From 944015484a4442682c64fb6a56d8756573c3d0ca Mon Sep 17 00:00:00 2001 From: gexinzhineng/gxzn27 <1348660141@qq.com> Date: Tue, 28 Mar 2023 11:27:08 +0800 Subject: [PATCH 1/5] =?UTF-8?q?1=E3=80=81=E9=85=8D=E5=90=88=E5=9C=B0?= =?UTF-8?q?=E5=8C=BA=E7=AE=A1=E7=90=86=E6=8E=A5=E5=8F=A3=E7=9A=84api?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=8C=E5=90=8E=E7=AB=AF=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=9B=B8=E5=BA=94=E5=AD=97=E6=AE=B5=E5=8F=AF=E4=BB=A5=E4=B8=8D?= =?UTF-8?q?=E8=A6=81=E6=AD=A4=E6=96=87=E4=BB=B6=202=E3=80=81=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E8=AE=BE=E6=96=BD/=E6=96=87=E4=BB=B6=E7=AE=A1?= =?UTF-8?q?=E7=90=86/=E6=96=87=E4=BB=B6=E5=88=97=E8=A1=A8=20=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=A4=B1=E8=B4=A5=E6=97=A0=E6=B3=95=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=8F=AA=E8=83=BD=E5=88=B7=E6=96=B0=E9=A1=B5=E9=9D=A2=E6=89=8D?= =?UTF-8?q?=E8=83=BD=E4=B8=8A=E4=BC=A0bug=203=E3=80=81=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E8=AE=BE=E6=96=BD/=E6=96=87=E4=BB=B6=E7=AE=A1=E7=90=86/?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=88=97=E8=A1=A8=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=98=AF=E4=B8=8B=E6=8B=89=E6=A1=86=E6=98=BE=E7=A4=BA0=20?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=BAnull?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/infra/fileConfig/index.ts | 2 +- src/config/axios/request.ts | 50 ++++++++++++++++++++++++++++ src/views/infra/fileConfig/index.vue | 4 +-- src/views/infra/fileList/index.vue | 6 +++- 4 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 src/config/axios/request.ts diff --git a/src/api/infra/fileConfig/index.ts b/src/api/infra/fileConfig/index.ts index 2151141c..9a4f625c 100644 --- a/src/api/infra/fileConfig/index.ts +++ b/src/api/infra/fileConfig/index.ts @@ -16,7 +16,7 @@ export interface FileClientConfig { export interface FileConfigVO { id: number name: string - storage: number + storage: any master: boolean visible: boolean config: FileClientConfig diff --git a/src/config/axios/request.ts b/src/config/axios/request.ts new file mode 100644 index 00000000..d65842c2 --- /dev/null +++ b/src/config/axios/request.ts @@ -0,0 +1,50 @@ +import { service } from './service' + +import { config } from './config' + +const { default_headers } = config + +const request = (option: any) => { + const { url, method, params, data, headersType, responseType } = option + return service({ + url: url, + method, + params, + data, + responseType: responseType, + headers: { + 'Content-Type': headersType || default_headers + } + }) +} +export default { + get: async (option: any) => { + const res = await request({ method: 'GET', ...option }) + return res as unknown as T + }, + post: async (option: any) => { + const res = await request({ method: 'POST', ...option }) + return res as unknown as T + }, + delete: async (option: any) => { + const res = await request({ method: 'DELETE', ...option }) + return res as unknown as T + }, + put: async (option: any) => { + const res = await request({ method: 'PUT', ...option }) + return res as unknown as T + }, + patch: async (option: any) => { + const res = await request({ method: 'PATCH', ...option }) + return res as unknown as T + }, + download: async (option: any) => { + const res = await request({ method: 'GET', responseType: 'blob', ...option }) + return res as unknown as Promise + }, + upload: async (option: any) => { + option.headersType = 'multipart/form-data' + const res = await request({ method: 'POST', ...option }) + return res as unknown as Promise + } +} diff --git a/src/views/infra/fileConfig/index.vue b/src/views/infra/fileConfig/index.vue index 9d796a65..bd9a978a 100644 --- a/src/views/infra/fileConfig/index.vue +++ b/src/views/infra/fileConfig/index.vue @@ -183,7 +183,7 @@ const detailData = ref() // 详情 Ref const form = ref({ id: 0, name: '', - storage: 0, + storage: null, master: false, visible: false, config: { @@ -216,7 +216,7 @@ const handleCreate = (formEl: FormInstance | undefined) => { form.value = { id: 0, name: '', - storage: 0, + storage: null, master: false, visible: false, config: { diff --git a/src/views/infra/fileList/index.vue b/src/views/infra/fileList/index.vue index cda8b68d..b9bfb815 100644 --- a/src/views/infra/fileList/index.vue +++ b/src/views/infra/fileList/index.vue @@ -59,6 +59,7 @@ :on-exceed="handleExceed" :on-success="handleFileSuccess" :on-error="excelUploadError" + :before-remove="beforeRemove" :auto-upload="false" accept=".jpg, .png, .gif" > @@ -82,7 +83,7 @@ diff --git a/src/views/infra/config/index.vue b/src/views/infra/config/index.vue index e75b09da..b2bc8a8b 100644 --- a/src/views/infra/config/index.vue +++ b/src/views/infra/config/index.vue @@ -1,203 +1,185 @@ diff --git a/src/views/system/mail/log/log.data.ts b/src/views/system/mail/log/log.data.ts index d389bce5..f01cb549 100644 --- a/src/views/system/mail/log/log.data.ts +++ b/src/views/system/mail/log/log.data.ts @@ -114,7 +114,8 @@ const crudSchemas = reactive({ { title: '创建时间', field: 'createTime', - isTable: false + isTable: false, + formatter: 'formatDate' } ] }) diff --git a/src/views/system/tenantPackage/tenantPackage.data.ts b/src/views/system/tenantPackage/tenantPackage.data.ts index 47db56d4..d57dee29 100644 --- a/src/views/system/tenantPackage/tenantPackage.data.ts +++ b/src/views/system/tenantPackage/tenantPackage.data.ts @@ -43,7 +43,7 @@ const crudSchemas = reactive({ { title: t('form.remark'), field: 'remark', - isTable: false, + isTable: true, isSearch: true, form: { component: 'Input', From ffd2b5b8eee96c95bc379ae9dbe1992f6b6bcbd9 Mon Sep 17 00:00:00 2001 From: gexinzhineng/gxzn27 <1348660141@qq.com> Date: Tue, 28 Mar 2023 16:10:07 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86/?= =?UTF-8?q?=E7=A7=9F=E6=88=B7=E7=AE=A1=E7=90=86/=E7=A7=9F=E6=88=B7?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=96=B0=E5=A2=9E=E6=97=B6=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E9=A2=9D=E5=BA=A6=E9=BB=98=E8=AE=A4=E4=B8=BA1=20=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=AE=A1=E7=90=86=E4=B8=8D=E9=80=89=E6=8B=A9=E6=80=A7?= =?UTF-8?q?=E5=88=AB=20=E4=BF=AE=E6=94=B9=E6=97=B6=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=A1=86=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/tenant/tenant.data.ts | 6 +++++- src/views/system/user/index.vue | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/system/tenant/tenant.data.ts b/src/views/system/tenant/tenant.data.ts index 1137b44a..4d9e6d33 100644 --- a/src/views/system/tenant/tenant.data.ts +++ b/src/views/system/tenant/tenant.data.ts @@ -143,7 +143,11 @@ const crudSchemas = reactive({ } }, form: { - component: 'InputNumber' + component: 'InputNumber', + value: null, + componentProps: { + min: 0 + } } }, { diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 2f9ba9b0..c59e6d18 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -394,6 +394,7 @@ const handleUpdate = async (rowId: number) => { unref(formRef)?.delSchema('password') // 设置数据 const res = await UserApi.getUserApi(rowId) + if (res.sex == 0) res.sex = null unref(formRef)?.setValues(res) } const detailData = ref() From 46fc6ce1b7a23e5f9fb9cf02af15fd3cd97d6849 Mon Sep 17 00:00:00 2001 From: gexinzhineng/gxzn27 <1348660141@qq.com> Date: Tue, 28 Mar 2023 17:24:20 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=9C=80=E5=B0=8F=E5=80=BC=E4=B8=BA0?= =?UTF-8?q?=E4=BC=9A=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/tenant/tenant.data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/system/tenant/tenant.data.ts b/src/views/system/tenant/tenant.data.ts index 4d9e6d33..2c1e846a 100644 --- a/src/views/system/tenant/tenant.data.ts +++ b/src/views/system/tenant/tenant.data.ts @@ -146,7 +146,7 @@ const crudSchemas = reactive({ component: 'InputNumber', value: null, componentProps: { - min: 0 + min: 1 } } }, From 0503b7d0780dc8b616b13cb5ebc2cdd71472d5c9 Mon Sep 17 00:00:00 2001 From: gexinzhineng/gxzn27 <1348660141@qq.com> Date: Tue, 28 Mar 2023 18:00:18 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=96=B0=E7=9A=84=E7=A7=9F=E6=88=B7?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E9=80=89=E6=8B=A9=E5=B2=97=E4=BD=8D=E6=89=8D?= =?UTF-8?q?=E8=83=BD=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=9A=82=E5=B0=86=E5=85=B6?= =?UTF-8?q?=E8=AE=BE=E6=88=90=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/user.data.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/system/user/user.data.ts b/src/views/system/user/user.data.ts index 3a702c04..7f7384eb 100644 --- a/src/views/system/user/user.data.ts +++ b/src/views/system/user/user.data.ts @@ -28,6 +28,7 @@ export const rules = reactive({ } ], status: [required], + postIds: [{ required: true, message: '请选择岗位', trigger: ['blur', 'change'] }], mobile: [ required, {