Browse Source

养护饼图

dev
xingyongchun 2 years ago
parent
commit
ffc07d004e
  1. 11
      web/client/src/sections/fillion/actions/infor.js
  2. 8
      web/client/src/sections/fillion/components/highways/guanli.js
  3. 12
      web/client/src/sections/quanju/containers/footer/conserve/index.js

11
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' }
});
}

8
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) => {
})
}
})

12
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)
})

Loading…
Cancel
Save