Преглед на файлове

1. 添加航空影像与卫星影像截图;2. 同屏对比按照时间排序; 3. 水印透明度调节

Bella преди 2 години
родител
ревизия
3c26c54020

+ 8 - 0
public/static/config/config.js

@@ -14,11 +14,18 @@ var systemConfig = {
     center: [31.14785322514787, 121.50195320451814],
     zoom: 1,
   },
+  terrainMap: {
+    url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/dlg-fullcolor/proxy",
+  },
   // 暂时无法使用
   // token: "65463DEE-620A-0ED5-2385-17ECD07CD351", //公共地图资源token
   // mapService: "http://121.43.55.7:10011/proxy/", //地图服务,
   blueBlackMap: {
     crs: "",
+    // 政务图--无法查看
+    // url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/basemap-as/proxy",
+    // 地形图 -- 无法看
+    // url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/dlg-fullcolor/proxy",
     // 调用了测绘院底图
     url: "http://10.242.181.28:8080/OneMapServer/rest/services/shmap_anhei/MapServer?token=xvdp5nmSa6UoSQf20x7sk4l2DDQNicrUHaVrvm40k9cf-Iy8Z_rHGAMty2ZFIqH_",
     // url:"http://aimap.pudong.sh:5236/maps/rest/services/darkmap-f/proxy",
@@ -54,6 +61,7 @@ var systemConfig = {
 
 //地图全局变量声明
 var map2DViewer = {
+  baseMapCollection:[],
   markers: {},
   polygons: {},
   polylines: {},

BIN
src/assets/map/卫星影像.png


BIN
src/assets/map/航空影像.png


+ 40 - 17
src/components/common/BottomForm/SameScreenComparison.vue

@@ -22,15 +22,15 @@
         <div
           class="ssc_main_mapList_showList"
           :id="'map' + index"
-          v-for="(mapIndex, index) in checkedCities"
-          :key="index"
+          v-for="(item, index) in sortBaseMap"
+          :key="item.id"
           :style="mapListBoxStyle()"
           @mouseover="changeMouseOverIndex(index)"
         >
-          <span>{{ mapList[mapIndex].mapName }}</span>
+          <span>{{ item.mapName }}</span>
           <Map
             ref="mapBox"
-            :mapUrl="mapList[mapIndex].mapUrl"
+            :mapUrl="item.mapUrl"
             :index="index"
             :mouseIndex="mouseIndex"
             :centerZoom="centerZoom"
@@ -116,6 +116,7 @@ export default {
   components: { Map },
   data() {
     return {
+      sortBaseMap: [],
       doPrintLoading: false,
       // 同屏对比弹窗显示状态
       dialogVisible: false,
@@ -168,28 +169,36 @@ export default {
   methods: {
     // 获取地图底图服务
     getBaseMap() {
-      this.mapList = [];
+      map2DViewer.baseMapCollection = [];
       let params = new FormData();
-      params = {
-        columnId: 35,
-        states: "3",
-        pageSize: 30,
-        page: 0,
-      };
+      params.append("columnId", 35);
+      params.append("states", 3);
+      params.append("pageSize", 30);
+      params.append("page", 0);
       let sortparam = [{ field: "c_year", orderByType: 1 }];
-      params.orderBy = JSON.stringify(sortparam);
+      params.append("orderBy", JSON.stringify(sortparam));
       this.$Post(this.urlsCollection.selectContentList, params).then((res) => {
         if (res.code === 200 && res.content.data.length > 0) {
           let data = res.content.data;
           data.forEach((v) => {
-            this.mapList.unshift({
+            map2DViewer.baseMapCollection.unshift({
               mapName: v.title,
               mapUrl:
                 v.c_url +
                 "?AccessKey=lUaEMxqqhZKLSImGuP/Ergx47orYVyIqHVgxfyGpIurKAy9kdq5uU1cWuTuIXeOM",
               active: v.c_defined_show ? v.c_defined_show : false,
+              basemapType: v.basemap,
+              year: v.c_year,
             });
           });
+          this.mapList = map2DViewer.baseMapCollection.map((v) => {
+            return {
+              mapName: v.mapName,
+              mapUrl: v.mapUrl,
+              active: v.active,
+              year: v.year,
+            };
+          });
         }
       });
     },
@@ -209,7 +218,9 @@ export default {
           zoom: mapZoom,
         };
       }
-      this.handleCheckedCitiesChange();
+      setTimeout(() => {
+        this.handleCheckedCitiesChange();
+      }, 1000);
     },
     // 弹窗关闭询问
     handleClose() {
@@ -359,15 +370,27 @@ export default {
       document.body.removeChild(new_iframe);
     },
     // 修改选中地图
-    handleCheckedCitiesChange(e) {
+    handleCheckedCitiesChange() {
+      this.sortBaseMap = this.checkedCities.map((v) => {
+        return {
+          id: v,
+          mapUrl: this.mapList[v].mapUrl,
+          mapName: this.mapList[v].mapName,
+          year: this.mapList[v].year,
+        };
+      });
+      let newSortBaseMap = this.sortBaseMap.sort((a, b) => {
+        return a.year - b.year;
+      });
       setTimeout(() => {
-        this.checkedCities.forEach((item, index) => {
+        // 修改地图尺寸
+        newSortBaseMap.forEach((item, index) => {
           this.$refs["mapBox"][index].$nextTick(() => {
             this.$refs["mapBox"][index].changeMapSize();
             this.$refs["mapBox"][index].addSinglePolygon(false);
           });
         });
-      }, 300);
+      }, 1000);
     },
     // 根据地图列表,返回合适的样式
     mapListBoxStyle() {

+ 1 - 1
src/utils/watermark.js

@@ -30,7 +30,7 @@ let setWatermark = (str1, str2) => {
   div.style.pointerEvents = "none";
   div.style.top = "60px";
   div.style.left = "0px";
-  div.style.opacity = "0.35";
+  div.style.opacity = "0.32";
   div.style.position = "fixed";
   div.style.zIndex = "100000";
   div.style.width = document.documentElement.clientWidth + "px";

+ 1 - 0
src/views/ComprehensiveAnalysis.vue

@@ -234,6 +234,7 @@
                   class="panel-list-item"
                   v-for="(v, i) in originalData[key]"
                   :key="v.id"
+                  @dblclick="locateCase(v)"
                 >
                   <div>
                     {{