Browse Source

feat:fix bugs

dev
zhaobing 1 year ago
parent
commit
3c602be0df
  1. 1
      api/app/lib/controllers/data/vehicle.js
  2. 10
      web/client/src/sections/fillion/components/bridgeTable.js
  3. 7
      web/client/src/sections/fillion/components/highwaysTable.js
  4. 23
      web/client/src/sections/fillion/components/transportationTable.js
  5. 4
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js
  6. 14
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/top.js

1
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 === '养护责任牌')

10
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,

7
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 <div><Button type="link"
return <div>{record.id !== null ? (<Button type="link"
onClick={() => {
hightModal('edit', record)
setTypecard('compile')
setRecortd(record)
}}
disabled={editAble && record.id === null}
>编辑</Button></div>
disabled={editAble}
>编辑</Button>) : null}</div>
}
},

23
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) => [
<span style={{ marginRight: 20 }}>{`共有${whichofits}道:${roadData.length || 0}`}</span>,
<span >{`共有${whichofits}道:${roadData.length || 0}`}</span>,
...dom.reverse(),
<Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, grade, differentiate) }}
disabled={user?.username !== 'SuperAdmin' && user?.userResources?.filter(i => i.resourceId === 'ROADMANAGE')[0].isshow === "true" ? true : ''}

4
web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js

@ -38,6 +38,7 @@ const Right = (props) => {
// const
})
}, [])
const roadMile = 2481.2
const renderBody = () => {
return (
@ -117,8 +118,7 @@ const Right = (props) => {
</div>
<div style={{ width: "96%", position: "relative", left: "2%" }}>
{/* <Spin spinning={!roads} tip="Loading" > */}
<p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>乡村道道路<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}></span>2481.2<span style={{ marginLeft: "4%" }}></span></p>
<p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>乡村道道路<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{roadMile}</span><span style={{ marginLeft: "4%" }}></span></p>
{/* <p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>乡村道道路<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{isNaN((roads?.["乡"] + roads?.["村"]).toFixed(3)) ? "" : (roads?.["乡"] + roads?.["村"]).toFixed(3)}</span><span style={{ marginLeft: "4%" }}>公里</span></p> */}
<p style={{ position: "absolute", right: "0", color: "rgba(216,240,255,0.8)", top: "10px" }}>占比<span>{((2481.2 / 2689) * 100).toFixed(2)}</span><span>%</span></p>

14
web/client/src/sections/quanju/containers/footer/leadership/centerleft/top.js

@ -28,7 +28,7 @@ const Leftcenter = (props) => {
{/* <div className={tabKey == "build" ? "tabKey-map" : "notabKey"} style={{ backgroundImage: "url(/assets/images/quanju/zuobeijing.png)", backgroundSize: "100% 100%" }} onClick={() => {
onClick("build")
}}><a>建设</a></div> */}
<div style={{ width: "30%", height: "10vh", backgroundColor: "", position: "relative", left: "2%", top: "100%" }} onClick={() => {
<div style={{ width: "35%", height: "10vh", backgroundColor: "", position: "relative", left: "10%", top: "100%" }} onClick={() => {
onClick("daolu")
}} >
{
@ -37,14 +37,14 @@ const Leftcenter = (props) => {
<div style={{ width: "50%", height: "100%", position: "absolute", left: "17%", top: "23%" }}>
<img src='/assets/images/leadership/lu.png' style={{ width: "50%" }} />
</div>
<div style={{ width: "50%", height: "100%", position: "absolute", left: "50%", top: "11%" }}>
<div style={{ width: "60%", height: "100%", position: "absolute", left: "50%", top: "11%" }}>
<p style={{ fontFamily: "YouSheBiaoTiHei", color: "#ffffff", fontSize: "2.5vh", marginTop: "-2%" }}>2689</p>
<p style={{ fontSize: "2vh", color: "#D8F0FF", fontFamily: "PingFangSC-Regular, PingFang SC", marginTop: "3%" }}>道路统计<span style={{ marginLeft: "10px", color: "rgba(216,240,255,0.8000)" }}>公里</span></p>
{/* <p style={{ fontFamily: "YouSheBiaoTiHei", color: "#ffffff", fontSize: "2.5vh", marginTop: "-2%" }}>{isNaN((list?.["县"] + list?.["乡"] + list?.["村"]).toFixed(3)) ? "" : (list?.["县"] + list?.["乡"] + list?.["村"]).toFixed(3)}</p> */}
<p style={{ fontFamily: "YouSheBiaoTiHei", color: "#ffffff", fontSize: "2.5vh", marginTop: "-2%" }}>2689</p>
</div>
</div>
<div style={{ width: "30%", height: "10vh", backgroundColor: "", position: "relative", left: "35%", top: "-105%" }} onClick={() => {
{/* <div style={{ width: "30%", height: "10vh", backgroundColor: "", position: "relative", left: "35%", top: "-105%" }} onClick={() => {
onClick("handong")
}} >
{
@ -57,8 +57,8 @@ const Leftcenter = (props) => {
<p style={{ fontSize: "2vh", color: "#D8F0FF", fontFamily: "PingFangSC-Regular, PingFang SC", marginTop: "3%" }}>涵洞统计<span style={{ fontSize: "14px", marginLeft: "10px", color: "rgba(216,240,255,0.8000)" }}></span></p>
<p style={{ fontFamily: "YouSheBiaoTiHei", color: "#24FFEE", fontSize: "2.5vh" }}>{isNaN((culvert?.["县"] + culvert?.["乡"] + culvert?.["村"]).toFixed(0)) ? "" : (culvert?.["县"] + culvert?.["乡"] + culvert?.["村"]).toFixed(0)}</p>
</div>
</div>
<div style={{ width: "30%", height: "10vh", backgroundColor: "", position: "relative", left: "68%", top: "-315%" }} onClick={() => {
</div> */}
<div style={{ width: "35%", height: "10vh", backgroundColor: "", position: "relative", left: "55%", top: "-100%" }} onClick={() => {
onClick("qiaoliang")
}} >
{
@ -68,8 +68,8 @@ const Leftcenter = (props) => {
<img src='/assets/images/leadership/qiao.png' style={{ width: "50%" }} />
</div>
<div style={{ width: "50%", height: "100%", position: "absolute", left: "50%", top: "8%" }}>
<p style={{ fontSize: "2vh", color: "#D8F0FF", fontFamily: "PingFangSC-Regular, PingFang SC", marginTop: "3%" }}>桥梁统计<span style={{ fontSize: "14px", marginLeft: "10px", color: "rgba(216,240,255,0.8000)" }}></span></p>
<p style={{ fontFamily: "YouSheBiaoTiHei", color: "#00F1FF", fontSize: "2.5vh", marginTop: "-2%" }}>165</p>
<p style={{ fontSize: "2vh", color: "#D8F0FF", fontFamily: "PingFangSC-Regular, PingFang SC", marginTop: "3%" }}>桥梁统计<span style={{ marginLeft: "10px", color: "rgba(216,240,255,0.8000)" }}></span></p>
{/* <p style={{ fontFamily: "YouSheBiaoTiHei", color: "#00F1FF", fontSize: "2.5vh", marginTop: "-2%" }}>{isNaN((bridge?.["小桥"] + bridge?.["中桥"] + bridge?.["大桥"])) ? "" : (bridge?.["小桥"] + bridge?.["中桥"] + bridge?.["大桥"])}</p> */}
</div>

Loading…
Cancel
Save