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 | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 47 insertions(+), 2 deletions(-) diff --git a/src/views/Tools/queryinfo.vue b/src/views/Tools/queryinfo.vue index 649848c..da00c5d 100644 --- a/src/views/Tools/queryinfo.vue +++ b/src/views/Tools/queryinfo.vue @@ -8,10 +8,13 @@ maxHeight="400" @close="close(data.id)" left="calc(90% - 900px)" - top="calc(100% - 470px) " + top="calc(100% - 530px) " > <div> - <div style="width:940px;height:400px;"> + <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'" /> @@ -52,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() { @@ -90,6 +123,14 @@ ) 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 = {}) { @@ -115,6 +156,10 @@ Math.random().toString().substr(2, 5) ); }, + mouseDown(event) { + // document.addEventListener("mousemove", this.mouseMove); + // this.lastX = event.screenX; + }, }, }; </script> -- Gitblit v1.9.3