230320a303 2 年 前
コミット
2f7e465320

ファイルの差分が大きいため隠しています
+ 0 - 0
dist/index.html


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/css/chunk-4ea9f5d5.9d17984c.css


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/app.14418276.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-4ea9f5d5.a6352a14.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-5bb44cae.eb7e612c.js


+ 12 - 0
src/views/map/dtl.vue

@@ -166,6 +166,7 @@
         :events="polylineEvents"
         :path="polyline.path">
       </el-amap-polyline>
+      <el-amap-info-window :position="winObj.position" :content="winObj.content"></el-amap-info-window>
     </el-amap>
     <MapTextEdit
       :isShow="isMteShow"
@@ -211,6 +212,7 @@ export default {
         zooms: [15, 19],
       },
       amapManager,
+      winObj: {},
       polygons: [
         // {
         //   path: [[115.823481,28.702359],[115.861933,28.672241],[115.812838,28.629609],[115.793784,28.657179]],
@@ -289,6 +291,12 @@ export default {
         click(e) {
           const eData = e.target.getExtData()
           that.polygonIndex = eData.index
+          const lnglatObj = e.lnglat
+          that.winObj.position = [lnglatObj.lng, lnglatObj.lat]
+          that.winObj.content = `
+            <div style="font-weight: bold;color:#409eff;padding: 10px 10px 2px">${that.polygons[that.polygonIndex].text}</div>
+            <div style="text-align: center;color:#999;">序号:${that.polygonIndex + 1}</div>
+          `
           // wx.miniProgram.navigateTo({url: '/pagesSchool/indexDtl?id=25'})
         },
       },
@@ -638,6 +646,10 @@ export default {
       }).then(res => {
         if (res.data) {
           const data = JSON.parse(res.data)
+          this.winObj = {
+            content: data.mapDiyObj.title,
+            position: [data.mapDiyObj.center[0], data.mapDiyObj.center[1]],
+          }
           this.polylines = data.polylines && data.polylines.length > 0 ? [...data.polylines] : []
           this.polygons = [...data.polygons]
           this.markerData = [...data.markerData]

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません