From 86e8e69675bc9f4d7e14e5bb659c20377644f646 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Thu, 24 Oct 2024 13:20:57 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/system/dict/dictExample.ts | 24 ++++++------ frontend/src/views/system/dict/data.vue | 34 +++++------------ frontend/src/views/system/dict/index.vue | 42 +++++++-------------- 3 files changed, 36 insertions(+), 64 deletions(-) diff --git a/frontend/src/api/system/dict/dictExample.ts b/frontend/src/api/system/dict/dictExample.ts index bee602d..852ab4f 100644 --- a/frontend/src/api/system/dict/dictExample.ts +++ b/frontend/src/api/system/dict/dictExample.ts @@ -5,10 +5,10 @@ export const dictTypeList: Dict.ResDictType[] = [ id: "1", name: "用户性别", code: "EXAMPLE_CODE1", - sort: 1, + sort: 100, openLevel: 1, openDescribe: 1, - remark: "示例描述1221", + remark: "示例描述示例描述示例描述12231", state: 1, createBy: "admin", createTime: "2023-10-01 12:00:00", @@ -19,10 +19,10 @@ export const dictTypeList: Dict.ResDictType[] = [ id: "231", name: "菜单状态", code: "EXAMPLE_CODE2", - sort: 1, + sort: 100, openLevel: 1, openDescribe: 1, - remark: "示例描述11133", + remark: "示例描述示例描述示例描述11133", state: 0, createBy: "admin", createTime: "2023-10-01 12:00:00", @@ -33,10 +33,10 @@ export const dictTypeList: Dict.ResDictType[] = [ id: "33", name: "系统开关", code: "EXAMPLE_CODE3", - sort: 1, + sort: 100, openLevel: 1, openDescribe: 1, - remark: "示例描述111344", + remark: "示例描述示例描述示例描述11144", state: 1, createBy: "admin", createTime: "2023-10-01 12:00:00", @@ -51,7 +51,7 @@ export const dictDataList: Dict.ResDictData[] = [ typeId: "101", name: "字典项1", code: "EXAMPLE_00111", - sort: 1, + sort:100, level: 1, algoDescribe: null, value: "字典值1", @@ -66,7 +66,7 @@ export const dictDataList: Dict.ResDictData[] = [ typeId: "101", name: "字典项2", code: "EXAMPLE_00121", - sort: 1, + sort:100, level: 2, algoDescribe: null, value: "字典值2", @@ -81,7 +81,7 @@ export const dictDataList: Dict.ResDictData[] = [ typeId: "101", name: "字典项3", code: "EXAMPLE_00141", - sort: 1, + sort:100, level: 3, algoDescribe: null, value: "字典值3", @@ -96,7 +96,7 @@ export const dictDataList: Dict.ResDictData[] = [ typeId: "101", name: "字典项4", code: "EXAMPLE_00311", - sort: 1, + sort:100, level: null, algoDescribe: null, value: "字典值4", @@ -111,7 +111,7 @@ export const dictDataList: Dict.ResDictData[] = [ typeId: "101", name: "字典项5", code: "EXAMPLE_00341", - sort: 1, + sort:100, level: undefined, algoDescribe: null, value: "字典值5", @@ -126,7 +126,7 @@ export const dictDataList: Dict.ResDictData[] = [ typeId: "101", name: "字典项6", code: "EXAMPLE_00318", - sort: 1, + sort:100, level: 0, algoDescribe: null, value: "字典值6", diff --git a/frontend/src/views/system/dict/data.vue b/frontend/src/views/system/dict/data.vue index 23a624c..d62077b 100644 --- a/frontend/src/views/system/dict/data.vue +++ b/frontend/src/views/system/dict/data.vue @@ -34,14 +34,7 @@ - - - - - {{ - item.label - }} - + @@ -88,34 +81,28 @@ const columns = reactive[]>([ { prop: 'name', label: '名称', - width: 160, + width: 180, search: { - el: 'input', - props: { - placeholder: '请输入名称' - } + el: 'input' } }, { prop: 'code', label: '编码', - width: 160, + width: 180, search: { - el: 'input', - props: { - placeholder: '请输入编码' - } + el: 'input' } }, { prop: 'value', label: '值', - width: 160 + width: 180 }, { prop: 'level', label: '事件等级', - width: 100, + width: 150, render: scope => { return ( <> @@ -132,6 +119,7 @@ const columns = reactive[]>([ { prop: 'state', label: '状态', + minWidth: 100, enum: dictStore.getDictData('status'), search: { el: 'tree-select', @@ -175,8 +163,7 @@ function useCount() { name: "", code: "", value: "", - sort: 1, - state: 1, // 状态:0-删除 1-正常 + sort:100, }) return { dialogVisible, dialogType, dialogForm }; @@ -231,8 +218,7 @@ const close = () => { name: "", code: "", value: "", - sort: 1, - state: 1, + sort:100 } } diff --git a/frontend/src/views/system/dict/index.vue b/frontend/src/views/system/dict/index.vue index 9606fdb..b64aa57 100644 --- a/frontend/src/views/system/dict/index.vue +++ b/frontend/src/views/system/dict/index.vue @@ -1,6 +1,6 @@