|
@@ -4,6 +4,7 @@ import { queryConditionSnapshot } from '@/services/SmartOps';
|
|
import { getToken, UnityAction } from '@/utils/utils';
|
|
import { getToken, UnityAction } from '@/utils/utils';
|
|
import { LoadingOutlined } from '@ant-design/icons';
|
|
import { LoadingOutlined } from '@ant-design/icons';
|
|
import { connect, useParams, useRequest } from '@umijs/max';
|
|
import { connect, useParams, useRequest } from '@umijs/max';
|
|
|
|
+import { Popover } from 'antd';
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
import { useEffect, useState } from 'react';
|
|
import { useEffect, useState } from 'react';
|
|
import { getScadaPage } from '../../services/OperationManagement';
|
|
import { getScadaPage } from '../../services/OperationManagement';
|
|
@@ -36,6 +37,7 @@ const HomePage = (props) => {
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
localStorage.width = document.documentElement.getBoundingClientRect().width;
|
|
localStorage.width = document.documentElement.getBoundingClientRect().width;
|
|
window.refreshRem();
|
|
window.refreshRem();
|
|
|
|
+ document.body.style.backgroundColor = 'transparent';
|
|
}, []);
|
|
}, []);
|
|
return (
|
|
return (
|
|
<div className={styles.content} {...webMouseEvent}>
|
|
<div className={styles.content} {...webMouseEvent}>
|
|
@@ -224,40 +226,49 @@ const SelfInspection = connect(({ eqSelfInspection, loading }) => ({
|
|
// 能耗监测
|
|
// 能耗监测
|
|
const Electric = (props) => {
|
|
const Electric = (props) => {
|
|
const { data } = props;
|
|
const { data } = props;
|
|
- const { projectId } = useParams();
|
|
|
|
const [open, setOpen] = useState(false);
|
|
const [open, setOpen] = useState(false);
|
|
- const title = (
|
|
|
|
- <div
|
|
|
|
- onClick={(e) => {
|
|
|
|
- e.stopPropagation();
|
|
|
|
- setOpen(!open);
|
|
|
|
- }}
|
|
|
|
- >
|
|
|
|
- 能耗监测
|
|
|
|
- <div
|
|
|
|
- style={{ marginLeft: 10 }}
|
|
|
|
- className={`password-eye ${open ? 'open' : ''}`}
|
|
|
|
- ></div>
|
|
|
|
|
|
+
|
|
|
|
+ const content = (
|
|
|
|
+ <div className={styles.popoverContent}>
|
|
|
|
+ <p>理论值规则:</p>
|
|
|
|
+ <p>分为高/中/低温3档,</p>
|
|
|
|
+ <p>高温为≥25℃,低温为<20℃,中温为≥20且<25℃</p>
|
|
|
|
+ <p>当前温度为近一天平均温度</p>
|
|
</div>
|
|
</div>
|
|
);
|
|
);
|
|
|
|
+
|
|
return (
|
|
return (
|
|
<div
|
|
<div
|
|
className={styles.electric}
|
|
className={styles.electric}
|
|
onClick={() => UnityAction.sendMsg('menuItem', '能耗监测')}
|
|
onClick={() => UnityAction.sendMsg('menuItem', '能耗监测')}
|
|
>
|
|
>
|
|
- <Title title={title} />
|
|
|
|
|
|
+ <Title title={'能耗监测'} />
|
|
|
|
+
|
|
|
|
+ <div
|
|
|
|
+ className={`password-eye ${styles.eye} ${open ? 'open' : ''}`}
|
|
|
|
+ onClick={(e) => {
|
|
|
|
+ e.stopPropagation();
|
|
|
|
+ setOpen(!open);
|
|
|
|
+ }}
|
|
|
|
+ ></div>
|
|
<ul>
|
|
<ul>
|
|
<li>
|
|
<li>
|
|
<div className={styles.value}>
|
|
<div className={styles.value}>
|
|
{open ? getValue(data?.elec_unit) : '*****'}
|
|
{open ? getValue(data?.elec_unit) : '*****'}
|
|
</div>
|
|
</div>
|
|
- <div className={styles.btn1}>吨水电耗(KWh/m³)</div>
|
|
|
|
|
|
+ <div className={styles.btn1}>吨水电耗</div>
|
|
</li>
|
|
</li>
|
|
<li>
|
|
<li>
|
|
<div className={styles.value}>
|
|
<div className={styles.value}>
|
|
- {open ? getValue(data?.elec) : '*****'}
|
|
|
|
|
|
+ {/* {open ? getValue(data?.elec) : '*****'} */}
|
|
|
|
+ 12312312
|
|
</div>
|
|
</div>
|
|
- <div className={styles.btn1}>用电量(KWh/h)</div>
|
|
|
|
|
|
+ <Popover title={content}>
|
|
|
|
+ <div className={styles.btn1} onClick={(e) => e.stopPropagation()}>
|
|
|
|
+ 理论值(KWh/m³)
|
|
|
|
+ <i className={styles.iconAlert}></i>
|
|
|
|
+ </div>
|
|
|
|
+ </Popover>
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
@@ -283,33 +294,39 @@ const Medicine = () => {
|
|
return res[0];
|
|
return res[0];
|
|
},
|
|
},
|
|
});
|
|
});
|
|
- const title = (
|
|
|
|
- <div
|
|
|
|
- onClick={(e) => {
|
|
|
|
- e.stopPropagation();
|
|
|
|
- setOpen(!open);
|
|
|
|
- }}
|
|
|
|
- >
|
|
|
|
- 药耗监测
|
|
|
|
- <div
|
|
|
|
- style={{ marginLeft: 10 }}
|
|
|
|
- className={`password-eye ${open ? 'open' : ''}`}
|
|
|
|
- ></div>
|
|
|
|
|
|
+ const content = (
|
|
|
|
+ <div className={styles.popoverContent}>
|
|
|
|
+ <p>理论值规则:</p>
|
|
|
|
+ <p>分为高/中/低温3档,</p>
|
|
|
|
+ <p>高温为≥25℃,低温为<20℃,中温为≥20且<25℃</p>
|
|
|
|
+ <p>当前温度为近一天平均温度</p>
|
|
</div>
|
|
</div>
|
|
);
|
|
);
|
|
-
|
|
|
|
return (
|
|
return (
|
|
<div
|
|
<div
|
|
className={styles.medicine}
|
|
className={styles.medicine}
|
|
onClick={() => UnityAction.sendMsg('menuItem', '药耗监测')}
|
|
onClick={() => UnityAction.sendMsg('menuItem', '药耗监测')}
|
|
>
|
|
>
|
|
- <Title title={title} />
|
|
|
|
|
|
+ <Title title={'药耗监测'} />
|
|
|
|
+
|
|
|
|
+ <div
|
|
|
|
+ className={`password-eye ${styles.eye} ${open ? 'open' : ''}`}
|
|
|
|
+ onClick={(e) => {
|
|
|
|
+ e.stopPropagation();
|
|
|
|
+ setOpen(!open);
|
|
|
|
+ }}
|
|
|
|
+ ></div>
|
|
<ul>
|
|
<ul>
|
|
<li>
|
|
<li>
|
|
<div className={styles.valueLong}>
|
|
<div className={styles.valueLong}>
|
|
{open ? data?.value?.toFixed(2) : '*****'}
|
|
{open ? data?.value?.toFixed(2) : '*****'}
|
|
</div>
|
|
</div>
|
|
- <div className={styles.btn1}>当月吨水药成本(元)</div>
|
|
|
|
|
|
+ <Popover title={content}>
|
|
|
|
+ <div className={styles.btn1} onClick={(e) => e.stopPropagation()}>
|
|
|
|
+ 当月吨水药成本(元)
|
|
|
|
+ <i className={styles.iconAlert}></i>
|
|
|
|
+ </div>
|
|
|
|
+ </Popover>
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|