|
@@ -1,7 +1,6 @@
|
|
|
import PageContent from '@/components/PageContent';
|
|
|
import PageTitle from '@/components/PageTitle';
|
|
|
import { GetTokenFromUrl, UnityAction } from '@/utils/utils';
|
|
|
-import { DiffFilled, FundFilled } from '@ant-design/icons';
|
|
|
import { connect, history, useLocation, useParams } from '@umijs/max';
|
|
|
import { Button, Form, Modal, Select, Spin, message } from 'antd';
|
|
|
import dayjs from 'dayjs';
|
|
@@ -112,46 +111,49 @@ const EqSelfInspection = (props) => {
|
|
|
<PageContent>
|
|
|
<PageTitle>系统自检</PageTitle>
|
|
|
<Spin spinning={loading} tip="正在自检中...">
|
|
|
- <div className={`${styles.itemMain} card-box`} style={{ padding: 20 }}>
|
|
|
- <div style={{ position: 'relative', display: 'flex' }}>
|
|
|
- <div style={{ fontSize: 24 }}>
|
|
|
- 自检间隔:{autoReport?.RouteInfo?.PlanDur}h
|
|
|
- </div>
|
|
|
- <div className={styles.icon}>
|
|
|
- <DiffFilled
|
|
|
- style={{ cursor: 'pointer', marginRight: 20 }}
|
|
|
- onClick={() => {
|
|
|
- history.push(
|
|
|
- `/self-inspection/list/${projectId}`,
|
|
|
- );
|
|
|
- }}
|
|
|
- />
|
|
|
- <FundFilled
|
|
|
- onClick={() => {
|
|
|
- history.push(
|
|
|
- `/self-inspection/statistics/${projectId}?JWT-TOKEN=${GetTokenFromUrl()}`,
|
|
|
- );
|
|
|
- }}
|
|
|
- />
|
|
|
- </div>
|
|
|
+ <div
|
|
|
+ className={`${styles.itemMain} card-box`}
|
|
|
+ style={{ padding: '10px 20px' }}
|
|
|
+ >
|
|
|
+ <div style={{ fontSize: 20, color: 'rgba(110, 110, 110, 1)' }}>
|
|
|
+ 自检间隔:{autoReport?.RouteInfo?.PlanDur}h
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div className={styles.icon}>
|
|
|
+ <div
|
|
|
+ className={styles.iconDiffFilled}
|
|
|
+ onClick={() => {
|
|
|
+ history.push(`/self-inspection/list/${projectId}`);
|
|
|
+ }}
|
|
|
+ ></div>
|
|
|
+ <div
|
|
|
+ className={styles.iconFundFilled}
|
|
|
+ onClick={() => {
|
|
|
+ history.push(
|
|
|
+ `/self-inspection/statistics/${projectId}?JWT-TOKEN=${GetTokenFromUrl()}`,
|
|
|
+ );
|
|
|
+ }}
|
|
|
+ ></div>
|
|
|
</div>
|
|
|
<div className={styles.logoInfo}>
|
|
|
<div className={styles.logo} />
|
|
|
- <div style={{ display: 'flex', fontSize: 20 }}>
|
|
|
+ <div className={styles.logoTitle}>
|
|
|
<div>系统自检发现</div>
|
|
|
<div
|
|
|
style={{
|
|
|
- color: autoReport?.warningTotalNum === 0 ? '#333' : '#FE5850',
|
|
|
- margin: '0 6px 0 6px',
|
|
|
+ color:
|
|
|
+ autoReport?.warningTotalNum === 0
|
|
|
+ ? '#333'
|
|
|
+ : 'rgba(254, 88, 80, 1)',
|
|
|
+ margin: '0 6px',
|
|
|
}}
|
|
|
>
|
|
|
{autoReport?.warningTotalNum === 0
|
|
|
? '暂无'
|
|
|
- : autoReport?.warningTotalNum || 0}
|
|
|
+ : autoReport?.warningTotalNum + '项异常'}
|
|
|
</div>
|
|
|
- <div>项异常</div>
|
|
|
</div>
|
|
|
- <div style={{ fontSize: 20 }}>
|
|
|
+ <div className={styles.logoTime}>
|
|
|
{autoReport?.CreatedTime
|
|
|
? dayjs(autoReport?.CreatedTime).format('YYYY-MM-DD HH:mm')
|
|
|
: ''}
|
|
@@ -160,17 +162,10 @@ const EqSelfInspection = (props) => {
|
|
|
<Button type="primary" onClick={HandleInspection}>
|
|
|
一键自检
|
|
|
</Button>
|
|
|
- <div
|
|
|
- style={{
|
|
|
- position: 'absolute',
|
|
|
- display: 'flex',
|
|
|
- alignItems: 'flex-end',
|
|
|
- right: 0,
|
|
|
- height: '100%',
|
|
|
- }}
|
|
|
- >
|
|
|
- <div>系统自检中</div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ <div className={styles.logoFont}>
|
|
|
+ 系统自检中
|
|
|
+ <div className={styles.iconSetting}></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -192,20 +187,19 @@ const EqSelfInspection = (props) => {
|
|
|
<WarningItem label={item.label} status={item.status} />
|
|
|
))}
|
|
|
</Item>
|
|
|
- <div className={styles.reportBtn}>
|
|
|
- <Button
|
|
|
- type="primary"
|
|
|
- onClick={() => {
|
|
|
- history.push(
|
|
|
- `/self-inspection/detail/${projectId}/${
|
|
|
- autoReport?.Id
|
|
|
- }?JWT-TOKEN=${GetTokenFromUrl()}`,
|
|
|
- );
|
|
|
- }}
|
|
|
- >
|
|
|
- 查看自检报告
|
|
|
- </Button>
|
|
|
- </div>
|
|
|
+ <Button
|
|
|
+ className={styles.reportBtn}
|
|
|
+ type="primary"
|
|
|
+ onClick={() => {
|
|
|
+ history.push(
|
|
|
+ `/self-inspection/detail/${projectId}/${
|
|
|
+ autoReport?.Id
|
|
|
+ }?JWT-TOKEN=${GetTokenFromUrl()}`,
|
|
|
+ );
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 查看自检报告
|
|
|
+ </Button>
|
|
|
|
|
|
<Modal
|
|
|
title="选择巡检路线"
|
|
@@ -253,11 +247,7 @@ const Item = (props) => {
|
|
|
const renderRight = (status) => {
|
|
|
switch (status) {
|
|
|
case 0:
|
|
|
- return (
|
|
|
- <div className={styles.right} style={{ color: '#52c41a' }}>
|
|
|
- 正常
|
|
|
- </div>
|
|
|
- );
|
|
|
+ return <div className={`${styles.iconSuccess} ${styles.right}`}></div>;
|
|
|
case 1:
|
|
|
return (
|
|
|
<div className={styles.right} style={{ color: '#FE5850' }}>
|
|
@@ -268,22 +258,13 @@ const Item = (props) => {
|
|
|
return;
|
|
|
// return <SyncOutlined className={styles.right} spin />;
|
|
|
default:
|
|
|
- return (
|
|
|
- <div className={styles.right} style={{ color: '#52c41a' }}>
|
|
|
- 正常
|
|
|
- </div>
|
|
|
- );
|
|
|
+ return <div className={`${styles.iconSuccess} ${styles.right}`}></div>;
|
|
|
}
|
|
|
};
|
|
|
return (
|
|
|
- <div
|
|
|
- className={`${styles.itemMain} card-box`}
|
|
|
- style={{
|
|
|
- paddingBottom: children ? 20 : 0,
|
|
|
- }}
|
|
|
- >
|
|
|
- <div className={styles.item}>
|
|
|
- <span>{name}</span>
|
|
|
+ <div className={`${styles.itemMain} card-box`}>
|
|
|
+ <div className={styles.item} style={{ height: children ? 60 : '' }}>
|
|
|
+ <span className={styles.itemName}>{name}</span>
|
|
|
<span className={styles.warningText}>{warningText}</span>
|
|
|
{renderRight(status)}
|
|
|
</div>
|
|
@@ -297,16 +278,18 @@ const WarningItem = (props) => {
|
|
|
return (
|
|
|
<div className={styles.warningItem}>
|
|
|
<span>{label}</span>
|
|
|
- <div
|
|
|
- style={{
|
|
|
- color: status === 1 ? '#FE5850' : '#52c41a',
|
|
|
- fontSize: 20,
|
|
|
- position: 'absolute',
|
|
|
- right: 20,
|
|
|
- }}
|
|
|
- >
|
|
|
- {status === 0 ? '正常' : '异常'}
|
|
|
- </div>
|
|
|
+
|
|
|
+ {status === 0 ? (
|
|
|
+ <div className={styles.iconSuccess}></div>
|
|
|
+ ) : (
|
|
|
+ <span
|
|
|
+ style={{
|
|
|
+ color: '#FE5850',
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 异常
|
|
|
+ </span>
|
|
|
+ )}
|
|
|
</div>
|
|
|
);
|
|
|
};
|