diff --git a/super-screen/client/assets/images/homepage/communtity/kztotal.png b/super-screen/client/assets/images/homepage/communtity/kztotal.png new file mode 100644 index 0000000..d7a0b3e Binary files /dev/null and b/super-screen/client/assets/images/homepage/communtity/kztotal.png differ diff --git a/super-screen/client/src/sections/community-safty/containers/gis.js b/super-screen/client/src/sections/community-safty/containers/gis.js index 9591251..fff92a0 100644 --- a/super-screen/client/src/sections/community-safty/containers/gis.js +++ b/super-screen/client/src/sections/community-safty/containers/gis.js @@ -51,10 +51,7 @@ function Map(props) { map.on('complete', () => { setDelay(false) - // setTimeout(() => { - // tab == 'home' && map && renderMarkers() - // tab == 'device' && map && renderDevices() - // }, 1000); + tab == 'home' && map && renderMarkers() }); map.on('click', (e) => { @@ -82,10 +79,12 @@ function Map(props) { useEffect(() => { if (!delay) { - tab == 'home' && map && renderMarkers() - tab == 'device' && map && renderDevices() + setTimeout(() => { + tab == 'home' && map && renderMarkers() + tab == 'device' && map && renderDevices() + }, 200); } - }, [tab]); + }, [tab, devices]); useEffect(() => { if (!delay) map && renderDevices() @@ -126,7 +125,7 @@ function Map(props) { var marker = new AMap.Marker({ position: new AMap.LngLat(x.lng, x.lat), // 将一张图片的地址设置为 icon - icon: '/assets/images/homepage/communtity/' + x.kind + '.png', + icon: '/assets/images/homepage/communtity/markerblue.png', // 设置了 icon 以后,设置 icon 的偏移量,以 icon 的 [center bottom] 为原点 offset: new AMap.Pixel(-13, -30), zooms: [3, 14], @@ -305,31 +304,16 @@ function Map(props) { } const renderLeftTop = () => { - return tab == 'person' ? -
-
区域总人数
-
455
- -
新生儿总数
-
45
+ return
+
廉租房总数
+
455
-
老人总数
-
45
-
: -
-
租赁房屋总数
-
4556
+
租赁中
+
45
-
回迁房总数
-
4556
- -
城中村总数
-
4556
- -
廉租房
-
4556
- -
+
空置
+
45
+
} const renderRightBottom = () => { diff --git a/super-screen/client/src/sections/community-safty/containers/gis.less b/super-screen/client/src/sections/community-safty/containers/gis.less index d667a8b..d40acb4 100644 --- a/super-screen/client/src/sections/community-safty/containers/gis.less +++ b/super-screen/client/src/sections/community-safty/containers/gis.less @@ -350,7 +350,7 @@ .hqtotal { width: 126.45px; height: 26.23px; - padding-left: 24px; + padding-left: 30px; background: url('/assets/images/homepage/communtity/hqtotal.png') no-repeat; background-size: 100% 100%; } @@ -358,8 +358,8 @@ .cztotal { width: 126.45px; height: 26.23px; - padding-left: 24px; - background: url('/assets/images/homepage/communtity/cztotal.png') no-repeat; + padding-left: 38px; + background: url('/assets/images/homepage/communtity/kztotal.png') no-repeat; background-size: 100% 100%; }