From 6a3d7e6d194cb23f6a7213ca014e53f71d54c7ee Mon Sep 17 00:00:00 2001
From: SongZhen <>
Date: Fri, 22 Sep 2023 14:10:21 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9C=B0=E5=9B=BE=E7=BC=A9?=
=?UTF-8?q?=E6=94=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/dataBoard/cpts/map/index.vue | 32 ++++++++++++++-----
.../organizational/dangTree/index.vue | 12 -------
2 files changed, 24 insertions(+), 20 deletions(-)
diff --git a/src/views/dataBoard/cpts/map/index.vue b/src/views/dataBoard/cpts/map/index.vue
index 080eeab50..4460d6201 100644
--- a/src/views/dataBoard/cpts/map/index.vue
+++ b/src/views/dataBoard/cpts/map/index.vue
@@ -3,7 +3,7 @@
切换深色模式
切换浅色模式
-
+
@@ -39,7 +39,7 @@ export default {
data() {
return {
mapType,
-
+ zoom: 0,
mapStyleType: localStorage.getItem("mapStyle") || "dark",
// srcGridData: {},
darkStyle: {
@@ -264,9 +264,25 @@ export default {
dotList2(val, oldValue) {
this.updateDot();
},
+ // "$store.state.chooseArea.realScale"(n, v) {
+ // this.setStartScale(n);
+ // },
+ },
+
+ mounted() {
+ // const scale = this.$store.state.chooseArea.realScale;
+ // console.log(scale);
+ // if (scale) {
+ // this.setStartScale(scale);
+ // }
},
methods: {
+ // setStartScale(n) {
+ // const scale = 1 / n;
+ // this.zoom = scale;
+ // },
+
iniMap() {
const { darkStyle, lightStyle, srcGridData } = this;
if (!srcGridData) return false;
@@ -493,7 +509,7 @@ export default {
.active(true);
scene.addLayer(textLayer);
- polygonLayer.on("mouseenter", (e) => {
+ polygonLayer.on("mousemove", (e) => {
// console.log("e", e);
// const { lng, lat } = e.lngLat;
// const popup = new Popup({
@@ -515,11 +531,11 @@ export default {
scene.addPopup(popup);
});
- polygonLayer.on("mousemove", (e) => {
- polygonLayer.style({
- raisingHeight: 0,
- });
- });
+ // polygonLayer.on("mousemove", (e) => {
+ // polygonLayer.style({
+ // raisingHeight: 0,
+ // });
+ // });
polygonLayer.on("click", (e) => {
console.log("e", e);
this.$emit("clickAgency", e.feature.properties);
diff --git a/src/views/dataBoard/organizational/dangTree/index.vue b/src/views/dataBoard/organizational/dangTree/index.vue
index 8ad15fd66..43bd9a2c2 100644
--- a/src/views/dataBoard/organizational/dangTree/index.vue
+++ b/src/views/dataBoard/organizational/dangTree/index.vue
@@ -39,28 +39,16 @@ export default {
this.getTreeData();
}
},
- "$store.state.chooseArea.realScale"(n, v) {
- this.setStartScale(n);
- },
},
computed: {},
mounted() {
const orgId = this.$store.state.chooseArea.chooseName.orgId;
- const scale = this.$store.state.chooseArea.realScale;
- if (scale) {
- this.setStartScale(scale);
- }
if (orgId) {
this.getTreeData();
}
this.getTextMap();
},
methods: {
- setStartScale(n) {
- const scale = 1 / n;
- this.zoom = scale;
- },
-
getLevelArrNum(myArray) {
const arr = [...myArray];
while (arr.length > 1) {