From 56f4a0ef63eb3d9d4ac9ea8f16bbd7dbc7a5b043 Mon Sep 17 00:00:00 2001 From: DaxPay Date: Mon, 28 Oct 2024 11:47:34 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E7=B3=BB=E7=BB=9F=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=88=B0MySQL8=E4=BF=9D=E7=95=99=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/baseapi/param/SystemParam.api.ts | 2 +- src/views/baseapi/param/SystemParamEdit.vue | 19 +++++++++++++------ src/views/baseapi/param/SystemParamList.vue | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/views/baseapi/param/SystemParam.api.ts b/src/views/baseapi/param/SystemParam.api.ts index 54465fe1..b5205182 100644 --- a/src/views/baseapi/param/SystemParam.api.ts +++ b/src/views/baseapi/param/SystemParam.api.ts @@ -83,7 +83,7 @@ export interface SystemParam extends BaseEntity { // 参数名称 name?: string // 参数键名 - key?: string + paramKey?: string // 参数值 value?: string // 参数类型 diff --git a/src/views/baseapi/param/SystemParamEdit.vue b/src/views/baseapi/param/SystemParamEdit.vue index aefbf389..c393d19e 100644 --- a/src/views/baseapi/param/SystemParamEdit.vue +++ b/src/views/baseapi/param/SystemParamEdit.vue @@ -29,7 +29,7 @@ @@ -112,14 +112,14 @@ formEditType, } = useFormEdit() const { existsByServer } = useValidate() - const { dictDropDownNumber } = useDict() + const { dictDropDown } = useDict() // 表单 const formRef = ref() let form = ref({ id: null, name: '', - key: '', + paramKey: '', value: '', enable: true, type: undefined, @@ -145,7 +145,7 @@ initFormEditType(editType) resetForm() getInfo(id, editType) - dictDropDownNumber('ParamType').then((res) => (paramTypeList.value = res)) + dictDropDown('ParamType').then((res) => (paramTypeList.value = res)) } // 获取信息 function getInfo(id, editType: FormEditType) { @@ -181,8 +181,15 @@ } // 校验key值 async function validateKey() { - const { key, id } = form.value - return existsByServer(key, id, formEditType.value, existsByKey, existsByKeyNotId, '该Key已存在') + const { paramKey, id } = form.value + return existsByServer( + paramKey, + id, + formEditType.value, + existsByKey, + existsByKeyNotId, + '该Key已存在', + ) } defineExpose({ init, diff --git a/src/views/baseapi/param/SystemParamList.vue b/src/views/baseapi/param/SystemParamList.vue index 5b02a430..91b83886 100644 --- a/src/views/baseapi/param/SystemParamList.vue +++ b/src/views/baseapi/param/SystemParamList.vue @@ -28,7 +28,7 @@ > - +