Commit f9c86787 authored by TZW's avatar TZW

12122038

parent 32eb7245
...@@ -4,6 +4,7 @@ import { Divider, Image } from 'antd'; ...@@ -4,6 +4,7 @@ import { Divider, Image } from 'antd';
export default ({ index, title, dataSource, columns, hidden, navhidden = false }) => { export default ({ index, title, dataSource, columns, hidden, navhidden = false }) => {
const [flag, setflag] = useState(true); const [flag, setflag] = useState(true);
console.log(index, dataSource);
// 0:报修 1:接单 2:派单 3:完成维修 4:转追踪 5:转外协 6:转单 7:退单 8:追踪审核 9:外协审核 10:退单审核 11:效果验证 // 0:报修 1:接单 2:派单 3:完成维修 4:转追踪 5:转外协 6:转单 7:退单 8:追踪审核 9:外协审核 10:退单审核 11:效果验证
const columns_mes = { const columns_mes = {
sbxx: [ sbxx: [
...@@ -150,21 +151,39 @@ export default ({ index, title, dataSource, columns, hidden, navhidden = false } ...@@ -150,21 +151,39 @@ export default ({ index, title, dataSource, columns, hidden, navhidden = false }
) )
) : ( ) : (
<div> <div>
<div style={{ borderLeft: '1px solid #ccc' }}> <div className="fault-detail">
<span <div style={{ flex: 1, display: 'flex', flexDirection: 'row' }}>
style={{ border: '1px solid #ccc', backgroundColor: 'white', borderRidus: '30%' }} <div
style={{
display: 'block',
width: '30px',
height: '30px',
fontWeight: 500,
textAlign: 'center',
padding: '2px',
border: '1px solid #1890FF',
borderRadius: '50%',
backgroundColor: 'white',
marginRight: 16,
}}
> >
{index} {index}
</span>
</div> </div>
<div> <div>
<div> <label style={{ width: '40px', fontSize: 18, fontWeight: 600 }}>
{dataSource?.operationTypeName}
</label>
</div>
</div>
<div style={{ flex: 6 }}>
<div style={{ marginBottom: 8 }}>
<h2 className="page-title">{dataSource?.operationTypeName}信息</h2> <h2 className="page-title">{dataSource?.operationTypeName}信息</h2>
</div> </div>
<ProDescriptions dataSource={dataSource?.equipment} columns={columns_mes['sbxx']} /> <ProDescriptions dataSource={dataSource} columns={columns_mes['sbxx']} />
<ProDescriptions dataSource={dataSource} columns={columns_mes['gzxx']} /> <ProDescriptions dataSource={dataSource} columns={columns_mes['gzxx']} />
</div> </div>
</div> </div>
</div>
)} )}
</div> </div>
) : null} ) : null}
......
...@@ -9,42 +9,29 @@ export default (props) => { ...@@ -9,42 +9,29 @@ export default (props) => {
const request = useRequest(async () => { const request = useRequest(async () => {
let res = await doFetch({ url: detailpath, params }); let res = await doFetch({ url: detailpath, params });
return res?.data.data || {}; return res?.data || {};
}); });
console.log(request); console.log(1111, request);
const selectType = {
gzbx: (
<DesItem
type="gzbx"
index="0"
dataSource={request?.data}
title="基本信息"
hidden={true}
navhidden={true}
/>
),
wxgd: <Wxgd />,
};
// 维修工单 // 维修工单
const Wxgd = () => { const Wxgd = () => {
return ( return (
<> <>
<DesItem <DesItem
type="wxgd" dataSource={request?.data?.dataList[0]}
dataSource={request?.data}
title="报修信息" title="报修信息"
hidden={true} hidden={true}
navhidden={false} index="1"
// navhidden={false}
/> />
{request?.data?.map((it, index) => { {request?.data?.dataList?.splice(1).map((it, index) => {
return ( return (
<> <>
<DesItem <DesItem
type="wxgd" type="wxgd"
dataSource={request?.data} dataSource={it}
index={index + 2}
title="报修信息" title="报修信息"
hidden={true} hidden={true}
navhidden={false} navhidden={false}
...@@ -55,6 +42,19 @@ export default (props) => { ...@@ -55,6 +42,19 @@ export default (props) => {
</> </>
); );
}; };
const selectType = {
gzbx: (
<DesItem
type="gzbx"
index="0"
dataSource={request?.data?.data}
title="基本信息"
hidden={true}
navhidden={true}
/>
),
wxgd: <Wxgd />,
};
return ( return (
<> <>
<div> <div>
...@@ -62,7 +62,7 @@ export default (props) => { ...@@ -62,7 +62,7 @@ export default (props) => {
{title}{titleno} {title}{titleno}
</h2> </h2>
</div> </div>
<ProDescriptions columns={basecolumns} dataSource={request.data} /> <ProDescriptions columns={basecolumns} dataSource={baseRow} />
<Divider /> <Divider />
{selectType[type]} {selectType[type]}
</> </>
......
...@@ -412,3 +412,11 @@ ol { ...@@ -412,3 +412,11 @@ ol {
background-color: #1890FF; background-color: #1890FF;
margin-right: 10px; margin-right: 10px;
} }
.fault-detail {
display: flex;
flex-direction: row;
border-left: 1px solid #ccc;
padding: 16px;
// background-color: #ff4800;
}
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03 * @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-12 15:59:07 * @Last Modified time: 2022-12-12 20:07:04
*/ */
import * as React from 'react'; import * as React from 'react';
......
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