Bläddra i källkod

云图页面显示图层时叠加二级图层、其他页面不叠加

JX.LI 2 år sedan
förälder
incheckning
221bae96d6
3 ändrade filer med 10 tillägg och 5 borttagningar
  1. 7 2
      src/components/supermap-2.5d.vue
  2. 1 1
      src/views/forest.vue
  3. 2 2
      vue.config.js

+ 7 - 2
src/components/supermap-2.5d.vue

@@ -64,14 +64,19 @@
           mapData: null,
           mapName: null
         },
+        showLayer:null
       }
     },
     watch: {},
     created() {
       this.superMapInfo();
     },
-    mounted() {},
-    props: {},
+    mounted() {
+         this.showLayer = this.showLayer != undefined ? this.showLayer:false;
+    },
+    props: {
+        showLayer: [Boolean],
+    },
     methods: {
       choseMeasuringAreaAll() {
         if (this.handlerDis != null) {

+ 1 - 1
src/views/forest.vue

@@ -117,7 +117,7 @@
         </div>
       </div>
       <!-- 地图 -->
-      <supermap ref="supermap" style="width: 100%;height: 100vh;" @showEventDialog="showEventDialog"></supermap>
+      <supermap ref="supermap" style="width: 100%;height: 100vh;" @showEventDialog="showEventDialog" :showLayer="true"></supermap>
       <!-- 右侧 -->
       <div class="rightbar rightbar-index" ref="right">
         <div class="right-item1">

+ 2 - 2
vue.config.js

@@ -43,9 +43,9 @@ module.exports = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
         // target: `http://127.0.0.1:3031`,
-        // target: `http://121.36.228.66:3031`,
+        target: `http://121.36.228.66:3031`,
         // target: `http://192.168.2.118:3031`,
-        target: `https://29613561xe.eicp.vip`,
+        // target: `https://29613561xe.eicp.vip`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''