From 11b07f6546632adc78d067d99f0bc543290f2a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E4=BA=91=E9=B9=8F?= Date: Wed, 20 Nov 2024 14:58:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=EF=BC=9A=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BF=AE=E6=94=B9=20=E6=95=85=E9=9A=9C?= =?UTF-8?q?=EF=BC=9A=E5=9B=BE=E8=A1=A8=E6=98=BE=E7=A4=BA=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=20=E9=93=BE=E8=B7=AF=EF=BC=9A=E5=8D=8F=E8=AE=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/backend/logRecord/index.vue | 7 +- .../src/views/backend/malfunction/index.vue | 6 +- ui/dasadmin/src/views/backend/node/index.vue | 11 +- .../src/views/backend/node/protocol.vue | 212 +++++++++++------- ui/dasadmin/src/views/backend/node/type.ts | 2 + 5 files changed, 146 insertions(+), 92 deletions(-) diff --git a/ui/dasadmin/src/views/backend/logRecord/index.vue b/ui/dasadmin/src/views/backend/logRecord/index.vue index 230670e3..d9cc5fa5 100644 --- a/ui/dasadmin/src/views/backend/logRecord/index.vue +++ b/ui/dasadmin/src/views/backend/logRecord/index.vue @@ -469,15 +469,18 @@ const getRandomDarkColor = () => { return color } const createSeriesData = () => { + console.log(curSeries) + const seriesData: any = [] - const curAttr = curSeries.map((item: any) => item.name) + const curAttr = curSeries.map((item: any) => item.id) selectPreviewTree.forEach((item: string) => { if (curAttr.includes(item)) { - const seriesItem = curSeries.find((cur: any) => cur.name === item) + const seriesItem = curSeries.find((cur: any) => cur.id === item) seriesData.push(seriesItem) } else { const color = getRandomDarkColor() const data = { + id: item, name: fileKeyEnums?.[item] ?? item, type: 'line', barWidth: 20, diff --git a/ui/dasadmin/src/views/backend/malfunction/index.vue b/ui/dasadmin/src/views/backend/malfunction/index.vue index 3e61c1a2..10c4f839 100644 --- a/ui/dasadmin/src/views/backend/malfunction/index.vue +++ b/ui/dasadmin/src/views/backend/malfunction/index.vue @@ -143,6 +143,7 @@ import { getMalFunctionListReq, setConfigReq, previewFileReq, downloadFileReq, g import { equipList } from '/@/api/backend/temperature/request' import * as echarts from 'echarts' import { tableItemData } from './type' +import { id } from 'element-plus/es/locales.mjs' const defaultProps = { children: 'children', @@ -475,14 +476,15 @@ const getRandomDarkColor = () => { } const createSeriresData = () => { const seriesData: any = [] - const curAttr = curSeries.map((item: any) => item.name) + const curAttr = curSeries.map((item: any) => item.id) selectPreviewTree.forEach((item: string) => { if (curAttr.includes(item)) { - const seriesItem = curSeries.find((cur: any) => cur.name === item) + const seriesItem = curSeries.find((cur: any) => cur.id === item) seriesData.push(seriesItem) } else { const color = getRandomDarkColor() const data = { + id: item, name: fileKeyEnums[item], type: 'line', barWidth: 20, diff --git a/ui/dasadmin/src/views/backend/node/index.vue b/ui/dasadmin/src/views/backend/node/index.vue index 85218871..af43efa3 100644 --- a/ui/dasadmin/src/views/backend/node/index.vue +++ b/ui/dasadmin/src/views/backend/node/index.vue @@ -525,12 +525,13 @@ const getLinkData = (nodeId: string, linkName?: string) => { const protocolList = [ // * 代表需要配置的协议 - { label: 'IEC104主 *', value: 8 }, + // { label: 'IEC104主 *', value: 8 }, { label: 'IEC104从 *', value: 9 }, - { label: 'MODBUSRTU主 *', value: 12 }, - { label: 'MODBUSTCP主 *', value: 16 }, - { label: '倍福MODBUS', value: 11111 }, - { label: '倍福ADS', value: 11112 }, + // { label: 'MODBUSRTU主 *', value: 12 }, + // { label: 'MODBUSTCP主 *', value: 16 }, + { label: 'MODBUSTCP从 *', value: 17 }, + { label: 'MODBUS', value: 80 }, + { label: 'ADS', value: 81 }, ] diff --git a/ui/dasadmin/src/views/backend/node/protocol.vue b/ui/dasadmin/src/views/backend/node/protocol.vue index 3d0e6521..4618459c 100644 --- a/ui/dasadmin/src/views/backend/node/protocol.vue +++ b/ui/dasadmin/src/views/backend/node/protocol.vue @@ -9,7 +9,11 @@ >