From 2ebfac32ae11f2c883d57b61626835d2e9c33b2a Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期六, 06 五月 2023 09:19:18 +0800
Subject: [PATCH] 修改发布影像白色无法选择;修改空间搜索选择后,上面的框类显示目录结构最高层级的名称;下拉框的收回机制修改;图层管理移动修改;管线输送介质,图层管理-属性表-翻译错误修改;3D切换到2D,底图切换失效修改;模板管理修改;

---
 src/views/Tools/maplayer.vue |   84 +++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 82 insertions(+), 2 deletions(-)

diff --git a/src/views/Tools/maplayer.vue b/src/views/Tools/maplayer.vue
index b59da98..4afa171 100644
--- a/src/views/Tools/maplayer.vue
+++ b/src/views/Tools/maplayer.vue
@@ -11,8 +11,18 @@
       :top="data.top || top + index * 42 + 'px'"
     >
       <div>
-        <layer-tree />
+        <div
+          id="eagleMapContainer"
+          style="width:300px;height:400px;"
+          v-drag
+          @mousedown="dragEagle"
+        >
+          <layer-tree />
+        </div>
       </div>
+      <!-- <div class="InfoPopupContianer">
+       
+      </div> -->
     </Popup>
   </div>
 </template>
@@ -35,9 +45,79 @@
       top: 10,
     };
   },
+  directives: {
+    drag: {
+      inserted: function (el) {
+        const dragDom = el;
+        dragDom.style.cursor = "nwse-resize";
+        dragDom.onmousedown = (e) => {
+          // 榧犳爣鎸変笅锛岃绠楀綋鍓嶅厓绱犺窛绂诲彲瑙嗗尯鐨勮窛绂�
+          const disX = e.clientX;
+          const w = dragDom.clientWidth;
+          const minW = 300;
+          const maxW = 500;
+          const disY = e.clientY;
+          const h = dragDom.clientHeight;
+          const minH = 300;
+          const maxH = 700;
+          var nw, nh;
+          document.onmousemove = function (e) {
+            // 閫氳繃浜嬩欢濮旀墭锛岃绠楃Щ鍔ㄧ殑璺濈
+            const l = e.clientX - disX;
+            const r = e.clientY - disY;
+            // 鏀瑰彉褰撳墠鍏冪礌瀹藉害锛屼笉鍙秴杩囨渶灏忔渶澶у��
+            nw = w + l;
+            nw = nw < minW ? minW : nw;
+            nw = nw > maxW ? maxW : nw;
+            dragDom.style.width = `${nw}px`;
+            nh = h + r;
+            nh = nh < minH ? minH : nh;
+            nh = nh > maxH ? maxH : nh;
+            dragDom.style.height = `${nh}px`;
+          };
+
+          document.onmouseup = function (e) {
+            document.onmousemove = null;
+            document.onmouseup = null;
+          };
+        };
+      },
+    },
+  },
   computed: {},
-  mounted() {},
+  mounted() { },
   methods: {
+    dragEagle: function (e) {
+      var targetDiv = document.getElementById('eagleMapContainer');
+      //寰楀埌鐐瑰嚮鏃惰鍦板浘瀹瑰櫒鐨勫楂橈細
+      var targetDivHeight = targetDiv.offsetHeight;
+      var startX = e.clientX;
+      var startY = e.clientY;
+      var _this = this;
+      document.onmousemove = function (e) {
+        e.preventDefault();
+        //寰楀埌榧犳爣鎷栧姩鐨勫楂樿窛绂伙細鍙栫粷瀵瑰��
+        var distX = Math.abs(e.clientX - startX);
+        var distY = Math.abs(e.clientY - startY);
+        //寰�涓婃柟鎷栧姩锛�
+        if (e.clientY < startY) {
+          targetDiv.style.height = targetDivHeight + distY + 'px';
+        }
+        //寰�涓嬫柟鎷栧姩锛�
+        if (e.clientX < startX && e.clientY > startY) {
+          targetDiv.style.height = (targetDivHeight - distY) + 'px';
+        }
+        if (parseInt(targetDiv.style.height) >= 300) {
+          targetDiv.style.height = 300 + 'px';
+        }
+        if (parseInt(targetDiv.style.height) <= 150) {
+          targetDiv.style.height = 150 + 'px';
+        }
+      }
+      document.onmouseup = function () {
+        document.onmousemove = null;
+      }
+    },
     // 鍏抽棴鎵�鏈�
     closeAll() {
       this.PopupData.forEach((item) => {

--
Gitblit v1.9.3