yang1998 9 months ago
parent
commit
ff03ea56a3

+ 20 - 10
src/views/deck/IndexPage.vue

@@ -703,7 +703,7 @@ export default {
       }
 
       this.layerStaShowFunc(true)
-      this.addQjxLayer()
+      // this.addQjxLayer()
     },
     handleClickTool(item) {
       item.isOn = !item.isOn
@@ -818,10 +818,6 @@ export default {
               GetDsxmLocation().then(res => {
                 if (res?.data.length > 0) {
                   let geos = []
-                  res.data.forEach(row => {
-                    geos.push({ id: row.dsxmId, rings: JSON.parse(row.geojson).coordinates, attributes: { 'dsxmId': row.dsxmId } })
-                  })
-                  this.dsxm_isAdd = true
                   const dsxmSymbol = {
                     'type': 'simple-fill',
                     "color": [255, 0, 0, 0.7],
@@ -830,6 +826,15 @@ export default {
                       'width': 1
                     }
                   }
+                  res.data.forEach(row => {
+                    geos.push({
+                      id: row.dsxmId,
+                      rings: JSON.parse(row.geojson).coordinates,
+                      attributes: { 'dsxmId': row.dsxmId },
+                      symbol: dsxmSymbol
+                    })
+                  })
+                  this.dsxm_isAdd = true
                   addPolygons(geos, false, 'dsxm', dsxmSymbol)
                 }
               })
@@ -947,10 +952,10 @@ export default {
               return;
             }
             let status = [
-              { name: '意向招商审核中', color: '#ff6961', borderColor: '#ff6961' },
-              { name: '待招商', color: 'rgba(0,255,10,1)', borderColor: 'rgba(0,255,10,1)' },
-              { name: '流转审批中', color: 'rgba(252,230,0,1)', borderColor: 'rgba(252,230,0,1)' },
-              { name: '已流转', color: 'rgba(127,255,212,1)', borderColor: 'rgba(127,255,212,1)' },
+              { name: '意向招商审核中', color: 'rgba(205,105,97,0.5)', borderColor: 'rgba(205,105,97,1)' },
+              { name: '待招商', color: 'rgba(0,255,10,0.5)', borderColor: 'rgba(0,255,10,1)' },
+              { name: '流转审批中', color: 'rgba(252,230,0,0.5)', borderColor: 'rgba(252,230,0,1)' },
+              { name: '已流转', color: 'rgba(127,255,212,0.5)', borderColor: 'rgba(127,255,212,1)' },
             ]
             this.isZsGenSon = true
             getYxzsdkhGenson().then(res => {
@@ -1052,6 +1057,7 @@ export default {
           if (n.name === '新河镇' || n.name === '新建村') {
             this.is3d = true
             changeViewType('3D')
+
             setCamera({
               tilt:60
             })
@@ -1059,7 +1065,11 @@ export default {
               if(n.name === '新建村'){
                 layerQueryGet('http://10.108.3.5' + '/ags_feature_svc/nfgl/FeatureServer/0', "name='新建村'", true, true, true, 10000,[255,0,0,1],3)
               }else {
-                layerQueryGet(getLayerByName('镇界线').url, "name='新河镇'", true, true, true, 10000,[255,0,0,1],3)
+                layerQueryGet(getLayerByName('镇界线').url, "name='新河镇'", true, true, true, 5000,[255,0,0,1],3)
+
+                setCamera({
+                  tilt:60
+                })
               }
               setScale(n.name === '新建村'?15000:50000)
             },1000)

+ 1 - 3
src/views/deck/pages/Page_zhcj.vue

@@ -18,7 +18,7 @@
 </template>
 
 <script>
-import { emptyAllLayers, clearMap, locateCM } from '@/utils/map/AddLayer'
+import {emptyAllLayers, clearMap, locateCM} from '@/utils/map/AddLayer'
 import ZhcjZdxm from './zhcj_sub/ZhcjZdxm.vue'
 import ZhcjTscy from './zhcj_sub/ZhcjTscy.vue'
 import ZhcjZhgc from './zhcj_sub/ZhcjZhgc.vue'
@@ -69,8 +69,6 @@ export default {
 
       }
       // this.$emit('findQjx')
-
-
     },
   },
   watch: {

+ 15 - 3
src/views/deck/pages/zhcj_sub/ZhcjXczx.vue

@@ -192,7 +192,9 @@ export default {
         left: [],
         right: []
       },
-      outlinecolor: [255, 0, 0, 1]
+      outlinecolor: [255, 0, 0, 1],
+
+      viewType: "2D"
     }
   },
   mounted() {
@@ -281,7 +283,10 @@ export default {
       this.layer_qxsy.find((i) => {
         console.log(i)
         if (i.name === item.xz) {
-          changeViewType('3D')
+          if(this.viewType !== "3D"){
+            changeViewType('3D')
+          }
+
           setCamera({
             tilt:60
           })
@@ -292,7 +297,8 @@ export default {
               // layerQueryGet(process.env.VUE_APP_MAP_SERVICE +'/i3s_svc/qxsy_test_3/SceneServer', `name='${item.village}'`, true, true, true, 10000, this.outlinecolor, 3)
               layerQueryGet('http://10.108.3.5/ags_feature_svc/nfgl/FeatureServer/0', "name='新建村'", true, true, true, 5000,this.outlinecolor,3)
             }
-            setScale(item.village === '新建村'?15000:50000)
+            // setScale(item.village === '新建村'?15000:50000)
+            setScale(15000)
           },1000)
           layerControl('xczxymlxcsfc', false)
 
@@ -302,12 +308,14 @@ export default {
             addLayer(getLayerByName("新建村"))
           }
 
+          this.viewType = "3D"
 
         }
         else {
           changeViewType('2D')
           layerControl('xczxymlxcsfc', true)
           layerQueryGet(this.layer_xczx.url, `name='${item.village}'`, true, true, true, 30000)
+          this.viewType = "2D"
         }
 
       })
@@ -447,6 +455,10 @@ export default {
   },
   beforeDestroy() {
     myBridge.bridgeContent.removeEventListener(listen, this)
+
+    if(this.viewType === "3D"){
+      changeViewType('2D')
+    }
   }
 }
 </script>