diff --git a/src/components/custom/file-upload.vue b/src/components/custom/file-upload.vue new file mode 100644 index 00000000..8bc1dff3 --- /dev/null +++ b/src/components/custom/file-upload.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index dbd6b1d1..9076000d 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -25,6 +25,7 @@ const local: App.I18n.Schema = { deleteSuccess: 'Delete Success', confirmDelete: 'Are you sure you want to delete?', edit: 'Edit', + download: 'Download', warning: 'Warning', error: 'Error', index: 'Index', @@ -182,7 +183,8 @@ const local: App.I18n.Schema = { 'monitor_oper-log': 'Operate Log', system_client: 'Client Management', system_notice: 'Notice Management', - 'social-callback': 'Social Callback' + 'social-callback': 'Social Callback', + system_oss: 'File Management' }, page: { login: { diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index 6b3dbe6a..377bf5e0 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -25,6 +25,7 @@ const local: App.I18n.Schema = { deleteSuccess: '删除成功', confirmDelete: '确认删除吗?', edit: '编辑', + download: '下载', warning: '警告', error: '错误', index: '序号', @@ -182,7 +183,8 @@ const local: App.I18n.Schema = { 'monitor_oper-log': '操作日志', system_client: '客户端管理', system_notice: '通知公告', - 'social-callback': '单点登录回调' + 'social-callback': '单点登录回调', + system_oss: '文件管理' }, page: { login: { diff --git a/src/service/api/system/config.ts b/src/service/api/system/config.ts index c8548f1a..4eb3bf53 100644 --- a/src/service/api/system/config.ts +++ b/src/service/api/system/config.ts @@ -35,6 +35,15 @@ export function fetchUpdateConfig(data: Api.System.ConfigOperateParams) { }); } +/** 根据Key修改值 */ +export function fetchUpdateConfigByKey(data: Api.System.ConfigOperateParams) { + return request({ + url: '/system/config/updateByKey', + method: 'put', + data + }); +} + /** 批量删除参数配置 */ export function fetchBatchDeleteConfig(configIds: CommonType.IdType[]) { return request({ diff --git a/src/typings/api/system.api.d.ts b/src/typings/api/system.api.d.ts index 148c4ff1..0c427c96 100644 --- a/src/typings/api/system.api.d.ts +++ b/src/typings/api/system.api.d.ts @@ -623,13 +623,15 @@ declare namespace Api { fileName: string; /** 原名 */ originalName: string; - /** 后缀名 */ + /** 文件后缀名 */ fileSuffix: string; - /** 文件预览 */ + /** URL地址 */ url: string; + /** 扩展属性 */ + ext1: string; /** 服务商 */ service: string; - /** 创建者 */ + /** 创建者名称 */ createByName: string; }>; @@ -637,6 +639,7 @@ declare namespace Api { type OssSearchParams = CommonType.RecordNullable< Pick & Api.Common.CommonSearchParams >; + /** oss list */ type OssList = Api.Common.PaginatingQueryRecord; } diff --git a/src/typings/app.d.ts b/src/typings/app.d.ts index 16967299..5bef9891 100644 --- a/src/typings/app.d.ts +++ b/src/typings/app.d.ts @@ -319,6 +319,7 @@ declare namespace App { deleteSuccess: string; confirmDelete: string; edit: string; + download: string; warning: string; error: string; index: string; diff --git a/src/typings/components.d.ts b/src/typings/components.d.ts index ae66ac78..8b8bb997 100644 --- a/src/typings/components.d.ts +++ b/src/typings/components.d.ts @@ -22,6 +22,7 @@ declare module 'vue' { DictSelect: typeof import('./../components/custom/dict-select.vue')['default'] DictTag: typeof import('./../components/custom/dict-tag.vue')['default'] ExceptionBase: typeof import('./../components/common/exception-base.vue')['default'] + FileUpload: typeof import('./../components/custom/file-upload.vue')['default'] FormTip: typeof import('./../components/custom/form-tip.vue')['default'] FullScreen: typeof import('./../components/common/full-screen.vue')['default'] IconAntDesignEnterOutlined: typeof import('~icons/ant-design/enter-outlined')['default'] @@ -30,10 +31,13 @@ declare module 'vue' { IconEpCopyDocument: typeof import('~icons/ep/copy-document')['default'] IconGridiconsFullscreen: typeof import('~icons/gridicons/fullscreen')['default'] IconGridiconsFullscreenExit: typeof import('~icons/gridicons/fullscreen-exit')['default'] + 'IconHugeicons:configuration01': typeof import('~icons/hugeicons/configuration01')['default'] 'IconIc:roundPlus': typeof import('~icons/ic/round-plus')['default'] IconIcRoundDelete: typeof import('~icons/ic/round-delete')['default'] IconIcRoundDownload: typeof import('~icons/ic/round-download')['default'] IconIcRoundEdit: typeof import('~icons/ic/round-edit')['default'] + IconIcRoundFileUpload: typeof import('~icons/ic/round-file-upload')['default'] + IconIcRoundImage: typeof import('~icons/ic/round-image')['default'] IconIcRoundPlus: typeof import('~icons/ic/round-plus')['default'] IconIcRoundRefresh: typeof import('~icons/ic/round-refresh')['default'] IconIcRoundRemove: typeof import('~icons/ic/round-remove')['default'] @@ -87,6 +91,7 @@ declare module 'vue' { NGi: typeof import('naive-ui')['NGi'] NGrid: typeof import('naive-ui')['NGrid'] NGridItem: typeof import('naive-ui')['NGridItem'] + NImage: typeof import('naive-ui')['NImage'] NInput: typeof import('naive-ui')['NInput'] NInputGroup: typeof import('naive-ui')['NInputGroup'] NInputGroupLabel: typeof import('naive-ui')['NInputGroupLabel'] @@ -101,6 +106,7 @@ declare module 'vue' { NMessageProvider: typeof import('naive-ui')['NMessageProvider'] NModal: typeof import('naive-ui')['NModal'] NNotificationProvider: typeof import('naive-ui')['NNotificationProvider'] + NP: typeof import('naive-ui')['NP'] NPopconfirm: typeof import('naive-ui')['NPopconfirm'] NPopover: typeof import('naive-ui')['NPopover'] NRadio: typeof import('naive-ui')['NRadio'] @@ -119,10 +125,13 @@ declare module 'vue' { NTabPane: typeof import('naive-ui')['NTabPane'] NTabs: typeof import('naive-ui')['NTabs'] NTag: typeof import('naive-ui')['NTag'] + NText: typeof import('naive-ui')['NText'] NThing: typeof import('naive-ui')['NThing'] NTooltip: typeof import('naive-ui')['NTooltip'] NTree: typeof import('naive-ui')['NTree'] NTreeSelect: typeof import('naive-ui')['NTreeSelect'] + NUpload: typeof import('naive-ui')['NUpload'] + NUploadDragger: typeof import('naive-ui')['NUploadDragger'] NWatermark: typeof import('naive-ui')['NWatermark'] PinToggler: typeof import('./../components/common/pin-toggler.vue')['default'] PostSelect: typeof import('./../components/custom/post-select.vue')['default'] diff --git a/src/views/home/index.vue b/src/views/home/index.vue index d2dd4008..2d8e5dbd 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -1,46 +1,7 @@ - + diff --git a/src/views/system/oss/index.vue b/src/views/system/oss/index.vue index e95830ec..5bc9a2fd 100644 --- a/src/views/system/oss/index.vue +++ b/src/views/system/oss/index.vue @@ -1,25 +1,30 @@ - + diff --git a/src/views/system/oss/modules/oss-search.vue b/src/views/system/oss/modules/oss-search.vue index 56be83e6..de183253 100644 --- a/src/views/system/oss/modules/oss-search.vue +++ b/src/views/system/oss/modules/oss-search.vue @@ -1,6 +1,7 @@ @@ -32,7 +40,7 @@ async function search() { - + @@ -40,13 +48,21 @@ async function search() { - - + + - + + + +