王通 пре 1 година
родитељ
комит
d65a5bf53f
2 измењених фајлова са 6 додато и 5 уклоњено
  1. 1 1
      src/api/monitor.js
  2. 5 4
      src/views/monitor.vue

+ 1 - 1
src/api/monitor.js

@@ -26,7 +26,7 @@ export function selectKeyAreaList() {
 // 获取重点区域
 export function getRegionalFlag(id) {
   return request({
-    url: '/center-environment/VisuForestCloudMapController/getRegionalFlag/'+id,
+    url: '/center-data/importarea/getRegionalFlagFeign/' + id,
     method: 'get',
   })
 }

+ 5 - 4
src/views/monitor.vue

@@ -1153,10 +1153,11 @@ export default {
       getRegionalFlag(id).then((res) => {
         that.graphicsList = [];
         //地图标记
-        if (res.data != null && res.data.length > 0) {
-          for (let i = 0; i < res.data.length; i++) {
-            that.graphicsList.push(res.data[i].lng);
-            that.graphicsList.push(res.data[i].lat);
+        let latLngs = JSON.parse(res.data.data.latLngs!=null?res.data.data.latLngs:'[]')
+        if (latLngs.length > 0) {
+          for (let i = 0; i < latLngs.length; i++) {
+            that.graphicsList.push(latLngs[i].lng);
+            that.graphicsList.push(latLngs[i].lat);
           }
           setTimeout(() => {
             that.$refs.supermap.clearG();