From 30286253e7778445ed550a9a14dd9814a77a4f6f Mon Sep 17 00:00:00 2001 From: xuziqiang <1344691446@qq.com> Date: Tue, 9 Jul 2024 16:27:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=86=E7=BB=84=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hx-ai-intelligent/src/App.vue | 9 +++++ hx-ai-intelligent/src/api/deviceManage.ts | 1 + hx-ai-intelligent/src/components/ns-modal-form.vue | 9 +++-- hx-ai-intelligent/src/icon/fenzujiedian.svg | 10 +++++ hx-ai-intelligent/src/icon/jisuanjiedian.svg | 10 +++++ .../src/view/equipmentManage/group/config.ts | 23 ++++++++--- .../src/view/equipmentManage/group/index.vue | 45 ++++++++++++++-------- .../view/organizationManage/usermanage/index.vue | 7 +++- lib/component/tree/tree-api.vue | 5 +++ 9 files changed, 94 insertions(+), 25 deletions(-) create mode 100644 hx-ai-intelligent/src/icon/fenzujiedian.svg create mode 100644 hx-ai-intelligent/src/icon/jisuanjiedian.svg diff --git a/hx-ai-intelligent/src/App.vue b/hx-ai-intelligent/src/App.vue index 4ac92d2..35a2db5 100644 --- a/hx-ai-intelligent/src/App.vue +++ b/hx-ai-intelligent/src/App.vue @@ -48,6 +48,15 @@ height: 100%; } } + // :deep(.ant-menu-item), + // :deep(.ant-menu-submenu-title) { + // &:not(.ant-menu-item-selected) { + // // &:not(.ant-menu-item-active) { + // .anticon { + // color: rgb(141, 150, 163); + // } + // } + // } // :deep(.ns-content) { // // padding-top: 80px !important; // } diff --git a/hx-ai-intelligent/src/api/deviceManage.ts b/hx-ai-intelligent/src/api/deviceManage.ts index ea91ef7..413afeb 100644 --- a/hx-ai-intelligent/src/api/deviceManage.ts +++ b/hx-ai-intelligent/src/api/deviceManage.ts @@ -8,4 +8,5 @@ export enum device { export enum group { queryDeviceGroupTree = `${BASE_URL}/deviceGroup/queryDeviceGroupTree`, // 左侧树 creatOrUpdate = `${BASE_URL}/deviceGroup/creatOrUpdate`, // 左侧树节点新增编辑 + del = `${BASE_URL}/deviceGroup/del`, // 左侧树节点新增编辑 } diff --git a/hx-ai-intelligent/src/components/ns-modal-form.vue b/hx-ai-intelligent/src/components/ns-modal-form.vue index 24af74c..d60757c 100644 --- a/hx-ai-intelligent/src/components/ns-modal-form.vue +++ b/hx-ai-intelligent/src/components/ns-modal-form.vue @@ -1,13 +1,14 @@ @@ -21,6 +22,7 @@ api: string | object | Function; data?: object; extraModalConfig?: object; + success?: Function; }; const route = useRoute(); const { httpRequest } = useApi(); @@ -59,14 +61,15 @@ formRef.value .triggerSubmit() .then((data: any) => { - const { api } = props; + const { api, success } = props; const requestConfig: HttpRequestConfig = { method: 'POST' }; const { params } = route; httpRequest({ api, params: data, pathParams: params, requestConfig }) - .then(() => { + .then((res) => { NsMessage.success('操作成功', 1, () => { toggle(); + success && success(res); }); }) .finally(() => { diff --git a/hx-ai-intelligent/src/icon/fenzujiedian.svg b/hx-ai-intelligent/src/icon/fenzujiedian.svg new file mode 100644 index 0000000..3a830e9 --- /dev/null +++ b/hx-ai-intelligent/src/icon/fenzujiedian.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/hx-ai-intelligent/src/icon/jisuanjiedian.svg b/hx-ai-intelligent/src/icon/jisuanjiedian.svg new file mode 100644 index 0000000..a485030 --- /dev/null +++ b/hx-ai-intelligent/src/icon/jisuanjiedian.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/hx-ai-intelligent/src/view/equipmentManage/group/config.ts b/hx-ai-intelligent/src/view/equipmentManage/group/config.ts index 4dee03b..f9a9459 100644 --- a/hx-ai-intelligent/src/view/equipmentManage/group/config.ts +++ b/hx-ai-intelligent/src/view/equipmentManage/group/config.ts @@ -62,7 +62,12 @@ const mockData = ref(data.listData); export const formSchema = [ { field: 'isCreate', - component: 'NsInput', + component: 'NsCheck', + show: false, + }, + { + field: 'isCreatSon', + component: 'NsCheck', show: false, }, { @@ -71,7 +76,12 @@ export const formSchema = [ show: false, }, { - field: 'isCreatSon', + field: 'id', + component: 'NsInput', + show: false, + }, + { + field: 'pid', component: 'NsInput', show: false, }, @@ -95,10 +105,10 @@ export const formSchema = [ component: 'NsSelectApi', componentProps: { placeholder: '请选择节点类型(必填)', - api: dict, - params: { dicKey: 'COUNT_POINT' }, + api: () => dict({ params: { dicKey: 'COUNT_POINT' } }), + // params: { dicKey: 'COUNT_POINT' }, immediate: true, - resultField: 'data.COUNT_POINT', + // resultField: 'data.COUNT_POINT', labelField: 'cnValue', valueField: 'cnValue', }, @@ -118,6 +128,7 @@ export const treeConfig = (orgId) => { title: '能耗分组', }, params: { orgId }, + showLine: { showLeafIcon: false }, api: group.queryDeviceGroupTree, // api: () => { // return new Promise((resolve) => { @@ -127,7 +138,7 @@ export const treeConfig = (orgId) => { // }); // }, transform: (data) => { - return [{ title: '全部', key: 'all', selectable: false, children: data }]; + return [{ pointName: '全部', id: 'all', selectable: false, children: data }]; }, formConfig: { schemas: [ diff --git a/hx-ai-intelligent/src/view/equipmentManage/group/index.vue b/hx-ai-intelligent/src/view/equipmentManage/group/index.vue index 997394e..17b464c 100644 --- a/hx-ai-intelligent/src/view/equipmentManage/group/index.vue +++ b/hx-ai-intelligent/src/view/equipmentManage/group/index.vue @@ -10,20 +10,25 @@
- +