diff --git a/web/client/RZqpT7Q7lM.txt b/web/client/RZqpT7Q7lM.txt new file mode 100644 index 0000000..a94f40f --- /dev/null +++ b/web/client/RZqpT7Q7lM.txt @@ -0,0 +1 @@ +bd7228e19d69b5cc220f4d419e7815e2 \ No newline at end of file diff --git a/web/client/index.html b/web/client/index.html index de25da3..02169df 100644 --- a/web/client/index.html +++ b/web/client/index.html @@ -74,6 +74,7 @@
+ \ No newline at end of file diff --git a/web/client/src/sections/bigScreen/components/electrical.js b/web/client/src/sections/bigScreen/components/electrical.js index 694602e..2f735e8 100644 --- a/web/client/src/sections/bigScreen/components/electrical.js +++ b/web/client/src/sections/bigScreen/components/electrical.js @@ -9,7 +9,7 @@ import VoltageTrend from '../components/electrity/voltageTrend'; import LevelTrend from '../components/electrity/levelTrend'; const Electrical = ({ dispatch, actions, siteList, waterLevelSix, currentSix, cabinet }) => { - + const isMobile = window.innerWidth <= 1080 ? true : false; const { bigScreen } = actions const [pumpList, setPumpList] = useState([]) //水泵列表 const [cabinetList, setCabinetList] = useState([]) //水泵列表 @@ -64,13 +64,54 @@ const Electrical = ({ dispatch, actions, siteList, waterLevelSix, currentSix, ca } }, [strucId]) - - - - + const renderMobilePage = () => { + return
+
+
+
+ 环境湿度:
+ {waterLevelSix[waterLevelSix.length - 1]?.sHumidity || "--"} % +
+
+
+ 环境温度: +
+ {waterLevelSix[waterLevelSix.length - 1]?.sTEMP || "--"} ℃ +
+
+
+ 信号:
+ +
+
+ +
+ } return
-
+ {isMobile ? renderMobilePage() :
}
-
- -
+ } + } function mapStateToProps(state) { diff --git a/web/client/src/sections/bigScreen/components/electrity/realTimeStatus.js b/web/client/src/sections/bigScreen/components/electrity/realTimeStatus.js index f20bf35..02bce58 100644 --- a/web/client/src/sections/bigScreen/components/electrity/realTimeStatus.js +++ b/web/client/src/sections/bigScreen/components/electrity/realTimeStatus.js @@ -1,10 +1,10 @@ import React, { useState, useEffect } from 'react'; import { connect } from 'react-redux'; import moment from 'moment' - import { Select, Modal, Switch, Input, Button, Form, message } from 'antd'; +import './realTimeStatus.less' -const RealTimeStatus = ({ dispatch, actions, user, pumpId, pumpList, setPumpId, strucId, siteList, pumpOne, setPumpOne, currentSix }) => { +const RealTimeStatus = ({ dispatch, actions, user, pumpId, pumpList, setPumpId, strucId, siteList, pumpOne, setPumpOne, currentSix, isMobile }) => { const { bigScreen } = actions; @@ -175,17 +175,24 @@ const RealTimeStatus = ({ dispatch, actions, user, pumpId, pumpList, setPumpId, }) } - return
-
实时状态
+
实时状态