lb преди 1 година
родител
ревизия
0e32824730
променени са 3 файла, в които са добавени 11 реда и са изтрити 4 реда
  1. +1
    -1
      src/components/BottomBar/gasii/gasChart/index.jsx
  2. +9
    -2
      src/components/BottomBar/gasii/gridList/index.jsx
  3. +1
    -1
      src/components/RightBar/EnergyCost/index.jsx

+ 1
- 1
src/components/BottomBar/gasii/gasChart/index.jsx Целия файл

@@ -18,7 +18,7 @@ function GasChart(props) {
: Array(dataSource == 'gas-i' ? 8 : 5).fill(Array(7).fill(0));

// debug
// console.log('gasII series data', dataName, hisState?.[dataName], seriesData)
console.log('天然气 series data', dataName, hisState?.[dataName], seriesData);

return (
<div className={cls.gasChart}>


+ 9
- 2
src/components/BottomBar/gasii/gridList/index.jsx Целия файл

@@ -1,5 +1,6 @@
import cls from './index.module.css';
import { useEffect, useState } from 'react';
import { useContext, useEffect, useState } from 'react';
import SocketContext from '../../../../store/socket-data-provider';

function getData(type) {
let data = [];
@@ -30,7 +31,13 @@ function getData(type) {
}

function GridList(props) {
const dataList = getData(props.dataSource);
const { runState } = useContext(SocketContext);
const key = props.dataSource == 'gas-i' ? 'gasFlowArr' : 'furnaceGasFlowArr';

let dataList = getData(props.dataSource);
dataList = runState?.[key]
? dataList.map((v, i) => ({ ...v, value: runState[key][i] ?? '/' }))
: dataList;

return (
<div className={cls.gridList}>


+ 1
- 1
src/components/RightBar/EnergyCost/index.jsx Целия файл

@@ -17,7 +17,7 @@ function EnergyCost(props) {
<div className={cls.info__item_groups}>
<div className={cls.info__item}>水 耗 量 : 32Km³</div>
<div className={cls.info__item}>天 然 气 I : 83m³</div>
<div className={cls.info__item}>电 耗 量 : 52Km³</div>
<div className={cls.info__item}>电 耗 量 : 52kWh</div>
<div className={cls.info__item}>天 然 气 II: 32m³</div>
</div>
</div>


Зареждане…
Отказ
Запис