From 23b766b7d308dcb8f97213d4903cc9ceef2c1c2b Mon Sep 17 00:00:00 2001 From: fandaiyang <1147379969@qq.com> Date: Thu, 12 Dec 2024 09:53:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/LeftSidebarMenu/index.tsx | 20 ++++++++++--------- .../components/Map/index.tsx | 6 +++--- src/pages/UrbanSituation/Focus/index.tsx | 11 ++++++---- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/layouts/LeftSidebarMenu/index.tsx b/src/layouts/LeftSidebarMenu/index.tsx index ea0e8b24..f90d7d47 100644 --- a/src/layouts/LeftSidebarMenu/index.tsx +++ b/src/layouts/LeftSidebarMenu/index.tsx @@ -46,12 +46,9 @@ const menu: MenuItemProps[] = [ title: '城市感知', unActiveIcon: require('@/assets/images/routeMenu/bg4.png'), activeIcon: require('@/assets/images/routeMenu/bg4_a.png'), - path: '/home/developmentSignsIndex', + path: '/home/iot-platform-screen', renderCard: () => { - return
{ - const url = 'https://10.1.174.34:13200/iot-platform-screen' - window.open(url, '_blank'); - }}>城市感知
; + return
城市感知
; }, }, { @@ -60,7 +57,7 @@ const menu: MenuItemProps[] = [ activeIcon: require('@/assets/images/routeMenu/bg8_a.png'), path: '/home/developmentSignsIndex', renderCard: () => { - return
道路实况(建设中)
; + return
道路实况
; }, }, ]; @@ -87,6 +84,12 @@ export default function LeftSidebarMenu() { message.warning('系统正在抓紧建设中'); return; } + // 跳转城市感知 + if (item.path === '/home/iot-platform-screen') { + const url = 'https://10.1.174.34:13200/iot-platform-screen' + window.open(url, '_blank'); + return + } setActive(index); navigation(item.path); }; @@ -99,9 +102,8 @@ export default function LeftSidebarMenu() { style={{ gridColumn: item.columns?.join('/'), gridRow: item.rows?.join('/'), - backgroundImage: `url(${ - i === active ? item.activeIcon : item.unActiveIcon - })`, + backgroundImage: `url(${i === active ? item.activeIcon : item.unActiveIcon + })`, }} > {item.renderCard?.()} diff --git a/src/pages/TheOperationOfTheDistrictCityAndCounty/components/Map/index.tsx b/src/pages/TheOperationOfTheDistrictCityAndCounty/components/Map/index.tsx index 50aac2b5..f534438a 100644 --- a/src/pages/TheOperationOfTheDistrictCityAndCounty/components/Map/index.tsx +++ b/src/pages/TheOperationOfTheDistrictCityAndCounty/components/Map/index.tsx @@ -53,7 +53,7 @@ const DistrictMap: React.FC = () => { }; console.log(data, selectedData); useEffect(() => { - const temp = data.find((v) => v?.objectId === selectDistrict?.objectId); + const temp = data?.find((v) => v?.objectId === selectDistrict?.objectId); setSelectedData(temp); }, [data, selectDistrict]); @@ -67,7 +67,7 @@ const DistrictMap: React.FC = () => { > {!selectDistrict ? ( - {data.map((item, index) => { + {data?.map((item, index) => { console.log(item); return ( { > ); })} - {data.map((item, index) => { + {data?.map((item, index) => { const point = [Number(item.centerX), Number(item.centerY)]; return ( diff --git a/src/pages/UrbanSituation/Focus/index.tsx b/src/pages/UrbanSituation/Focus/index.tsx index 91885a2b..aa5f1534 100644 --- a/src/pages/UrbanSituation/Focus/index.tsx +++ b/src/pages/UrbanSituation/Focus/index.tsx @@ -55,17 +55,17 @@ const Focus = () => { // }, { name: '保障点位', - value: 12, + value: 5, unit: '个', }, { name: '保障资源', - value: 12, + value: 10, unit: '个', }, { name: '当前问题', - value: 12, + value: 3, unit: '个', }, ]; @@ -148,7 +148,10 @@ const Focus = () => { style={{ marginTop: 30 }} > 重大活动保障 - 更多 + { + const url = 'https://10.1.174.34:13000' + window.open(url, '_blank'); + }}>更多
-- GitLab