From be3618780ef924115aa63bf40ac56b515025eab7 Mon Sep 17 00:00:00 2001
From: WX <1377869194@qq.com>
Date: 星期四, 14 九月 2023 16:03:51 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.20.92:8888/r/PM20230220027_Web

---
 src/views/search/search.vue |   34 ++++++++++++++++++----------------
 1 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/src/views/search/search.vue b/src/views/search/search.vue
index 546e6f9..2b9cec9 100644
--- a/src/views/search/search.vue
+++ b/src/views/search/search.vue
@@ -115,6 +115,7 @@
 // import config from "../../../public/config/config.js";
 import { dataQuery_selectByPage } from "@/api/api.js";
 import { ElMessage } from "element-plus";
+import menuTool from "@/assets/js/Map/menuTool";
 let searchValue = ref("");
 const searchFLag = ref(false);
 const tableData = ref([]);
@@ -129,25 +130,26 @@
 const NumhandleChange = (value: number) => {};
 const handleChange = (val: string[]) => {};
 const setPoitCannel = () => {
-  if (imageLabel) {
-    imageLabel.deleteObject();
-    imageLabel = null;
-  }
+  // if (imageLabel) {
+  // imageLabel.deleteObject();
+  // imageLabel = null;
+  // }
+  menuTool.setClearLocation("鍦板悕瀹氫綅");
 };
 const setPointLocal = (res) => {
-  if (imageLabel) {
-    setPoitCannel();
-  }
+  setPoitCannel();
+
   var position = { X: res.lon, Y: res.lat, Altitude: 10 };
-  imageLabel = window.sgworld.Creator.CreateImageLabel(
-    position,
-    config.StaticFileBaseUrl + "/Workers/image/location.png",
-    {},
-    0,
-    "鏍囩鐐�"
-  );
-  var id = imageLabel.item.id;
-  window.sgworld.Navigate.flyToObj(imageLabel.item);
+  menuTool.setLocationPoint([res.lon, res.lat], "鍦板悕瀹氫綅");
+  // imageLabel = window.sgworld.Creator.CreateImageLabel(
+  //   position,
+  //   config.StaticFileBaseUrl + "/Workers/image/location.png",
+  //   {},
+  //   0,
+  //   "鏍囩鐐�"
+  // );
+  // var id = imageLabel.item.id;
+  // window.sgworld.Navigate.flyToObj(imageLabel.item);
   // window.earthCtrl.camera.flyTo(res.log, res.lat, 300, 9.5, -45, 0.0, 5);
 };
 const setInputCahgne = () => {

--
Gitblit v1.9.3