更新
This commit is contained in:
@ -146,9 +146,12 @@ export function MapUtil(map) {
|
||||
// 展示气泡框
|
||||
MapUtil.prototype.makerPopup = (item,flag,style = 'Dark')=>{
|
||||
// Dark Light Custom
|
||||
let marker;
|
||||
let flagPop = flag+'_pop'
|
||||
if(!_that._self[flagPop]) _that._self[flagPop] = [];
|
||||
if(style == 'Dark' || style == 'Light') {
|
||||
let list = zdyContent(flag,item);// 默认的样式
|
||||
map.createPopup([item.jd,item.wd],{
|
||||
marker = map.createPopup([item.jd,item.wd],{
|
||||
style:style, // 气泡框样式:
|
||||
data:list,
|
||||
title:item.ssbm,
|
||||
@ -157,7 +160,7 @@ export function MapUtil(map) {
|
||||
pixelOffset:[0,-50]
|
||||
})
|
||||
}else {
|
||||
map.createPopup([item.jd,item.wd],{
|
||||
marker = map.createPopup([item.jd,item.wd],{
|
||||
style:'Custom', // // 自定义样式
|
||||
attrs:{
|
||||
class:'popupCustom'
|
||||
@ -168,13 +171,14 @@ export function MapUtil(map) {
|
||||
pixelOffset:[0,-30]
|
||||
})
|
||||
}
|
||||
_that._self[flagPop].push(marker)
|
||||
}
|
||||
// 弹窗自定义默认内容
|
||||
function zdyContent(flag,item){
|
||||
switch (flag) {
|
||||
case 'hm':
|
||||
return [
|
||||
{ label:'临安码线索数量',value:item.lamsx },
|
||||
{ label:'林安码线索数量',value:item.lamsx },
|
||||
{ label:'布控预警数量',value:item.bkyj },
|
||||
{ label:'红色预警数量',value:item.hsyj },
|
||||
{ label:'信息采集数量',value:item.xxcjsl },
|
||||
@ -189,7 +193,7 @@ export function MapUtil(map) {
|
||||
html = `
|
||||
<div class="popupCustomBox">
|
||||
<div class="popupCustomTitle_title">${item.ssbm}</div>
|
||||
<div>临安码线索数量:${item.lamsx}</div>
|
||||
<div>林安码线索数量:${item.lamsx}</div>
|
||||
<div>布控预警数量:${item.bkyj}</div>
|
||||
<div>红色预警数量:${item.hsyj}</div>
|
||||
<div>信息采集数量:${item.xxcjsl}</div>
|
||||
|
||||
Reference in New Issue
Block a user