|
@ -31,9 +31,18 @@ const Electrical = ({ dispatch, actions, siteList }) => { |
|
|
const [electricityTrend, setElectricityTrend] = useState([]) //电流趋势
|
|
|
const [electricityTrend, setElectricityTrend] = useState([]) //电流趋势
|
|
|
const [useTrend, setUseTrend] = useState([]) //用电趋势
|
|
|
const [useTrend, setUseTrend] = useState([]) //用电趋势
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
|
setStrucId(siteList[0]?.value) |
|
|
const autoStructId = sessionStorage.getItem('structId'); |
|
|
|
|
|
let nextStructId = siteList[0]?.value; |
|
|
|
|
|
if (autoStructId) { |
|
|
|
|
|
for (let i = 0; i < siteList.length; i++) { |
|
|
|
|
|
if (autoStructId == siteList[i].value) { |
|
|
|
|
|
nextStructId = siteList[i].value; |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
setStrucId(nextStructId); |
|
|
}, [siteList]) |
|
|
}, [siteList]) |
|
|
|
|
|
|
|
|
useEffect(async () => { |
|
|
useEffect(async () => { |
|
@ -202,7 +211,7 @@ const Electrical = ({ dispatch, actions, siteList }) => { |
|
|
}}> |
|
|
}}> |
|
|
<div style={{ fontSize: 20, color: '#E2F8FF', fontWeight: 600 }}> |
|
|
<div style={{ fontSize: 20, color: '#E2F8FF', fontWeight: 600 }}> |
|
|
环境湿度:</div> |
|
|
环境湿度:</div> |
|
|
<span style={{color: '#00FFF8',fontFamily:"D-DIN-Italic"}}>{depthWater[depthWater.length-1]?.sHumidity || "--"} %</span> |
|
|
<span style={{ color: '#00FFF8', fontFamily: "D-DIN-Italic" }}>{depthWater[depthWater.length - 1]?.sHumidity || "--"} %</span> |
|
|
</div> |
|
|
</div> |
|
|
<div style={{ |
|
|
<div style={{ |
|
|
backgroundImage: 'url(/assets/images/monitor/pedestal.png)', |
|
|
backgroundImage: 'url(/assets/images/monitor/pedestal.png)', |
|
@ -212,7 +221,7 @@ const Electrical = ({ dispatch, actions, siteList }) => { |
|
|
<div style={{ fontSize: 20, color: '#E2F8FF', fontWeight: 600 }}> |
|
|
<div style={{ fontSize: 20, color: '#E2F8FF', fontWeight: 600 }}> |
|
|
环境温度: |
|
|
环境温度: |
|
|
</div> |
|
|
</div> |
|
|
<span style={{color: '#00FFF8',fontFamily:"D-DIN-Italic"}}>{depthWater[depthWater.length-1]?.sTEMP || "--"} ℃</span> |
|
|
<span style={{ color: '#00FFF8', fontFamily: "D-DIN-Italic" }}>{depthWater[depthWater.length - 1]?.sTEMP || "--"} ℃</span> |
|
|
</div> |
|
|
</div> |
|
|
<div style={{ |
|
|
<div style={{ |
|
|
backgroundImage: 'url(/assets/images/monitor/pedestal.png)', |
|
|
backgroundImage: 'url(/assets/images/monitor/pedestal.png)', |
|
@ -221,7 +230,7 @@ const Electrical = ({ dispatch, actions, siteList }) => { |
|
|
}}> |
|
|
}}> |
|
|
<div style={{ fontSize: 20, color: '#E2F8FF', fontWeight: 600 }}> |
|
|
<div style={{ fontSize: 20, color: '#E2F8FF', fontWeight: 600 }}> |
|
|
信号:</div> |
|
|
信号:</div> |
|
|
<span style={{color: '#00FFF8',fontFamily:"D-DIN-Italic"}}>{depthWater[depthWater.length-1]?.CSQ4G || "--"}</span> |
|
|
<span style={{ color: '#00FFF8', fontFamily: "D-DIN-Italic" }}>{depthWater[depthWater.length - 1]?.CSQ4G || "--"}</span> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<img style={{ width: "44%", height: "46%", position: "absolute", left: "28%", top: "34%" }} src={`/assets/images/electrical/centre.png`} /> |
|
|
<img style={{ width: "44%", height: "46%", position: "absolute", left: "28%", top: "34%" }} src={`/assets/images/electrical/centre.png`} /> |
|
@ -254,7 +263,7 @@ const Electrical = ({ dispatch, actions, siteList }) => { |
|
|
</div > |
|
|
</div > |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function mapStateToProps (state) { |
|
|
function mapStateToProps(state) { |
|
|
const { auth, global } = state; |
|
|
const { auth, global } = state; |
|
|
return { |
|
|
return { |
|
|
user: auth.user, |
|
|
user: auth.user, |
|
|