From ffc07d004eaaca2062acf47b0b94b9785fa47a17 Mon Sep 17 00:00:00 2001 From: xingyongchun Date: Mon, 5 Sep 2022 16:41:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BB=E6=8A=A4=E9=A5=BC=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/client/src/sections/fillion/actions/infor.js | 11 +++++++++++ .../sections/fillion/components/highways/guanli.js | 8 +++++--- .../quanju/containers/footer/conserve/index.js | 12 +----------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/web/client/src/sections/fillion/actions/infor.js b/web/client/src/sections/fillion/actions/infor.js index 89626eb5..06afa907 100644 --- a/web/client/src/sections/fillion/actions/infor.js +++ b/web/client/src/sections/fillion/actions/infor.js @@ -424,3 +424,14 @@ export function postCustodyunit(query) { // reducer: { name: 'roadMaintenances' } }); } +export function getxiuyangas(query) { + return dispatch => basicAction({ + type: 'get', + query, + dispatch: dispatch, + actionType: 'GET_XIUYANG', + url: ApiTable.getXiuyang, + msg: { error: '获取信息失败' }, + reducer: { name: 'xiuyang' } + }); +} \ No newline at end of file diff --git a/web/client/src/sections/fillion/components/highways/guanli.js b/web/client/src/sections/fillion/components/highways/guanli.js index a17baff1..3dda4694 100644 --- a/web/client/src/sections/fillion/components/highways/guanli.js +++ b/web/client/src/sections/fillion/components/highways/guanli.js @@ -2,7 +2,9 @@ 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, getCustodyunitOne } from "../../actions/infor" +import { putOperaTional, postCustodyunit, getCustodyunitOne,getxiuyangas } from "../../actions/infor" + + import _ from 'lodash' const Guanli = (props) => { @@ -26,8 +28,8 @@ const Guanli = (props) => { 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) => { + let date = { fourceUpdate: false } + dispatch(getxiuyangas(date)).then((res) => { }) } }) 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 6ab12b1d..eeb36b55 100644 --- a/web/client/src/sections/quanju/containers/footer/conserve/index.js +++ b/web/client/src/sections/quanju/containers/footer/conserve/index.js @@ -27,23 +27,13 @@ const Conserve = (props) => { dispatch(getRoadMaintenances()).then(res => { setRoadMaintenances(res.payload.data || []) }) - let query={fourceUpdate:false} - dispatch(getxiuyang(query)).then(res => { - - // let obj = {}; + dispatch(getxiuyang()).then(res => { setData(res.payload.data.filter(item => { if (moment(item.maintenanceDate).format("MM") == (new Date().getMonth() < 10 ? "0" + new Date().getMonth() : new Date().getMonth())) { return item } })) -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 - // } - // })) }) - dispatch(getMaintenance()).then(res => { setShuju(res.payload.data) })