From c7343975a450bfc7afa1d7cfec6d460425f25cd4 Mon Sep 17 00:00:00 2001
From: liuqimichale <123456lq>
Date: Thu, 2 Sep 2021 09:35:58 +0800
Subject: [PATCH] 地图
---
src/views/map/map.vue | 32 ++++++++++++++++++++++++++++----
src/views/map/search.vue | 2 +-
2 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/src/views/map/map.vue b/src/views/map/map.vue
index 36916a9..8646493 100644
--- a/src/views/map/map.vue
+++ b/src/views/map/map.vue
@@ -21,7 +21,7 @@
:zoom="16">
-
+
@@ -86,11 +86,18 @@ export default {
popupVisible: false,
n:10,
setTimeoutTimer:'',
- latitude:'',
- longitude:'',
+ latitude:'39.91092455',
+ longitude:'116.41338370',
name:'',
idleberths:'',
- julis:''
+ julis:'',
+ labelShow: false,
+ labelContent:'',
+ position:{
+ latitude:'39.91092455',
+ longitude:'116.41338370',
+ bgcolor: '#f00'
+ }
}
},
methods: {
@@ -158,7 +165,24 @@ export default {
this.latitude = datas.latitude
this.longitude = datas.longitude
+ this.position.latitude = datas.latitude
+ this.position.longitude = datas.longitude
this.idleberths = datas.idleberths
+ this.labelContent = datas.idleberths
+ if(datas.idleberths>10){
+ this.position.bgcolor = '#0f0'
+ }else if(datas.idleberths<=10&&datas.idleberths>0){
+ this.position.bgcolor = '#ff9e04'
+ }else if(datas.idleberths<=0){
+ this.position.bgcolor = '#f00'
+ }else{
+ this.position.bgcolor = '#0f0'
+ }
+
+
+
+
+
this.julis = this.dis
})
},
diff --git a/src/views/map/search.vue b/src/views/map/search.vue
index 61fbc66..3681aff 100644
--- a/src/views/map/search.vue
+++ b/src/views/map/search.vue
@@ -82,7 +82,7 @@ export default {
tzmap: function (i) {
console.log(i)
this.$router.push({
- name:'map',
+ path:'map',
query:{
name: i.name,
lng:i.longitude,
--
libgit2 0.21.4