From dd9f66544a2e4e4b094261e551181dcca28feb47 Mon Sep 17 00:00:00 2001 From: dengyinhuan Date: Fri, 4 Aug 2023 13:53:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/sections/fillion/actions/index.js | 4 +- .../fillion/components/luzhengmodel.js | 94 +++++++++++++++++++ 2 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 web/client/src/sections/fillion/components/luzhengmodel.js 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);