From dfc1d1556c5f6e291aeed922cc943db5d35c9c7e Mon Sep 17 00:00:00 2001 From: leiqiaochu Date: Mon, 4 Sep 2023 19:15:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=95=B0=E6=8D=AE=E5=AD=97=E5=85=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/dictionary.ts | 21 ++- .../Dictionary/components/Export/index.vue | 97 ++++++++++++ .../system/Dictionary/components/Left.vue | 87 +++++++++-- .../components/Right/Save/index.vue | 139 +++++++++++------- .../Dictionary/components/Right/index.vue | 94 +++++++++++- 5 files changed, 372 insertions(+), 66 deletions(-) create mode 100644 src/views/system/Dictionary/components/Export/index.vue diff --git a/src/api/system/dictionary.ts b/src/api/system/dictionary.ts index 055d0c4b..451d1a24 100644 --- a/src/api/system/dictionary.ts +++ b/src/api/system/dictionary.ts @@ -5,6 +5,10 @@ import server, { request } from '@/utils/request'; */ export const getDicList = (data:any) => request.post('/dictionary/_query/no-paging',data) +/** + * 查询字典分页 + */ +export const getDic_page = (data:any) => request.post('/dictionary/_query',data) /** * 查询字典ID是否重复 */ @@ -28,4 +32,19 @@ export const queryDicItem = (data:any)=>request.post('/dictionary-item/_query',d /** * 保存字典项 */ -export const saveDicItem = (data:any) => request.patch('/dictionary-item',data) \ No newline at end of file +export const saveDicItem = (data:any) => request.patch('/dictionary-item',data) + +/** + * 删除字典项 + */ +export const deleteDicItem = (id:string) => request.delete(`/dictionary-item/${id}`) + +/** + * 校验字典项value唯一 + */ +export const verifyValue = (data:any) => request.post('/dictionary-item/_exists',data) + +/** + * 下载字典 + */ +export const downDic = (data:any) => request.post('/dictionary/detail/_query',data) \ No newline at end of file diff --git a/src/views/system/Dictionary/components/Export/index.vue b/src/views/system/Dictionary/components/Export/index.vue new file mode 100644 index 00000000..3ef863b2 --- /dev/null +++ b/src/views/system/Dictionary/components/Export/index.vue @@ -0,0 +1,97 @@ + + + + \ No newline at end of file diff --git a/src/views/system/Dictionary/components/Left.vue b/src/views/system/Dictionary/components/Left.vue index 29b2aeda..cebe5d15 100644 --- a/src/views/system/Dictionary/components/Left.vue +++ b/src/views/system/Dictionary/components/Left.vue @@ -6,9 +6,30 @@
- 新增字典 - 下载 - 导入 + + 新增字典 + + + + 下载 + + + + 导入 +
@@ -16,14 +37,31 @@ @@ -31,12 +69,15 @@
+ + - \ No newline at end of file + \ No newline at end of file diff --git a/src/views/system/Dictionary/components/Right/index.vue b/src/views/system/Dictionary/components/Right/index.vue index f8b8c8e1..3ba0cd80 100644 --- a/src/views/system/Dictionary/components/Right/index.vue +++ b/src/views/system/Dictionary/components/Right/index.vue @@ -24,25 +24,58 @@ 新增 + - +