|
@@ -20,8 +20,8 @@ const HomePage = (props) => {
|
|
|
// }, []);
|
|
|
return (
|
|
|
<div className={styles.content}>
|
|
|
+ <CenterContent data={data} />
|
|
|
<LeftContent data={data} />
|
|
|
- <CenterContent />
|
|
|
<RightContent data={data} />
|
|
|
</div>
|
|
|
);
|
|
@@ -31,18 +31,22 @@ const LeftContent = (props) => {
|
|
|
const { data } = props;
|
|
|
return (
|
|
|
<div className={styles.left}>
|
|
|
- <SmartWork data={data} />
|
|
|
+ {/* <SmartWork data={data} /> */}
|
|
|
<WaterAmt data={data} />
|
|
|
<WaterQuality data={data} />
|
|
|
+ <Backlog />
|
|
|
{/* <Backlog /> */}
|
|
|
</div>
|
|
|
);
|
|
|
};
|
|
|
-const CenterContent = () => {
|
|
|
+const CenterContent = (props) => {
|
|
|
+ const { data } = props;
|
|
|
return (
|
|
|
<div className={styles.centerBox}>
|
|
|
- <Backlog />
|
|
|
- <Scada />
|
|
|
+ <SmartWork data={data} />
|
|
|
+ <SelfInspection />
|
|
|
+ {/* <Backlog />
|
|
|
+ <Scada /> */}
|
|
|
</div>
|
|
|
);
|
|
|
};
|
|
@@ -50,9 +54,10 @@ const RightContent = (props) => {
|
|
|
const { data } = props;
|
|
|
return (
|
|
|
<div className={styles.right}>
|
|
|
- <SelfInspection />
|
|
|
+ {/* <SelfInspection /> */}
|
|
|
<Electric data={data} />
|
|
|
<Medicine />
|
|
|
+ <Scada />
|
|
|
{/* <Scada /> */}
|
|
|
</div>
|
|
|
);
|
|
@@ -62,11 +67,11 @@ const RightContent = (props) => {
|
|
|
const SmartWork = (props) => {
|
|
|
const { data } = props;
|
|
|
return (
|
|
|
- <Box
|
|
|
- small={true}
|
|
|
- title="水厂工况"
|
|
|
+ <div
|
|
|
+ className={styles.smartWork}
|
|
|
onClick={() => UnityAction.sendMsg('menuItem', '工况管理')}
|
|
|
>
|
|
|
+ <Title title="水厂工况" />
|
|
|
<div className={styles.scoreBox}>
|
|
|
<div className={styles.circle}>
|
|
|
<div className={styles.score}>{data?.score}</div>
|
|
@@ -80,7 +85,7 @@ const SmartWork = (props) => {
|
|
|
<div className={styles.time}>
|
|
|
{dayjs(data?.clac_time).format('YYYY-MM-DD HH:mm')}
|
|
|
</div>
|
|
|
- </Box>
|
|
|
+ </div>
|
|
|
);
|
|
|
};
|
|
|
|
|
@@ -89,10 +94,11 @@ const WaterAmt = (props) => {
|
|
|
const { data } = props;
|
|
|
const { projectId } = useParams();
|
|
|
return (
|
|
|
- <Box
|
|
|
- title="水量监测"
|
|
|
+ <div
|
|
|
+ className={styles.waterAmt}
|
|
|
onClick={() => UnityAction.sendMsg('menuItem', '水量监测')}
|
|
|
>
|
|
|
+ <Title title="水量监测" />
|
|
|
<ul>
|
|
|
<li>
|
|
|
<div className={styles.value}>{data?.fwa}</div>
|
|
@@ -103,7 +109,7 @@ const WaterAmt = (props) => {
|
|
|
<div className={styles.btn2}>产水量</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- </Box>
|
|
|
+ </div>
|
|
|
);
|
|
|
};
|
|
|
|
|
@@ -112,21 +118,22 @@ const WaterQuality = (props) => {
|
|
|
const { data } = props;
|
|
|
const { projectId } = useParams();
|
|
|
return (
|
|
|
- <Box
|
|
|
- title="水质监测"
|
|
|
+ <div
|
|
|
+ className={styles.waterQuality}
|
|
|
onClick={() => UnityAction.sendMsg('menuItem', '水质监测')}
|
|
|
>
|
|
|
+ <Title title="水质监测" />
|
|
|
<ul>
|
|
|
<li>
|
|
|
- <div className={styles.value}>{data?.dsan || 0}</div>
|
|
|
+ <div className={styles.valueLong}>{data?.dsan || 0}</div>
|
|
|
<div className={styles.btn1}>出水余氯</div>
|
|
|
</li>
|
|
|
<li>
|
|
|
- <div className={styles.value}>{data?.dtur || 0}</div>
|
|
|
+ <div className={styles.valueLong}>{data?.dtur || 0}</div>
|
|
|
<div className={styles.btn2}>出水浊度</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- </Box>
|
|
|
+ </div>
|
|
|
);
|
|
|
};
|
|
|
|
|
@@ -164,11 +171,11 @@ const SelfInspection = connect(({ eqSelfInspection, loading }) => ({
|
|
|
}, []);
|
|
|
|
|
|
return (
|
|
|
- <Box
|
|
|
- small={true}
|
|
|
- title="系统自检"
|
|
|
+ <div
|
|
|
+ className={styles.selfInspection}
|
|
|
onClick={() => UnityAction.sendMsg('menuItem', '系统自检')}
|
|
|
>
|
|
|
+ <Title title="系统自检" />
|
|
|
<div className={styles.selfCon}>
|
|
|
<div className={styles.circle}>{renderStatus()}</div>
|
|
|
<div className={styles.texting}>自检中</div>
|
|
@@ -182,7 +189,7 @@ const SelfInspection = connect(({ eqSelfInspection, loading }) => ({
|
|
|
<div className={styles.time} style={{ marginBottom: 30 }}>
|
|
|
{dayjs(autoReport.CreatedTime).format('YYYY-MM-DD HH:mm')}
|
|
|
</div> */}
|
|
|
- </Box>
|
|
|
+ </div>
|
|
|
);
|
|
|
});
|
|
|
|
|
@@ -191,17 +198,18 @@ const Electric = (props) => {
|
|
|
const { data } = props;
|
|
|
const { projectId } = useParams();
|
|
|
return (
|
|
|
- <Box
|
|
|
- title="能耗监测"
|
|
|
+ <div
|
|
|
+ className={styles.electric}
|
|
|
onClick={() => UnityAction.sendMsg('menuItem', '能耗监测')}
|
|
|
>
|
|
|
+ <Title title="能耗监测" />
|
|
|
<ul>
|
|
|
<li>
|
|
|
<div className={styles.value}>{data?.elec}</div>
|
|
|
<div className={styles.btn1}>用电量</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- </Box>
|
|
|
+ </div>
|
|
|
);
|
|
|
};
|
|
|
// 药耗监测
|
|
@@ -225,17 +233,20 @@ const Medicine = () => {
|
|
|
});
|
|
|
|
|
|
return (
|
|
|
- <Box
|
|
|
- title="药耗监测"
|
|
|
+ <div
|
|
|
+ className={styles.medicine}
|
|
|
onClick={() => UnityAction.sendMsg('menuItem', '药耗监测')}
|
|
|
>
|
|
|
+ <Title title="药耗监测" />
|
|
|
<ul>
|
|
|
<li>
|
|
|
- <div className={styles.value}>{data?.value?.toFixed(2) || '-'}元</div>
|
|
|
+ <div className={styles.valueLong}>
|
|
|
+ {data?.value?.toFixed(2) || '-'}元
|
|
|
+ </div>
|
|
|
<div className={styles.btn1}>当月吨水药成本</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- </Box>
|
|
|
+ </div>
|
|
|
);
|
|
|
};
|
|
|
|
|
@@ -260,21 +271,26 @@ const Scada = () => {
|
|
|
});
|
|
|
|
|
|
return (
|
|
|
- <Box
|
|
|
- title="工艺监控"
|
|
|
+ <div
|
|
|
+ className={styles.scadaMain}
|
|
|
onClick={() => UnityAction.sendMsg('menuItem', '工艺监控')}
|
|
|
>
|
|
|
- <div className={styles.scada} style={{ width: '540px', height: '270px' }}>
|
|
|
+ <Title title="工艺监控" />
|
|
|
+ <div style={{ width: '707px', height: '279px' }}>
|
|
|
{data?.map((url) => (
|
|
|
<iframe
|
|
|
key={url}
|
|
|
- style={{ width: '540px', height: '270px' }}
|
|
|
+ style={{
|
|
|
+ width: '707px',
|
|
|
+ height: '279px',
|
|
|
+ borderRadius: '0 0 42px 0',
|
|
|
+ }}
|
|
|
src={url}
|
|
|
/>
|
|
|
))}
|
|
|
<div className={styles.mask}></div>
|
|
|
</div>
|
|
|
- </Box>
|
|
|
+ </div>
|
|
|
);
|
|
|
};
|
|
|
|
|
@@ -298,15 +314,12 @@ const Backlog = (props) => {
|
|
|
}
|
|
|
};
|
|
|
return (
|
|
|
- <Box
|
|
|
- title={
|
|
|
- <div style={{ display: 'flex' }}>
|
|
|
- 待办事项
|
|
|
- {/* <div className={styles.count}>{data?.length || 0}</div> */}
|
|
|
- </div>
|
|
|
- }
|
|
|
+ <div
|
|
|
+ className={styles.backlogMain}
|
|
|
onClick={() => UnityAction.sendMsg('menuItem', '待办事项')}
|
|
|
>
|
|
|
+ <Title title={<div style={{ display: 'flex' }}>待办事项</div>} />
|
|
|
+
|
|
|
<div className={styles.backlog}>
|
|
|
<div>
|
|
|
{data?.map((item) => (
|
|
@@ -331,7 +344,15 @@ const Backlog = (props) => {
|
|
|
))}
|
|
|
</div>
|
|
|
</div>
|
|
|
- </Box>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+};
|
|
|
+const Title = ({ title }) => {
|
|
|
+ return (
|
|
|
+ <div className={styles.titleContent}>
|
|
|
+ <div className={styles.line} />
|
|
|
+ <div className={styles.boxTitle}>{title}</div>
|
|
|
+ </div>
|
|
|
);
|
|
|
};
|
|
|
|