From 956ab62df477b4b211ab9291c8b6e4dd0d476a0f Mon Sep 17 00:00:00 2001 From: wangxiang <1827945911@qq.com> Date: Mon, 9 May 2022 00:21:14 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=A3=20=E7=BC=96=E5=86=99=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E6=A8=A1=E5=9D=97=E5=AD=97=E5=85=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/system/dict/DictDataModal.vue | 4 ++- .../src/views/system/dict/DictDataTable.vue | 26 ++++++++++++------- .../src/views/system/dict/dictdata.data.ts | 8 +++--- kicc-ui/src/views/system/dict/index.vue | 3 ++- kicc-ui/src/views/system/role/RoleDrawer.vue | 2 +- 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/kicc-ui/src/views/system/dict/DictDataModal.vue b/kicc-ui/src/views/system/dict/DictDataModal.vue index 8783fe9b..3b8e446a 100644 --- a/kicc-ui/src/views/system/dict/DictDataModal.vue +++ b/kicc-ui/src/views/system/dict/DictDataModal.vue @@ -36,16 +36,18 @@ await clearValidate(); // 处理设置数据 tag.value = data._tag; + const dictType = data.dictType; const dictDataId = data.record?.id; const props: Partial = { confirmLoading: false }; // 采用tag标签区分操作 switch (unref(tag)) { case 'add': props.title = '新增字典数据'; + await setFieldsValue({ dictType }); break; case 'edit': props.title = '编辑字典数据'; - await setFieldsValue(await getDictData(dictDataId)); + await setFieldsValue( Object.assign({}, { dictType }, await getDictData(dictDataId))); break; } // 尾部:设置处理后的最终配置数据 diff --git a/kicc-ui/src/views/system/dict/DictDataTable.vue b/kicc-ui/src/views/system/dict/DictDataTable.vue index a7b25e94..d46663f3 100644 --- a/kicc-ui/src/views/system/dict/DictDataTable.vue +++ b/kicc-ui/src/views/system/dict/DictDataTable.vue @@ -7,9 +7,15 @@ +