diff --git a/web/client/src/sections/fillion/actions/patrol.js b/web/client/src/sections/fillion/actions/patrol.js
index a1befe8a..fa9d51c0 100644
--- a/web/client/src/sections/fillion/actions/patrol.js
+++ b/web/client/src/sections/fillion/actions/patrol.js
@@ -46,4 +46,17 @@ export function handleReport (reportId, data) {
data: data,
msg: { option: '处理数据' },
});
+}
+
+
+export function getAnspectionNotificationPhone (query) {
+ return dispatch => basicAction({
+ type: 'get',
+ dispatch: dispatch,
+ actionType: 'GET_REPORT_LIST',
+ url: ApiTable.getAnspectionNotificationPhone,
+ query,
+ msg: { error: '获取巡查数据失败' },
+ reducer: { name: 'reportList' }
+ });
}
\ No newline at end of file
diff --git a/web/client/src/sections/fillion/components/patrolTable.js b/web/client/src/sections/fillion/components/patrolTable.js
index 6e47e36a..20b7a8fc 100644
--- a/web/client/src/sections/fillion/components/patrolTable.js
+++ b/web/client/src/sections/fillion/components/patrolTable.js
@@ -1,8 +1,8 @@
import { connect } from 'react-redux';
import './protable.less'
-import { Card, Button, Popconfirm, Badge, Col, Row, DatePicker, Input, Modal, Spin, Image, message, Popover, Select, Tree } from 'antd';
+import { Card, Button, Popconfirm, Badge, Col, Row, DatePicker, Input, Modal, Spin, Image, message, Popover, Select, Tree, Form } from 'antd';
import ProTable from '@ant-design/pro-table';
-import { DownOutlined, RightOutlined, CaretDownOutlined, CaretRightOutlined } from '@ant-design/icons';
+import { DownOutlined, RightOutlined, CaretDownOutlined, CaretRightOutlined, MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
import { getReportList, getReportDetail, handleReport } from '../actions/patrol';
import React, { useEffect, useState, useMemo } from 'react';
import { getAllDepUsers } from '../actions/allDepUsers'
@@ -15,6 +15,9 @@ import styles from './protable.less';
import moment from 'moment';
import NominateModalcopy from './feedback/nominateModalcopy';//指派的模块
+
+
+
export const reportTypeText = (text) => {
switch (text) {
case 'road': return '道路';
@@ -709,8 +712,11 @@ const PatrolTable = (props) => {
const isAnomaly = pathname.includes('anomaly')
const isPatrol = !isRoad && !isAnomaly
const reportType = isRoad ? 'road' : isAnomaly ? 'anomaly' : 'patrol';
+ const [isModalOpen, setIsModalOpen] = useState(false);
+ const [form] = Form.useForm();
useEffect(() => {
queryData();
+ console.log(123456789);
}, [])
useEffect(() => {
if (userList && userList instanceof Array && reportDetail && reportDetail instanceof Object) {
@@ -807,6 +813,39 @@ const PatrolTable = (props) => {
exports(ids, reportType);
}
}
+ const showModal = () => {
+ setIsModalOpen(true);
+ };
+
+ const handleOk = () => {
+ // setIsModalOpen(false);
+ console.log(form, '=====');
+ form.validateFields().then(values => {
+ console.log(values, '----------');
+ }).catch(err => {
+ console.log(err, 'err');
+ })
+ };
+
+ const handleCancel = () => {
+ setIsModalOpen(false);
+ };
+ const formItemLayout = {
+ labelCol: {
+ xs: { span: 24 },
+ sm: { span: 4 },
+ },
+ wrapperCol: {
+ xs: { span: 24 },
+ sm: { span: 20 },
+ },
+ };
+ const formItemLayoutWithOutLabel = {
+ wrapperCol: {
+ xs: { span: 24, offset: 0 },
+ sm: { span: 20, offset: 4 },
+ },
+ };
return (
@@ -853,6 +892,8 @@ const PatrolTable = (props) => {
: ''
}
+
+
{/* */}
: ''
}
@@ -865,12 +906,86 @@ const PatrolTable = (props) => {
isPatrol={isPatrol} isRoad={isRoad} isAnomaly={isAnomaly}
/>
+
+ {
+ // if (!names || names.length < 1) {
+ // return Promise.reject(new Error('At least 2 passengers'));
+ // }
+ // },
+ // },
+ // ]}
+ >
+ {(fields, { add, remove }, { errors }) => (
+ <>
+ {fields.map((field, index) => (
+
+ {
+ console.log(phone,'phone');
+ let re = /^1((3[\d])|(4[5,6,9])|(5[0-3,5-9])|(6[5-7])|(7[0-8])|(8[1-3,5-8])|(9[1,8,9]))\d{8}$/
+ if(!re.test(phone)){
+ return Promise.reject(new Error('请输入正确的手机号!'));
+ }
+ },
+ },
+ ]}
+ noStyle
+ >
+
+
+
+ remove(field.name)}
+ />
+
+ ))}
+
+
+
+
+ >
+ )}
+
+ {/*
+
+ */}
+
+
);
};
-function mapStateToProps (state) {
+function mapStateToProps(state) {
const { auth, depMessage, userList, reportList, reportDetail, global, allDepUsers } = state;
const pakData = (dep) => {
return dep.map((d) => {
diff --git a/web/client/src/utils/webapi.js b/web/client/src/utils/webapi.js
index 12353e78..201fee0a 100644
--- a/web/client/src/utils/webapi.js
+++ b/web/client/src/utils/webapi.js
@@ -304,7 +304,9 @@ export const ApiTable = {
//部门下所有员工
getAllDepUsers: 'allDepUsers',
//指派任务
- appointTask: 'appointTask'
+ appointTask: 'appointTask',
+ //获取短信提醒电话
+ getAnspectionNotificationPhone:'/anspection/notification/phone'
};