From 1be888febab1c605be99bc3922b0f255f5934de3 Mon Sep 17 00:00:00 2001 From: xuziqiang <1344691446@qq.com> Date: Wed, 17 Jul 2024 13:48:54 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=E9=83=A8=E9=97=A8=E6=9D=83?= =?UTF-8?q?=E9=99=90=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hx-ai-intelligent/src/router/organizationManage.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hx-ai-intelligent/src/router/organizationManage.ts b/hx-ai-intelligent/src/router/organizationManage.ts index e02f7c4..6b5a52e 100644 --- a/hx-ai-intelligent/src/router/organizationManage.ts +++ b/hx-ai-intelligent/src/router/organizationManage.ts @@ -31,7 +31,6 @@ const organizationManage = { { title: '重置密码', code: 'userCodeReset' }, { title: '删除', code: 'userDelete' }, ], - // backApi: [], }, }, ], @@ -50,7 +49,16 @@ const organizationManage = { meta: { title: '部门/权限', keepAlive: true, - // backApi: [], + operates: [ + { title: '新增部门', code: 'authorityDeptAdd' }, + { title: '新增子部门', code: 'authorityDeptSonAdd' }, + { title: '删除部门', code: 'authorityDeptDelete' }, + { title: '编辑部门', code: 'authorityDeptEdit' }, + { title: '新增角色', code: 'authorityRoleAdd' }, + { title: '新增子角色', code: 'authorityRoleSonAdd' }, + { title: '删除角色', code: 'authorityRoleDelete' }, + { title: '编辑角色', code: 'authorityRoleEdit' }, + ], }, }, ], From ddf0514182d33b6a712dc3eea4b1b8982ef544bb Mon Sep 17 00:00:00 2001 From: fks-yangshouda Date: Wed, 17 Jul 2024 15:06:11 +0800 Subject: [PATCH 2/5] =?UTF-8?q?1.=E8=AE=BE=E5=A4=87=E7=9B=91=E6=B5=8B=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5=202.=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E7=9B=91=E6=B5=8B=20=E5=B9=B3=E5=9D=87=E6=95=B0=E6=8D=AE=20?= =?UTF-8?q?=E5=89=8D=E5=8F=B0=E9=A1=B5=E9=9D=A2=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hx-ai-intelligent/src/api/monitor.ts | 13 + .../src/view/monitor/deviceMonitor/graph/index.vue | 47 ++- .../src/view/monitor/deviceMonitor/index.vue | 1 + .../src/view/monitor/deviceMonitor/page.vue | 2 +- .../src/view/monitor/deviceMonitor/table/index.vue | 86 ++-- .../src/view/monitor/deviceMonitor/tree/index.vue | 452 ++++++++------------- .../environmentMonitor/averageData/config.ts | 36 ++ .../environmentMonitor/averageData/index.vue | 250 ++++++++++++ .../environmentMonitor/historyData/config.ts | 20 + .../environmentMonitor/historyData/index.vue | 243 +++++++++++ .../src/view/monitor/environmentMonitor/index.vue | 6 +- 11 files changed, 832 insertions(+), 324 deletions(-) create mode 100644 hx-ai-intelligent/src/api/monitor.ts create mode 100644 hx-ai-intelligent/src/view/monitor/environmentMonitor/averageData/config.ts create mode 100644 hx-ai-intelligent/src/view/monitor/environmentMonitor/averageData/index.vue create mode 100644 hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/config.ts create mode 100644 hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/index.vue diff --git a/hx-ai-intelligent/src/api/monitor.ts b/hx-ai-intelligent/src/api/monitor.ts new file mode 100644 index 0000000..62f5064 --- /dev/null +++ b/hx-ai-intelligent/src/api/monitor.ts @@ -0,0 +1,13 @@ +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', +} diff --git a/hx-ai-intelligent/src/view/monitor/deviceMonitor/graph/index.vue b/hx-ai-intelligent/src/view/monitor/deviceMonitor/graph/index.vue index bce9c0e..194ded6 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/graph/index.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/graph/index.vue @@ -17,6 +17,7 @@ tableList: any[]; tableColumns: any[]; graphList: any[]; + XData: any[]; } const pageData = inject('pageData'); @@ -37,32 +38,40 @@ const draw = () => { data.value = pageData.graphList; + let XData = pageData.XData; if (chartInstance) { chartInstance.dispose(); } chartInstance = echarts.init(graphChart.value); var seriesList = []; - var date = []; + // var date = []; var legendList: string | any[] = []; for (let i = 0; i < data.value.length; i++) { - date.push(data.value[i].date); + seriesList.push({ + name: data.value[i].deviceName, + data: data.value[i].data, + type: 'line', + smooth: true, + }); + legendList.push(data.value[i].deviceName); + // date.push(data.value[i].date); - for (let j = 0; j < data.value[i].data.length; j++) { - if (seriesList.length < j + 1) { - seriesList.push({ - name: data.value[i].data[j].name, - data: [data.value[i].data[j].value], - type: 'line', - smooth: true, - }); - } else { - seriesList[j].data.push(data.value[i].data[j].value); - } - if (legendList.length == 0 || legendList.length < j + 1) { - legendList.push(data.value[i].data[j].name); - } - } + // for (let j = 0; j < data.value[i].data.length; j++) { + // if (seriesList.length < j + 1) { + // seriesList.push({ + // name: data.value[i].data[j].name, + // data: [data.value[i].data[j].value], + // type: 'line', + // smooth: true, + // }); + // } else { + // seriesList[j].data.push(data.value[i].data[j].value); + // } + // if (legendList.length == 0 || legendList.length < j + 1) { + // legendList.push(data.value[i].data[j].name); + // } + // } } const option = { legend: { @@ -76,7 +85,7 @@ const date = params[0].name; const values = params .map((param: any) => { - const unit = data.value.find((d) => d.date === date)?.unit || ''; + const unit = data.value.find((d) => d.date === date)?.devicePositionUnit || ''; return ` ${param.marker}${param.seriesName} ${param.value} ${unit} @@ -88,7 +97,7 @@ }, xAxis: { type: 'category', - data: date, + data: XData, }, yAxis: { type: 'value', diff --git a/hx-ai-intelligent/src/view/monitor/deviceMonitor/index.vue b/hx-ai-intelligent/src/view/monitor/deviceMonitor/index.vue index 71bf86b..909b319 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/index.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/index.vue @@ -12,6 +12,7 @@ tableList: [], tableColumns: [], graphList: [], + XData: [], }); // 使用 provide 函数来提供这个响应式对象 diff --git a/hx-ai-intelligent/src/view/monitor/deviceMonitor/page.vue b/hx-ai-intelligent/src/view/monitor/deviceMonitor/page.vue index d406f8c..4cbf1e7 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/page.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/page.vue @@ -16,7 +16,7 @@ - + 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 c205a2d..60f77cc 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue @@ -1,5 +1,10 @@ + + diff --git a/hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/config.ts b/hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/config.ts new file mode 100644 index 0000000..6fdccb4 --- /dev/null +++ b/hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/config.ts @@ -0,0 +1,20 @@ +export const tableColumns = [ + { + title: '序号', + customRender: (text: any) => { + return text.index + 1; + }, + }, + { + title: '区域名称', + dataIndex: 'areaName', + }, + { + title: '点位', + dataIndex: 'point', + }, + { + title: '日期', + dataIndex: 'date', + }, +]; diff --git a/hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/index.vue b/hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/index.vue new file mode 100644 index 0000000..a9342ab --- /dev/null +++ b/hx-ai-intelligent/src/view/monitor/environmentMonitor/historyData/index.vue @@ -0,0 +1,243 @@ + + + + + diff --git a/hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue b/hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue index 48caad7..485a9d9 100644 --- a/hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue +++ b/hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue @@ -4,14 +4,16 @@ Content of Tab Pane 2 Content of Tab Pane 3 - + + - - diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue index be5bf5b..9298666 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue @@ -1,13 +1,13 @@