diff --git a/web/client/src/sections/fillion/actions/index.js b/web/client/src/sections/fillion/actions/index.js index 3eb40f1e..8a48b86e 100644 --- a/web/client/src/sections/fillion/actions/index.js +++ b/web/client/src/sections/fillion/actions/index.js @@ -6,11 +6,13 @@ import * as file from './file' import * as assess from './assess' import * as allDepUsers from './allDepUsers' import * as getReportSpotPrepare from './extract' +import * as luzheng from './luzheng' export default { ...infor, ...patrol, ...file, ...assess, ...allDepUsers, - ...getReportSpotPrepare + ...getReportSpotPrepare, + ...luzheng } \ No newline at end of file diff --git a/web/client/src/sections/fillion/components/luzhengmodel.js b/web/client/src/sections/fillion/components/luzhengmodel.js new file mode 100644 index 00000000..5a4ca0e5 --- /dev/null +++ b/web/client/src/sections/fillion/components/luzhengmodel.js @@ -0,0 +1,94 @@ +import React, { useState, useEffect } from 'react'; +import { connect } from 'react-redux'; +import { Form, Input, Select, DatePicker, InputNumber, Button, Modal } from 'antd'; +import { unitList } from '../containers/assess' +import { getAssess, delAssess, editAssess } from '../actions/assess'; +import moment from 'moment'; +import { getRoadadministration,addRoadadministration,delRoadadministration,modifyRoadadministration } from '../actions/luzheng'; +import Uploads from "../../../../components/Upload/index" +const { Option } = Select; + +const AssessModal = ({ editData, check, visible, onCancel, dispatch }) => { + const [form] = Form.useForm(); + + return ( + { + if (check) { + return onCancel() + } + form.validateFields().then(values => { + dispatch(editAssess({ + ...values, + month: moment(values.month).format('YYYY-MM-DD'), + assessId: editData ? editData.id : undefined + })).then(res => { + if (res.success) { + onCancel() + } + }) + }) + }} + onCancel={() => { + onCancel() + }} + > +
+ + {/* */} + + + + + + + + + + + + + + +
+
+ ); +}; + +function mapStateToProps (state) { + const { auth, assess } = state + return { + user: auth.user, + assess: assess.data || [] + } +} +export default connect(mapStateToProps)(AssessModal);