From 3d42b358d0760676d0c893cbbfc26e34ba6802eb Mon Sep 17 00:00:00 2001 From: lb Date: Tue, 12 Sep 2023 15:38:22 +0800 Subject: [PATCH] update --- src/components/BottomBar/gasi/index.jsx | 6 +++--- .../BottomBar/gasii/gasChart/chart.config.js | 2 +- .../BottomBar/gasii/gridList/index.jsx | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/BottomBar/gasi/index.jsx b/src/components/BottomBar/gasi/index.jsx index ea5a43b..23e0215 100644 --- a/src/components/BottomBar/gasi/index.jsx +++ b/src/components/BottomBar/gasi/index.jsx @@ -92,7 +92,7 @@ function GasI(props) { // max: 100, }, series: seriesData.map((v, i) => ({ - name: i + 1 + '#助燃风', + name: i ? i + 1 + '#助燃风' : '助燃风总流量', data: v, type: 'line', symbol: 'circle', @@ -111,6 +111,7 @@ function GasI(props) { } else { dataList = realtimeState?.wind ? [ + { id: 0, name: '助燃风总流量', value: '0m³/h' }, { id: 1, name: '1#助燃风', value: '0m³/h' }, { id: 2, name: '2#助燃风', value: '0m³/h' }, { id: 3, name: '3#助燃风', value: '0m³/h' }, @@ -118,12 +119,12 @@ function GasI(props) { { id: 5, name: '5#助燃风', value: '0m³/h' }, { id: 6, name: '6#助燃风', value: '0m³/h' }, { id: 7, name: '7#助燃风', value: '0m³/h' }, - { id: 8, name: '8#助燃风', value: '0m³/h' }, ].map((item, index) => ({ ...item, value: realtimeState.wind[index] ?? '/', })) : [ + { id: 0, name: '助燃风总流量', value: '0m³/h' }, { id: 1, name: '1#助燃风', value: '0m³/h' }, { id: 2, name: '2#助燃风', value: '0m³/h' }, { id: 3, name: '3#助燃风', value: '0m³/h' }, @@ -131,7 +132,6 @@ function GasI(props) { { id: 5, name: '5#助燃风', value: '0m³/h' }, { id: 6, name: '6#助燃风', value: '0m³/h' }, { id: 7, name: '7#助燃风', value: '0m³/h' }, - { id: 8, name: '8#助燃风', value: '0m³/h' }, ]; } diff --git a/src/components/BottomBar/gasii/gasChart/chart.config.js b/src/components/BottomBar/gasii/gasChart/chart.config.js index 90ad5dc..00a670a 100644 --- a/src/components/BottomBar/gasii/gasChart/chart.config.js +++ b/src/components/BottomBar/gasii/gasChart/chart.config.js @@ -80,7 +80,7 @@ export default function getOptions(seriesData, name) { }, }, series: seriesData.map((arr, index) => ({ - name: index + 1 + '#' + name, + name: index ? index + 1 + '#' + name : '天然气总流量', data: arr, type: 'line', areaStyle: { diff --git a/src/components/BottomBar/gasii/gridList/index.jsx b/src/components/BottomBar/gasii/gridList/index.jsx index 2b5f57d..0527285 100644 --- a/src/components/BottomBar/gasii/gridList/index.jsx +++ b/src/components/BottomBar/gasii/gridList/index.jsx @@ -7,14 +7,14 @@ function getData(type) { switch (type) { case 'gas-i': data = [ - { id: 1, name: '1#天然气I', value: '0m³/h' }, - { id: 2, name: '2#天然气I', value: '0m³/h' }, - { id: 3, name: '3#天然气I', value: '0m³/h' }, - { id: 4, name: '4#天然气I', value: '0m³/h' }, - { id: 5, name: '5#天然气I', value: '0m³/h' }, - { id: 6, name: '6#天然气I', value: '0m³/h' }, - { id: 7, name: '7#天然气I', value: '0m³/h' }, - { id: 8, name: '8#天然气I', value: '0m³/h' }, + { id: 0, name: '天然气总流量', value: '0m³/h' }, + { id: 1, name: '1#天然气', value: '0m³/h' }, + { id: 2, name: '2#天然气', value: '0m³/h' }, + { id: 3, name: '3#天然气', value: '0m³/h' }, + { id: 4, name: '4#天然气', value: '0m³/h' }, + { id: 5, name: '5#天然气', value: '0m³/h' }, + { id: 6, name: '6#天然气', value: '0m³/h' }, + { id: 7, name: '7#天然气', value: '0m³/h' }, ]; break; case 'gas-ii':