diff --git a/api/app/lib/controllers/data/vehicle.js b/api/app/lib/controllers/data/vehicle.js index 554e4e5a..4ba183a5 100644 --- a/api/app/lib/controllers/data/vehicle.js +++ b/api/app/lib/controllers/data/vehicle.js @@ -26,7 +26,6 @@ async function get(ctx) { } } const vehicleRes = await models.Statistic.findAll(findOption) - console.log('vehicleRes', vehicleRes) ctx.status = 200; ctx.body = { vehicleRes: vehicleRes.filter(item => item.dataValues.name === '标志牌' || item.dataValues.name === '养护责任牌') diff --git a/web/client/src/sections/fillion/components/bridgeTable.js b/web/client/src/sections/fillion/components/bridgeTable.js index f32c0e89..1f9b43bb 100644 --- a/web/client/src/sections/fillion/components/bridgeTable.js +++ b/web/client/src/sections/fillion/components/bridgeTable.js @@ -39,6 +39,12 @@ const BrideTable = (props) => { setDelet(res) }) } + useEffect(async () => { + const res = await dispatch(getBridge()) + setSmallBridge(res.payload.data?.filter(item => item.bridgeClassification === '小桥')) + setMiddleBridge(res.payload.data?.filter(item => item.bridgeClassification === '中桥')) + setBigBridge(res.payload.data?.filter(item => item.bridgeClassification === '大桥')) + }, []) const deldatas = (id) => { // 工程 const query = { projectId: id @@ -1813,9 +1819,7 @@ const BrideTable = (props) => { setRowSelected([]); const res = await dispatch(getBridge(query)); // console.log(res) - setSmallBridge(res.payload.data?.filter(item => item.bridgeClassification === '小桥')) - setMiddleBridge(res.payload.data?.filter(item => item.bridgeClassification === '中桥')) - setBigBridge(res.payload.data?.filter(item => item.bridgeClassification === '大桥')) + setCounts(res.payload.data) return { ...res, diff --git a/web/client/src/sections/fillion/components/highwaysTable.js b/web/client/src/sections/fillion/components/highwaysTable.js index 2d19929a..248e503c 100644 --- a/web/client/src/sections/fillion/components/highwaysTable.js +++ b/web/client/src/sections/fillion/components/highwaysTable.js @@ -91,15 +91,14 @@ const TransporTationTable = (props) => { width: 160, fixed: 'right', render: (dom, record) => { - console.log('record', record.id === null) - return
+ disabled={editAble} + >编辑) : null} } }, diff --git a/web/client/src/sections/fillion/components/transportationTable.js b/web/client/src/sections/fillion/components/transportationTable.js index 99e35d15..6fabd4b7 100644 --- a/web/client/src/sections/fillion/components/transportationTable.js +++ b/web/client/src/sections/fillion/components/transportationTable.js @@ -76,6 +76,20 @@ const TransporTationTable = (props) => { setDelet(res) }) } + useEffect(async () => { + console.log('whichofits', whichofits) + let query = {} + if (whichofits === '县') { + query.level = '县' + } else if (whichofits === '乡') { + query.level = '乡' + } else if (whichofits === '村') { + query.level = '村' + } + const res = await dispatch(getRoadway(query)) + const uniqueArray = [...new Set(res.payload.data?.map(item => item.routeName))]; + setRoadData(uniqueArray) + }, [whichofits]) const columns = { tab1: [ { @@ -3823,8 +3837,7 @@ const TransporTationTable = (props) => { } setRowSelected([]); const res = await dispatch(getRoadway(query)); - const uniqueArray = [...new Set(res.payload.data?.map(item => item.routeName))]; - setRoadData(uniqueArray) + setCounts(departmentInfo ? res.payload.data.filter((item) => { return item.townshipCode === departmentInfo.areaCode }) : res.payload.data) @@ -3840,8 +3853,6 @@ const TransporTationTable = (props) => { } setRowSelected([]); const res = await dispatch(getRoadway(query)); - const uniqueArray = [...new Set(res.payload.data?.map(item => item.routeName))]; - setRoadData(uniqueArray) setCounts(departmentInfo ? res.payload.data.filter((item) => { return item.townshipCode === departmentInfo.areaCode }) : res.payload.data) @@ -3856,8 +3867,6 @@ const TransporTationTable = (props) => { } setRowSelected([]); const res = await dispatch(getRoadway(query)) - const uniqueArray = [...new Set(res.payload.data?.map(item => item.routeName))]; - setRoadData(uniqueArray) setCounts(departmentInfo ? res.payload.data.filter((item) => { return item.townshipCode === departmentInfo.areaCode }) : res.payload.data) @@ -3883,7 +3892,7 @@ const TransporTationTable = (props) => { search={{ defaultCollapsed: false, optionRender: (searchConfig, formProps, dom) => [ - {`共有${whichofits}道:${roadData.length || 0}条`}, + {`共有${whichofits}道:${roadData.length || 0}条`}, ...dom.reverse(),乡村道道路2481.2公里
- +乡村道道路{roadMile}公里
{/*乡村道道路{isNaN((roads?.["乡"] + roads?.["村"]).toFixed(3)) ? "" : (roads?.["乡"] + roads?.["村"]).toFixed(3)}公里
*/}占比{((2481.2 / 2689) * 100).toFixed(2)}%
diff --git a/web/client/src/sections/quanju/containers/footer/leadership/centerleft/top.js b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/top.js index eb227e7b..7049020d 100644 --- a/web/client/src/sections/quanju/containers/footer/leadership/centerleft/top.js +++ b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/top.js @@ -28,7 +28,7 @@ const Leftcenter = (props) => { {/*2689
道路统计公里
{/*{isNaN((list?.["县"] + list?.["乡"] + list?.["村"]).toFixed(3)) ? "" : (list?.["县"] + list?.["乡"] + list?.["村"]).toFixed(3)}
*/} -2689
涵洞统计个
{isNaN((culvert?.["县"] + culvert?.["乡"] + culvert?.["村"]).toFixed(0)) ? "" : (culvert?.["县"] + culvert?.["乡"] + culvert?.["村"]).toFixed(0)}
桥梁统计座
165
+桥梁统计座
{/*{isNaN((bridge?.["小桥"] + bridge?.["中桥"] + bridge?.["大桥"])) ? "" : (bridge?.["小桥"] + bridge?.["中桥"] + bridge?.["大桥"])}
*/}