From 35f8cced0094fdfe19e96e5780a094521fdb8cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=B2=E4=B9=88=E4=BA=86?= Date: Thu, 25 Jan 2024 16:42:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E5=85=B8=E6=A0=91ok?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system-boot/dic.ts | 18 ++- src/views/auth/role/index.vue | 19 +++- .../setting/statisticalType/binding.vue | 8 +- .../govern/setting/statisticalType/index.vue | 4 +- src/views/setting/dictionary/list/index.vue | 20 ++-- src/views/setting/dictionary/tree/index.vue | 106 ++++++++++++++++-- .../setting/dictionary/tree/popupForm.vue | 83 ++++++++++++++ types/table.d.ts | 2 +- 8 files changed, 225 insertions(+), 35 deletions(-) create mode 100644 src/views/setting/dictionary/tree/popupForm.vue diff --git a/src/api/system-boot/dic.ts b/src/api/system-boot/dic.ts index 24d5dc2..153a0ca 100644 --- a/src/api/system-boot/dic.ts +++ b/src/api/system-boot/dic.ts @@ -1,6 +1,6 @@ import createAxios from '@/utils/request' -export const deleteStatistical = (id) => { +export const dicDelete = (id: string) => { let form = new FormData() form.append('id', id) return createAxios({ @@ -12,3 +12,19 @@ export const deleteStatistical = (id) => { data: form }) } + +export function dicAdd(data: any) { + return createAxios({ + url: '/system-boot/dic/add', + method: 'post', + data: data + }) +} + +export function dicUpdate(data: any) { + return createAxios({ + url: '/system-boot/dic/update', + method: 'put', + data: data + }) +} \ No newline at end of file diff --git a/src/views/auth/role/index.vue b/src/views/auth/role/index.vue index 89fc496..7fb58c8 100644 --- a/src/views/auth/role/index.vue +++ b/src/views/auth/role/index.vue @@ -18,7 +18,7 @@ > - + \ No newline at end of file +const addMenu = () => { + popupFormRef.value.open('新增字典类型') +} + diff --git a/src/views/setting/dictionary/tree/popupForm.vue b/src/views/setting/dictionary/tree/popupForm.vue new file mode 100644 index 0000000..5367ec8 --- /dev/null +++ b/src/views/setting/dictionary/tree/popupForm.vue @@ -0,0 +1,83 @@ + + diff --git a/types/table.d.ts b/types/table.d.ts index 7430c77..f86be46 100644 --- a/types/table.d.ts +++ b/types/table.d.ts @@ -77,7 +77,7 @@ declare global { interface OptButton { // 渲染方式:tipButton=带tip的按钮,confirmButton=带确认框的按钮,moveButton=移动按钮,basicButton=普通按钮 render: 'tipButton' | 'confirmButton' | 'moveButton' | 'basicButton' - name: string + name?: string title?: string text?: string class?: string