Răsfoiți Sursa

修改外面URL链接页面修改

mork 3 săptămâni în urmă
părinte
comite
5b6f5cbcda

+ 1 - 0
.env

@@ -0,0 +1 @@
+BASE_URL="env"

+ 1 - 0
.env.development

@@ -0,0 +1 @@
+BASE_URL="/onemap/"

+ 1 - 0
.env.production

@@ -0,0 +1 @@
+BASE_URL="/onemap/"

+ 17 - 17
public/index.html

@@ -7,37 +7,37 @@
     <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
     <title><%= htmlWebpackPlugin.options.title %></title>
 
-    <link rel="stylesheet" href="./static/plugins/leaflet1.3.1/leaflet.css" />
-    <script src="./static/config/config.js"></script>
-    <script src="./static/plugins/leaflet1.3.1/leaflet.js"></script>
-    <script src="./static/plugins/leaflet1.3.1/leaflet-side-by-side.js"></script>
-    <script src="./static/plugins/esri-leaflet-v3.0.4/esri-leaflet.js"></script>
-    <script src="./static/plugins/leaflet1.3.1/leaflet.measure.js"></script>
+    <link rel="stylesheet" href="<%= BASE_URL %>static/plugins/leaflet1.3.1/leaflet.css" />
+    <script src="<%= BASE_URL %>static/config/config.js"></script>
+    <script src="<%= BASE_URL %>static/plugins/leaflet1.3.1/leaflet.js"></script>
+    <script src="<%= BASE_URL %>static/plugins/leaflet1.3.1/leaflet-side-by-side.js"></script>
+    <script src="<%= BASE_URL %>static/plugins/esri-leaflet-v3.0.4/esri-leaflet.js"></script>
+    <script src="<%= BASE_URL %>static/plugins/leaflet1.3.1/leaflet.measure.js"></script>
     <link
       rel="stylesheet"
       type="text/css"
-      href="./static/plugins/leaflet1.3.1/leaflet.measure.css"
+      href="<%= BASE_URL %>static/plugins/leaflet1.3.1/leaflet.measure.css"
     />
-    <script src="./static/plugins/leaflet1.3.1/leaflet.label.js"></script>
-    <script src="./static/plugins/leaflet/proj4.js"></script>
-    <script src="./static/plugins/leaflet/proj4-compressed.js"></script>
-    <script src="./static/plugins/leaflet/proj4leaflet.js"></script>
+    <script src="<%= BASE_URL %>static/plugins/leaflet1.3.1/leaflet.label.js"></script>
+    <script src="<%= BASE_URL %>static/plugins/leaflet/proj4.js"></script>
+    <script src="<%= BASE_URL %>static/plugins/leaflet/proj4-compressed.js"></script>
+    <script src="<%= BASE_URL %>static/plugins/leaflet/proj4leaflet.js"></script>
     <!-- <script src="./static/plugins/draw-plugin/lodash.js"></script> -->
-    <script src="./static/plugins/draw-plugin/leaflet.draw.js"></script>
+    <script src="<%= BASE_URL %>static/plugins/draw-plugin/leaflet.draw.js"></script>
     <!-- <script src="./static/plugins/draw-plugin/leafletDraw2.js"></script> -->
-    <script src="./static/plugins/leaflet/shpjs.js"></script>
+    <script src="<%= BASE_URL %>static/plugins/leaflet/shpjs.js"></script>
     <link
       rel="stylesheet"
       type="text/css"
-      href="./static/plugins/leaflet1.3.1/leaflet.label.css"
+      href="<%= BASE_URL %>static/plugins/leaflet1.3.1/leaflet.label.css"
     />
     <link
       rel="stylesheet"
       type="text/css"
-      href="./static//plugins/draw-plugin/leaflet.draw.css"
+      href="<%= BASE_URL %>static/plugins/draw-plugin/leaflet.draw.css"
     />
-    <script src="./static/plugins/Cesium/Cesium.js"></script>
-    <link rel="stylesheet" href="./static/plugins/Cesium/Widgets/widgets.css" />
+    <script src="<%= BASE_URL %>static/plugins/Cesium/Cesium.js"></script>
+    <link rel="stylesheet" href="<%= BASE_URL %>static/plugins/Cesium/Widgets/widgets.css" />
   </head>
   <body>
     <noscript>

+ 1 - 0
public/static/config/config.js

@@ -8,6 +8,7 @@ var loginConfig = {
 var webConfig = {
     // authUrl: "http://10.235.245.174:8888/",
     authUrl: "http://121.43.55.7:10086/",
+    map_url:"https://service-api.onemap.sh.gov.cn/data-service-manage-service/MapProxyApi/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBsaWNhdGlvbl9pZCI6NjEsImFwcGxpY2F0aW9uX25hbWUiOiLpnZLmtabkuozkuInnu7TmnI3liqHns7vnu58iLCJleHAiOjIwNDY2Nzg0MDN9.IKUMdjUX4U1jncIUNren-iotL7duXI90aLECMjpvUX8/shmap_base_web/MapServer"
 }
 
 var systemConfig = {

+ 1 - 0
public/static/image/close.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1756459621799" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1140" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M196.266667 256l256 256-256 256c-17.066667 17.066667-17.066667 42.666667 0 59.733333 17.066667 17.066667 42.666667 17.066667 59.733333 0l256-256 256 256c17.066667 17.066667 42.666667 17.066667 59.733333 0 17.066667-17.066667 17.066667-42.666667 0-59.733333l-256-256 256-256c17.066667-17.066667 17.066667-42.666667 0-59.733333-17.066667-17.066667-42.666667-17.066667-59.733333 0l-256 256-256-256c-17.066667-17.066667-42.666667-17.066667-59.733333 0-17.066667 14.933333-17.066667 42.666667 0 59.733333z" p-id="1141"></path></svg>

+ 1 - 0
public/static/image/mapPinSimpleArea.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1756785158250" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="15722" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M480 412.8V704a32 32 0 0 0 64 0v-291.2a160 160 0 1 0-64 0zM512 160a96 96 0 1 1 0 192 96 96 0 0 1 0-192z m448 544c0 124.736-230.848 192-448 192S64 828.736 64 704c0-30.976 15.232-76.512 88-117.632 49.024-27.776 116.48-49.088 195.072-61.696a32 32 0 0 1 36.16 39.168 32.128 32.128 0 0 1-26.144 24.16c-70.176 11.264-132 30.528-173.696 54.208C148.192 662.016 128 684.544 128 704c0 53.44 146.08 128 384 128s384-74.56 384-128c0-19.456-20.192-42.016-55.392-61.952-41.856-23.68-103.52-42.912-173.696-54.208a32 32 0 1 1 10.176-63.168c78.592 12.608 146.048 33.92 195.072 61.696C944.768 627.488 960 673.024 960 704z" p-id="15723"></path></svg>

+ 13 - 9
src/router/index.js

@@ -1,11 +1,11 @@
-import { createRouter, createWebHistory } from 'vue-router'
-import Tourism from '../views/Tourism.vue'
-import Emergency from '../views/Emergency.vue'
-import CityManagement from '../views/CityManagement.vue'
-import PeopleLivelihood from '../views/PeopleLivelihood.vue'
-import Rfq from '../views/Rfq.vue'
-import OnemapData from '../views/OnemapData.vue'
-import leaflet from '../views/leaflet.vue'
+import { createRouter, createWebHistory,createWebHashHistory } from 'vue-router'
+import Tourism from '@/views/Tourism.vue'
+import Emergency from '@/views/Emergency.vue'
+import CityManagement from '@/views/CityManagement.vue'
+import PeopleLivelihood from '@/views/PeopleLivelihood.vue'
+import Rfq from '@/views/Rfq.vue'
+import OnemapData from '@/views/OnemapData.vue'
+import leaflet from '@/views/leaflet.vue'
 
 
 const routes = [
@@ -52,8 +52,12 @@ const routes = [
   }
 ]
 
+let baseUrl  = process.env.BASE_URL;
+console.log("baseUrl====="+baseUrl);
+
 const router = createRouter({
-  history: createWebHistory(process.env.BASE_URL),
+  // history: createWebHistory(process.env.BASE_URL),
+  history: createWebHashHistory(baseUrl), // 使用hash模式
   routes
 })
 

+ 198 - 66
src/views/leaflet.vue

@@ -26,7 +26,9 @@
         </div>
         <!-- 楼宇信息UI -->
         <div class="building-information" v-if="BuildingInformationShow">
-          <div style="position: absolute;right: 10px;padding: 5px;cursor: pointer;" @click="colseWin" title="关闭"><span>X</span></div>         
+          <div style="position: absolute;right: 10px;padding: 5px;cursor: pointer;" @click="colseWin" title="关闭">
+            <img style="width: 20px;" src="../../public/static/image/close.svg" />
+          </div>         
            <!-- title -->
           <div class="building-information-title">
             {{ BuildingInformationProperties.c_resource_name || BuildingInformationProperties.c_parcel_number+'地块' }}
@@ -145,6 +147,16 @@
           <i class="measure-icon"></i>
           <span class="measure-text">测距</span>
         </button>
+        <button
+          :class="isDraw == true ? 'measure-button active' : 'measure-button'"
+          style="margin-top: 20px;"
+          @click="toggleDraw"
+          :title="isDraw ? '结束绘制' : '开始绘制十五分钟圈'"
+        >
+          <i class="mapPinSimpleArea"></i>
+          <span class="measure-text">绘制</span>
+        </button>
+        
         <!-- 新增图层控制复选框 -->
         <div class="layer-toggle-controls">
           <label class="layer-checkbox">
@@ -181,6 +193,7 @@
 <script>
 import { get } from "@/utils/request";
 import publicFun from "@/utils/publicFunction.js";
+let baseUrl  = process.env.BASE_URL;
 export default {
   data() {
     return {
@@ -196,6 +209,13 @@ export default {
       searchStr: "",
       currentCircle: null, // 当前绘制的圆圈
       filteredLifeLayer: null, // 筛选结果图层组
+
+      initShow:{
+        lifeDataFlag:false,
+        dkDataFlag:false,
+        lyDataFlag:false
+      },
+
       //   15分钟生活圈数据集合
       lifeDatas: {},
       landDatas: {},
@@ -206,6 +226,7 @@ export default {
       showBuildingLayer: true, // 楼宇图层显示状态
       // 测距相关状态
       isMeasuring: false, // 是否正在测距
+      isDraw:false, //判断是否在绘制十五分钟圈
       measurePoints: [], // 测距点集合
       measureLine: null, // 测距线对象
       measureTooltip: null, // 测距提示框
@@ -276,8 +297,94 @@ export default {
     });
 
     this.clearMeasureData();
+  },
+  created() {
+      
   },
   methods: {
+    initIframeInfo (){
+      let that = this;
+      let URL = window.location.href.split('#');
+      let type = '';
+      let code = '';
+      let center = '';
+      if(URL.length>1){
+        const paramsStr = URL[1].split('?')[1];
+        const params = {};
+        if (paramsStr) {
+          paramsStr.split('&').forEach(pair => {
+            const [key, value] = pair.split('=');
+            params[key] = decodeURIComponent(value);
+          });
+        }
+        type = params.type;
+        code = params.code;
+        center = params.center;
+      }else{
+        const params = new URLSearchParams(window.location.search);
+        type = params.get('type');
+        code = params.get('code');
+        center = params.get('center');
+      }
+      // console.log("type======"+type); // 输出参数值
+      // console.log("code======"+code); // 输出参数值
+      // console.log("center===="+center); // 输出参数值
+
+      if(type == null || center == null) return
+      let zoom = 18;
+      if(type == 3){
+        zoom = 14;
+      }
+      const geometry = JSON.parse(center)
+      const latlnt = {lat:geometry[1],lng:geometry[0]}
+      map2DViewer.map.flyTo(latlnt, zoom, {
+          duration: 1, // 动画持续时间(秒)
+          easeLinearity: 0.25, // 动画缓动效果
+      });
+      let curTimer = undefined;
+      curTimer = setInterval(() => {
+           if(this.initShow.lifeDataFlag == true && this.initShow.dkDataFlag == true && this.initShow.lyDataFlag == true){
+              clearInterval(curTimer)
+              let feature = undefined;
+              // type= 1、楼宇 2、地块 3、十五分钟圈
+              Object.entries(this.landDatas).forEach(([key, item]) => {
+                  if(type == 1 && item.properties.c_park_code == code){
+                      feature = item
+                      return
+                  }else if(type == 2 && item.properties.c_parcel_number == code){
+                      feature = item
+                      return
+                  }else if(type == 3){
+                      // that.drawCircle({latlng:latlnt})
+                      return
+                  } 
+              })
+              if(type != 3){
+                  this.BuildingInformationShow = true;
+                  if(feature){
+                    // 创建弹窗内容
+                    const properties = feature.properties;
+                    if(properties.column_name == '楼宇表'){
+                      this.isDataTypeFlag = 1
+                    }else{
+                      this.isDataTypeFlag = 2
+                    }
+                    properties.cy_lable = '';
+                    if(properties.c_industry_direction !=  undefined){
+                      properties.cy_lable = properties.c_industry_direction
+                    }
+                    if(properties.content !=  undefined){
+                      properties.cy_lable = properties.content
+                    }
+                    this.BuildingInformationProperties = properties;
+                  }
+                  
+              }else{
+                  this.BuildingInformationShow = false;
+              }
+           }
+      }, 500);
+    },
     colseWin(){
       this.BuildingInformationShow = false;
     },
@@ -294,22 +401,23 @@ export default {
     },
     getOauthToken() {
       let that = this;
-      let loginInfo = new FormData();
-      // loginConfig 在config.js中配置,项目中灵活运用
-      let keyArr = Object.keys(loginConfig);
-      let valueArr = Object.values(loginConfig);
-      keyArr.map(function (field, index) {
-        loginInfo.append(field, valueArr[index]);
-      });
-      fetch(webConfig.authUrl + "oauth/user/login", {
-        method: "POST",
-        body: loginInfo,
-      })
-        .then((resp) => resp.json())
-        .then((data) => {
-          that.oauthToken = data.message;
-          that.initMap();
-        });
+      // let loginInfo = new FormData();
+      // // loginConfig 在config.js中配置,项目中灵活运用
+      // let keyArr = Object.keys(loginConfig);
+      // let valueArr = Object.values(loginConfig);
+      // keyArr.map(function (field, index) {
+      //   loginInfo.append(field, valueArr[index]);
+      // });
+      // fetch(webConfig.authUrl + "oauth/user/login", {
+      //   method: "POST",
+      //   body: loginInfo,
+      // })
+      //   .then((resp) => resp.json())
+      //   .then((data) => {
+      //     that.oauthToken = data.message;
+      //     that.initMap();
+      //   });
+      that.initMap();
     },
     initMap() {
       map2DViewer.map = L.map("map2DViewer", {
@@ -321,11 +429,14 @@ export default {
         doubleClickZoom: false,
       }).setView([31.17665808878003, 121.27975386938489], 18);
 
+      // this.layer = this.addTiledMapLayer(
+      //   "internalMap?servertype=shmap_base_web&proxyToken=" + this.oauthToken
+      // ).addTo(map2DViewer.map);
       this.layer = this.addTiledMapLayer(
-        "internalMap?servertype=shmap_base_web&proxyToken=" + this.oauthToken
+        webConfig.map_url
       ).addTo(map2DViewer.map);
       // 单击事件:清除所有绘制的元素和筛选结果
-      map2DViewer.map.on("click", () => {
+      map2DViewer.map.on("click", (e) => {
         // 清除圆圈
         if (this.currentCircle) {
           map2DViewer.map.removeLayer(this.currentCircle);
@@ -338,10 +449,28 @@ export default {
           this.filteredLifeLayer = null; // 重置引用
         }
 
+        if(this.isDraw){
+          this.drawCircle(e)
+        }
+
         // 如果有其他需要清除的筛选结果数据,也可以在这里处理
         // 例如:this.filteredResults = [];
       });
       map2DViewer.map.on("dblclick", (e) => {
+        this.drawCircle(e)
+      });
+
+      this.lifeDatas = {};
+      this.landDatas = {};
+      //   加载静态文件渲染geojson数据
+      this.getJSonDataToMap();
+      this.getJSonDataToMap2();
+      this.getJSonDataToMap3();
+
+      this.initIframeInfo(); // 第三方URL引进此工程获取的参数
+    },
+
+    drawCircle(e){
         // 清除上一次的圆圈和筛选结果
         if (this.currentCircle) {
           map2DViewer.map.removeLayer(this.currentCircle);
@@ -349,7 +478,7 @@ export default {
         if (this.filteredLifeLayer) {
           this.filteredLifeLayer.clearLayers();
         }
-
+        // console.log('[ ==== ] >', e.latlng)
         // 创建新的1500米半径圆圈
         this.currentCircle = L.circle(e.latlng, {
           color: "#ff7800",
@@ -364,42 +493,6 @@ export default {
         L.marker(e.latlng).addTo(this.filteredLifeLayer);
         // 筛选并渲染lifeDatas中在圆圈内的对象
         this.renderLifeDatasInCircle(e.latlng);
-      });
-
-      map2DViewer.map.on("touchend", (e) => {
-        var now = new Date().getTime();
-        if (now - lastTouchTime < 500) { // 假设双击间隔小于500毫秒
-          // 清除上一次的圆圈和筛选结果
-          if (this.currentCircle) {
-            map2DViewer.map.removeLayer(this.currentCircle);
-          }
-          if (this.filteredLifeLayer) {
-            this.filteredLifeLayer.clearLayers();
-          }
-
-          // 创建新的1500米半径圆圈
-          this.currentCircle = L.circle(e.latlng, {
-            color: "#ff7800",
-            fillColor: "#ff7800",
-            fillOpacity: 0.1,
-            radius: 1500,
-          }).addTo(map2DViewer.map);
-
-          // 创建新的图层组用于存放筛选结果
-          this.filteredLifeLayer = L.featureGroup().addTo(map2DViewer.map);
-          // 在圆圈中心添加标记点
-          L.marker(e.latlng).addTo(this.filteredLifeLayer);
-          // 筛选并渲染lifeDatas中在圆圈内的对象
-          this.renderLifeDatasInCircle(e.latlng);
-        }
-      });
-
-      this.lifeDatas = {};
-      this.landDatas = {};
-      //   加载静态文件渲染geojson数据
-      this.getJSonDataToMap();
-      this.getJSonDataToMap2();
-      this.getJSonDataToMap3();
     },
 
     // 添加tiledMapLayer图层 -- 针对arcgis rest services
@@ -431,8 +524,8 @@ export default {
         feature.properties.c_parcel_name ||
         "未命名区域";
       const markerColor = feature.properties.markerColor || color; // 优先使用特性中定义的颜色
+      this.landDatas[markerName].properties.center = centroid;
 
-      this.landDatas[markerName] = centroid;
       const customIcon = L.divIcon({
         html: `<div class="floating-marker" style="color: ${markerColor}">
                 <div class="marker-content">${markerName}</div>
@@ -580,7 +673,8 @@ export default {
         // for (const [key, value] of Object.entries(properties)) {
         //   popupContent += `<div class="popup-row"><span class="popup-label">${key}:</span><span class="popup-value">${value}</span></div>`;
         // }
-        let obj = {name:'名称',type:'类型',circle_type:'生活圈类型',set_type:'规划类型',build_area:'区域面积',county:'区县名称',town:'乡镇名称',feature_level:'行政级别',content:'内容',set_time:'规定时间',open_status:'开放状态',config_type:'配置类型',lxdh:'联系电话',address:'地址',owner:'所有者',operation_model:'操作部门'};
+        //let obj = {name:'名称',type:'类型',circle_type:'生活圈类型',set_type:'规划类型',build_area:'区域面积',county:'区县名称',town:'乡镇名称',feature_level:'行政级别',content:'内容',set_time:'规定时间',open_status:'开放状态',config_type:'配置类型',lxdh:'联系电话',address:'地址',owner:'所有者',operation_model:'操作部门'};
+        let obj = {name:'项目名称',circle_type:'生活圈类型',type:'类型',county:'区县名称',town:'乡镇名称',feature_level:'级别',content:'项目内容',open_status:'开放情况',config_type:'配置类型',lxdh:'联系电话',address:'地址'};
         for (const [key, value] of Object.entries(obj)) {
           let val = properties[key];
           if(val == undefined || val == null || val == ''){
@@ -603,12 +697,13 @@ export default {
       });
     },
     getJSonDataToMap() {
+      let that = this;
       // 先删除历史图层
       if (map2DViewer.map.hasLayer(map2DViewer.groups["15分钟生活圈_label"])) {
         map2DViewer.groups["15分钟生活圈_label"].remove();
       }
       // 请求并渲染新的区域图层
-      get("/static/json/15minLifeData.geojson", "").then((geoJson) => {
+      get(baseUrl+"static/json/15minLifeData.geojson", "").then((geoJson) => {
         // 存放所有的点数据
         map2DViewer.groups["15分钟生活圈_label"] = L.featureGroup();
         geoJson.features.map((feature) => {
@@ -619,15 +714,17 @@ export default {
             this.lifeDatas[feature.properties.name] = feature;
           }
         });
+        that.initShow.lifeDataFlag = true
       });
     },
     getJSonDataToMap2() {
+      let that = this;
       // 先删除历史图层
       if (map2DViewer.map.hasLayer(map2DViewer.groups["dkModelColChName_polygon"])) {
         map2DViewer.groups["dkModelColChName_polygon"].remove();
       }
       // 请求并渲染新的区域图层
-      get("/static/json/地块数据-20250820.geojson", "").then((geoJson) => {
+      get(baseUrl+"static/json/地块数据-20250820.geojson", "").then((geoJson) => {
         // 存放所有的面数据
         map2DViewer.groups["dkModelColChName_polygon"] = L.featureGroup();
         map2DViewer.groups["dkModelColChName_polygon"].addTo(map2DViewer.map);
@@ -636,17 +733,25 @@ export default {
           let newCorrectCoordArr = publicFun.latLngsToReverseByLngLat(correctCordArr);
           feature.geometry.coordinates = newCorrectCoordArr;
           let configKey = dkModelColChName;
+          if (feature.properties) {
+            const markerName =
+              feature.properties.c_parcel_name ||
+              "未命名区域";
+            this.landDatas[markerName] = feature;
+          }
           this.addPolygon(feature, "#409EFF", configKey, "dkModelColChName");
         });
+        that.initShow.dkDataFlag = true
       });
     },
     getJSonDataToMap3() {
+      let that = this;
       // 先删除历史图层
       if (map2DViewer.map.hasLayer(map2DViewer.groups["lyModelColChName_polygon"])) {
         map2DViewer.groups["lyModelColChName_polygon"].remove();
       }
       // 请求并渲染新的区域图层
-      get("/static/json/楼宇数据-20250820.geojson", "").then((geoJson) => {
+      get(baseUrl+"static/json/楼宇数据-20250820.geojson", "").then((geoJson) => {
         // 存放所有的面数据
         map2DViewer.groups["lyModelColChName_polygon"] = L.featureGroup();
         map2DViewer.groups["lyModelColChName_polygon"].addTo(map2DViewer.map);
@@ -658,12 +763,12 @@ export default {
           if (feature.properties) {
             const markerName =
               feature.properties.c_resource_name ||
-              feature.properties.c_parcel_name ||
               "未命名区域";
             this.landDatas[markerName] = feature;
           }
           this.addPolygon(feature, "#67C23A", configKey, "lyModelColChName");
         });
+        that.initShow.lyDataFlag = true
       });
     },
     // 新增搜索处理方法
@@ -689,7 +794,7 @@ export default {
         if (key.toLowerCase().includes(lowerKeyword) && this.searchResults.length <= 10) {
           this.searchResults.push({
             key: key,
-            value: item,
+            value: item.properties.center,
           });
           return;
         }
@@ -719,12 +824,28 @@ export default {
       // 地块\楼宇
       setTimeout(() => {
         // 平滑移动视角到标记位置
-        map2DViewer.map.flyTo(this.landDatas[key], 18, {
+        map2DViewer.map.flyTo(this.landDatas[key].properties.center, 18, {
           duration: 1, // 动画持续时间(秒)
           easeLinearity: 0.25, // 动画缓动效果
         });
       }, 0);
     },
+    toggleDraw(){
+      this.isDraw = !this.isDraw;
+      if(this.isDraw == false){
+         // 清除圆圈
+        if (this.currentCircle) {
+          map2DViewer.map.removeLayer(this.currentCircle);
+          this.currentCircle = null; // 重置引用
+        }
+
+        // 清除筛选结果图层
+        if (this.filteredLifeLayer) {
+          map2DViewer.map.removeLayer(this.filteredLifeLayer);
+          this.filteredLifeLayer = null; // 重置引用
+        }
+      }
+    },
     // 切换测距模式
     toggleMeasureMode() {
       this.isMeasuring = !this.isMeasuring;
@@ -1241,7 +1362,7 @@ export default {
   background: white;
   border-radius: 0.5rem;
   box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
-  z-index: 1000;
+  z-index: 10000;
   max-height: 200px;
   overflow-y: auto;
 }
@@ -1297,6 +1418,14 @@ export default {
   background-repeat: no-repeat;
   margin-right: 6px;
 }
+.mapPinSimpleArea{
+  width: 20px;
+  height: 20px;
+  background-image: url('../../public/static/image/mapPinSimpleArea.svg');
+  background-repeat: no-repeat;
+  margin-right: 6px;
+  background-size: contain;
+}
 
 .measure-text {
   font-size: 14px;
@@ -1444,6 +1573,9 @@ export default {
   .measure-icon {
     margin-right: 0;
   }
+  .mapPinSimpleArea{
+     margin-right: 0;
+  }
 }
 /* 分段距离标签样式 */
 .segment-measure-tooltip {
@@ -1486,7 +1618,7 @@ export default {
   // background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
   background: #f1f5fe;
   border-radius: 8px;
-  padding: 12px;
+  padding: 6px;
   display: flex;
   align-items: center;
   justify-content: center;

+ 1 - 1
vue.config.js

@@ -10,7 +10,7 @@ function resolve(dir) {
 
 module.exports = defineConfig({
   transpileDependencies: true,
-  publicPath: "/",
+  publicPath: "./",
   pages: {
     index: {
       // page 的入口