diff --git a/src/styles/reset.css b/src/styles/reset.css index ada771f..cab5698 100644 --- a/src/styles/reset.css +++ b/src/styles/reset.css @@ -127,4 +127,28 @@ table { color:rgba(255,255,255,1); background:rgba(68,182,255,.6); } +.dislog-body{ + display: flex; + background:rgba(1,172,254,.2); +} +.dislog-body li{ + text-align: center; + color: #fff; +} +.dislog-body li:nth-of-type(1),.dislog-body li:nth-of-type(3){ + flex: 1; +} +.dislog-body li:nth-of-type(2){ + width: 12px; +} +.dislog-body li:nth-of-type(1) div:nth-of-type(1){ + font-size: 14px; + color: #32F532; +} +.dislog-body li:nth-of-type(3) div:nth-of-type(1){ + font-size: 14px; + color: #fff; +} + + diff --git a/src/views/mapsection.vue b/src/views/mapsection.vue index 916d1f8..bbccb94 100644 --- a/src/views/mapsection.vue +++ b/src/views/mapsection.vue @@ -90,9 +90,9 @@ export default { }) let data = { nurseryInfo: [ - {Name:'万达停车场1',MapPointX:'111.742579',MapPointY:'40.818675',status:0}, - {Name:'万达停车场2',MapPointX:'111.722579',MapPointY:'40.878675',status:1}, - {Name:'万达停车场333333',MapPointX:'111.782579',MapPointY:'40.818675',status:2} + {Name:'万达停车场1',MapPointX:'111.742579',MapPointY:'40.818675',status:0,free:30,total:1000}, + {Name:'万达停车场2',MapPointX:'111.722579',MapPointY:'40.878675',status:1,free:40,total:800}, + {Name:'万达停车场333333',MapPointX:'111.782579',MapPointY:'40.818675',status:2,free:300,total:500} ] } this.baiduMap(data) @@ -103,9 +103,9 @@ export default { this.currentIndex = index let data = { nurseryInfo: [ - {Name:'万达停车场1',MapPointX:'111.742579',MapPointY:'40.818675',status:2}, - {Name:'万达停车场2',MapPointX:'111.722579',MapPointY:'40.878675',status:0}, - {Name:'万达停车场333333',MapPointX:'111.782579',MapPointY:'40.818675',status:1} + {Name:'万达停车场11111',MapPointX:'111.742579',MapPointY:'40.818675',status:2,free:300,total:500}, + {Name:'万达停车场22222',MapPointX:'111.722579',MapPointY:'40.878675',status:0,free:30,total:1000}, + {Name:'万达停车场333333',MapPointX:'111.782579',MapPointY:'40.818675',status:1,free:40,total:800} ] } this.baiduMap(data) @@ -122,6 +122,7 @@ export default { var points = []; for (var item in data.nurseryInfo) { (function (x) { + var itemthat = item; //创建标注 var pt = new BMap.Point(data.nurseryInfo[item].MapPointX, data.nurseryInfo[item].MapPointY); points[i] = pt; @@ -150,56 +151,35 @@ export default { console.log(data) map.addOverlay(marker); var myLabel; + marker.addEventListener("mouseover", function (e) { console.log(e) myLabel = new BMap.Label( `