From 0feebcd5ba9732ee4939ea2161cc7849a7e8f342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=B2=E4=B9=88=E4=BA=86?= Date: Mon, 15 Jan 2024 16:15:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=87=E6=A0=87=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system-boot/csstatisticalset.ts | 23 ++ src/api/system-boot/dic.ts | 14 + src/api/system-boot/dictTree.ts | 21 ++ src/utils/tableStore.ts | 2 +- src/views/auth/menu/index.vue | 5 +- src/views/govern/analyze/DVR/index.vue | 2 +- .../govern/setting/statisticalType/add.vue | 87 ++++++ .../setting/statisticalType/binding.vue | 295 ++++++++++++++++++ .../govern/setting/statisticalType/index.vue | 70 +++-- .../setting/statisticalType/popupForm.vue | 103 ------ tsconfig.json | 1 + types/global.d.ts | 9 + 12 files changed, 505 insertions(+), 127 deletions(-) create mode 100644 src/api/system-boot/csstatisticalset.ts create mode 100644 src/api/system-boot/dic.ts create mode 100644 src/views/govern/setting/statisticalType/add.vue create mode 100644 src/views/govern/setting/statisticalType/binding.vue delete mode 100644 src/views/govern/setting/statisticalType/popupForm.vue diff --git a/src/api/system-boot/csstatisticalset.ts b/src/api/system-boot/csstatisticalset.ts new file mode 100644 index 0000000..c3d8b36 --- /dev/null +++ b/src/api/system-boot/csstatisticalset.ts @@ -0,0 +1,23 @@ +import createAxios from '@/utils/request' +// 查询指标 +export const queryStatistical = (id:string) => { + let form = new FormData() + form.append('id', id) + return createAxios({ + url: '/system-boot/csstatisticalset/queryStatistical', + method: 'post', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + data: form + }) +} + +// 绑定指标 +export const addStatistical = (params:any) => { + return createAxios({ + url: '/system-boot/csstatisticalset/addStatistical', + method: 'post', + data: params + }) +} diff --git a/src/api/system-boot/dic.ts b/src/api/system-boot/dic.ts new file mode 100644 index 0000000..24d5dc2 --- /dev/null +++ b/src/api/system-boot/dic.ts @@ -0,0 +1,14 @@ +import createAxios from '@/utils/request' + +export const deleteStatistical = (id) => { + let form = new FormData() + form.append('id', id) + return createAxios({ + url: '/system-boot/dic/delete', + method: 'DELETE', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + data: form + }) +} diff --git a/src/api/system-boot/dictTree.ts b/src/api/system-boot/dictTree.ts index ca98002..2c45b88 100644 --- a/src/api/system-boot/dictTree.ts +++ b/src/api/system-boot/dictTree.ts @@ -1,4 +1,5 @@ import createAxios from '@/utils/request' + // 字典树接口 export function queryByCode(code: string) { let form = new FormData() @@ -40,3 +41,23 @@ export function queryByid(id: string) { data: form }) } + + +//新增字典树数据 +export const addDictTree = (data: any) => { + return createAxios({ + url: '/system-boot/dictTree/add', + method: 'post', + data: data + }) +} + + +// 编辑统计指标配置项 +export const updateStatistical = (data) => { + return createAxios({ + url: '/system-boot/dic/update', + method: 'PUT', + data: data + }) +} diff --git a/src/utils/tableStore.ts b/src/utils/tableStore.ts index 3fd58c2..333d892 100644 --- a/src/utils/tableStore.ts +++ b/src/utils/tableStore.ts @@ -47,7 +47,7 @@ export default class TableStore { this.isWebPaging = options.isWebPaging || false this.method = options.method || 'GET' this.table.column = options.column - this.showPage = options.showPage || true + this.showPage = options.showPage === false ? false : true this.table.publicHeight = options.publicHeight || 0 this.table.resetCallback = options.resetCallback || null this.table.loadCallback = options.loadCallback || null diff --git a/src/views/auth/menu/index.vue b/src/views/auth/menu/index.vue index 218c37c..cfc1a95 100644 --- a/src/views/auth/menu/index.vue +++ b/src/views/auth/menu/index.vue @@ -2,10 +2,10 @@
- +
@@ -26,6 +26,7 @@ const tableRef = ref() const popupRef = ref() const navTabs = useNavTabs() const tableStore = new TableStore({ + showPage: false, url: '/user-boot/function/functionTree', column: [ { title: '菜单名称', field: 'title', align: 'left', treeNode: true }, diff --git a/src/views/govern/analyze/DVR/index.vue b/src/views/govern/analyze/DVR/index.vue index 67013e6..5496e15 100644 --- a/src/views/govern/analyze/DVR/index.vue +++ b/src/views/govern/analyze/DVR/index.vue @@ -35,7 +35,7 @@ const tableStore = new TableStore({ buttons: [ { name: 'edit', - text: '波形分析', + title: '波形分析', type: 'primary', icon: 'el-icon-DataLine', render: 'tipButton', diff --git a/src/views/govern/setting/statisticalType/add.vue b/src/views/govern/setting/statisticalType/add.vue new file mode 100644 index 0000000..39ba7b3 --- /dev/null +++ b/src/views/govern/setting/statisticalType/add.vue @@ -0,0 +1,87 @@ + + diff --git a/src/views/govern/setting/statisticalType/binding.vue b/src/views/govern/setting/statisticalType/binding.vue new file mode 100644 index 0000000..5388ce5 --- /dev/null +++ b/src/views/govern/setting/statisticalType/binding.vue @@ -0,0 +1,295 @@ + + + diff --git a/src/views/govern/setting/statisticalType/index.vue b/src/views/govern/setting/statisticalType/index.vue index 963fbbf..67833ff 100644 --- a/src/views/govern/setting/statisticalType/index.vue +++ b/src/views/govern/setting/statisticalType/index.vue @@ -1,41 +1,55 @@ - diff --git a/src/views/govern/setting/statisticalType/popupForm.vue b/src/views/govern/setting/statisticalType/popupForm.vue deleted file mode 100644 index 4a5a4aa..0000000 --- a/src/views/govern/setting/statisticalType/popupForm.vue +++ /dev/null @@ -1,103 +0,0 @@ - - diff --git a/tsconfig.json b/tsconfig.json index 761ef38..f6d17f8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "target": "esnext", "useDefineForClassFields": true, + "suppressImplicitAnyIndexErrors": true, "module": "esnext", "moduleResolution": "node", "removeComments": false, diff --git a/types/global.d.ts b/types/global.d.ts index 2f36cba..87061e2 100644 --- a/types/global.d.ts +++ b/types/global.d.ts @@ -13,6 +13,15 @@ interface anyObj { [key: string]: any } +interface treeData { + id?: string + value?: string + name?: string + label?: string + children: treeData[] + [key: string]: any +} + interface TableDefaultData { list: T remark: string