Bläddra i källkod

超图林班数据图层

jiangbo111111 2 år sedan
förälder
incheckning
fb78880595
2 ändrade filer med 61 tillägg och 2 borttagningar
  1. 7 0
      src/api/components/supermap.js
  2. 54 2
      src/components/supermap.vue

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

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

+ 54 - 2
src/components/supermap.vue

@@ -94,6 +94,47 @@
 			</div>
 
 		</el-dialog>
+<!--    <el-dialog title="林班数据" :visible.sync="showBanData" width="80%" append-to-body>
+      <div style="display: flex; flex-wrap: wrap; height:70vh; overflow-y: scroll; align-content: flex-start">
+        <div style="width:33%;border: 1px solid #1b6d9d;">
+          <div style="display: flex; align-items: center;padding: .5rem; color: #3ee1fa; font-size: 14px;">
+            <div><h5>ID:</h5></div>
+            <div>
+              <h5 style="margin-left: .5rem;">{{ banDataList.id }}</h5>
+            </div>
+          </div>
+        </div>
+        <div style="width:33%;border: 1px solid #1b6d9d;">
+          <div style="display: flex; align-items: center;padding: .5rem; color: #3ee1fa; font-size: 14px;">
+            <div><h5>SmID:</h5></div>
+            <div>
+              <h5 style="margin-left: .5rem;">{{ banDataList.smid }}</h5>
+            </div>
+          </div>
+        </div>
+        <div style="width:33%;border: 1px solid #1b6d9d;">
+          <div style="display: flex; align-items: center;padding: .5rem; color: #3ee1fa; font-size: 14px;">
+            <div><h5>SmArea:</h5></div>
+            <div>
+              <h5 style="margin-left: .5rem;">{{ banDataList.smarea }}</h5>
+            </div>
+          </div>
+        </div>
+        <div style="width:33%;border: 1px solid #1b6d9d;">
+          <div style="display: flex; align-items: center;padding: .5rem; color: #3ee1fa; font-size: 14px;">
+            <div><h5>SmGeometry:</h5></div>
+            <div>
+              <h5 style="margin-left: .5rem;">{{ banDataList.smgeometry }}</h5>
+            </div>
+          </div>
+        </div>
+
+
+      </div>
+
+    </el-dialog>-->
+
+
 	</div>
 </template>
 <script>
@@ -109,7 +150,8 @@
 
 	import {
 		getSuperMap,
-		iconList
+		iconList,
+    getCenterdataTSupermapBlockBySmID
 	} from '@/api/components/supermap.js'
 	import {
 		selectConfigKey
@@ -1376,10 +1418,20 @@
         });
         that.lbtThemeLayer.on("mousemove", that.lbtHighLightLayer);
 
-        that.lbtThemeLayer.on('dblclick', function(e) {
+        /*that.lbtThemeLayer.on('dblclick', function(e) {
           that.showBanData = true
           var fea = that.lbtThemeLayer.getFeatureById(e.target.refDataID);
           that.banDataList = fea.attributes
+        })*/
+
+        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.showBanData = true
+          });
         })