From 41d2de202a08d133e22288c7e754e0602dcd62b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=98lijianhao=E2=80=99?=
Date: Tue, 26 Jul 2022 17:28:10 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E5=AD=97=E6=AE=B5=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/sections/quanju/containers/example.js | 14 +++++++++-----
.../footer/conserve/right/right-bottom.js | 3 ++-
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/web/client/src/sections/quanju/containers/example.js b/web/client/src/sections/quanju/containers/example.js
index 986938d7..62a34a9f 100644
--- a/web/client/src/sections/quanju/containers/example.js
+++ b/web/client/src/sections/quanju/containers/example.js
@@ -7,6 +7,8 @@ import Header from './heand';
import Footer from './footer';
import ProTable, { TableDropdown } from '@ant-design/pro-table';
+const MAPID = 'screenGis'
+
const Example = (props) => {
const { dispatch, actions, user, loading } = props
const [tabKey, setTabKey] = useState('leadership')
@@ -23,10 +25,9 @@ const Example = (props) => {
useEffect(() => {
-
const timer = setTimeout(() => {
- const map = new AMap.Map("amapId", {
+ const map = new AMap.Map(MAPID, {
//resizeEnable: true,
center: [115.912663, 28.543149],//地图中心点,初始定位加载显示楼块
// center: [115.857952, 28.683003],//地图中心点
@@ -39,7 +40,7 @@ const Example = (props) => {
});
let styleName = 'amap://styles/fb26776387242721c2fc32e2cb1daccc';
map.setMapStyle(styleName);
-
+
let mapComplete = false;
let windowOnload = false;
window.onload = function () {
@@ -48,12 +49,15 @@ const Example = (props) => {
}, 100);
//主题样式
-
+
return () => {
const amapKeys = Object.keys(localStorage).filter(key => key.match(/^_AMap_/)) // 销毁地图
amapKeys.forEach(key => {
localStorage.removeItem(key)
})
+ map.clearMap();
+ if (map) map.destroy();
+ map = null;
clearTimeout(timer)
}
}, [])
@@ -67,7 +71,7 @@ const Example = (props) => {
document.body.clientHeight / 1080
)})`, */
}}>
-
+
diff --git a/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js b/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js
index 739517cc..efcc9de0 100644
--- a/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js
+++ b/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js
@@ -15,7 +15,7 @@ let underColorList = [
"rgba(255,194,20,0.5)"
]
-const type = ['road', 'culvert', 'bridge']
+const type = ['culvert','', 'road', 'bridge']
const RightBottom = (props) => {
const { roadMaintenances } = props
@@ -45,6 +45,7 @@ const RightBottom = (props) => {
}
}).filter(f => f !== undefined)
const otherNum = totalData - typesNum
+ console.log();
otherNum !== null && list?.push({ name: '其他', value: otherNum })
const style = { height: "31%", marginTop: "3%" }
return (
From 186b48f9a08c4b673706c89ba10df9f8414bd11b Mon Sep 17 00:00:00 2001
From: wanyiwei
Date: Tue, 26 Jul 2022 17:37:08 +0800
Subject: [PATCH 2/2] =?UTF-8?q?*=E5=B7=A6=E4=BE=A7=E6=9A=82=E6=97=A0?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=B1=95=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../containers/footer/operation/left.js | 36 ++++++++++---------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/web/client/src/sections/quanju/containers/footer/operation/left.js b/web/client/src/sections/quanju/containers/footer/operation/left.js
index e4c5be32..92e69c9a 100644
--- a/web/client/src/sections/quanju/containers/footer/operation/left.js
+++ b/web/client/src/sections/quanju/containers/footer/operation/left.js
@@ -27,8 +27,8 @@ const Left = (props) => {
const onChange = (e) => {
const { value } = e.target;
let keys = []
- const newExpandedKeys = treeDataList.filter(e=> e.key.match(value))
- newExpandedKeys.forEach(e=>{
+ const newExpandedKeys = treeDataList.filter(e => e.key.match(value))
+ newExpandedKeys.forEach(e => {
keys.push(e.key)
})
setExpandedKeys(keys);
@@ -66,12 +66,12 @@ const Left = (props) => {
key: e.name,
title: e.name,
})
- e.child.forEach(i=>{
+ e.child.forEach(i => {
dataList.push({
key: i.name,
title: i.name,
})
- i.child.forEach(s=>{
+ i.child.forEach(s => {
dataList.push({
key: s.vehicleLicensePlateNumber,
title: s.vehicleLicensePlateNumber,
@@ -103,18 +103,22 @@ const Left = (props) => {
/>
-
+ {
+ treeData.length > 0 ?
+
:
暂无数据
+ }
+