From ea8e3fae44d8e44ab6ca7219612549cc2d63bf79 Mon Sep 17 00:00:00 2001
From: suerprisePlus <15810472099@163.com>
Date: 星期二, 17 十二月 2024 09:07:58 +0800
Subject: [PATCH] 代码更新

---
 src/views/Tools/queryinfo.vue |  327 ++++++++++++++++++++++++++---------------------------
 1 files changed, 160 insertions(+), 167 deletions(-)

diff --git a/src/views/Tools/queryinfo.vue b/src/views/Tools/queryinfo.vue
index da00c5d..d1c3d76 100644
--- a/src/views/Tools/queryinfo.vue
+++ b/src/views/Tools/queryinfo.vue
@@ -1,167 +1,160 @@
-<template>
-  <div class="InfoPopup">
-    <Popup
-      ref="pop"
-      v-for="(data, index) in PopupData"
-      :key="data.id"
-      :title="data.title || '鎻愮ず'"
-      maxHeight="400"
-      @close="close(data.id)"
-      left="calc(90% - 900px)"
-      top="calc(100% - 530px) "
-    >
-      <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>
-
-<script>
-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,
-    pipeLineAnaly,
-    mapPickUpPop
-  },
-  data() {
-    return {
-      // 寮圭獥鏁版嵁
-      PopupData: ['queryinfo'],
-      left: 'calc(100% - 600px)',
-      top: 'calc(100% - 10px)',
-    };
-  },
-  computed: {},
-  mounted() {
-
-
-
-  },
-  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() {
-      this.PopupData.forEach((item) => {
-        item.close && item.close();
-      });
-      this.PopupData = [];
-    },
-    // 鍏抽棴寮圭獥
-    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];
-      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 = {}) {
-      this.PopupData.push({
-        id: this.createRandomId(),
-        title,
-        value,
-        ...style,
-      });
-      let index = this.PopupData.length - 1;
-      this.$nextTick(() => {
-        this.$refs.pop[index].open();
-      });
-      return this.PopupData[index];
-    },
-    // 闅忔満id
-    createRandomId() {
-      return (
-        (Math.random() * 10000000).toString(16).substr(0, 4) +
-        '-' +
-        new Date().getTime() +
-        '-' +
-        Math.random().toString().substr(2, 5)
-      );
-    },
-    mouseDown(event) {
-      // document.addEventListener("mousemove", this.mouseMove);
-      // this.lastX = event.screenX;
-    },
-  },
-};
-</script>
-
-
+<template>
+  <div id="InfoPopup" class="InfoPopup">
+    <Popup ref="pop" v-for="(data, index) in PopupData" :key="data.id" :title="data.title || '鎻愮ず'" maxHeight="400"
+      @close="close(data.id)" left="calc(90% - 900px)" top="calc(100% - 530px) ">
+      <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>
+
+<script>
+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,
+    pipeLineAnaly,
+    mapPickUpPop
+  },
+  data() {
+    return {
+      // 寮圭獥鏁版嵁
+      PopupData: ['queryinfo'],
+      left: 'calc(100% - 600px)',
+      top: 'calc(100% - 10px)',
+    };
+  },
+  computed: {},
+  mounted() {
+
+
+
+  },
+  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 = window.screen.width;
+          var startY = e.clientY;
+          var nw;
+          var targetDiv = document.getElementById('eagleMapContainer');
+          //寰楀埌鐐瑰嚮鏃惰鍦板浘瀹瑰櫒鐨勫楂橈細
+          var targetDivHeight = targetDiv.offsetHeight;
+          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() {
+      this.PopupData.forEach((item) => {
+        item.close && item.close();
+      });
+      this.PopupData = [];
+    },
+    // 鍏抽棴寮圭獥
+    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];
+      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 = {}) {
+      this.PopupData.push({
+        id: this.createRandomId(),
+        title,
+        value,
+        ...style,
+      });
+      let index = this.PopupData.length - 1;
+      this.$nextTick(() => {
+        this.$refs.pop[index].open();
+      });
+      return this.PopupData[index];
+    },
+    // 闅忔満id
+    createRandomId() {
+      return (
+        (Math.random() * 10000000).toString(16).substr(0, 4) +
+        '-' +
+        new Date().getTime() +
+        '-' +
+        Math.random().toString().substr(2, 5)
+      );
+    },
+    mouseDown(event) {
+      // document.addEventListener("mousemove", this.mouseMove);
+      // this.lastX = event.screenX;
+    },
+  },
+};
+</script>

--
Gitblit v1.9.3