|
@@ -1,6 +1,6 @@
|
|
|
import { getComparisonData } from '@/services/OperationManagement';
|
|
|
import { queryConditionSnapshot } from '@/services/SmartOps';
|
|
|
-import { UnityAction } from '@/utils/utils';
|
|
|
+import { getToken, UnityAction } from '@/utils/utils';
|
|
|
import { LoadingOutlined } from '@ant-design/icons';
|
|
|
import { connect, useParams, useRequest } from '@umijs/max';
|
|
|
import dayjs from 'dayjs';
|
|
@@ -17,6 +17,7 @@ const HomePage = (props) => {
|
|
|
return (
|
|
|
<div className={styles.content}>
|
|
|
<LeftContent data={data} />
|
|
|
+ <CenterContent />
|
|
|
<RightContent data={data} />
|
|
|
</div>
|
|
|
);
|
|
@@ -32,6 +33,13 @@ const LeftContent = (props) => {
|
|
|
</div>
|
|
|
);
|
|
|
};
|
|
|
+const CenterContent = () => {
|
|
|
+ return (
|
|
|
+ <div className={styles.centerBox}>
|
|
|
+ <Scada />
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+};
|
|
|
const RightContent = (props) => {
|
|
|
const { data } = props;
|
|
|
return (
|
|
@@ -205,6 +213,35 @@ const Medicine = () => {
|
|
|
);
|
|
|
};
|
|
|
|
|
|
+// 工艺监控
|
|
|
+const Scada = () => {
|
|
|
+ const { projectId } = useParams();
|
|
|
+ const token = getToken();
|
|
|
+ let domain =
|
|
|
+ process.env.NODE_ENV === 'production'
|
|
|
+ ? 'http://120.55.44.4:8900/'
|
|
|
+ : 'http://47.96.12.136:8788/';
|
|
|
+ const src = `${domain}smart-water/scada/index.html#/3dview/${projectId}/267?JWT-TOKEN=${token}&hideTitle=true`;
|
|
|
+ return (
|
|
|
+ <Box
|
|
|
+ title="工艺监控"
|
|
|
+ onClick={() => UnityAction.sendMsg('menuItem', '工艺监控')}
|
|
|
+ >
|
|
|
+ <div className={styles.scadaContent}>
|
|
|
+ <iframe
|
|
|
+ style={{
|
|
|
+ width: '100%',
|
|
|
+ height: '100%',
|
|
|
+ border: 'none',
|
|
|
+ pointerEvents: 'none',
|
|
|
+ }}
|
|
|
+ src={src}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </Box>
|
|
|
+ );
|
|
|
+};
|
|
|
+
|
|
|
const Box = ({ title, children, onClick }) => {
|
|
|
return (
|
|
|
<div className={styles.box} onClick={onClick}>
|