From a2bfe148d35f113dfd731ed40ba73dd1bb8dbc91 Mon Sep 17 00:00:00 2001 From: xuziqiang <1344691446@qq.com> Date: Tue, 23 Jul 2024 14:39:55 +0800 Subject: [PATCH 1/7] =?UTF-8?q?feat:=20=E6=9D=83=E9=99=90=E8=A1=A5?= =?UTF-8?q?=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/router/equipmentManage.ts | 13 ++++++++- .../src/view/equipmentManage/group/config.ts | 28 +++++++++---------- .../src/view/equipmentManage/group/index.vue | 17 +++++++---- .../src/view/equipmentManage/ledger/config.ts | 2 +- 4 files changed, 38 insertions(+), 22 deletions(-) diff --git a/hx-ai-intelligent/src/router/equipmentManage.ts b/hx-ai-intelligent/src/router/equipmentManage.ts index 5cb2769..26cf030 100644 --- a/hx-ai-intelligent/src/router/equipmentManage.ts +++ b/hx-ai-intelligent/src/router/equipmentManage.ts @@ -39,7 +39,18 @@ const equipment = { meta: { title: '分组管理', keepAlive: false, - // backApi: [], + operates: [ + { title: '新增分组', code: 'GroupAdd' }, + { title: '删除分组', code: 'GroupDelete' }, + { title: '编辑分组', code: 'GroupEdit' }, + { title: '删除点位', code: 'GroupPointDelete' }, + { title: '编辑点位', code: 'GroupPointEdit' }, + { title: '导入点位', code: 'GroupPointImport' }, + { title: '导出点位', code: 'GroupPointExports' }, + { title: '模版下载', code: 'GroupTempDownload' }, + { title: '批量分组', code: 'GroupBatchGroup' }, + { title: '公式编辑', code: 'GroupFormulaEdit' }, + ], }, }, ], diff --git a/hx-ai-intelligent/src/view/equipmentManage/group/config.ts b/hx-ai-intelligent/src/view/equipmentManage/group/config.ts index be69c2c..9cfd69c 100644 --- a/hx-ai-intelligent/src/view/equipmentManage/group/config.ts +++ b/hx-ai-intelligent/src/view/equipmentManage/group/config.ts @@ -225,7 +225,7 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => { headerActions: [ { label: '编辑', - name: 'groupEdit', + name: 'GroupEdit', type: 'primary', dynamicDisabled: () => !defaultParams.value?.id, handle: (a, b) => { @@ -234,7 +234,7 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => { }, { label: '批量删除', - name: 'groupBatDelete', + name: 'GroupDelete', type: 'primary', dynamicDisabled: (data: any) => { return data.list.length === 0; @@ -247,7 +247,7 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => { }, { label: '批量导出', - name: 'groupExports', + name: 'GroupPointExports', type: 'primary', dynamicDisabled: (data: any) => { return data.list.length === 0; @@ -259,7 +259,7 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => { }, { label: '批量导入', - name: 'groupImport', + name: 'GroupPointImport', type: 'primary', extra: { // api: props.postImportApi, // 导入接口名 @@ -277,7 +277,7 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => { { label: '模板下载', - name: 'groupTemDownload', + name: 'GroupTempDownload', type: 'primary', handle: () => { // http.get('/asset/file/whiteListUser.xlsx'); @@ -291,7 +291,7 @@ export const tableConfig = (el, elGroup, elFormula, defaultParams) => { actions: [ { label: '删除', - name: 'groupDelete', + name: 'GroupDelete', dynamicParams: { linkIds: 'linkId[]' }, confirm: true, isClearCheck: true, @@ -346,7 +346,7 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => { headerActions: [ { label: '编辑', - name: 'groupEdit', + name: 'GroupPointEdit', type: 'primary', handle: (a, b) => { el.value.toggle(); @@ -354,7 +354,7 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => { }, { label: '批量删除', - name: 'groupTemDownload', + name: 'GroupPointDelete', type: 'primary', dynamicDisabled: (data: any) => { return data.list.length === 0; @@ -367,7 +367,7 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => { }, { label: '批量导出', - name: 'groupExports', + name: 'GroupPointExports', type: 'primary', dynamicDisabled: (data: any) => { return data.list.length === 0; @@ -379,7 +379,7 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => { }, { label: '批量导入', - name: 'groupImport', + name: 'GroupPointImport', type: 'primary', extra: { // api: props.postImportApi, // 导入接口名 @@ -397,7 +397,7 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => { { label: '模板下载', - name: 'groupTemDownload', + name: 'GroupTempDownload', type: 'primary', handle: () => { // http.get('/asset/file/whiteListUser.xlsx'); @@ -407,7 +407,7 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => { { label: '批量分组', - name: 'groupBatGroup', + name: 'GroupBatchGroup', type: 'primary', dynamicDisabled: (data: any) => { return data.list.length === 0; @@ -421,7 +421,7 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => { }, { label: '公式编辑', - name: 'groupFormulaEdit', + name: 'GroupFormulaEdit', type: 'primary', handle: () => { elFormula.value.toggle(); @@ -435,7 +435,7 @@ export const tableConfigCal = (el, elGroup, elFormula, defaultParams) => { actions: [ { label: '删除', - name: 'groupDelete', + name: 'GroupPointDelete', dynamicParams: { ids: 'id[]' }, confirm: true, isReload: true, diff --git a/hx-ai-intelligent/src/view/equipmentManage/group/index.vue b/hx-ai-intelligent/src/view/equipmentManage/group/index.vue index f093213..5cc1b0e 100644 --- a/hx-ai-intelligent/src/view/equipmentManage/group/index.vue +++ b/hx-ai-intelligent/src/view/equipmentManage/group/index.vue @@ -27,9 +27,11 @@ @@ -54,6 +56,8 @@ import NsModalFrom from '/@/components/ns-modal-form.vue'; import { group } from '/@/api/deviceManage'; import { http } from '/nerv-lib/util/http'; + import { authorizationService } from '/nerv-lib/saas/store/modules/authorization-service'; + const { checkAllPermission } = authorizationService(); type opType = 'up' | 'down'; const { getParams } = useParams(); @@ -156,14 +160,15 @@ if (data.id === 'all') { list = ['addNodeSon']; } - return actions.filter(({ key }) => list.includes(key)); + const res = actions.filter(({ key, name }) => list.includes(key) && checkAllPermission(name)); + return res; }; const actionList = [ - { title: '新增子节点', key: 'addNodeSon', func: (data) => addNodeSon(data) }, - { title: '编辑', key: 'editNode', func: (data) => editNode(data) }, - { title: '上移', key: 'moveUp', func: (data) => moveNode(data, 'up') }, - { title: '下移', key: 'moveDown', func: (data) => moveNode(data, 'down') }, - { title: '删除', key: 'deleteNode', func: (data) => deleteNode(data) }, + { title: '新增子节点', name: 'GroupAdd', key: 'addNodeSon', func: (data) => addNodeSon(data) }, + { title: '编辑', name: 'GroupEdit', key: 'editNode', func: (data) => editNode(data) }, + { title: '上移', name: 'Group', key: 'moveUp', func: (data) => moveNode(data, 'up') }, + { title: '下移', name: 'Group', key: 'moveDown', func: (data) => moveNode(data, 'down') }, + { title: '删除', name: 'GroupDelete', key: 'deleteNode', func: (data) => deleteNode(data) }, ]; const handleSelect = (key, record) => { //清除选中行数据 diff --git a/hx-ai-intelligent/src/view/equipmentManage/ledger/config.ts b/hx-ai-intelligent/src/view/equipmentManage/ledger/config.ts index 1c2cfc4..3420345 100644 --- a/hx-ai-intelligent/src/view/equipmentManage/ledger/config.ts +++ b/hx-ai-intelligent/src/view/equipmentManage/ledger/config.ts @@ -34,7 +34,7 @@ export const tableConfig = (orgId) => { }, }, rowSelection: null, - scroll: { x: 2000 }, + // scroll: { x: 2000 }, columns: [ { title: '设备名称', From 79c56bb97968d8c8bdd901b9220693e90bf7c2de Mon Sep 17 00:00:00 2001 From: fks-yangshouda Date: Tue, 23 Jul 2024 14:42:17 +0800 Subject: [PATCH 2/7] =?UTF-8?q?1.=E5=AF=B9=E6=8E=A5=E8=83=BD=E8=80=97?= =?UTF-8?q?=E7=9B=91=E6=B5=8B=E6=8E=A5=E5=8F=A3=202.=E5=AF=B9=E6=8E=A5?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=9B=91=E6=B5=8B=E6=8E=A5=E5=8F=A3=203.?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BE=E5=A4=87=E7=9B=91=E6=B5=8B=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E5=BA=8F=E5=8F=B7=E5=88=97=E6=98=BE=E7=A4=BA=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hx-ai-intelligent/src/api/deviceManage.ts | 1 + hx-ai-intelligent/src/api/monitor.ts | 21 +- .../monitor/deviceMonitor/table/index.vue | 13 +- .../view/monitor/deviceMonitor/tree/index.vue | 229 ++----- .../energyMonitor/analysisGraph/index.vue | 62 +- .../energyMonitor/analysisTable/index.vue | 76 ++- .../energyMonitor/graphGraph/index.vue | 41 +- .../energyMonitor/graphTable/index.vue | 48 +- .../src/view/monitor/energyMonitor/page.vue | 4 +- .../view/monitor/energyMonitor/tree/index.vue | 564 +++--------------- .../view/monitor/environmentMonitor/index.vue | 4 +- 11 files changed, 347 insertions(+), 716 deletions(-) diff --git a/hx-ai-intelligent/src/api/deviceManage.ts b/hx-ai-intelligent/src/api/deviceManage.ts index 29cfc9e..d4b2fd4 100644 --- a/hx-ai-intelligent/src/api/deviceManage.ts +++ b/hx-ai-intelligent/src/api/deviceManage.ts @@ -28,4 +28,5 @@ export enum group { queryFormula = `${BASE_URL}/deviceGroup/queryFormula`, // 公式查询 dropGroupFilter = `${BASE_URL}/deviceGroup/dropGroupFilter`, // 分组列表查询 dropGroupInfoFilter = `${BASE_URL}/deviceGroup/dropGroupInfoFilter`, // 计算列表查询 + queryDeviceToEnergy = `${BASE_URL}/deviceGroup/queryDeviceToEnergy`, // 能耗监测用查询设备(能耗监测设备树) } diff --git a/hx-ai-intelligent/src/api/monitor.ts b/hx-ai-intelligent/src/api/monitor.ts index 62f5064..35e31ee 100644 --- a/hx-ai-intelligent/src/api/monitor.ts +++ b/hx-ai-intelligent/src/api/monitor.ts @@ -1,13 +1,14 @@ +// 设备监测 export enum deviceMonitor { - // getTableList = '/carbon/emission/factor/queryCarbonFactorPage', - // addNewData = '/carbon/emission/factor/creatOrUpdate', - // editUser = '/carbon-smart/api/user/edit', - // frozen = '/carbon-smart/api/user/frozen', - // resetPwd = '/carbon-smart/api/user/resetPwd', - // del = '/carbon-smart/api/user/del', - // batchDel = '/carbon-smart/api/user/batchDel', - // getCarbonFactorTree = '/carbon/emission/type/getCarbonFactorTree', - // queryDeptTree = '/carbon-smart/api/user/queryDeptTree', - // queryUserPerList = '/carbon-smart/api/user/queryUserPerList', getDeviceGraph = '/carbon-smart/api/monitor/getDeviceGraph', + getDevicePointToMonitor = '/carbon-smart//api/monitor/getDevicePointToMonitor', } + +// 能耗监测 +export enum energyMonitor { + getDeviceOrNodeEnergyGraph = '/carbon-smart/api/monitor/getDeviceOrNodeEnergyGraph', + getDeviceOrNodeEnergyAnalyse = '/carbon-smart/api/monitor/getDeviceOrNodeEnergyAnalyse', +} + +// 环境监测 +export enum environmentMonitor {} diff --git a/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue b/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue index 60f77cc..efe8cf6 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue @@ -69,11 +69,18 @@ { title: '序号', customRender: ({ record, index }) => { + debugger; // 自定义单元格内容,这里返回序号 - if (index == 0 || data.value[index - 1].deviceName == record.deviceName) { - return index + 1; + if (index == 0) { + data.value[index].index = 1; + // return 1; + } else if (data.value[index - 1].deviceName == record.deviceName) { + data.value[index].index = data.value[index - 1].index; + // return data.value[index].index; + } else { + data.value[index].index = data.value[index - 1].index + 1; } - return index; + return data.value[index].index; }, customCell: (record, rowIndex) => { if (rowIndex == undefined) { diff --git a/hx-ai-intelligent/src/view/monitor/deviceMonitor/tree/index.vue b/hx-ai-intelligent/src/view/monitor/deviceMonitor/tree/index.vue index f087745..eeb4944 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/tree/index.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/tree/index.vue @@ -52,12 +52,13 @@ diff --git a/hx-ai-intelligent/src/view/equipmentControl/liftSystem/liftInfo.vue b/hx-ai-intelligent/src/view/equipmentControl/liftSystem/liftInfo.vue new file mode 100644 index 0000000..3b63442 --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/liftSystem/liftInfo.vue @@ -0,0 +1,151 @@ + + + +