Pārlūkot izejas kodu

时空演变改造

songxy 1 gadu atpakaļ
vecāks
revīzija
3ccb54c212

+ 5 - 6
BJYSYBZ_C/public/config.js

@@ -358,14 +358,13 @@ window.ApplicationConfig = {
               name: "滨江区行政区",
               enabled: true,
               visible: false,
-              serverType: "dynamic",
+              serverType: 'wms',
               params: {
-                layers: "show:0",
-                layerDefs: {
-                  0: "xzqdm like '330108%'"
-                }
+                version: '1.1.1',
+                layers: 'sde:xzq',
               },
-              url: "https://zlzd.zrzyt.zj.gov.cn/arcMapServer216/arcgis/rest/services/YSYBZ/BJXZQ/MapServer",
+              url: 'https://zdzy.zrzyt.zj.gov.cn/geoserver/sde/wms',
+              queryUrl: 'https://zdzy.zrzyt.zj.gov.cn/geoserver/sde',
             },
             {
               id: "bjq-gd",

+ 0 - 1
BJYSYBZ_C/src/views/BjWlydManageView/components/Td.vue

@@ -323,7 +323,6 @@ export default {
             let { data, success } = resp;
             success &&
               this.$message.success('删除成功') &&
-              this.$vm.$emit('refreshLayer', 'bj-lsyd') &&
               this.$parent.detailClose();
             success || this.$message.error('操作繁忙');
             this.$emit('yjsqClose');

+ 74 - 2
BJYSYBZ_C/src/views/components/BigScreenMap/index.vue

@@ -354,6 +354,15 @@
         </div>
       </template>
     </vl-feature-overlay>
+    <div class="modalBox" v-if="skybShow">
+      <span class="close" @click="skybShow = false"></span>
+      <div class="modalContent">
+        <iframe
+          id="imageTool"
+          src="https://kjzl.zrzyt.zj.gov.cn/kjzlv2/blockTool"
+        ></iframe>
+      </div>
+    </div>
   </vl-map>
 </template>
 <script>
@@ -517,6 +526,8 @@ export default {
       geoLayer: undefined,
       isgyyd: "",
       kgLayer: null,
+      skybShow: false,
+      geometry: ''
     };
   },
   watch: {
@@ -537,6 +548,8 @@ export default {
     },
   },
   mounted() {
+    //监听 工具发来的信息
+    window.addEventListener("message", this.setBlockMessage);
     this.$vm.$on("setLayerIndexEvent", (index) => {
       this.layerIndex = index;
     });
@@ -736,6 +749,28 @@ export default {
     this.echartslayer && this.echartslayer.remove();
   },
   methods: {
+    //发送项目信息给遥感影像工具
+    setBlockMessage: function (event) {
+      //判断是否为工具加载完成消息
+      if (!event.data || !event.data.loadSuccess) {
+        return;
+      }
+      //向遥感影像工具发送信息
+      let receiver = document.getElementById("imageTool").contentWindow;
+      let postString = {
+        areaId: this.getAreaId(),
+        geometryFormat: "wkt",
+      
+        geometry: this.geometry,
+  
+      };
+      receiver.postMessage(postString, "*");
+    },
+    getAreaId () {
+      const date = new Date();
+      const random = Math.random().toString().substring(2)
+      return random+date.getDate().toString();
+    },
     initHotLayer(field) {
       this.heatMapLayer = new HeatmapLayer({
         source: new VectorSource({
@@ -2009,8 +2044,9 @@ export default {
         );
       });
     },
-    skyb(p) {
-      window.open(`https://kjzl.zrzyt.zj.gov.cn/kjzlptv2/blockTool?geometry=${p.wkt}`);
+    skyb(props) {
+      this.skybShow = true;
+      this.geometry = props.wkt;
     },
   },
 };
@@ -2273,6 +2309,42 @@ export default {
     }
   }
 
+  .modalBox {
+    position: fixed;
+    top: 0px;
+    bottom: 0px;
+    left: 0px;
+    right: 0px;
+    margin: auto;
+    z-index: 999999999;
+    background-color: rgba(0,0,0,.8);
+    >.close {
+      display: block;
+      width: 20px;
+      height: 20px;
+      position: absolute;
+      top: 25px;
+      right: 25px;
+      z-index: 99999999;
+      background: url("../../../assets/images/bjybz/close.png") no-repeat;
+      background-size: 100% 100%;
+      cursor: pointer;
+    }
+    >.modalContent {
+      position: absolute;
+      top: 15px;
+      bottom: 15px;
+      left: 15px;
+      right: 15px;
+      margin: auto;
+      background-color: #fff;
+      >iframe {
+        width: 100%;
+        height: 100%;
+        border: 0px;
+      }
+    }
+  }
   .ivu-spin-fix {
     z-index: 0 !important;
     background-color: unset;