|
@@ -9,7 +9,7 @@ import {
|
|
|
} from '@/pages/TaskManage/constent';
|
|
|
import { getDiagnosticDetail, getMandateDetail } from '@/services/TaskManage';
|
|
|
import { useLocation } from '@@/exports';
|
|
|
-import { UpOutlined } from '@ant-design/icons';
|
|
|
+import { CaretDownFilled } from '@ant-design/icons';
|
|
|
import { connect, useRequest } from '@umijs/max';
|
|
|
import { Col, Collapse, Divider, Row, Table } from 'antd';
|
|
|
import dayjs from 'dayjs';
|
|
@@ -39,10 +39,12 @@ function TaskDetail(props) {
|
|
|
title: '详情',
|
|
|
dataIndex: 'detail',
|
|
|
key: 'key',
|
|
|
- render: (value, record) => {
|
|
|
+ render: (value, _record, index) => {
|
|
|
return (
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}>
|
|
|
- <div style={{ width: '100%' }}>{value.text}</div>
|
|
|
+ <div style={{ width: '100%' }}>
|
|
|
+ {index + 1}、{value.text}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
);
|
|
|
},
|
|
@@ -99,7 +101,7 @@ function TaskDetail(props) {
|
|
|
{
|
|
|
key: '1',
|
|
|
label: (
|
|
|
- <span style={{ color: '#5697e4' }}>
|
|
|
+ <span style={{ color: '#ffffff', marginRight: '0.05rem' }}>
|
|
|
关联工单({workOrder.length})
|
|
|
</span>
|
|
|
),
|
|
@@ -107,19 +109,19 @@ function TaskDetail(props) {
|
|
|
return (
|
|
|
<div key={record.Id} className={styles.workOrderCard}>
|
|
|
<div className={styles.leftInfo}>
|
|
|
- <Row style={{ marginBottom: '15px' }}>
|
|
|
- <Col className={styles.fontS24} span={12}>
|
|
|
+ <Row style={{ marginBottom: '0.15rem' }}>
|
|
|
+ <Col className={styles.fontS30} span={10}>
|
|
|
<>
|
|
|
工单类型:
|
|
|
{record.RecordType?.label?.replace('工单', '')}
|
|
|
</>
|
|
|
</Col>
|
|
|
- <Col className={styles.fontS24} span={12}>
|
|
|
+ <Col className={styles.fontS30} span={14}>
|
|
|
时间:{record.CreateTime || '-'}
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<Row>
|
|
|
- <Col className={styles.fontS24} span={12}>
|
|
|
+ <Col className={styles.fontS30} span={10}>
|
|
|
工单状态:
|
|
|
<span style={{ color: '#5697e4' }}>
|
|
|
{typeof record.Status === 'number'
|
|
@@ -127,7 +129,7 @@ function TaskDetail(props) {
|
|
|
: record.Status?.label}
|
|
|
</span>
|
|
|
</Col>
|
|
|
- <Col className={styles.fontS24} span={12}>
|
|
|
+ <Col className={styles.fontS30} span={14}>
|
|
|
工单负责人:
|
|
|
{typeof record.Responsible === 'number'
|
|
|
? '-'
|
|
@@ -135,23 +137,41 @@ function TaskDetail(props) {
|
|
|
</Col>
|
|
|
</Row>
|
|
|
</div>
|
|
|
- <Divider type="vertical" style={{ height: '40px' }} />
|
|
|
- <div
|
|
|
- className={styles.rightButton}
|
|
|
- style={{ color: '#5697e4' }}
|
|
|
- onClick={() => {
|
|
|
- if (typeof record.RecordType === 'number') {
|
|
|
- return;
|
|
|
- }
|
|
|
- // @ts-ignore
|
|
|
- goTaskOrder(
|
|
|
- record.Id,
|
|
|
- record.RecordType?.value,
|
|
|
- tempMandate?.MandateClass.value,
|
|
|
- );
|
|
|
- }}
|
|
|
- >
|
|
|
- 查看工单
|
|
|
+ <Divider type="vertical" style={{ height: '0.4rem' }} />
|
|
|
+ <div className={styles.rightButtonContainer}>
|
|
|
+ <div
|
|
|
+ className={styles.rightButton}
|
|
|
+ onClick={() => {
|
|
|
+ if (typeof record.RecordType === 'number') {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // @ts-ignore
|
|
|
+ goMyWorkOrder(
|
|
|
+ record.Id,
|
|
|
+ record.RecordType?.value,
|
|
|
+ tempMandate?.MandateClass.value,
|
|
|
+ );
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 查看
|
|
|
+ </div>
|
|
|
+ {/* <div
|
|
|
+ className={styles.rightButton}
|
|
|
+ style={{ color: '#5697e4' }}
|
|
|
+ onClick={() => {
|
|
|
+ if (typeof record.RecordType === 'number') {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // @ts-ignore
|
|
|
+ goTaskOrder(
|
|
|
+ record.Id,
|
|
|
+ record.RecordType?.value,
|
|
|
+ tempMandate?.MandateClass.value,
|
|
|
+ );
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 关闭工单
|
|
|
+ </div> */}
|
|
|
</div>
|
|
|
</div>
|
|
|
);
|
|
@@ -232,33 +252,36 @@ function TaskDetail(props) {
|
|
|
setMandateTable(dataSource);
|
|
|
}, [mandateChild]);
|
|
|
|
|
|
- const goTaskOrder = (orderID, orderType, mandateClass) => {
|
|
|
+ const goMyWorkOrder = (orderID, orderType, mandateClass) => {
|
|
|
+ if (orderType === undefined) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
navigate(
|
|
|
- `/task-manage/list/order-detail?project_id=${project_id}&order_id=${orderID}&order_type=${orderType}&mandate_class=${mandateClass}`,
|
|
|
+ `/center/my-task/work-order-detail?project_id=${project_id}&order_id=${orderID}&order_type=${orderType}&mandate_class=${mandateClass}`,
|
|
|
);
|
|
|
};
|
|
|
|
|
|
return (
|
|
|
<PageContent closeable={false}>
|
|
|
<PageTitle returnable>任务详情</PageTitle>
|
|
|
- <div className={`${styles.cardContainer} card-box`}>
|
|
|
+ <div className={`${styles.cardContainer}`}>
|
|
|
<div className={styles.normalInfo}>
|
|
|
- <Row className={styles.infoRow} justify="space-between">
|
|
|
- <Col className={styles.fontS24}>
|
|
|
+ <Row className={styles.infoRow}>
|
|
|
+ <Col span={14} className={styles.fontS30}>
|
|
|
时间:{mandateDetail?.CreateTime}
|
|
|
</Col>
|
|
|
{/*// @ts-ignore*/}
|
|
|
- <Col className={styles.fontS24}>
|
|
|
+ <Col className={styles.fontS30}>
|
|
|
{/*//@ts-ignore*/}
|
|
|
任务类别:{mandateDetail?.MandateClass?.label}
|
|
|
</Col>
|
|
|
</Row>
|
|
|
- <Row justify="space-between">
|
|
|
- <Col className={styles.fontS24}>
|
|
|
+ <Row>
|
|
|
+ <Col span={14} className={styles.fontS30}>
|
|
|
{/*//@ts-ignore*/}
|
|
|
任务状态:{mandateDetail?.Status?.label}
|
|
|
</Col>
|
|
|
- <Col className={styles.fontS24}>
|
|
|
+ <Col className={styles.fontS30}>
|
|
|
{/*// @ts-ignore*/}
|
|
|
任务负责人:{mandateDetail?.ResponsiblePeople?.CName}
|
|
|
</Col>
|
|
@@ -266,20 +289,32 @@ function TaskDetail(props) {
|
|
|
</div>
|
|
|
<div className={styles.detailInfo}>
|
|
|
<Row className={styles.infoRow}>
|
|
|
- <Col className={styles.fontS24} span={4}>
|
|
|
+ <Col
|
|
|
+ className={styles.fontS30}
|
|
|
+ span={4}
|
|
|
+ style={{ fontWeight: 600 }}
|
|
|
+ >
|
|
|
任务总结
|
|
|
</Col>
|
|
|
- <Col className={styles.fontS24}>
|
|
|
+ <Col
|
|
|
+ span={20}
|
|
|
+ className={styles.fontS30}
|
|
|
+ style={{ color: 'rgba(97, 93, 93, 1)' }}
|
|
|
+ >
|
|
|
{mandateDetail?.Summary ||
|
|
|
'根据水质相关数据.建议您调节以下参数,水厂运行可达较优状态'}
|
|
|
</Col>
|
|
|
</Row>
|
|
|
{mandateDetail?.img && (
|
|
|
<Row className={styles.infoRow}>
|
|
|
- <Col className={styles.fontS24} span={4}>
|
|
|
+ <Col
|
|
|
+ className={styles.fontS30}
|
|
|
+ span={4}
|
|
|
+ style={{ fontWeight: 600 }}
|
|
|
+ >
|
|
|
预警图片
|
|
|
</Col>
|
|
|
- <Col className={styles.fontS24}>
|
|
|
+ <Col className={styles.fontS30}>
|
|
|
<ReactZmage
|
|
|
controller={{
|
|
|
// 关闭按钮
|
|
@@ -294,7 +329,7 @@ function TaskDetail(props) {
|
|
|
pagination: false,
|
|
|
}}
|
|
|
backdrop="rgba(255,255,255,0.5)"
|
|
|
- style={{ width: '350px' }}
|
|
|
+ style={{ width: '3.5rem' }}
|
|
|
src={mandateDetail?.img}
|
|
|
/>
|
|
|
</Col>
|
|
@@ -303,10 +338,14 @@ function TaskDetail(props) {
|
|
|
|
|
|
{mandateDetail?.Files.length > 0 && (
|
|
|
<Row className={styles.infoRow}>
|
|
|
- <Col className={styles.fontS24} span={4}>
|
|
|
+ <Col
|
|
|
+ className={styles.fontS30}
|
|
|
+ span={4}
|
|
|
+ style={{ fontWeight: 600 }}
|
|
|
+ >
|
|
|
截图
|
|
|
</Col>
|
|
|
- <Col className={styles.fontS24}>
|
|
|
+ <Col className={styles.fontS30}>
|
|
|
<ReactZmage
|
|
|
controller={{
|
|
|
// 关闭按钮
|
|
@@ -321,7 +360,7 @@ function TaskDetail(props) {
|
|
|
pagination: true,
|
|
|
}}
|
|
|
backdrop="rgba(255,255,255,0.5)"
|
|
|
- style={{ width: '350px' }}
|
|
|
+ style={{ width: '3.5rem' }}
|
|
|
src={mandateDetail?.Files[0].url}
|
|
|
set={mandateDetail?.Files.map((item) => {
|
|
|
if (item) {
|
|
@@ -337,12 +376,17 @@ function TaskDetail(props) {
|
|
|
)}
|
|
|
|
|
|
<Row>
|
|
|
- <Col className={styles.fontS24} span={4}>
|
|
|
+ <Col
|
|
|
+ className={styles.fontS30}
|
|
|
+ span={4}
|
|
|
+ style={{ fontWeight: 600 }}
|
|
|
+ >
|
|
|
任务内容
|
|
|
</Col>
|
|
|
- <Col className={styles.fontS24} span={20}>
|
|
|
+ <Col className={styles.fontS30} span={20}>
|
|
|
{/*{mandateDetail?.Detail}*/}
|
|
|
<Table
|
|
|
+ className={styles.taskTable}
|
|
|
rowKey="key"
|
|
|
columns={columnDef}
|
|
|
dataSource={mandateTable}
|
|
@@ -356,8 +400,8 @@ function TaskDetail(props) {
|
|
|
className={styles.collapseLabel}
|
|
|
ghost
|
|
|
expandIcon={({ isActive }) => (
|
|
|
- <UpOutlined
|
|
|
- style={{ color: '#5697e4' }}
|
|
|
+ <CaretDownFilled
|
|
|
+ style={{ color: '#ffffff' }}
|
|
|
rotate={isActive ? 180 : 0}
|
|
|
/>
|
|
|
)}
|