lcw
This commit is contained in:
@ -143,59 +143,61 @@ export function MapUtil(map) {
|
||||
});
|
||||
}
|
||||
|
||||
// 展示气泡框
|
||||
MapUtil.prototype.makerPopup = (val)=>{
|
||||
|
||||
let { data,flag,type = 'Dark'} = val
|
||||
// 展示气泡框
|
||||
MapUtil.prototype.makerPopup = (val) => {
|
||||
|
||||
let { data, flag, type = 'Dark' } = val
|
||||
// Dark Light Custom
|
||||
let marker;
|
||||
if(!_that._self[flag]) _that._self[flag] = [];
|
||||
if(type == 'Dark' || type == 'Light') {
|
||||
let list = zdyContent(flag,data);// 默认的样式
|
||||
marker = map.createPopup([data.jd,data.wd],{
|
||||
style:style, // 气泡框样式:
|
||||
data:list,
|
||||
title:data.ssbm,
|
||||
closeButton:false,
|
||||
anchor:'bottom',
|
||||
pixelOffset:[0,-50]
|
||||
if (!_that._self[flag]) _that._self[flag] = [];
|
||||
if (type == 'Dark' || type == 'Light') {
|
||||
let list = zdyContent(flag, data);// 默认的样式
|
||||
marker = map.createPopup([data.jd, data.wd], {
|
||||
style: style, // 气泡框样式:
|
||||
data: list,
|
||||
title: data.ssbm,
|
||||
closeButton: false,
|
||||
anchor: 'bottom',
|
||||
pixelOffset: [0, -50]
|
||||
})
|
||||
}else {
|
||||
marker = map.createPopup([data.jd,data.wd],{
|
||||
style:'Custom', // // 自定义样式
|
||||
attrs:{
|
||||
class:'popupCustom'
|
||||
} else {
|
||||
marker = map.createPopup([data.jd, data.wd], {
|
||||
style: 'Custom', // // 自定义样式
|
||||
attrs: {
|
||||
class: 'popupCustom'
|
||||
},
|
||||
container: zdyContentHtml(flag,data),
|
||||
closeButton:false,
|
||||
anchor:'bottom',
|
||||
pixelOffset:[0,-30]
|
||||
container: zdyContentHtml(flag, data),
|
||||
closeButton: false,
|
||||
anchor: 'bottom',
|
||||
pixelOffset: [0, -30]
|
||||
})
|
||||
}
|
||||
_that._self[flag].push(marker)
|
||||
}
|
||||
// 弹窗自定义默认内容
|
||||
function zdyContent(flag,item){
|
||||
function zdyContent(flag, item) {
|
||||
switch (flag) {
|
||||
case 'hm':
|
||||
return [
|
||||
{ label:'林安码线索数量',value:item.lamsx },
|
||||
{ label:'布控预警数量',value:item.bkyj },
|
||||
{ label:'红色预警数量',value:item.hsyj },
|
||||
{ label:'信息采集数量',value:item.xxcjsl },
|
||||
{ label: '林安码线索数量', value: item.lamsx },
|
||||
{ label: '布控预警数量', value: item.bkyj },
|
||||
{ label: '红色预警数量', value: item.hsyj },
|
||||
{ label: '信息采集数量', value: item.xxcjsl },
|
||||
]
|
||||
}
|
||||
}
|
||||
// 弹窗自定义标签内容
|
||||
function zdyContentHtml(flag,item){
|
||||
function zdyContentHtml(flag, item) {
|
||||
console.log(item);
|
||||
|
||||
let html = ''
|
||||
switch (flag) {
|
||||
case 'hm_pop':
|
||||
const list = [
|
||||
{ jb: "一级",sl:'5',ypl:'100%' },
|
||||
{ jb: "二级",sl:'5',ypl:'100%' },
|
||||
{ jb: "三级",sl:'3',ypl:'60%' },
|
||||
{ jb: "四级",sl:'0',ypl:'20%' }
|
||||
{ jb: "一级", sl: '5' },
|
||||
{ jb: "二级", sl: '5' },
|
||||
{ jb: "三级", sl: '3' },
|
||||
{ jb: "四级", sl: '0' }
|
||||
];
|
||||
html = `
|
||||
<div class="popupCustomBox">
|
||||
@ -204,16 +206,16 @@ export function MapUtil(map) {
|
||||
<span>今日警情${item.jrzs || 0}</span>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="popupCustomTitle_li"><span>级别</span> <span>数量</span> <span>研判率</span> </li>
|
||||
${item.jqjb.map(it => `<li class="popupCustomTitle_li"><span>${it.jbmc}</span> <span>${it.jrsl}</span> <span>${it.ypbl}</span></li>`).join('')}
|
||||
<li class="popupCustomTitle_li"><span>数据来源</span> <span>数量</span> </li>
|
||||
${item.jrtj.map(it => `<li class="popupCustomTitle_li"><span>${it.lyms}</span> <span>${it.jrsl}</span> </li>`).join('')}
|
||||
</ul>
|
||||
</div>
|
||||
`
|
||||
break;
|
||||
break;
|
||||
}
|
||||
return html;
|
||||
}
|
||||
|
||||
|
||||
// 信息框展示
|
||||
MapUtil.prototype.makerShowTitle = (item, points, flag, text, offset) => {
|
||||
|
||||
|
||||
@ -595,6 +595,11 @@ const sendMessage = (gzlid) => {
|
||||
qcckPost(promes, '/mosty-gsxt/gsxt/bqbk/sendFqzl ').then(res => {
|
||||
console.log(res);
|
||||
})
|
||||
break;
|
||||
case 'QBSP':
|
||||
qcckPost(promes, '/mosty-gsxt/qbcj/callback ').then(res => {
|
||||
console.log(res);
|
||||
})
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user