From c2a6c53657baaf0830cd881e1a23a15af23ac6fa Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期四, 21 九月 2023 18:35:14 +0800 Subject: [PATCH] 代码更新 --- src/views/Tools/queryinfo.vue | 105 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 88 insertions(+), 17 deletions(-) diff --git a/src/views/Tools/queryinfo.vue b/src/views/Tools/queryinfo.vue index 26fb791..da00c5d 100644 --- a/src/views/Tools/queryinfo.vue +++ b/src/views/Tools/queryinfo.vue @@ -4,21 +4,23 @@ ref="pop" v-for="(data, index) in PopupData" :key="data.id" - :title="data.title || '鎻愮ず'" - maxHeight="360px" - + :title="data.title || '鎻愮ず'" + maxHeight="400" @close="close(data.id)" - left="calc(100% - 960px)" - top="calc(100% - 430px) " + left="calc(90% - 900px)" + top="calc(100% - 530px) " > - <div> - <div style="width:940px;height:358px;"> - - - <map-menu-pop v-if="$store.state.mapPopBoxFlag == '1'" /> - <map-space-pop v-if="$store.state.mapPopBoxFlag == '2'" /> - </div> - </div> + <div> + <div + style="width:940px;height:460px;" + v-drag + > + <map-menu-pop v-if="$store.state.mapPopBoxFlag == '1'" /> + <map-space-pop v-if="$store.state.mapPopBoxFlag == '2'" /> + <pipe-line-analy v-if="$store.state.mapPopBoxFlag == '3'" /> + <map-pick-up-pop v-if="$store.state.mapPopBoxFlag == '4'" /> + </div> + </div> </Popup> </div> </template> @@ -27,13 +29,17 @@ import Popup from './Popup.vue'; import mapMenuPop from '../../components/MapView/mapMenuPop.vue'; import mapSpacePop from '../../components/MapView/mapSpacePop.vue'; +import mapPickUpPop from '../../components/MapView/mapPickUpPop'; +import pipeLineAnaly from './pipeLineAnaly.vue' export default { name: 'queryinfo', components: { Popup, - mapMenuPop, - mapSpacePop + mapMenuPop, + mapSpacePop, + pipeLineAnaly, + mapPickUpPop }, data() { return { @@ -49,6 +55,36 @@ }, + directives: { + drag: { + inserted: function (el) { + const dragDom = el; + dragDom.style.cursor = "e-resize"; + dragDom.onmousedown = (e) => { + // 榧犳爣鎸変笅锛岃绠楀綋鍓嶅厓绱犺窛绂诲彲瑙嗗尯鐨勮窛绂� + const disX = e.clientX; + const w = dragDom.clientWidth; + const minW = 500; + const maxW = 940; + var nw; + document.onmousemove = function (e) { + // 閫氳繃浜嬩欢濮旀墭锛岃绠楃Щ鍔ㄧ殑璺濈 + const l = e.clientX - disX; + // 鏀瑰彉褰撳墠鍏冪礌瀹藉害锛屼笉鍙秴杩囨渶灏忔渶澶у�� + nw = w + l; + nw = nw < minW ? minW : nw; + nw = nw > maxW ? maxW : nw; + dragDom.style.width = `${nw}px`; + }; + + document.onmouseup = function (e) { + document.onmousemove = null; + document.onmouseup = null; + }; + }; + }, + }, + }, methods: { // 鍏抽棴鎵�鏈� closeAll() { @@ -60,10 +96,41 @@ // 鍏抽棴寮圭獥 close(id) { let index = this.PopupData.findIndex((item) => { + console.log(item); return item.id === id; }); + this.$store.state.showPopBoxFlag = false; let data = this.PopupData.splice(index, 1)[0]; - data.close && data.close(); + if (this.$store.state.pipelineEntity.length != 0) { + for (var i in this.$store.state.pipelineEntity) { + sgworld.Viewer.entities.remove(this.$store.state.pipelineEntity[i]); + } + + } + if (this.$store.state.primitLayer != null) { + sgworld.Viewer.entities.remove(this.$store.state.primitLayer); + sgworld.Creator.DeleteObject(this.$store.state.primitLayer); + this.$store.state.primitLayer = null + } + if (this.$store.state.histogramLayer.length != 0) { + for (var i in this.$store.state.histogramLayer) { + Viewer.entities.remove(this.$store.state.histogramLayer[i]) + } + } + if (window.histogramHandler != null && Cesium.defined(window.histogramHandler)) { + window.histogramHandler.removeInputAction( + Cesium.ScreenSpaceEventType.MOUSE_MOVE + ) + window.histogramHandler = null + } + var entitys = Viewer.entities._entities._array; + for (var i = 0; i < entitys.length; i++) { + if (entitys[i]._name === "鍦拌川浣撴ā鍨�") { + Viewer.entities.remove(entitys[i]); + i--; + } + } + this.$store.state.histLenged = false; }, // 鎵撳紑寮圭獥 open(title, value, style = {}) { @@ -89,8 +156,12 @@ Math.random().toString().substr(2, 5) ); }, + mouseDown(event) { + // document.addEventListener("mousemove", this.mouseMove); + // this.lastX = event.screenX; + }, }, }; </script> -<style scoped lang="less"> + -- Gitblit v1.9.3