Commit b56985bf180607ad01ea1e14bdf2c9ea6a93e826
1 parent
33e582e5
弹窗
Showing
3 changed files
with
85 additions
and
31 deletions
src/assets/img/dialog-address.png
0 → 100644
769 Bytes
src/styles/reset.css
... | ... | @@ -130,26 +130,37 @@ table { |
130 | 130 | } |
131 | 131 | |
132 | 132 | .dislog-wrap{ |
133 | - width:100px; | |
134 | - height: 47px; | |
135 | - border-radius:2px; | |
133 | + width:220px; | |
134 | + height: 181px; | |
135 | + padding:0 15px 15px 15px; | |
136 | + background:rgba(3,38,116,.49) url("../assets/img/sectionsmall.png") no-repeat; | |
137 | + background-size: 100% 100%; | |
136 | 138 | } |
137 | 139 | .dialog-header{ |
138 | - width: 100px; | |
139 | - height:14px; | |
140 | - line-height: 14px; | |
141 | - font-size: 12px; | |
142 | - font-weight:400; | |
143 | - text-align: center; | |
140 | + width: 220px; | |
141 | + height:34px; | |
142 | + line-height: 34px; | |
143 | + font-size: 14px; | |
144 | + font-weight:500; | |
144 | 145 | overflow: hidden; |
145 | 146 | white-space: nowrap; |
146 | 147 | text-overflow: ellipsis; |
147 | - color:rgba(255,255,255,1); | |
148 | - background:rgba(68,182,255,1); | |
148 | + color:rgba(255,255,255,.8); | |
149 | +} | |
150 | +.dialog-address{ | |
151 | + height:22px; | |
152 | + font-size:12px; | |
153 | + padding-left: 20px; | |
154 | + font-family:PingFang-SC-Medium; | |
155 | + font-weight:500; | |
156 | + color:rgba(255,255,255,.4); | |
157 | + background: url("../assets/img/dialog-address.png") no-repeat 0 3px; | |
158 | + background-size: 12px 12px | |
149 | 159 | } |
150 | 160 | .dislog-body{ |
151 | 161 | display: flex; |
152 | - background:rgba(1,172,254,.8); | |
162 | + height: 50px; | |
163 | + background:#2577F5; | |
153 | 164 | } |
154 | 165 | .dislog-body li{ |
155 | 166 | text-align: center; |
... | ... | @@ -159,16 +170,50 @@ table { |
159 | 170 | flex: 1; |
160 | 171 | } |
161 | 172 | .dislog-body li:nth-of-type(2){ |
162 | - width: 12px; | |
173 | + width:1px; | |
174 | + height:31px; | |
175 | + margin-top: 9px; | |
176 | + background:rgba(5,41,112,.6); | |
163 | 177 | } |
164 | 178 | .dislog-body li:nth-of-type(1) div:nth-of-type(1){ |
165 | - font-size: 14px; | |
166 | - color: #32F532; | |
179 | + height: 25px; | |
180 | + line-height: 30px; | |
181 | + font-size: 24px; | |
182 | + color: #0ECF0E; | |
183 | +} | |
184 | +.dislog-body li:nth-of-type(1) div:nth-of-type(2),.dislog-body li:nth-of-type(3) div:nth-of-type(2){ | |
185 | + height: 25px; | |
186 | + line-height: 25px; | |
187 | + color:rgba(69,195,243,1) | |
167 | 188 | } |
189 | + | |
168 | 190 | .dislog-body li:nth-of-type(3) div:nth-of-type(1){ |
169 | - font-size: 14px; | |
191 | + height: 25px; | |
192 | + line-height: 30px; | |
193 | + font-size: 24px; | |
170 | 194 | color: #fff; |
171 | 195 | } |
196 | +.dislog-footer{ | |
197 | + height:25px; | |
198 | + line-height: 25px; | |
199 | + font-size:12px; | |
200 | + font-family:PingFang-SC-Regular; | |
201 | + font-weight:400; | |
202 | + color:rgba(7,179,245,1); | |
203 | +} | |
204 | +.dislog-footer-main{ | |
205 | + height:34px ; | |
206 | + overflow-y: auto; | |
207 | +} | |
208 | +.dislog-footer-main li { | |
209 | + font-size:12px; | |
210 | + font-family:PingFang-SC-Regular; | |
211 | + font-weight:400; | |
212 | + color:rgba(7,179,245,1); | |
213 | + overflow: hidden; | |
214 | + white-space: nowrap; | |
215 | + text-overflow: ellipsis; | |
216 | +} | |
172 | 217 | |
173 | 218 | .anchorBL{display:none;} /*去掉百度地图logo*/ |
174 | 219 | ... | ... |
src/views/mapsection.vue
... | ... | @@ -141,13 +141,13 @@ export default { |
141 | 141 | |
142 | 142 | }, |
143 | 143 | baiduMap (data) { |
144 | - console.log(data.length) | |
144 | + console.log(data) | |
145 | 145 | if(data.length === 0){ |
146 | 146 | var map = new BMap.Map('allmap', {enableMapClick: false}) |
147 | 147 | var point = new BMap.Point(111.742579, 40.878675) |
148 | 148 | map.centerAndZoom(point, 14) |
149 | 149 | var mapStyle={ style : "midnight" } |
150 | - map.enableScrollWheelZoom(true); | |
150 | + map.enableScrollWheelZoom(false); | |
151 | 151 | map.setMapStyle(mapStyle); |
152 | 152 | // var marker = new BMap.Marker(point) // 创建标注 |
153 | 153 | // map.addOverlay(marker) // 将标注添加到地图中 |
... | ... | @@ -158,7 +158,7 @@ export default { |
158 | 158 | var point = new BMap.Point(data[0].lonId, data[0].latId) |
159 | 159 | map.centerAndZoom(point, 15) |
160 | 160 | var mapStyle={ style : "midnight" } |
161 | - map.enableScrollWheelZoom(true); | |
161 | + map.enableScrollWheelZoom(false); | |
162 | 162 | map.setMapStyle(mapStyle); |
163 | 163 | // var marker = new BMap.Marker(point) // 创建标注 |
164 | 164 | // map.addOverlay(marker) // 将标注添加到地图中 |
... | ... | @@ -204,19 +204,28 @@ export default { |
204 | 204 | map.addOverlay(marker); |
205 | 205 | var myLabel; |
206 | 206 | |
207 | - marker.addEventListener("mouseover", (e)=> { | |
207 | + marker.addEventListener("click", (e)=> { | |
208 | + map.removeOverlay(myLabel); | |
208 | 209 | var that = this; |
209 | 210 | myLabel = new BMap.Label( |
210 | 211 | `<div class="dislog-wrap"> |
211 | - <div class="dialog-header" title="${data[itemthat].plAddress}">${data[itemthat].plAddress}</div> | |
212 | - <ul class="dislog-body"> | |
213 | - <li><div>${data[itemthat].freeBrethNum}</div><div>空闲</div></li> | |
214 | - <li><div>/</div><div></div></li> | |
215 | - <li><div>${data[itemthat].plBerthNum}</div><div>总数</div></li> | |
216 | - </ul> | |
217 | - </div>`, | |
212 | + <div class="dialog-header" title="${data[itemthat].plAddress}">${data[itemthat].plAddress}</div> | |
213 | + <div class="dialog-address" title="${data[itemthat].plAddress}">${data[itemthat].plAddress}</div> | |
214 | + <ul class="dislog-body"> | |
215 | + <li><div>${data[itemthat].freeBrethNum}</div><div>空闲</div></li> | |
216 | + <li></li> | |
217 | + <li><div>${data[itemthat].plBerthNum}</div><div>总数</div></li> | |
218 | + </ul> | |
219 | + <div class="dislog-footer">收费标准</div> | |
220 | + <ul class="dislog-footer-main"> | |
221 | + <li>收费标准收费标准收费标准收费标准</li> | |
222 | + <li>收费标准收费标准收费标准收费标准</li> | |
223 | + <li>收费标准收费标准收费标准收费标准</li> | |
224 | + <li>收费标准收费标准收费标准收费标准</li> | |
225 | + </ul> | |
226 | + </div>`, | |
218 | 227 | { |
219 | - offset: new BMap.Size(25, -35), //label的偏移量,为了让label的中心显示在点上 | |
228 | + offset: new BMap.Size(-225, -55), //label的偏移量,为了让label的中心显示在点上 | |
220 | 229 | position: pt |
221 | 230 | }); |
222 | 231 | myLabel.setStyle({ |
... | ... | @@ -233,9 +242,9 @@ export default { |
233 | 242 | marker.setTop(true,27000000); |
234 | 243 | |
235 | 244 | }); |
236 | - marker.addEventListener("mouseout", function (e) { | |
237 | - map.removeOverlay(myLabel); | |
238 | - }); | |
245 | + // marker.addEventListener("mouseout", function (e) { | |
246 | + // map.removeOverlay(myLabel); | |
247 | + // }); | |
239 | 248 | i++; |
240 | 249 | })(i); |
241 | 250 | } | ... | ... |