Commit f9c86787 authored by TZW's avatar TZW

12122038

parent 32eb7245
......@@ -4,6 +4,7 @@ import { Divider, Image } from 'antd';
export default ({ index, title, dataSource, columns, hidden, navhidden = false }) => {
const [flag, setflag] = useState(true);
console.log(index, dataSource);
// 0:报修 1:接单 2:派单 3:完成维修 4:转追踪 5:转外协 6:转单 7:退单 8:追踪审核 9:外协审核 10:退单审核 11:效果验证
const columns_mes = {
sbxx: [
......@@ -150,21 +151,39 @@ export default ({ index, title, dataSource, columns, hidden, navhidden = false }
)
) : (
<div>
<div style={{ borderLeft: '1px solid #ccc' }}>
<span
style={{ border: '1px solid #ccc', backgroundColor: 'white', borderRidus: '30%' }}
<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: '1px solid #1890FF',
borderRadius: '50%',
backgroundColor: 'white',
marginRight: 16,
}}
>
{index}
</span>
</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>
</div>
<ProDescriptions dataSource={dataSource?.equipment} columns={columns_mes['sbxx']} />
<ProDescriptions dataSource={dataSource} columns={columns_mes['sbxx']} />
<ProDescriptions dataSource={dataSource} columns={columns_mes['gzxx']} />
</div>
</div>
</div>
)}
</div>
) : null}
......
......@@ -9,42 +9,29 @@ export default (props) => {
const request = useRequest(async () => {
let res = await doFetch({ url: detailpath, params });
return res?.data.data || {};
return res?.data || {};
});
console.log(request);
const selectType = {
gzbx: (
<DesItem
type="gzbx"
index="0"
dataSource={request?.data}
title="基本信息"
hidden={true}
navhidden={true}
/>
),
wxgd: <Wxgd />,
};
console.log(1111, request);
// 维修工单
const Wxgd = () => {
return (
<>
<DesItem
type="wxgd"
dataSource={request?.data}
dataSource={request?.data?.dataList[0]}
title="报修信息"
hidden={true}
navhidden={false}
index="1"
// navhidden={false}
/>
{request?.data?.map((it, index) => {
{request?.data?.dataList?.splice(1).map((it, index) => {
return (
<>
<DesItem
type="wxgd"
dataSource={request?.data}
dataSource={it}
index={index + 2}
title="报修信息"
hidden={true}
navhidden={false}
......@@ -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 (
<>
<div>
......@@ -62,7 +62,7 @@ export default (props) => {
{title}{titleno}
</h2>
</div>
<ProDescriptions columns={basecolumns} dataSource={request.data} />
<ProDescriptions columns={basecolumns} dataSource={baseRow} />
<Divider />
{selectType[type]}
</>
......
......@@ -412,3 +412,11 @@ ol {
background-color: #1890FF;
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 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @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';
......
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