|
@@ -1,6 +1,6 @@
|
|
import ModuleTitle from '@/components/ManagementPage/moduleTitle';
|
|
import ModuleTitle from '@/components/ManagementPage/moduleTitle';
|
|
-import { getDumuDetail } from '@/services/eqSelfInspection';
|
|
|
|
-import { connect, useRequest } from '@umijs/max';
|
|
|
|
|
|
+import { getDumuDetail, getMandateIDs } from '@/services/eqSelfInspection';
|
|
|
|
+import { connect, useParams, useRequest } from '@umijs/max';
|
|
import { Checkbox, Col, Row, Spin, Table } from 'antd';
|
|
import { Checkbox, Col, Row, Spin, Table } from 'antd';
|
|
import { useEffect, useMemo, useState } from 'react';
|
|
import { useEffect, useMemo, useState } from 'react';
|
|
import styles from './PatrolReportDetail.less';
|
|
import styles from './PatrolReportDetail.less';
|
|
@@ -15,10 +15,23 @@ import WaterQualityCom from './Table/WaterQualityCom';
|
|
|
|
|
|
function Detail(props) {
|
|
function Detail(props) {
|
|
const { data, userList, projectId, dispatch, loading = false } = props;
|
|
const { data, userList, projectId, dispatch, loading = false } = props;
|
|
|
|
+ const { routeId } = useParams();
|
|
|
|
|
|
const [select, setSelect] = useState();
|
|
const [select, setSelect] = useState();
|
|
const [statusCheck, setStatusCheck] = useState([0, 1, 2]);
|
|
const [statusCheck, setStatusCheck] = useState([0, 1, 2]);
|
|
|
|
|
|
|
|
+ const { data: mandate } = useRequest(getMandateIDs, {
|
|
|
|
+ defaultParams: [
|
|
|
|
+ {
|
|
|
|
+ project_id: projectId,
|
|
|
|
+ id: routeId,
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ formatResult(res) {
|
|
|
|
+ return res;
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+
|
|
const sendMessageToUnity = (select, data) => {
|
|
const sendMessageToUnity = (select, data) => {
|
|
setSelect(select);
|
|
setSelect(select);
|
|
if (window.HightlightEquipment) {
|
|
if (window.HightlightEquipment) {
|
|
@@ -97,7 +110,7 @@ function Detail(props) {
|
|
</Col>
|
|
</Col>
|
|
</Row>
|
|
</Row>
|
|
<Row>
|
|
<Row>
|
|
- <Col span={8} className={styles.cardText}>
|
|
|
|
|
|
+ <Col span={10} className={styles.cardText}>
|
|
自检路线:{data?.RouteInfo?.Name}
|
|
自检路线:{data?.RouteInfo?.Name}
|
|
</Col>
|
|
</Col>
|
|
<Col span={8} className={styles.cardText}>
|
|
<Col span={8} className={styles.cardText}>
|
|
@@ -106,7 +119,7 @@ function Detail(props) {
|
|
</Row>
|
|
</Row>
|
|
<Row>
|
|
<Row>
|
|
{result.map((item, index) => (
|
|
{result.map((item, index) => (
|
|
- <Col span={8} className={styles.cardText}>
|
|
|
|
|
|
+ <Col span={index == 0 ? 10 : 7} className={styles.cardText}>
|
|
{index == 0 && '自检结果:'}
|
|
{index == 0 && '自检结果:'}
|
|
{item.label}-
|
|
{item.label}-
|
|
<span style={{ color: item.color }}>{item.value}</span>
|
|
<span style={{ color: item.color }}>{item.value}</span>
|
|
@@ -141,6 +154,7 @@ function Detail(props) {
|
|
{/* 设备自检报告 */}
|
|
{/* 设备自检报告 */}
|
|
<DeviceReport
|
|
<DeviceReport
|
|
sendMessageToUnity={sendMessageToUnity}
|
|
sendMessageToUnity={sendMessageToUnity}
|
|
|
|
+ mandate={mandate}
|
|
select={select}
|
|
select={select}
|
|
data={data}
|
|
data={data}
|
|
userList={userList}
|
|
userList={userList}
|
|
@@ -151,6 +165,7 @@ function Detail(props) {
|
|
|
|
|
|
<AalysisTable
|
|
<AalysisTable
|
|
onClickItem={sendMessageToUnity}
|
|
onClickItem={sendMessageToUnity}
|
|
|
|
+ mandate={mandate}
|
|
select={select}
|
|
select={select}
|
|
data={data}
|
|
data={data}
|
|
statusCheck={statusCheck}
|
|
statusCheck={statusCheck}
|
|
@@ -158,6 +173,7 @@ function Detail(props) {
|
|
{/* 安全自检报告 */}
|
|
{/* 安全自检报告 */}
|
|
<SecureReport
|
|
<SecureReport
|
|
sendMessageToUnity={sendMessageToUnity}
|
|
sendMessageToUnity={sendMessageToUnity}
|
|
|
|
+ mandate={mandate}
|
|
select={select}
|
|
select={select}
|
|
data={data}
|
|
data={data}
|
|
userList={userList}
|
|
userList={userList}
|
|
@@ -320,7 +336,7 @@ function SecureReport(props) {
|
|
}
|
|
}
|
|
|
|
|
|
function AalysisTable(props) {
|
|
function AalysisTable(props) {
|
|
- const { data = {}, statusCheck } = props;
|
|
|
|
|
|
+ const { data = {}, statusCheck, mandate } = props;
|
|
const { FaultAnalysis } = data;
|
|
const { FaultAnalysis } = data;
|
|
const errorCount = data?.FaultAnalysis?.length || 0;
|
|
const errorCount = data?.FaultAnalysis?.length || 0;
|
|
const columns = [
|
|
const columns = [
|
|
@@ -359,6 +375,12 @@ function AalysisTable(props) {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ title: '关联任务',
|
|
|
|
+ render: (record) => (
|
|
|
|
+ <a>{mandate?.find((item) => item.source == record.Id)?.id}</a>
|
|
|
|
+ ),
|
|
|
|
+ },
|
|
];
|
|
];
|
|
|
|
|
|
if (statusCheck.length != 3) {
|
|
if (statusCheck.length != 3) {
|