Commit 52589d29 authored by TZW's avatar TZW

0000

parent 5906f020
import React, { useState, useEffect } from 'react';
import { ProDescriptions } from '@ant-design/pro-components';
import { Divider, Image } from 'antd';
import { Divider, Image, Collapse } from 'antd';
export default ({ index, title, dataSource, columns, hidden, navhidden = false }) => {
const { Panel } = Collapse;
export default ({ index, title, dataSource, columns, hidden, navhidden = false, type }) => {
const [flag, setflag] = useState(true);
console.log(index, dataSource);
// 0:报修 1:接单 2:派单 3:完成维修 4:转追踪 5:转外协 6:转单 7:退单 8:追踪审核 9:外协审核 10:退单审核 11:效果验证
const columns_mes = {
......@@ -455,6 +458,159 @@ export default ({ index, title, dataSource, columns, hidden, navhidden = false }
setflag(hidden);
}, []);
console.log('datasource', dataSource);
// // 普通的详情展示
// const normalItem = () => {
// return (
// <div>
// <div className="fault-detail">
// <div style={{ flex: 1, display: 'flex', flexDirection: 'row' }}>
// <div
// style={{
// display: 'block',
// width: '30px',
// height: '30px',
// fontWeight: 500,
// textAlign: 'center',
// padding: '2px',
// border: '2px solid #1890FF',
// borderRadius: '50%',
// backgroundColor: 'white',
// marginRight: 16,
// flexShrink: 0,
// }}
// >
// {index}
// </div>
// <div style={{ display: 'flex', flexDirection: 'column' }}>
// <label style={{ width: '40px', fontSize: 18, fontWeight: 600 }}>
// {dataSource?.operationTypeName}
// </label>
// <span>{dataSource?.updateUserName}</span>
// <span>{dataSource?.updateTime}</span>
// </div>
// </div>
// <div style={{ flex: 6 }}>
// <div style={{ marginBottom: 16 }}>
// <h2 className="page-title">{dataSource?.operationTypeName}信息</h2>
// </div>
// <ProDescriptions
// dataSource={dataSource}
// columns={columns_wxgd[dataSource?.operationType]}
// />
// <ProDescriptions dataSource={dataSource} columns={columns_mes['gzxx']} />
// </div>
// </div>
// </div>
// );
// };
// // 带验证的详情展示
// const checkItem = () => {
// return (
// <div>
// <div className="fault-detail">
// <div style={{ flex: 1, display: 'flex', flexDirection: 'row' }}>
// <div
// style={{
// display: 'block',
// width: '30px',
// height: '30px',
// fontWeight: 500,
// textAlign: 'center',
// padding: '2px',
// border: '2px solid #1890FF',
// borderRadius: '50%',
// backgroundColor: 'white',
// marginRight: 16,
// flexShrink: 0,
// }}
// >
// {index}
// </div>
// <div style={{ display: 'flex', flexDirection: 'column' }}>
// <label style={{ width: '40px', fontSize: 18, fontWeight: 600 }}>
// {dataSource?.operationTypeName}
// </label>
// <span>{dataSource?.updateUserName}</span>
// <span>{dataSource?.updateTime}</span>
// </div>
// </div>
// <div style={{ flex: 6 }}>
// <div style={{ marginBottom: 16 }}>
// <h2 className="page-title">{dataSource?.operationTypeName}信息</h2>
// </div>
// <ProDescriptions
// dataSource={dataSource}
// columns={columns_wxgd[dataSource?.operationType]}
// />
// <ProDescriptions dataSource={dataSource} columns={columns_mes['gzxx']} />
// </div>
// </div>
// </div>
// );
// };
const itemischeck = {
wxgd: (
<div>
<div className="fault-detail">
<div style={{ flex: 1, display: 'flex', flexDirection: 'row' }}>
<div className="fault-index ">{index}</div>
<div style={{ display: 'flex', flexDirection: 'column' }}>
<label style={{ width: '40px', fontSize: 18, fontWeight: 600 }}>
{dataSource?.operationTypeName}
</label>
<span>{dataSource?.updateUserName}</span>
<span>{dataSource?.updateTime}</span>
</div>
</div>
<div style={{ flex: 6 }}>
<div style={{ marginBottom: 16 }}>
<h2 className="page-title">{dataSource?.operationTypeName}信息</h2>
</div>
<ProDescriptions
dataSource={dataSource}
columns={columns_wxgd[dataSource?.operationType]}
/>
<ProDescriptions dataSource={dataSource} columns={columns_mes['gzxx']} />
</div>
</div>
</div>
),
zzgd: (
<div>
<div className="fault-detail">
<div style={{ flex: 1, display: 'flex', flexDirection: 'row' }}>
<div className="fault-index">{index}</div>
<div style={{ display: 'flex', flexDirection: 'column' }}>
<label style={{ width: '40px', fontSize: 18, fontWeight: 600 }}>
{dataSource?.operationTypeName}
</label>
<span>{dataSource?.updateUserName}</span>
<span>{dataSource?.updateTime}</span>
</div>
</div>
<div style={{ flex: 6 }}>
<div style={{ marginBottom: 16 }}>
<h2 className="page-title">{dataSource?.operationTypeName}信息</h2>
</div>
<ProDescriptions
dataSource={dataSource}
columns={columns_zzgd[dataSource?.operationType]}
/>
<Collapse expandIconPosition={'end'}>
<Panel header={<span style={{ fontSize: 16, fontWeight: 600 }}>验证信息</span>}>
<ProDescriptions
dataSource={dataSource?.trackProcessList?.[0]}
columns={columns_zzgd['yz']}
/>
</Panel>
</Collapse>
</div>
</div>
</div>
),
};
return (
<>
{flag ? (
......@@ -471,53 +627,9 @@ export default ({ index, title, dataSource, columns, hidden, navhidden = false }
<ProDescriptions dataSource={dataSource} columns={columns_mes['gzxx']} />
</div>
) : (
<div>
<div style={{ borderLeft: '1px solid #ccc' }}>
<span
style={{
border: '1px solid #ccc',
backgroundColor: 'white',
borderRidus: '30%',
}}
>
{index}
</span>
</div>
<div>
<div>
<h2 className="page-title">{title}</h2>
</div>
<Divider orientation="left">设备信息</Divider>
<ProDescriptions
dataSource={dataSource?.equipment}
columns={columns_mes['sbxx']}
/>
<Divider orientation="left">故障信息</Divider>
<ProDescriptions dataSource={dataSource} columns={columns_mes['gzxx']} />
</div>
</div>
)
) : (
<div>
<div className="fault-detail">
<div style={{ flex: 1, display: 'flex', flexDirection: 'row' }}>
<div
style={{
display: 'block',
width: '30px',
height: '30px',
fontWeight: 500,
textAlign: 'center',
padding: '2px',
border: '2px solid #1890FF',
borderRadius: '50%',
backgroundColor: 'white',
marginRight: 16,
flexShrink: 0,
}}
>
{index}
</div>
<div className="fault-index">{Number(index) + 1}</div>
<div style={{ display: 'flex', flexDirection: 'column' }}>
<label style={{ width: '40px', fontSize: 18, fontWeight: 600 }}>
{dataSource?.operationTypeName}
......@@ -527,14 +639,21 @@ export default ({ index, title, dataSource, columns, hidden, navhidden = false }
</div>
</div>
<div style={{ flex: 6 }}>
<div style={{ marginBottom: 16 }}>
<h2 className="page-title">{dataSource?.operationTypeName}信息</h2>
<div>
<h2 className="page-title">{title}</h2>
</div>
<ProDescriptions dataSource={dataSource} columns={columns_mes['sbxx']} />
<Divider orientation="left">设备信息</Divider>
<ProDescriptions
dataSource={dataSource?.equipment}
columns={columns_mes['sbxx']}
/>
<Divider orientation="left">故障信息</Divider>
<ProDescriptions dataSource={dataSource} columns={columns_mes['gzxx']} />
</div>
</div>
</div>
)
) : (
itemischeck[type]
)}
</div>
) : null}
......
import React, { useState, useEffect } from 'react';
import { ProDescriptions } from '@ant-design/pro-components';
import { Divider } from 'antd';
import { Divider, Button, Tooltip } from 'antd';
import { doFetch } from '@/utils/doFetch';
import { MoreOutlined } from '@ant-design/icons';
import { useRequest } from 'ahooks';
import DesItem from './DesItem';
export default (props) => {
const { type, detailpath, params, baseRow, basecolumns, title, titleno } = props;
const [hidden, sethidden] = useState(false);
const request = useRequest(async () => {
console.log(detailpath, params);
let res = await doFetch({ url: detailpath, params });
// const res = {
// code: '0000',
// msg: '',
// data: {
// dataList: [
// {
// id: '2022112931558310704',
// createTime: '2022-11-29 16:00:20',
// createUserId: '2022112227061106731',
// createUserName: 'HDKF1',
// updateTime: '2022-11-29 16:00:20',
// updateUserId: '2022112227061106731',
// updateUserName: 'HDKF1',
// isDelete: 0,
// pageIndex: 0,
// pageSize: 10,
// companyId: '2022110829866490982',
// trackOrderId: '2022112925456100066',
// operationType: 1,
// operationTypeName: '接单',
// sort: 0,
// workOrderId: null,
// umTrackOrder: null,
// trackOrderReceiving: null,
// trackTraceinfo: null,
// assistUserNames: null,
// repairId: '2022112227061106731',
// repairName: 'HDKF1',
// repairTime: '2022-11-29 16:00:20',
// dispatcherId: null,
// dispatcherName: null,
// dispatcherTime: null,
// trackerId: null,
// trackerName: null,
// trackerTime: null,
// planTrackTime: null,
// actualTrackTime: null,
// trackResult: null,
// trackResults: null,
// isFinishTrack: null,
// finishTrack: null,
// trackCycle: null,
// trackContents: null,
// trackProcessList: null,
// },
// {
// id: '2022112930928687096',
// createTime: '2022-11-29 16:43:41',
// createUserId: '2022112227061106731',
// createUserName: 'HDKF1',
// updateTime: '2022-11-29 16:43:41',
// updateUserId: '2022112227061106731',
// updateUserName: 'HDKF1',
// isDelete: 0,
// pageIndex: 0,
// pageSize: 10,
// companyId: '2022110829866490982',
// trackOrderId: '2022112925456100066',
// operationType: 4,
// operationTypeName: '追踪',
// sort: 1,
// workOrderId: null,
// umTrackOrder: null,
// trackOrderReceiving: null,
// trackTraceinfo: null,
// assistUserNames: null,
// repairId: null,
// repairName: null,
// repairTime: null,
// dispatcherId: null,
// dispatcherName: null,
// dispatcherTime: null,
// trackerId: null,
// trackerName: null,
// trackerTime: null,
// planTrackTime: null,
// actualTrackTime: null,
// trackResult: null,
// trackResults: null,
// isFinishTrack: null,
// finishTrack: null,
// trackCycle: null,
// trackContents: null,
// trackProcessList: null,
// },
// {
// id: '2022112932446783387',
// createTime: '2022-11-29 16:55:41',
// createUserId: '2022112227061106731',
// createUserName: 'HDKF1',
// updateTime: '2022-11-29 16:55:41',
// updateUserId: '2022112227061106731',
// updateUserName: 'HDKF1',
// isDelete: 0,
// pageIndex: 0,
// pageSize: 10,
// companyId: '2022110829866490982',
// trackOrderId: '2022112925456100066',
// operationType: 4,
// operationTypeName: '追踪',
// sort: 2,
// workOrderId: null,
// umTrackOrder: null,
// trackOrderReceiving: null,
// trackTraceinfo: null,
// assistUserNames: null,
// repairId: null,
// repairName: null,
// repairTime: null,
// dispatcherId: null,
// dispatcherName: null,
// dispatcherTime: null,
// trackerId: '2022112227061106731',
// trackerName: 'HDKF1',
// trackerTime: '2022-12-08 11:27:06',
// planTrackTime: '2022-11-29',
// actualTrackTime: null,
// trackResult: 1,
// trackResults: '通过',
// isFinishTrack: 1,
// finishTrack: '是',
// trackCycle: 7,
// trackContents: '追踪内容',
// trackProcessList: [
// {
// id: '2022113026622115346',
// createTime: '2022-11-30 09:36:31',
// createUserId: '2022112227061106731',
// createUserName: 'HDKF1',
// updateTime: '2022-11-30 09:36:31',
// updateUserId: '2022112227061106731',
// updateUserName: 'HDKF1',
// isDelete: 0,
// pageIndex: 0,
// pageSize: 10,
// companyId: '2022110829866490982',
// traceinfoId: '2022112930737666134',
// reviewerId: null,
// reviewerName: null,
// reviewerTime: null,
// reviewerResult: 1,
// reviewerResultName: null,
// remark: '备注',
// },
// ],
// },
// {
// id: '2022112932446783387',
// createTime: '2022-11-29 16:55:41',
// createUserId: '2022112227061106731',
// createUserName: 'HDKF1',
// updateTime: '2022-11-29 16:55:41',
// updateUserId: '2022112227061106731',
// updateUserName: 'HDKF1',
// isDelete: 0,
// pageIndex: 0,
// pageSize: 10,
// companyId: '2022110829866490982',
// trackOrderId: '2022112925456100066',
// operationType: 4,
// operationTypeName: '追踪',
// sort: 2,
// workOrderId: null,
// umTrackOrder: null,
// trackOrderReceiving: null,
// trackTraceinfo: null,
// assistUserNames: null,
// repairId: null,
// repairName: null,
// repairTime: null,
// dispatcherId: null,
// dispatcherName: null,
// dispatcherTime: null,
// trackerId: '2022112227061106731',
// trackerName: 'HDKF1',
// trackerTime: '2022-12-08 11:27:06',
// planTrackTime: '2022-11-29',
// actualTrackTime: null,
// trackResult: 1,
// trackResults: '通过',
// isFinishTrack: 1,
// finishTrack: '是',
// trackCycle: 7,
// trackContents: '追踪内容',
// trackProcessList: [
// {
// id: '2022113026622115346',
// createTime: '2022-11-30 09:36:31',
// createUserId: '2022112227061106731',
// createUserName: 'HDKF1',
// updateTime: '2022-11-30 09:36:31',
// updateUserId: '2022112227061106731',
// updateUserName: 'HDKF1',
// isDelete: 0,
// pageIndex: 0,
// pageSize: 10,
// companyId: '2022110829866490982',
// traceinfoId: '2022112930737666134',
// reviewerId: null,
// reviewerName: null,
// reviewerTime: null,
// reviewerResult: 1,
// reviewerResultName: null,
// remark: '备注',
// },
// ],
// },
// {
// id: '2022112932446783387',
// createTime: '2022-11-29 16:55:41',
// createUserId: '2022112227061106731',
// createUserName: 'HDKF1',
// updateTime: '2022-11-29 16:55:41',
// updateUserId: '2022112227061106731',
// updateUserName: 'HDKF1',
// isDelete: 0,
// pageIndex: 0,
// pageSize: 10,
// companyId: '2022110829866490982',
// trackOrderId: '2022112925456100066',
// operationType: 4,
// operationTypeName: '追踪',
// sort: 2,
// workOrderId: null,
// umTrackOrder: null,
// trackOrderReceiving: null,
// trackTraceinfo: null,
// assistUserNames: null,
// repairId: null,
// repairName: null,
// repairTime: null,
// dispatcherId: null,
// dispatcherName: null,
// dispatcherTime: null,
// trackerId: '2022112227061106731',
// trackerName: 'HDKF1',
// trackerTime: '2022-12-08 11:27:06',
// planTrackTime: '2022-11-29',
// actualTrackTime: null,
// trackResult: 1,
// trackResults: '通过',
// isFinishTrack: 1,
// finishTrack: '是',
// trackCycle: 7,
// trackContents: '追踪内容',
// trackProcessList: [
// {
// id: '2022113026622115346',
// createTime: '2022-11-30 09:36:31',
// createUserId: '2022112227061106731',
// createUserName: 'HDKF1',
// updateTime: '2022-11-30 09:36:31',
// updateUserId: '2022112227061106731',
// updateUserName: 'HDKF1',
// isDelete: 0,
// pageIndex: 0,
// pageSize: 10,
// companyId: '2022110829866490982',
// traceinfoId: '2022112930737666134',
// reviewerId: null,
// reviewerName: null,
// reviewerTime: null,
// reviewerResult: 1,
// reviewerResultName: null,
// remark: '备注',
// },
// ],
// },
// {
// id: '2022112932446783387',
// createTime: '2022-11-29 16:55:41',
// createUserId: '2022112227061106731',
// createUserName: 'HDKF1',
// updateTime: '2022-11-29 16:55:41',
// updateUserId: '2022112227061106731',
// updateUserName: 'HDKF1',
// isDelete: 0,
// pageIndex: 0,
// pageSize: 10,
// companyId: '2022110829866490982',
// trackOrderId: '2022112925456100066',
// operationType: 4,
// operationTypeName: '追踪',
// sort: 2,
// workOrderId: null,
// umTrackOrder: null,
// trackOrderReceiving: null,
// trackTraceinfo: null,
// assistUserNames: null,
// repairId: null,
// repairName: null,
// repairTime: null,
// dispatcherId: null,
// dispatcherName: null,
// dispatcherTime: null,
// trackerId: '2022112227061106731',
// trackerName: 'HDKF1',
// trackerTime: '2022-12-08 11:27:06',
// planTrackTime: '2022-11-29',
// actualTrackTime: null,
// trackResult: 1,
// trackResults: '通过',
// isFinishTrack: 1,
// finishTrack: '是',
// trackCycle: 7,
// trackContents: '追踪内容',
// trackProcessList: [
// {
// id: '2022113026622115346',
// createTime: '2022-11-30 09:36:31',
// createUserId: '2022112227061106731',
// createUserName: 'HDKF1',
// updateTime: '2022-11-30 09:36:31',
// updateUserId: '2022112227061106731',
// updateUserName: 'HDKF1',
// isDelete: 0,
// pageIndex: 0,
// pageSize: 10,
// companyId: '2022110829866490982',
// traceinfoId: '2022112930737666134',
// reviewerId: null,
// reviewerName: null,
// reviewerTime: null,
// reviewerResult: 1,
// reviewerResultName: null,
// remark: '备注',
// },
// ],
// },
// {
// id: '2022112932446783387',
// createTime: '2022-11-29 16:55:41',
// createUserId: '2022112227061106731',
// createUserName: 'HDKF1',
// updateTime: '2022-11-29 16:55:41',
// updateUserId: '2022112227061106731',
// updateUserName: 'HDKF1',
// isDelete: 0,
// pageIndex: 0,
// pageSize: 10,
// companyId: '2022110829866490982',
// trackOrderId: '2022112925456100066',
// operationType: 4,
// operationTypeName: '追踪',
// sort: 2,
// workOrderId: null,
// umTrackOrder: null,
// trackOrderReceiving: null,
// trackTraceinfo: null,
// assistUserNames: null,
// repairId: null,
// repairName: null,
// repairTime: null,
// dispatcherId: null,
// dispatcherName: null,
// dispatcherTime: null,
// trackerId: '2022112227061106731',
// trackerName: 'HDKF1',
// trackerTime: '2022-12-08 11:27:06',
// planTrackTime: '2022-11-29',
// actualTrackTime: null,
// trackResult: 1,
// trackResults: '通过',
// isFinishTrack: 1,
// finishTrack: '是',
// trackCycle: 7,
// trackContents: '追踪内容',
// trackProcessList: [
// {
// id: '2022113026622115346',
// createTime: '2022-11-30 09:36:31',
// createUserId: '2022112227061106731',
// createUserName: 'HDKF1',
// updateTime: '2022-11-30 09:36:31',
// updateUserId: '2022112227061106731',
// updateUserName: 'HDKF1',
// isDelete: 0,
// pageIndex: 0,
// pageSize: 10,
// companyId: '2022110829866490982',
// traceinfoId: '2022112930737666134',
// reviewerId: null,
// reviewerName: null,
// reviewerTime: null,
// reviewerResult: 1,
// reviewerResultName: null,
// remark: '备注',
// },
// ],
// },
// {
// id: '2022112932446783387',
// createTime: '2022-11-29 16:55:41',
// createUserId: '2022112227061106731',
// createUserName: 'HDKF1',
// updateTime: '2022-11-29 16:55:41',
// updateUserId: '2022112227061106731',
// updateUserName: 'HDKF1',
// isDelete: 0,
// pageIndex: 0,
// pageSize: 10,
// companyId: '2022110829866490982',
// trackOrderId: '2022112925456100066',
// operationType: 4,
// operationTypeName: '追踪',
// sort: 2,
// workOrderId: null,
// umTrackOrder: null,
// trackOrderReceiving: null,
// trackTraceinfo: null,
// assistUserNames: null,
// repairId: null,
// repairName: null,
// repairTime: null,
// dispatcherId: null,
// dispatcherName: null,
// dispatcherTime: null,
// trackerId: '2022112227061106731',
// trackerName: 'HDKF1',
// trackerTime: '2022-12-08 11:27:06',
// planTrackTime: '2022-11-29',
// actualTrackTime: null,
// trackResult: 1,
// trackResults: '通过',
// isFinishTrack: 1,
// finishTrack: '是',
// trackCycle: 7,
// trackContents: '追踪内容',
// trackProcessList: [
// {
// id: '2022113026622115346',
// createTime: '2022-11-30 09:36:31',
// createUserId: '2022112227061106731',
// createUserName: 'HDKF1',
// updateTime: '2022-11-30 09:36:31',
// updateUserId: '2022112227061106731',
// updateUserName: 'HDKF1',
// isDelete: 0,
// pageIndex: 0,
// pageSize: 10,
// companyId: '2022110829866490982',
// traceinfoId: '2022112930737666134',
// reviewerId: null,
// reviewerName: null,
// reviewerTime: null,
// reviewerResult: 1,
// reviewerResultName: null,
// remark: '备注',
// },
// ],
// },
// {
// id: '2022112932446783387',
// createTime: '2022-11-29 16:55:41',
// createUserId: '2022112227061106731',
// createUserName: 'HDKF1',
// updateTime: '2022-11-29 16:55:41',
// updateUserId: '2022112227061106731',
// updateUserName: 'HDKF1',
// isDelete: 0,
// pageIndex: 0,
// pageSize: 10,
// companyId: '2022110829866490982',
// trackOrderId: '2022112925456100066',
// operationType: 4,
// operationTypeName: '追踪',
// sort: 2,
// workOrderId: null,
// umTrackOrder: null,
// trackOrderReceiving: null,
// trackTraceinfo: null,
// assistUserNames: null,
// repairId: null,
// repairName: null,
// repairTime: null,
// dispatcherId: null,
// dispatcherName: null,
// dispatcherTime: null,
// trackerId: '2022112227061106731',
// trackerName: 'HDKF1',
// trackerTime: '2022-12-08 11:27:06',
// planTrackTime: '2022-11-29',
// actualTrackTime: null,
// trackResult: 1,
// trackResults: '通过',
// isFinishTrack: 1,
// finishTrack: '是',
// trackCycle: 7,
// trackContents: '追踪内容',
// trackProcessList: [
// {
// id: '2022113026622115346',
// createTime: '2022-11-30 09:36:31',
// createUserId: '2022112227061106731',
// createUserName: 'HDKF1',
// updateTime: '2022-11-30 09:36:31',
// updateUserId: '2022112227061106731',
// updateUserName: 'HDKF1',
// isDelete: 0,
// pageIndex: 0,
// pageSize: 10,
// companyId: '2022110829866490982',
// traceinfoId: '2022112930737666134',
// reviewerId: null,
// reviewerName: null,
// reviewerTime: null,
// reviewerResult: 1,
// reviewerResultName: null,
// remark: '备注',
// },
// ],
// },
// ],
// },
// };
if (res?.data?.dataList?.length > 4) {
sethidden(true);
}
return res?.data || {};
});
console.log(1111, request);
// 维修工单
const Wxgd = () => {
return (
......@@ -22,7 +541,7 @@ export default (props) => {
dataSource={request?.data?.dataList[0]}
title="报修信息"
hidden={true}
index="1"
index="0"
// navhidden={false}
/>
{request?.data?.dataList?.splice(1).map((it, index) => {
......@@ -32,7 +551,89 @@ export default (props) => {
type="wxgd"
dataSource={it}
index={index + 2}
title="报修信息"
hidden={true}
navhidden={false}
/>
</>
);
})}
</>
);
};
// 追踪工单
const Zzgd = () => {
return hidden ? (
<>
<DesItem
dataSource={request?.data?.dataList[0]}
title="基本信息"
hidden={true}
index="0"
// navhidden={false}
/>
<DesItem
type="zzgd"
dataSource={request?.data?.dataList[1]}
index={'2'}
hidden={true}
navhidden={false}
/>
<div className="fault-detail" style={{ paddingTop: 30, paddingBottom: 30 }}>
<Tooltip title="点击展开">
<Button
type="primary"
shape="circle"
icon={<MoreOutlined />}
onClick={() => {
sethidden(false);
}}
/>
</Tooltip>
</div>
<DesItem
type="zzgd"
dataSource={request?.data?.dataList[request?.data?.dataList?.length - 2]}
index={request?.data?.dataList?.length - 1}
hidden={true}
navhidden={false}
/>
<DesItem
type="zzgd"
dataSource={request?.data?.dataList[request?.data?.dataList?.length - 1]}
index={request?.data?.dataList?.length}
hidden={true}
navhidden={false}
/>
{/* {request?.data?.dataList?.splice(1).map((it, index) => {
return (
<>
<DesItem
type="zzgd"
dataSource={it}
index={index + 2}
hidden={true}
navhidden={false}
/>
</>
);
})} */}
</>
) : (
<>
<DesItem
dataSource={request?.data?.dataList[0]}
title="基本信息"
hidden={true}
index="0"
// navhidden={false}
/>
{request?.data?.dataList?.splice(1).map((it, index) => {
return (
<>
<DesItem
type="zzgd"
dataSource={it}
index={index + 2}
hidden={true}
navhidden={false}
/>
......@@ -54,6 +655,7 @@ export default (props) => {
/>
),
wxgd: <Wxgd />,
zzgd: <Zzgd />,
};
return (
<>
......
......@@ -418,7 +418,18 @@ ol {
flex-direction: row;
border-left: 2px dashed #ccc;
padding: 16px;
}
// background-color: #ff4800;
.fault-index {
display: block;
width: 30px;
height: 30px;
font-weight: 500;
text-align: center;
padding: 2px;
border: 2px solid #1890FF;
border-radius: 50%;
background-color: white;
margin-right: 16px;
flex-shrink: 0;
}
\ No newline at end of file
......@@ -8,6 +8,25 @@ function getcolumns(setdrawer) {
title: '追踪单号',
dataIndex: 'taskOrderNo',
key: 'taskOrderNo',
render: (text, row, _, action) => {
return (
<a
onClick={() => {
setdrawer((s) => ({
...s,
open: true,
title: '详情',
val: 'only',
type: 'detail',
title: '详细信息',
item: row,
}));
}}
>
{row?.taskOrderNo}
</a>
);
},
},
{
title: '设备编号',
......@@ -89,6 +108,25 @@ function getcolumns(setdrawer) {
title: '追踪单号',
dataIndex: 'taskOrderNo',
key: 'taskOrderNo',
render: (text, row, _, action) => {
return (
<a
onClick={() => {
setdrawer((s) => ({
...s,
open: true,
title: '详情',
val: 'only',
type: 'detail',
title: '详细信息',
item: row,
}));
}}
>
{row?.taskOrderNo}
</a>
);
},
},
{
title: '设备编号',
......@@ -164,6 +202,25 @@ function getcolumns(setdrawer) {
title: '追踪单号',
dataIndex: 'taskOrderNo',
key: 'taskOrderNo',
render: (text, row, _, action) => {
return (
<a
onClick={() => {
setdrawer((s) => ({
...s,
open: true,
title: '详情',
val: 'only',
type: 'detail',
title: '详细信息',
item: row,
}));
}}
>
{row?.taskOrderNo}
</a>
);
},
},
{
title: '设备编号',
......
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-08 14:03:22
* @Last Modified time: 2022-12-13 11:37:55
*/
import * as React from 'react';
......@@ -16,7 +16,7 @@ import { doFetch } from '@/utils/doFetch';
import Addform from '@/components/Addform';
import { Menu, Dropdown, Button, message } from 'antd';
import InitForm from '@/components/InitForm';
import Detail from '@/components/RepaireDetail/Detail';
function Failure(props) {
const actionRef = useRef(),
containderef = useRef(),
......@@ -39,29 +39,6 @@ function Failure(props) {
},
});
const detail = (text, row, _, action) => {
return (
<PremButton
btn={{
size: 'small',
type: 'link',
onClick: () => {
setdrawer((s) => ({
...s,
open: true,
item: row,
title: '详情',
val: 'detail',
title: '详细信息',
}));
},
}}
>
详情
</PremButton>
);
};
// 重新指派
const Reassig = () => {
return (
......@@ -528,6 +505,91 @@ function Failure(props) {
return defpath;
}, [activeTabKey]);
const basecolumns = useMemo(() => {
if (activeTabKey == 3) {
return [
{
title: '创建人',
dataIndex: 'createUserName',
key: 'createUserName',
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
},
{
title: '工单状态',
dataIndex: 'statusName',
key: 'statusName',
},
{
title: '来源工单',
dataIndex: 'dataSourcesNo',
key: 'dataSourcesNo',
},
{
title: '来源类型',
dataIndex: 'dataSourcesName',
key: 'dataSourcesName',
},
{
title: '最新追踪人员',
dataIndex: 'newRepairUserName',
key: 'newRepairUserName',
},
{
title: '下次追踪日期',
dataIndex: 'nextTrackDate',
key: 'nextTrackDate',
},
{
title: '关单时间',
dataIndex: 'repairCloseTime',
key: 'repairCloseTime',
},
];
} else {
return [
{
title: '创建人',
dataIndex: 'createUserName',
key: 'createUserName',
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
},
{
title: '工单状态',
dataIndex: 'statusName',
key: 'statusName',
},
{
title: '来源工单',
dataIndex: 'dataSourcesNo',
key: 'dataSourcesNo',
},
{
title: '来源类型',
dataIndex: 'dataSourcesName',
key: 'dataSourcesName',
},
{
title: '最新追踪人员',
dataIndex: 'newRepairUserName',
key: 'newRepairUserName',
},
{
title: '下次追踪日期',
dataIndex: 'nextTrackDate',
key: 'nextTrackDate',
},
];
}
}, [activeTabKey]);
const selectType = (type) => {
switch (type) {
case 'add':
......@@ -540,6 +602,18 @@ function Failure(props) {
return <CheckForm />;
case 'Reassig':
return <Reassig />;
case 'detail':
return (
<Detail
title="追踪单号"
titleno={drawer?.item?.taskOrderNo}
detailpath="/repair/umTrackOperation/queryOperationList"
params={{ trackOrderId: drawer?.item?.id }}
baseRow={drawer?.item}
basecolumns={basecolumns}
type="zzgd"
/>
);
default:
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment