|
@@ -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;
|