From a3f7347964b80ec3162f8af634d4d1c47378729b Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 07 Mar 2022 17:37:27 +0800
Subject: [PATCH] 地图标记更改,地图路线详情显示,标签样式,搜索框内容间距,滚动条样式

---
 src/components/campusNav/index.vue |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/components/campusNav/index.vue b/src/components/campusNav/index.vue
index 154acd8..ee06236 100644
--- a/src/components/campusNav/index.vue
+++ b/src/components/campusNav/index.vue
@@ -59,6 +59,12 @@
                     <el-button @click="startNavigation" type="primary">导航</el-button>
                 </div>
             </div>
+
+            <div class="path-box" v-show="pathBoxShow">
+                <ul>
+                    <li v-for="(item, index) in pathBoxList" :key="index">{{item.instruction}}</li>
+                </ul>
+            </div>
         </template>
     </public-box>
 </template>
@@ -87,6 +93,9 @@
             butChouse: '',
             startLayer: null,
             endLayer: null,
+
+            pathBoxShow: false,
+            pathBoxList: [],
 
             isOverRouter: false // 是否启用了导航
         }
@@ -201,7 +210,7 @@
             tooltip.enable = true
             let title = ''
             if (val == 'start') {
-                title = '点击放置起点'
+                title = '点击选择起点'
                 // 初始化图标图层
                 if (this.startLayer == null) {
                     this.startLayer = new this.DC.VectorLayer('startLayer')
@@ -210,7 +219,7 @@
                     this.startLayer.clear()
                 }
             } else if (val == 'end') {
-                title = '点击放置终点'
+                title = '点击选择终点'
                 // 初始化图标图层
                 if (this.endLayer == null) {
                     this.endLayer = new this.DC.VectorLayer('endLayer')
@@ -386,7 +395,11 @@
                             })
                         }
 
+                        this.pathBoxList = []
+
                         res.data.route.paths[0].steps.forEach((item) => {
+                            this.pathBoxList.push({ instruction: item.instruction, orientation: item.orientation, action: item.action })
+
                             item.polyline = item.polyline.split(';')
 
                             var lineArr = []
@@ -405,6 +418,8 @@
                             routes += lineArr
                         })
 
+                        this.pathBoxShow = true
+
                         routes =
                             startLog + ',' + startLat + ';' + routes + endLog + ',' + endLat
 

--
Gitblit v1.9.3