|
@@ -14,6 +14,7 @@ import { Col, Row } from 'antd';
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
import { DefaultOptionType } from 'rc-select/es/Select';
|
|
import { DefaultOptionType } from 'rc-select/es/Select';
|
|
import React, { useEffect, useState } from 'react';
|
|
import React, { useEffect, useState } from 'react';
|
|
|
|
+import ReactZmage from 'react-zmage';
|
|
import styles from './taskOrder.less';
|
|
import styles from './taskOrder.less';
|
|
|
|
|
|
interface IPropsType {
|
|
interface IPropsType {
|
|
@@ -113,10 +114,14 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
console.log(content, title);
|
|
console.log(content, title);
|
|
console.log(Object.values(content));
|
|
console.log(Object.values(content));
|
|
const result = [];
|
|
const result = [];
|
|
- result.push(<Row className={styles.fontS28}>{title}</Row>);
|
|
|
|
|
|
+ result.push(
|
|
|
|
+ <Row className={[styles.fontS28, styles.rowMargin].join(' ')}>
|
|
|
|
+ {title}
|
|
|
|
+ </Row>,
|
|
|
|
+ );
|
|
Object.values(content).forEach((item: any) => {
|
|
Object.values(content).forEach((item: any) => {
|
|
result.push(
|
|
result.push(
|
|
- <Row className={styles.fontS28}>
|
|
|
|
|
|
+ <Row className={[styles.fontS28, styles.rowMargin].join(' ')}>
|
|
{item['item_alias'] +
|
|
{item['item_alias'] +
|
|
' 现有数值:' +
|
|
' 现有数值:' +
|
|
item['old_value'] +
|
|
item['old_value'] +
|
|
@@ -175,6 +180,11 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
}
|
|
}
|
|
}, []);
|
|
}, []);
|
|
|
|
|
|
|
|
+ const image = [];
|
|
|
|
+ // JSON.parse(
|
|
|
|
+ // '[{"name":"1694762306412_Screenshot_20230815_180902_uni.UNI7E61B21.jpg","path":"work_order_files/1694762306412_Screenshot_20230815_180902_uni.UNI7E61B21.jpg","created_time":"2023-09-15 15:18:29","url":"https://water-service-test.oss-cn-hangzhou.aliyuncs.com/work_order_files/1694762306412_Screenshot_20230815_180902_uni.UNI7E61B21.jpg"},{"name":"1694762306230_Screenshot_20230815_180907_uni.UNI7E61B21.jpg","path":"work_order_files/1694762306230_Screenshot_20230815_180907_uni.UNI7E61B21.jpg","created_time":"2023-09-15 15:18:29","url":"https://water-service-test.oss-cn-hangzhou.aliyuncs.com/work_order_files/1694762306230_Screenshot_20230815_180907_uni.UNI7E61B21.jpg"}]',
|
|
|
|
+ // );
|
|
|
|
+
|
|
return (
|
|
return (
|
|
<PageContent closeable={false}>
|
|
<PageContent closeable={false}>
|
|
<PageTitle returnable>工单详情</PageTitle>
|
|
<PageTitle returnable>工单详情</PageTitle>
|
|
@@ -230,6 +240,35 @@ const TaskOrder: React.FC<IPropsType> = (props) => {
|
|
{orderInfo?.Reason}
|
|
{orderInfo?.Reason}
|
|
</Col>
|
|
</Col>
|
|
</Row>
|
|
</Row>
|
|
|
|
+ {image?.length > 0 && (
|
|
|
|
+ <Row>
|
|
|
|
+ <Col className={styles.fontS28}>任务图片:</Col>
|
|
|
|
+ <Col className={styles.fontS28} span={18}>
|
|
|
|
+ <ReactZmage
|
|
|
|
+ controller={{
|
|
|
|
+ // 关闭按钮
|
|
|
|
+ close: true,
|
|
|
|
+ // 缩放按钮
|
|
|
|
+ zoom: false,
|
|
|
|
+ // 下载按钮
|
|
|
|
+ download: false,
|
|
|
|
+ // 翻页按钮
|
|
|
|
+ flip: true,
|
|
|
|
+ // 多页指示
|
|
|
|
+ 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,
|
|
|
|
+ };
|
|
|
|
+ })}
|
|
|
|
+ />
|
|
|
|
+ </Col>
|
|
|
|
+ </Row>
|
|
|
|
+ )}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{order_type === 3 && (
|
|
{order_type === 3 && (
|