diff --git a/components.d.ts b/components.d.ts index 0d297f0..f05428b 100644 --- a/components.d.ts +++ b/components.d.ts @@ -79,5 +79,6 @@ declare module '@vue/runtime-core' { TableEdit: typeof import('./src/components/table-edit.vue')['default'] TableSearch: typeof import('./src/components/table-search.vue')['default'] Tabs: typeof import('./src/components/tabs.vue')['default'] + UploadFile: typeof import('./src/components/upload-file.vue')['default'] } } diff --git a/src/components/table-custom.vue b/src/components/table-custom.vue index 894d53e..363aafa 100644 --- a/src/components/table-custom.vue +++ b/src/components/table-custom.vue @@ -59,6 +59,9 @@ {{item.operate.push.label}} + + {{item.operate.gen.label}} + {{ item.formatter(row[item.prop]) }} @@ -147,7 +150,11 @@ const props = defineProps({ changePage: { type: Function, default: () => { } - } + }, + genOperate: { + type: Function, + default: () => { } + }, }) let { @@ -199,6 +206,13 @@ const handlePush = (row) => { .catch(() => { }); }; +const handleGen = (row) => { + async () => { + console.log("gen row:", row); + props.genOperate(row); + } +}; + const getIndex = (index: number) => { return index + 1 + (currentPage.value - 1) * pageSize.value } diff --git a/src/components/table-search.vue b/src/components/table-search.vue index 50b6a73..3bd8cbb 100644 --- a/src/components/table-search.vue +++ b/src/components/table-search.vue @@ -14,7 +14,7 @@ 搜索 - 重置 + 重置 @@ -38,6 +38,10 @@ const props = defineProps({ search: { type: Function, default: () => { } + }, + refresh: { + type: Function, + default: () => { } } }); diff --git a/src/components/upload-file.vue b/src/components/upload-file.vue new file mode 100644 index 0000000..8e5563e --- /dev/null +++ b/src/components/upload-file.vue @@ -0,0 +1,94 @@ + + + + + diff --git a/src/store/permiss.ts b/src/store/permiss.ts index 5970d3f..fbeacd8 100644 --- a/src/store/permiss.ts +++ b/src/store/permiss.ts @@ -12,7 +12,7 @@ export const usePermissStore = defineStore('permiss', { defaultList: { admin: [ '0', - '1', + '1', //系统管理 '11', //用户管理 '12', '13', @@ -54,7 +54,7 @@ export const usePermissStore = defineStore('permiss', { '55', //提示词生成 '56', //文件管理 ], - user: ['0', '8', '7','9', '61','53'], + user: ['0', '1' ,'8', '7','9', '61','53','51','56'], }, }; }, diff --git a/src/types/file.ts b/src/types/file.ts index 1f607b7..3b79590 100644 --- a/src/types/file.ts +++ b/src/types/file.ts @@ -1,6 +1,12 @@ export interface File { - name: string; - size: number; - type: string; - lastModified: number; -} \ No newline at end of file + ID: number; + CreatedAt: string; + UpdatedAt: string; + DeletedAt: string; + UserFileName: string; + UploadType: string; + IsPrivate: boolean; + file_store_name: string; +} + +export const fileUrl ="https://pm.ljsea.top/file/"; \ No newline at end of file diff --git a/src/views/system/function.vue b/src/views/system/function.vue index e37e740..70819b3 100644 --- a/src/views/system/function.vue +++ b/src/views/system/function.vue @@ -1,9 +1,9 @@