Bläddra i källkod

查询林班数据

jiangbo111111 2 år sedan
förälder
incheckning
226c7a462b
2 ändrade filer med 34 tillägg och 4 borttagningar
  1. 8 0
      src/api/components/supermap.js
  2. 26 4
      src/components/supermap.vue

+ 8 - 0
src/api/components/supermap.js

@@ -14,6 +14,14 @@ export function getCenterdataTSupermapBlockBySmID(smid){
   })
 }
 
+export function getCenterdataTSupermapBlockBySBT(query){
+  return request({
+    url: '/sooka-sponest-center-data/supermapBlock/getCenterdataTSupermapBlock',
+    method: 'get',
+    params: query
+  })
+}
+
 export const iconList = {
   'marker': require('@/assets/images/cameraType/marker.png'),
   'big-horn': require('@/assets/images/cameraType/big-horn.png'),

+ 26 - 4
src/components/supermap.vue

@@ -151,13 +151,15 @@
 	import {
 		getSuperMap,
 		iconList,
-    getCenterdataTSupermapBlockBySmID
+    getCenterdataTSupermapBlockBySmID,
+    getCenterdataTSupermapBlockBySBT,
 	} from '@/api/components/supermap.js'
 	import {
 		selectConfigKey
 	} from '@/api/system/config'
 	// import {setToken} from '../plugins/auth'
 	import modal from '@/plugins/modal'
+  import { getCenterdataTSupermapBlock } from '../api/components/supermap'
 
 	export default {
 		name: 'sookaSuperMap',
@@ -198,8 +200,16 @@
 				isheatPlotting: false, //火灾蔓延
 				heat_lat: 0, //火灾蔓延经纬度
 				heat_lng: 0, //火灾蔓延经纬度
-				host: ''
+				host: '',
+
+        queryParams: {
+          smid: null,
+          bsm: null,
+          tbbh: null,
+
+        },
 			}
+
 		},
 		watch: {
 			isEditableLayers: {
@@ -1424,12 +1434,24 @@
           that.banDataList = fea.attributes
         })*/
 
-        that.lbtThemeLayer.on('dblclick', function(e) {
 
+        /*that.lbtThemeLayer.on('dblclick', function(e) {
           var fea = that.lbtThemeLayer.getFeatureById(e.target.refDataID);
           var smid = fea.attributes.SMID;
           getCenterdataTSupermapBlockBySmID(smid).then(res => {
-            that.banDataList = res;
+            that.banDataList = res.data;
+            that.showBanData = true
+          });
+        })*/
+        that.lbtThemeLayer.on('dblclick', function(e) {
+
+          var fea = that.lbtThemeLayer.getFeatureById(e.target.refDataID);
+          that.queryParams.smid  = fea.attributes.SMID;
+          that.queryParams.bsm  = fea.attributes.BSM;
+          that.queryParams.tbbh = fea.attributes.TBBH;
+          console.log("this.queryParams" + that.queryParams)
+          getCenterdataTSupermapBlockBySBT(that.queryParams).then(res => {
+            that.banDataList = res.data;
             that.showBanData = true
           });
         })