diff --git a/src/pages/GlobalModalServices/modals/AdministPunish/NumTop5/index.tsx b/src/pages/GlobalModalServices/modals/AdministPunish/NumTop5/index.tsx index 514b44f210b2e86a332732f341a8c10761e0c81e..cff523db2f1d7cbfe9a5b3bfc0e679ec0250fd1d 100644 --- a/src/pages/GlobalModalServices/modals/AdministPunish/NumTop5/index.tsx +++ b/src/pages/GlobalModalServices/modals/AdministPunish/NumTop5/index.tsx @@ -82,11 +82,11 @@ const Top5: React.FC<{ return list?.map((item: any) => ({ name: item?.gridName, num: item?.num, - percent: ( + percent:total? ( (item?.num / total) * 100 - ).toFixed(2), + ).toFixed(2):0, })); }, [qysl, areaKey,total]); diff --git a/src/pages/GlobalModalServices/modals/AdministPunish/Top5/index.tsx b/src/pages/GlobalModalServices/modals/AdministPunish/Top5/index.tsx index 0049ad7afcded2b9ca831b2966e81958b35a7a0e..3c0fced5ca74ed72f0a82583422f244b119a6e2a 100644 --- a/src/pages/GlobalModalServices/modals/AdministPunish/Top5/index.tsx +++ b/src/pages/GlobalModalServices/modals/AdministPunish/Top5/index.tsx @@ -10,9 +10,9 @@ import styles from './index.less'; const Top5: React.FC<{ modalDispatch: ChildrenModalMethods; searchTime: any; - total:number + total: number; }> = memo((props) => { - const { modalDispatch, searchTime ,total} = props; + const { modalDispatch, searchTime, total } = props; const { data: wfxwsl } = useRequest( () => @@ -33,13 +33,9 @@ const Top5: React.FC<{ return list?.map((item: any) => ({ name: item?.wfxwlx, num: item?.num, - percent: ( - (item?.num / - total) * - 100 - ).toFixed(2), + percent: total?((item?.num / total) * 100).toFixed(2):0, })); - }, [wfxwsl,total]); + }, [wfxwsl, total]); return ( <BaseCard w={457} h={430} title="违法行为类型TOP5"> diff --git a/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/Advertisement/index.tsx b/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/Advertisement/index.tsx index 5d273cace488e802565f1ae9c46884d774c4a643..4c0e6f15d9dca54bffd599b75cbd806d81208a36 100644 --- a/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/Advertisement/index.tsx +++ b/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/Advertisement/index.tsx @@ -117,13 +117,13 @@ const Advertisement: React.FC = () => { <div className={styles.dataBox}> <img src={industry4_3} alt="" className={styles.bgImage2} /> <DescriptionItem - // value={36.6} - name="批准设置广告招牌" - unit="万个" + value={3500} + name="全市户外广告" + unit="余块" valueStyle={commonValueStyle} labelStyle={commonLabelStyle} unitStyle={commonUnitStyle} - decimals={2} + decimals={0} style={commonStyle} /> </div> diff --git a/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/CityLighting/index.tsx b/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/CityLighting/index.tsx index 720903b0774824fe7f274e70fd17157190f41d1d..b5caa9ae0bf413d25442aff38c9f8675fd4dc8bc 100644 --- a/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/CityLighting/index.tsx +++ b/src/pages/NewHome/NewRightContent/IndustryOperationV4/components/CityLighting/index.tsx @@ -104,6 +104,13 @@ const CityLighting: React.FC = () => { value={dataSource?.yesterdayLightRate} name="昨日亮灯率" unit="%" + onClick={() => { + dispatch.push('UrbanLighting', { + props: { + metaData: dataSource, + }, + }); + }} valueStyle={commonValueStyle} labelStyle={commonLabelStyle} unitStyle={commonUnitStyle} diff --git a/src/pages/NewHome/NewRightContent/IndustryOperationV4/index.tsx b/src/pages/NewHome/NewRightContent/IndustryOperationV4/index.tsx index f9225140385e797c6179b36944481295e7657b51..303d5a185dae0d44fb6cd0ba289ca54e3a64a073 100644 --- a/src/pages/NewHome/NewRightContent/IndustryOperationV4/index.tsx +++ b/src/pages/NewHome/NewRightContent/IndustryOperationV4/index.tsx @@ -1,19 +1,19 @@ -import React, { useMemo } from 'react'; -import { Flex, Space } from 'antd'; -import { DoubleRightOutlined } from '@ant-design/icons'; import { useGlobalModalServices } from '@/pages/GlobalModalServices/provider'; -import styles from './index.less'; +import { DoubleRightOutlined } from '@ant-design/icons'; +import { Flex, Space } from 'antd'; +import React, { useMemo } from 'react'; +import Advertisement from './components/Advertisement'; import Card from './components/Card'; -import EnvironmentalHealth from './components/EnvironmentalHealth'; -import WasteDisposal from './components/WasteDisposal'; import CityLighting from './components/CityLighting'; -import Advertisement from './components/Advertisement'; -import MunicipalFacilities from './components/MunicipalFacilities'; +import EnvironmentalHealth from './components/EnvironmentalHealth'; import LawEnforcement from './components/LawEnforcement'; +import MunicipalFacilities from './components/MunicipalFacilities'; +import WasteDisposal from './components/WasteDisposal'; +import styles from './index.less'; const IndustryOperationV4: React.FC = () => { const { dispatch } = useGlobalModalServices(); - + const cards = useMemo( () => [ { @@ -47,7 +47,7 @@ const IndustryOperationV4: React.FC = () => { ], }, { - title: '市容广招', + title: '市容广告', children: <Advertisement />, popverSystem: [ { @@ -55,7 +55,7 @@ const IndustryOperationV4: React.FC = () => { url: 'http://171.221.172.80:6888/eUrbanMIS/main.htm', }, ], - }, + }, { title: '市政设施', children: <MunicipalFacilities />, @@ -107,33 +107,33 @@ const IndustryOperationV4: React.FC = () => { </div> <div className={styles.content}> - <Flex gap={20}> - <Flex vertical gap={20}> - {cards.slice(0, 3).map((card) => ( - <Card - key={card.title} - title={card.title} - jumpSystem={card.popverSystem} - > - {card.children} - </Card> - ))} - </Flex> - <Flex vertical gap={20}> - {cards.slice(3).map((card) => ( - <Card - key={card.title} - title={card.title} - jumpSystem={card.popverSystem} - > - {card.children} - </Card> - ))} - </Flex> + <Flex gap={20}> + <Flex vertical gap={20}> + {cards.slice(0, 3).map((card) => ( + <Card + key={card.title} + title={card.title} + jumpSystem={card.popverSystem} + > + {card.children} + </Card> + ))} + </Flex> + <Flex vertical gap={20}> + {cards.slice(3).map((card) => ( + <Card + key={card.title} + title={card.title} + jumpSystem={card.popverSystem} + > + {card.children} + </Card> + ))} + </Flex> </Flex> </div> </div> ); }; -export default IndustryOperationV4; \ No newline at end of file +export default IndustryOperationV4;