diff --git a/src/pages/GlobalModalServices/modals/BridgeManage/components/BridgeTypeDistribution/index.css b/src/pages/GlobalModalServices/modals/BridgeManage/components/BridgeTypeDistribution/index.css index ec7bfb2cae1a60825418fc178dd5b46951ae449a..3687c8c8c3d8a1ca7d8fffd811e142a064b3e692 100644 --- a/src/pages/GlobalModalServices/modals/BridgeManage/components/BridgeTypeDistribution/index.css +++ b/src/pages/GlobalModalServices/modals/BridgeManage/components/BridgeTypeDistribution/index.css @@ -40,23 +40,19 @@ background: #0099f7; } .container .content { - margin-top: 16px; + margin-top: 56px; display: flex; - flex-direction: row; + justify-content: space-around; align-items: center; } -.container .content .chart { - padding-left: 13px; - padding-top: 30px; -} .container .content .legend { display: flex; flex-direction: column; justify-content: center; gap: 20px; - margin-top: -50px; } .container .content .legend.roadLegend { + margin-top: -30px; gap: 13px; } .container .content .legend .legendItem { diff --git a/src/pages/GlobalModalServices/modals/BridgeManage/components/BridgeTypeDistribution/index.less b/src/pages/GlobalModalServices/modals/BridgeManage/components/BridgeTypeDistribution/index.less index 086b5b65044adb135ddbc5474703563d5d3c4a16..31926efea2e3c0a95932a15630b5ac88b3829097 100644 --- a/src/pages/GlobalModalServices/modals/BridgeManage/components/BridgeTypeDistribution/index.less +++ b/src/pages/GlobalModalServices/modals/BridgeManage/components/BridgeTypeDistribution/index.less @@ -65,6 +65,7 @@ // margin-top: -50px; &.roadLegend { + margin-top: -30px; gap: 13px; } diff --git a/src/pages/GlobalModalServices/modals/SanitationResource/index.tsx b/src/pages/GlobalModalServices/modals/SanitationResource/index.tsx index 5c9dfa611cc493bf3fddac49bddb0cf2a2591761..e73aae320515171b0785efe339d79e9ca481f762 100644 --- a/src/pages/GlobalModalServices/modals/SanitationResource/index.tsx +++ b/src/pages/GlobalModalServices/modals/SanitationResource/index.tsx @@ -34,10 +34,45 @@ const SanitationDisp = () => { '#aa7dff', ]; //环卫车辆 - const { data: clzs } = useRequest(() => - services.DataBase.getSjdzInfoData({ - typeCode: 'zzcc-clzs', - }), + const { data: clzs } = useRequest( + () => + services.DataBase.getSjdzInfoData({ + typeCode: 'zzcc-clzs', + }) + .then(res => { + // console.log(res); + res.data.data.records[0].types = res.data.data.records[0].types.filter( + (item: any) => item.carGradeName + ); + return res; + }) + // .then(res => { + // console.log(res); + // // 在这里对数据进行排序处理 + // if (res?.data?.data?.records?.[0]?.types) { + // const sortedData = [...res.data.data.records[0].types].sort( + // (a, b) => b.vehicleCount - a.vehicleCount + // ); + // return { + // ...res, + // data: { + // ...res.data, + // data: { + // ...res.data.data, + // records: [{ + // ...res.data.data.records[0], + // types: sortedData + // }, + // ...res.data.data.records.slice(1), + // ]} + // } + // }; + // } + // return res; + // }), + // { + // refreshDeps: [], + // } ); //环卫人员 const { data: hwrysl } = useRequest(() => @@ -58,7 +93,8 @@ const SanitationDisp = () => { typeCode: 'zzcc-hyyxqk-nlfbnn', }), ); - console.log(nlfbnn); + // console.log(nlfbnn); + // console.log(clzs); const issue = useMemo(() => { return [ @@ -173,7 +209,7 @@ const SanitationDisp = () => {
({ + data={clzs?.data?.data?.records?.[0]?.types?.map((item: any) => ({ name: item?.carGradeName, value: item?.vehicleCount, }))} @@ -181,7 +217,7 @@ const SanitationDisp = () => { />
- {clzs?.data?.data?.records?.[0]?.types?.map((item, index) => { + {clzs?.data?.data?.records?.[0]?.types?.map((item: any, index: any) => { return (
{
({ + data={rylxsl?.data?.data?.records?.map((item: any) => ({ name: item?.key, value: item?.num, }))} @@ -243,7 +279,7 @@ const SanitationDisp = () => { />
- {rylxsl?.data?.data?.records?.map((item, index) => { + {rylxsl?.data?.data?.records?.map((item: any, index: any) => { return (