@@ -15,7 +15,7 @@ function GasChart(props) { | |||||
? Object.keys(hisState?.[dataName]) | ? Object.keys(hisState?.[dataName]) | ||||
.sort() | .sort() | ||||
.map((key, index) => hisState?.[dataName][key]) | .map((key, index) => hisState?.[dataName][key]) | ||||
: Array(dataSource == 'gas-i' ? 8 : 5).fill(Array(7).fill(0)); | |||||
: Array(dataSource == 'gas-i' ? 8 : 4).fill(Array(7).fill(0)); | |||||
// debug | // debug | ||||
console.log('天然气 series data', dataName, hisState?.[dataName], seriesData); | console.log('天然气 series data', dataName, hisState?.[dataName], seriesData); | ||||
@@ -23,7 +23,7 @@ function getData(type) { | |||||
{ id: 12, name: '2#天然气II', value: '0m³/h' }, | { id: 12, name: '2#天然气II', value: '0m³/h' }, | ||||
{ id: 13, name: '3#天然气II', value: '0m³/h' }, | { id: 13, name: '3#天然气II', value: '0m³/h' }, | ||||
{ id: 14, name: '4#天然气II', value: '0m³/h' }, | { id: 14, name: '4#天然气II', value: '0m³/h' }, | ||||
{ id: 15, name: '5#天然气II', value: '0m³/h' }, | |||||
// { id: 15, name: '5#天然气II', value: '0m³/h' }, | |||||
]; | ]; | ||||
break; | break; | ||||
} | } | ||||
@@ -9,14 +9,13 @@ import cls from './leftbox.module.less'; | |||||
const Chart2 = () => { | const Chart2 = () => { | ||||
const ctx = useContext(SocketContext); | const ctx = useContext(SocketContext); | ||||
let [restTime, setResttime] = useState( | |||||
ctx.runState?.lastFireChangeTime || '0分0秒', | |||||
); | |||||
let [time, setTime] = useState([0, 0]); | let [time, setTime] = useState([0, 0]); | ||||
useEffect(() => { | useEffect(() => { | ||||
let timer = null; | |||||
const restTime = ctx.runState?.lastFireChangeTime; | |||||
if (restTime == null) return; | if (restTime == null) return; | ||||
console.log('restTime is:', restTime); | |||||
let timer = null; | |||||
if (/分/.test(restTime) && /秒/.test(restTime)) { | if (/分/.test(restTime) && /秒/.test(restTime)) { | ||||
let [min, sec] = restTime.replace(/分/, ':').replace(/秒/, '').split(':'); | let [min, sec] = restTime.replace(/分/, ':').replace(/秒/, '').split(':'); | ||||
timer = setInterval(() => { | timer = setInterval(() => { | ||||
@@ -32,7 +32,7 @@ export default function index() { | |||||
<img src={TopSide} alt="图片丢失" className="TopSideLeft" /> | <img src={TopSide} alt="图片丢失" className="TopSideLeft" /> | ||||
<div className="TopSideLeftLine"> | <div className="TopSideLeftLine"> | ||||
<img src={LeftLine} alt="图片丢失" className="TopSideLeftLineicon" /> | <img src={LeftLine} alt="图片丢失" className="TopSideLeftLineicon" /> | ||||
<h2 className="TopSideLeftTxt">单位:中建材智能自动化研究院</h2> | |||||
<h2 className="TopSideLeftTxt">单位:河南汇融科技服务有限公司</h2> | |||||
</div> | </div> | ||||
<div> | <div> | ||||
<h2 className="TopTitleText"> | <h2 className="TopTitleText"> | ||||