+ {/*问题记录信息*/}
+ {renderPlanInfo()}
+
+ {/*维修处理计划表单*/}
+ {
+ ((editData?.patrolRecordIssueHandles?.length == 0 && !readOnly) || editData?.patrolRecordIssueHandles?.length > 0) &&
+ <>
+
{"维修计划信息"}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ }
+
+ {
+ editData?.patrolRecordIssueHandles[0]?.state === 2 &&
+ <>
+
{"维修计划审批"}
+
+ >
+ }
+
+
+
+
+ ModalForm>
+ );
+};
\ No newline at end of file
diff --git a/web/client/src/sections/issueHandle/containers/index.js b/web/client/src/sections/issueHandle/containers/index.js
new file mode 100644
index 0000000..2a7741e
--- /dev/null
+++ b/web/client/src/sections/issueHandle/containers/index.js
@@ -0,0 +1,5 @@
+'use strict';
+
+import PatrolReocrd from './patrolRecord';
+
+export { PatrolReocrd };
\ No newline at end of file
diff --git a/web/client/src/sections/issueHandle/containers/patrolRecord.js b/web/client/src/sections/issueHandle/containers/patrolRecord.js
new file mode 100644
index 0000000..a7bb93f
--- /dev/null
+++ b/web/client/src/sections/issueHandle/containers/patrolRecord.js
@@ -0,0 +1,234 @@
+
+'use strict'
+
+import React, { useEffect, useState } from 'react';
+import { connect } from 'react-redux';
+import { Form, Input, Select, Button, Table, Modal, DatePicker, Checkbox, Row, Col, Collapse } from 'antd';
+import moment from "moment";
+import Uploads from '$components/Uploads';
+import IssueHandleModal from '../components/isuue-handle-mdal'
+import '../style.less'
+
+const { Panel } = Collapse;
+const ISSUEHANDLE_STATE = [1, 2, 3, 4, 5, 6, 7]
+const STATE_TEXT = { 1: '待制定计划', 2: '待审核', 3: '计划驳回', 4: '待维修', 5: '待验收', 6: '验收通过', 7: '验收不通过', }
+
+const PatrolRecord = (props) => {
+ const { dispatch, actions, user } = props
+ const { patrolManage, issueHandle } = actions
+ const [tableList, settableList] = useState([])
+ const [name, setName] = useState('');
+ const [curState, setCurState] = useState('null');
+ const format = 'YYYY-MM-DD HH:mm:ss'
+ const times = [moment().subtract(70, 'years').format(format), moment().format(format)]
+ const [search, setSearch] = useState({ name: null, time: [times[0], times[1]], state: 'null' })
+
+ useEffect(() => {
+ queryData()
+ }, [])
+
+ const queryData = () => {
+ dispatch(patrolManage.records(`patrolRecord/all/${times[0]}/${times[1]}/true/null`)).then(res => {
+ if (res.success) {
+ settableList(name != null ? res.payload.data?.filter(v =>
+ (v.points.user.name.indexOf(name) != -1 || v.points.project.name.indexOf(name) != -1))
+ .map(v => ({ ...v, key: v.id })) : res.payload.data?.map(v => ({ ...v, key: v.id })))
+ }
+ })
+ }
+ const onFinish = async (values, editData) => {
+ const dataToSave = { ...values };
+ if (editData?.patrolRecordIssueHandles?.length > 0) {
+ let msg = '';
+ if (editData?.patrolRecordIssueHandles[0]?.state == 3) {
+ dataToSave.state = 2;
+ msg = '维修计划修改';
+ }
+ return dispatch(
+ issueHandle.modifyPatrolRecordIssueHandle(editData?.patrolRecordIssueHandles[0]?.id, dataToSave,
+ values?.msg || msg),
+ ).then(() => {
+ queryData();
+ });
+ }
+ let state = ISSUEHANDLE_STATE[1];
+
+ return dispatch(issueHandle.addPatrolRecordIssueHandle({
+ ...dataToSave,
+ state,
+ patrolRecordId: editData?.id,
+ creator: user,
+ createTime: moment()
+ })).then(() => {
+ queryData();
+ });
+ };
+
+ const renderOptionText = (currentState) => {
+ let text = '查看'
+
+ return STATE_TEXT[currentState] || text
+ }
+
+ const columns = [
+ {
+ title: '结构物名称',
+ dataIndex: 'name',
+ key: 'name',
+ width: '10%',
+ showInDetail: true,
+ render: (text, record, index) => {
+ return !record.points?.project ? '' :