|
@@ -2,9 +2,9 @@ import PageContent from '@/components/PageContent';
|
|
|
import PageTitle from '@/components/PageTitle';
|
|
|
import { GetTokenFromUrl, UnityAction } from '@/utils/utils';
|
|
|
import { connect, history, useParams } from '@umijs/max';
|
|
|
-import { Table } from 'antd';
|
|
|
import dayjs from 'dayjs';
|
|
|
import { Fragment, useEffect } from 'react';
|
|
|
+import styles from './index.less';
|
|
|
|
|
|
function List(props) {
|
|
|
const { loading, list, processList = [], dispatch } = props;
|
|
@@ -67,8 +67,7 @@ function List(props) {
|
|
|
];
|
|
|
};
|
|
|
|
|
|
- const goToDetail = (record, e) => {
|
|
|
- e.stopPropagation();
|
|
|
+ const goToDetail = (record) => {
|
|
|
UnityAction.sendMsg('reportDetail', '');
|
|
|
history.push(
|
|
|
`/self-inspection/detail/${projectId}/${
|
|
@@ -94,12 +93,31 @@ function List(props) {
|
|
|
<PageContent closeable={false}>
|
|
|
<PageTitle returnable>自检记录</PageTitle>
|
|
|
|
|
|
- <Table
|
|
|
- bordered
|
|
|
- loading={loading}
|
|
|
- columns={getColumns()}
|
|
|
- dataSource={list}
|
|
|
- />
|
|
|
+ <div className={styles.list}>
|
|
|
+ {list.map((item) => (
|
|
|
+ <div className={styles.item} onClick={() => goToDetail(item)}>
|
|
|
+ {item.Status == 0 ? (
|
|
|
+ <div className={`${styles.status}`}>正常</div>
|
|
|
+ ) : (
|
|
|
+ <div className={`${styles.status} ${styles.statusError}`}>
|
|
|
+ 异常
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ <div className={styles.info}>
|
|
|
+ <div className={styles.time}>
|
|
|
+ <i></i>自检时间:{dayjs(item.CreatedTime).format('MM-DD HH:mm')}
|
|
|
+ </div>
|
|
|
+ {/* <div className={styles.desc}>
|
|
|
+ <i></i>
|
|
|
+ 发现异常
|
|
|
+ <span className={styles.number}>4</span>
|
|
|
+ <span>项</span>
|
|
|
+ </div> */}
|
|
|
+ </div>
|
|
|
+ <div className={styles.btn}></div>
|
|
|
+ </div>
|
|
|
+ ))}
|
|
|
+ </div>
|
|
|
</PageContent>
|
|
|
);
|
|
|
}
|