소스 검색

714快速定位栏

yuh 1 년 전
부모
커밋
2e3520408e
3개의 변경된 파일44개의 추가작업 그리고 3개의 파일을 삭제
  1. BIN
      src/assets/imgs/deck/tool-orien-h.png
  2. BIN
      src/assets/imgs/deck/tool-orien.png
  3. 44 3
      src/views/deck/IndexPage.vue

BIN
src/assets/imgs/deck/tool-orien-h.png


BIN
src/assets/imgs/deck/tool-orien.png


+ 44 - 3
src/views/deck/IndexPage.vue

@@ -121,6 +121,16 @@
       <page-ztgl v-if="currentMenu==='总体概览'"/>
       <page-nyxz v-if="currentMenu==='农业现状'&&layerStaShow_nydxz" :pointSearchShow="pointSearchShow"/>
     </div>
+      <div class="juanlian my-abs-model" style="padding: 10px 10px 10px 10px;" v-show="!multiScreenMode" v-if="toolList.find(i => i.name ==='快速定位').isOn">
+          <span class="box-title1">快速定位</span>
+        <el-form label-width="6em">
+          <el-form-item prop="selectTown">
+            <el-select v-model="townVal" popper-class="my-prop-s" style="right: 30px" clearable>
+              <el-option v-for="item in townArr" :key="item" :value="item" :label="item"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-form>
+      </div>
   </div>
 </template>
 
@@ -142,6 +152,7 @@ import {
 } from '@/utils/data/fieldsMapper'
 import {addMapL, gldbMap} from "@/utils/map/AddLayer";
 import {nextTick} from "vue";
+import { bridge } from "@/views/map/Map";
 
 
 export default {
@@ -174,6 +185,7 @@ export default {
         { name: '卷帘', isOn: false, img: require('@/assets/imgs/deck/guanlian.png'), imgOn: require('@/assets/imgs/deck/guanlian-active.png') },
         { name: '行政区划', isOn: false, img: require('@/assets/imgs/deck/xqqh.png'), imgOn: require('@/assets/imgs/deck/xzqh-active.png') },
         { name: '多窗对比', isOn: false, img: require('@/assets/imgs/deck/tool-multi.png'), imgOn: require('@/assets/imgs/deck/tool-multi-h.png') },
+        { name: '快速定位', isOn: false, img: require('@/assets/imgs/deck/tool-orien.png'), imgOn: require('@/assets/imgs/deck/tool-orien-h.png') },
       ],
       data_allLayers: formatLayers(allLayerInfo),
       listChecked: [],
@@ -188,6 +200,7 @@ export default {
       pointSearchShow: false,
       pointSearchData: {},
       subPanelShow: false,
+      quickOrientation: false,
       jldbForm:{},
       judbArr:[
         {
@@ -235,7 +248,9 @@ export default {
       layerStaShow_nydxz: false,
       multiScreenMode: false,
       hkyxForm: ["","","",""],
-      hkyxArr: []
+      hkyxArr: [],
+      townVal: "",
+      townArr: ['陈家镇','中兴镇','向化镇','堡镇','港沿镇','竖新镇','新河镇','成桥镇','建设镇','港西镇','庙镇','三星镇','绿化镇','东平镇','新海镇']
     }
   },
   mounted() {
@@ -249,9 +264,13 @@ export default {
   watch: {
     listChecked(val) {
       this.rightShowByLayer(val, '农用地现状', '农业现状', 'layerStaShow_nydxz')
+    },
+    townVal(val) {
+      console.log(val);
+      this.townLine(val)
     }
   },
-  
+
   methods: {
     // 根据选中的图层控制右侧面板显隐
     rightShowByLayer(checked, LayerName, menuName, layerStaShow) {
@@ -323,6 +342,7 @@ export default {
           this.pointSearchShow = false
           this.toolList[1].isOn = false
           this.toolList[2].isOn = false
+          this.toolList[10].isOn = false
           setTimeout(() => {
             item.isOn = false
           }, 200);
@@ -396,6 +416,13 @@ export default {
             MyMap.methods.changeSplitScreen(false)
             this.hkyxForm = ["","","",""]
           }
+          break
+        case '快速定位':{
+          if(!item.isOn){
+            MyMap.methods.clearMap()
+          }
+          // this.quickOrientation = true
+        }
       }
     },
     handleChangeLayer(params) {
@@ -578,6 +605,20 @@ export default {
       const currentLayer = this.hkyxArr.find(i => i.title===this.hkyxForm[index])
       MyMap.methods.addLayer(currentLayer,true,1,"map"+index)
     },
+    townLine(name) {
+      let action = {
+        ActionName: "LayerQuery_Get",
+        Parameters: {
+          queryUrl: "http://10.108.3.5/ags_feature_svc/xzqh/FeatureServer/2/query",
+          queryParams: "&outFields=*&returnGeometry=true",
+          where: "name='"+name+"'",//todo
+          is_draw: true,
+          is_clear: true,
+          is_goto: true
+        }
+      };
+        bridge.Invoke(action)
+    }
   }
 }
 </script>
@@ -831,7 +872,7 @@ export default {
                 top: 10px;
               }
             }
-            
+
           }
         }
       }