From b2932091262392c1577f722d69341b988fe37066 Mon Sep 17 00:00:00 2001 From: zhang zhuo Date: Mon, 1 Dec 2025 16:25:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E5=85=B8=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/system.ts | 40 +++++++ {public => src/assets}/images/bg.jpg | Bin src/views/system/config/index.vue | 9 +- src/views/system/config/save.vue | 9 +- src/views/system/dict/index.vue | 124 +++++++++++++++++++++ src/views/system/dict/save.vue | 75 +++++++++++++ src/views/system/dict_data/index.vue | 155 +++++++++++++++++++++++++++ src/views/system/dict_data/save.vue | 103 ++++++++++++++++++ src/views/system/login/index.vue | 12 +-- 9 files changed, 516 insertions(+), 11 deletions(-) rename {public => src/assets}/images/bg.jpg (100%) create mode 100644 src/views/system/dict/index.vue create mode 100644 src/views/system/dict/save.vue create mode 100644 src/views/system/dict_data/index.vue create mode 100644 src/views/system/dict_data/save.vue diff --git a/src/api/model/system.ts b/src/api/model/system.ts index ab320f7..7e205b8 100644 --- a/src/api/model/system.ts +++ b/src/api/model/system.ts @@ -178,4 +178,44 @@ export default { return await http.get("system_config/option", data); }, }, + dict: { + list: async function (data = {}) { + return await http.get("dict/list", data); + }, + info: async function (data = {}) { + return await http.get("dict/list", data); + }, + add: async function (data = {}) { + return await http.post("dict/add", data); + }, + edit: async function (data = {}) { + return await http.put("dict/edit", data); + }, + del: async function (data = {}) { + return await http.delete("dict/del", data); + }, + option: async function (data = {}) { + return await http.get("dict/option", data); + }, + }, + dict_data: { + list: async function (data = {}) { + return await http.get("dict_data/list", data); + }, + info: async function (data = {}) { + return await http.get("dict_data/list", data); + }, + add: async function (data = {}) { + return await http.post("dict_data/add", data); + }, + edit: async function (data = {}) { + return await http.put("dict_data/edit", data); + }, + del: async function (data = {}) { + return await http.delete("dict_data/del", data); + }, + option: async function (data = {}) { + return await http.get("dict_data/option", data); + }, + }, } diff --git a/public/images/bg.jpg b/src/assets/images/bg.jpg similarity index 100% rename from public/images/bg.jpg rename to src/assets/images/bg.jpg diff --git a/src/views/system/config/index.vue b/src/views/system/config/index.vue index 78effc8..0aeb700 100644 --- a/src/views/system/config/index.vue +++ b/src/views/system/config/index.vue @@ -71,15 +71,18 @@ function add() { } //编辑 -async function edit(row) { +function edit(row) { dialogShow.value = true nextTick(() => { - dialogRef.value.open('edit', row) + if (row instanceof PointerEvent) { + row = selection.value[0] + } + dialogRef.value.open('edit', row || selection.value[0]) }) } //查看 -async function show(row) { +function show(row) { dialogShow.value = true nextTick(() => { dialogRef.value.open('show', row) diff --git a/src/views/system/config/save.vue b/src/views/system/config/save.vue index cd326e6..ea08a96 100644 --- a/src/views/system/config/save.vue +++ b/src/views/system/config/save.vue @@ -47,7 +47,14 @@ let form = ref({ config_value: null, remark: null }) -const rules = ref({}) +const rules = ref({ + config_name: [ + {required: true, message: '请填写参数名称'} + ], + config_key: [ + {required: true, message: '请填写参数键名'} + ] +}) function open(m = 'add', data = null) { mode.value = m diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue new file mode 100644 index 0000000..548de4a --- /dev/null +++ b/src/views/system/dict/index.vue @@ -0,0 +1,124 @@ + + + diff --git a/src/views/system/dict/save.vue b/src/views/system/dict/save.vue new file mode 100644 index 0000000..ca64e7e --- /dev/null +++ b/src/views/system/dict/save.vue @@ -0,0 +1,75 @@ + + + diff --git a/src/views/system/dict_data/index.vue b/src/views/system/dict_data/index.vue new file mode 100644 index 0000000..591b51d --- /dev/null +++ b/src/views/system/dict_data/index.vue @@ -0,0 +1,155 @@ + + + diff --git a/src/views/system/dict_data/save.vue b/src/views/system/dict_data/save.vue new file mode 100644 index 0000000..671dc0f --- /dev/null +++ b/src/views/system/dict_data/save.vue @@ -0,0 +1,103 @@ + + + diff --git a/src/views/system/login/index.vue b/src/views/system/login/index.vue index ebe21c8..2e632e2 100644 --- a/src/views/system/login/index.vue +++ b/src/views/system/login/index.vue @@ -1,6 +1,6 @@