From 546696d86afc88faf6ea966a2b058a771c3ae490 Mon Sep 17 00:00:00 2001
From: caozehui <2427765068@qq.com>
Date: Thu, 31 Oct 2024 19:48:38 +0800
Subject: [PATCH] =?UTF-8?q?dictData=E6=9C=AA=E6=8B=86=E5=88=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../api/system/dictionary/dictData/index.ts | 28 +++
frontend/src/views/system/dictionary/data.vue | 223 ++++++++----------
.../dictData/components/dataPopup.vue | 6 +
.../system/dictionary/dictData/index.vue | 9 +
.../dictType/components/typePopup.vue | 12 +
.../system/dictionary/dictType/index.vue | 25 +-
6 files changed, 157 insertions(+), 146 deletions(-)
create mode 100644 frontend/src/views/system/dictionary/dictData/components/dataPopup.vue
diff --git a/frontend/src/api/system/dictionary/dictData/index.ts b/frontend/src/api/system/dictionary/dictData/index.ts
index e69de29..bee0146 100644
--- a/frontend/src/api/system/dictionary/dictData/index.ts
+++ b/frontend/src/api/system/dictionary/dictData/index.ts
@@ -0,0 +1,28 @@
+import http from '@/api'
+import {type Dict} from '@/api/system/dictionary/interface'
+
+//获取字典数据
+export const getDictDataListByTypeId = (params: Dict.ReqDictDataParams) => {
+ return http.post(`/dictData/listByTypeId`, params)
+}
+
+//添加字典数据
+export const addDictData = (params: Dict.ResDictData) => {
+ return http.post(`/dictData/add`, params)
+}
+
+//编辑字典数据
+export const updateDictData = (params: Dict.ResDictData) => {
+ return http.post(`/dictData/update`, params)
+}
+
+//删除字典数据
+export const deleteDictData = (params: string[]) => {
+ return http.post(`/dictData/delete`, params)
+}
+
+export const getDicDataById = (params: string) => {
+ return http.post('/dictData/getDicDataById', params)
+}
+
+
diff --git a/frontend/src/views/system/dictionary/data.vue b/frontend/src/views/system/dictionary/data.vue
index 2546342..873fbe3 100644
--- a/frontend/src/views/system/dictionary/data.vue
+++ b/frontend/src/views/system/dictionary/data.vue
@@ -1,14 +1,15 @@
-
-
+
+
新增
批量添加
导出
+ @click="batchDelete(scope.selectedListIds)">
批量删除
@@ -18,25 +19,26 @@
删除
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -52,25 +54,24 @@
\ No newline at end of file
diff --git a/frontend/src/views/system/dictionary/dictData/index.vue b/frontend/src/views/system/dictionary/dictData/index.vue
index e69de29..7a7423f 100644
--- a/frontend/src/views/system/dictionary/dictData/index.vue
+++ b/frontend/src/views/system/dictionary/dictData/index.vue
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/views/system/dictionary/dictType/components/typePopup.vue b/frontend/src/views/system/dictionary/dictType/components/typePopup.vue
index ea60098..f6364e5 100644
--- a/frontend/src/views/system/dictionary/dictType/components/typePopup.vue
+++ b/frontend/src/views/system/dictionary/dictType/components/typePopup.vue
@@ -8,6 +8,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/system/dictionary/dictType/index.vue b/frontend/src/views/system/dictionary/dictType/index.vue
index 29aed39..d97df93 100644
--- a/frontend/src/views/system/dictionary/dictType/index.vue
+++ b/frontend/src/views/system/dictionary/dictType/index.vue
@@ -68,35 +68,12 @@ const columns = reactive[]>([
{
prop: 'remark',
label: '描述',
- width: 340,
- },
- {
- prop: 'state',
- label: '状态',
- enum: dictStore.getDictData('status'),
- search: {
- el: 'tree-select',
- props: { filterable: true },
- },
- fieldNames: { label: 'label', value: 'code' },
- render: scope => {
- return (
- <>
- {
- {scope.row.state ? '正常' : '禁用'}
- }
- >
- )
- },
+ minWidth: 300,
},
{
prop: 'createTime',
label: '创建时间',
width: 180,
- search: {
- el: 'date-picker',
- props: { type: 'daterange', valueFormat: 'YYYY-MM-DD' },
- },
},
{
prop: 'operation',