diff --git a/web/client/src/sections/fillion/actions/infor.js b/web/client/src/sections/fillion/actions/infor.js index 8381bab7..89626eb5 100644 --- a/web/client/src/sections/fillion/actions/infor.js +++ b/web/client/src/sections/fillion/actions/infor.js @@ -402,6 +402,17 @@ export function getCustodyunit() { reducer: { name: 'roadMaintenances_management' } }); } +export function getCustodyunitOne(query) { + return dispatch => basicAction({ + type: 'get', + query:query, + dispatch: dispatch, + actionType: 'GET_CUSTODY_UNIT_ONE', + url: ApiTable.getCustodyunit, + msg: { error: '获取管养单位概况失败' }, + // reducer: { name: 'roadMaintenances_management' } + }); +} export function postCustodyunit(query) { return dispatch => basicAction({ type: 'post', diff --git a/web/client/src/sections/fillion/components/highways/guanli.js b/web/client/src/sections/fillion/components/highways/guanli.js index f2cce139..a17baff1 100644 --- a/web/client/src/sections/fillion/components/highways/guanli.js +++ b/web/client/src/sections/fillion/components/highways/guanli.js @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; import { Form, Spin, Table } from 'antd'; import { ModalForm, ProForm, ProFormText, ProFormSelect } from '@ant-design/pro-form'; -import { putOperaTional, postCustodyunit } from "../../actions/infor" +import { putOperaTional, postCustodyunit, getCustodyunitOne } from "../../actions/infor" import _ from 'lodash' const Guanli = (props) => { @@ -22,12 +22,16 @@ const Guanli = (props) => { visible={visible} onVisibleChange={onVisibleChange} onFinish={(values) => { - setDelet(values) - const query = { ...values, id: recortd?.id,serialNumber:recortd?.id } - dispatch(postCustodyunit(query)).then((res) => { - setSuccess(res.success) - }) - return true + setDelet(values) + const query = { ...values, id: recortd?.id, serialNumber: recortd?.id } + dispatch(postCustodyunit(query)).then((res) => { + if (res.success === true) { + let date = { fourceUpdate: true } + dispatch(getCustodyunitOne(date)).then((res) => { + }) + } + }) + return true }} initialValues={recortd} > @@ -48,7 +52,7 @@ const Guanli = (props) => { width="md" label='管理人员' placeholder="请输入管理人员" - + /> { -// const { dispatch, user, } = props -// const [rowSelected, setRowSelected] = useState([]) -// const [modalVisible, setModalVisible] = useState(false); -// const [counts, setCounts] = useState()//shuju -// const [modalVisibleyilan, setModalVisibleyilan] = useState(false); -// const [modalVisibleyilans, setModalVisibleyilans] = useState(false); -// const [modalRecord, setModalRecord] = useState(); -// const [typecard, setTypecard] = useState(); -// const [recortd, setRecortd] = useState() -// const [sitename, setSitename] = useState()//桥梁名称 -// const [delet, setDelet] = useState() -// const [activeKey, setActiveKey] = useState('tab1'); -// const [whichofits, setWhichofits] = useState('sheshi') -// const [differentiate, setDifferentiate] = useState('bridge') - -// const ref = useRef() -// useEffect(() => { ref.current.reload() }, [delet]) - // //打开弹窗 - // const hightModal = (type, record) => { - // setModalVisibleyilan(true); - // // setModalType(type); - // if (type == 'edit') { - // setModalRecord(record); - // } else { - // setModalRecord(null); - // } - // } - -// const openModal = (type, record) => { -// setModalVisible(true); -// // setModalType(type); -// if (type == 'edit') { -// setModalRecord(record); -// } else { -// setModalRecord(null); -// } -// } -// const yilanModal = (type, record) => { -// setModalVisibleyilans(true); -// // setModalType(type); -// if (type == 'edit') { -// setModalRecord(record); -// } else { -// setModalRecord(null); -// } -// } - // const columns = { - // tab1: [ - // { - // title: '类型', - // dataIndex: 'placeName', - // fixed: 'left', - // width: 120, - // search: false, - // options: 1, - // backgroundColor: "#ffffff", - // fieldProps: { - // onChange: (value, cs) => { - // setSitename(value.currentTarget.value) - // }, - // placeholder: '请输入类型进行搜索', - - // }, - // render: (dom, record) => { - // return record.name - // }, - // }, - // { - // title: '数量', - // search: false, - // dataIndex: 'containers', - - // fixed: 'left', - // width: 120, - // render: (dom, record) => { - // return record.count - // }, - // fieldProps: { - // getPopupContainer: (triggerNode) => triggerNode.parentNode, - // } - // }, - // { - // title: '操作', - // dataIndex: 'creatTime', - // valueType: 'dateTimeRange', - // hideInSearch: true, - // width: 160, - // fixed: 'right', - // render: (dom, record) => { - // return
- - // } - // }, - - // ], - // tab2: [ - // { - // title: '管养责单位', - // dataIndex: 'placeName', - // fixed: 'left', - // width: 120, - // options: 1, - // backgroundColor: "#ffffff", - // fieldProps: { - // onChange: (value, cs) => { - // setSitename(value.currentTarget.value) - // }, - // placeholder: '请输入项目名称进行搜索', - - // }, - // render: (dom, record) => { - // return record.entryName - // }, - // }, - // { - // title: '养护单位', - // search: false, - // dataIndex: 'time1', - // valueType: 'dateRange', - - // // fixed: 'left', - // width: 120, - // render: (dom, record) => { - // return record.projectMileage - // }, - // fieldProps: { - // getPopupContainer: (triggerNode) => triggerNode.parentNode, - // } - // }, - // { - // title: '管理人员(人)', - // search: false, - // dataIndex: 'time2', - // valueType: 'dateRange', - // // align: 'right', - // width: 120, - // render: (dom, record) => { - // return record.investment - // }, - // fieldProps: { - // getPopupContainer: (triggerNode) => triggerNode.parentNode, - // } - // }, - // { - // title: '工人(人)', - // search: false, - // dataIndex: 'time3', - // valueType: 'dateRange', - - - - // width: 120, - // render: (dom, record) => { - // return record.buildUnit - // }, - // fieldProps: { - // getPopupContainer: (triggerNode) => triggerNode.parentNode, - // } - // }, { - // title: '公益岗位(人)', - // search: false, - // dataIndex: 'time4', - // valueType: 'dateRange', - - - // width: 120, - // render: (dom, record) => { - // return record.constructionControlUnit - // }, - // fieldProps: { - // getPopupContainer: (triggerNode) => triggerNode.parentNode, - // } - // }, { - // title: '县道(km)', - // search: false, - // dataIndex: 'time5', - // valueType: 'dateRange', - - - // width: 120, - // render: (dom, record) => { - // return record.designUnit - // }, - // fieldProps: { - // getPopupContainer: (triggerNode) => triggerNode.parentNode, - // } - // }, { - // title: '乡道(km)', - // search: false, - // dataIndex: 'time6', - // valueType: 'dateRange', - - - // width: 120, - // render: (dom, record) => { - // return record.constructionUnit - // }, - // fieldProps: { - // getPopupContainer: (triggerNode) => triggerNode.parentNode, - // } - // }, { - // title: '村道(km)', - // search: false, - // dataIndex: 'time7', - // valueType: 'dateRange', - - - // width: 120, - // render: (dom, record) => { - // return record.supervisorAndSupervisor - // }, - // fieldProps: { - // getPopupContainer: (triggerNode) => triggerNode.parentNode, - // } - // }, { - // title: '桥梁(座)', - // search: false, - // dataIndex: 'time8', - // valueType: 'dateRange', - - - // width: 120, - // render: (dom, record) => { - // return record.projectProgress - // }, - // fieldProps: { - // getPopupContainer: (triggerNode) => triggerNode.parentNode, - // } - // }, - // { - // title: '操作', - // dataIndex: 'creatTime', - // valueType: 'dateTimeRange', - // hideInSearch: true, - // width: 160, - // fixed: 'right', - // render: (dom, record) => { - // return
{ deldatas(record.id) }}> - // - //
- - // } - // }, - // { - // key: "direction", - // hideInTable: true, - // dataIndex: "direction", - // order: 6, - // renderFormItem: (item, { type, defaultRender, ...rest }, form, record) => { - // return ( - //
- // {/* */} - //
- - - // ); - // }, - // }, - // ] - // } - -// return ( - -// -//
-// setActiveKey(key), - // items: [ - // { - // key: 'tab1', - // label: { - // setWhichofits('sheshi') - // setDifferentiate('bridge') - // }}>设施统计{activeKey === 'tab1'}, - // }, - // { - // key: 'tab2', - // label: { - // setWhichofits('guanli') - // setDifferentiate('project') - // }}>管理养护{activeKey === 'tab2'}, - // }, - - // ], - // }, - // }} - // form={{ - // submitter: whichofits == "sheshi" ? false : true - // }} -// scroll={{ x: 800 }} -// options={false} -// ref={c => { finishedProductTable = c; }} -// style={{ width: "100% ", overflow: "auto", height: '760px' }} -// rowKey='id' - -// // rowSelection={{ -// // selectedRowKeys: rowSelected, -// // onChange: (selectedRowKeys) => { -// // setRowSelected(selectedRowKeys); -// // }, -// // }} -// columns={columns[activeKey]} -// dataSource={counts || []} -// request={async (params) => { - -// if (whichofits == 'sheshi') { -// console.log('differentiate','我我我我吧') -// const query = { -// name: sitename -// } -// setRowSelected([]); -// const res = await dispatch(getHighways(query)); -// setCounts(res.payload.data) -// return { -// ...res, -// total: res.payload.data ? res.payload.data.count : 0 -// } -// } if (whichofits == 'guanli') { -// console.log('first','afsvcsvcsvsdfv fsdv fdv b') -// const query = { - -// } -// setRowSelected([]); -// const res = await dispatch(getCustodyunit(query)); -// setCounts(res.payload.data) -// return { -// ...res, -// total: res.payload.data ? res.payload.data.count : 0 -// } -// } - -// }} - - -// > -// -//
-// {modalVisibleyilan ? : ''} -// {modalVisibleyilans ? : ''} -//
-// ) -// } -// const date = { -// "bridgeCode": "桥梁代码", -// "bridgeName": "桥梁名称", -// "centralStation": "中心桩号", -// "crossingFigureType": "跨越地物类型", -// "crossingFigureName": "跨越地物名称", -// "natureOfCharges": "收费性质", -// "rampCode": "匝道编码", -// "sectionType": "路段类型", -// "crossingFigureType1": "跨越地物类型1", -// "crossingFigureName1": "跨越地物名称1", -// "originalBridgeCode": "原桥梁代码", -// "whetherWideRoadAndNarrowBridge": "是否宽路窄桥", -// } -// function mapStateToProps(state) { -// const { auth, depMessage } = state; -// const pakData = (dep) => { -// return dep.map((d) => { -// return { -// title: d.name, -// value: d.id, -// // children: d.type >= 2 ? [] : pakData(d.subordinate) -// children: pakData(d.subordinate) -// } -// }) -// } -// let depData = pakData(depMessage.data || []) -// return { -// user: auth.user, -// depMessage: depMessage.data || [], -// depLoading: depMessage.isRequesting, -// depData, -// }; -// } -// export default connect(mapStateToProps)(HigwaysTable); import React, { useEffect, useState, useRef } from 'react'; import { connect } from 'react-redux'; import { Spin, Button, Popconfirm } from 'antd'; @@ -466,8 +28,7 @@ const TransporTationTable = (props) => { const ref = useRef() useEffect(() => { ref.current.reload() }, [whichofits, delet]) //打开弹窗 - //打开弹窗 - const hightModal = (type, record) => { + const hightModal = (type, record) => { setModalVisibleyilan(true); // setModalType(type); if (type == 'edit') { @@ -540,7 +101,7 @@ const TransporTationTable = (props) => { }, ], - tab2: [ + tab2: [ { title: '管养责单位', dataIndex: 'placeName', @@ -693,7 +254,7 @@ const TransporTationTable = (props) => { } }, - + ] } return ( @@ -727,7 +288,7 @@ const TransporTationTable = (props) => { }, }} form={{ - submitter:false + submitter: false }} scroll={{ x: 800 }} options={false} @@ -760,7 +321,8 @@ const TransporTationTable = (props) => { total: res.payload.data ? res.payload.data.count : 0 } } if (whichofits == 'guanli') { - const query = { + const query = { + } setRowSelected([]); const res = await dispatch(getCustodyunit(query)); @@ -796,7 +358,7 @@ const TransporTationTable = (props) => { setRecortd={setRecortd} setDelet={setDelet} /> : ''} - {modalVisibleyilans ? basicAction({ type: 'get', + query, dispatch: dispatch, actionType: 'GET_XIUYANG', url: ApiTable.getXiuyang, diff --git a/web/client/src/sections/quanju/containers/footer/conserve/index.js b/web/client/src/sections/quanju/containers/footer/conserve/index.js index f5a2c3fb..6ab12b1d 100644 --- a/web/client/src/sections/quanju/containers/footer/conserve/index.js +++ b/web/client/src/sections/quanju/containers/footer/conserve/index.js @@ -27,7 +27,8 @@ const Conserve = (props) => { dispatch(getRoadMaintenances()).then(res => { setRoadMaintenances(res.payload.data || []) }) - dispatch(getxiuyang()).then(res => { + let query={fourceUpdate:false} + dispatch(getxiuyang(query)).then(res => { // let obj = {}; setData(res.payload.data.filter(item => { @@ -35,7 +36,7 @@ const Conserve = (props) => { return item } })) -console.log('是发错地方v',res.payload.data.filter((i)=>i.countyName=='向塘镇人民政府')) +console.log('是发错地方v',res.payload.data.filter((i)=>i.countyName=='富山乡人民政府')) // setShuju(res.payload.data.filter(item => { // if ((new Date().getMonth() < 10 ? "0" + new Date().getMonth() : new Date().getMonth()) - 6 < moment(item.maintenanceDate).format("MM") && moment(item.maintenanceDate).format("MM") <= (new Date().getMonth() < 10 ? "0" + new Date().getMonth() : new Date().getMonth())) { // return item