|
@@ -36,6 +36,7 @@ interface IOrderInfo {
|
|
|
AntiCorrosive?: number;
|
|
|
Clean?: number;
|
|
|
Check?: number;
|
|
|
+ MandateImages?: any[];
|
|
|
}
|
|
|
|
|
|
const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
@@ -74,6 +75,20 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
) || '-',
|
|
|
OrderStatus:
|
|
|
OrderStatus.find((item) => item.value === temp.Status) || '-',
|
|
|
+ MandateImages:
|
|
|
+ temp?.mandate_images?.length > 0
|
|
|
+ ? temp.mandate_images.map((item: any) => {
|
|
|
+ console.log(item);
|
|
|
+ if (item.type === 2) {
|
|
|
+ return {
|
|
|
+ src: item.val,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ src: `data:image/png;base64,${item.val}`,
|
|
|
+ };
|
|
|
+ })
|
|
|
+ : [],
|
|
|
};
|
|
|
setOrderInfo(tempDetail);
|
|
|
},
|
|
@@ -103,6 +118,20 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
OrderStatus:
|
|
|
OrderStatus.find((item) => item.value === temp.AcceptanceStatus) ||
|
|
|
'-',
|
|
|
+ MandateImages:
|
|
|
+ temp?.mandate_images?.length > 0
|
|
|
+ ? temp.mandate_images.map((item: any) => {
|
|
|
+ console.log(item);
|
|
|
+ if (item.type === 2) {
|
|
|
+ return {
|
|
|
+ src: item.val,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ src: `data:image/png;base64,${item.val}`,
|
|
|
+ };
|
|
|
+ })
|
|
|
+ : [],
|
|
|
};
|
|
|
setOrderInfo(tempDetail);
|
|
|
},
|
|
@@ -151,6 +180,20 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
userList.find((item) => item.ID === temp.operator_id) || '-',
|
|
|
OrderStatus:
|
|
|
OrderStatus.find((item) => item.value === temp.status) || '-',
|
|
|
+ MandateImages:
|
|
|
+ temp?.mandate_images?.length > 0
|
|
|
+ ? temp.mandate_images.map((item: any) => {
|
|
|
+ console.log(item);
|
|
|
+ if (item.type === 2) {
|
|
|
+ return {
|
|
|
+ src: item.val,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ src: `data:image/png;base64,${item.val}`,
|
|
|
+ };
|
|
|
+ })
|
|
|
+ : [],
|
|
|
};
|
|
|
setOrderInfo(tempDetail);
|
|
|
},
|
|
@@ -240,8 +283,8 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
{orderInfo?.Reason}
|
|
|
</Col>
|
|
|
</Row>
|
|
|
- {image?.length > 0 && (
|
|
|
- <Row>
|
|
|
+ {orderInfo?.MandateImages?.length > 0 && (
|
|
|
+ <Row className={styles.rowMarginTop}>
|
|
|
<Col className={styles.fontS28}>任务图片:</Col>
|
|
|
<Col className={styles.fontS28} span={18}>
|
|
|
<ReactZmage
|
|
@@ -258,13 +301,9 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
|
pagination: true,
|
|
|
}}
|
|
|
backdrop="rgba(255,255,255,0.5)"
|
|
|
- style={{ width: '350px', height: '400px' }}
|
|
|
- src={image[0].url}
|
|
|
- set={image.map((item: any) => {
|
|
|
- return {
|
|
|
- src: item.url,
|
|
|
- };
|
|
|
- })}
|
|
|
+ style={{ width: '350px', height: '350px' }}
|
|
|
+ src={orderInfo?.MandateImages[0].src}
|
|
|
+ set={orderInfo?.MandateImages}
|
|
|
/>
|
|
|
</Col>
|
|
|
</Row>
|