|
|
|
@ -147,25 +147,12 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
computed: {}, |
|
|
|
|
|
|
|
components: { |
|
|
|
cptCard, |
|
|
|
cptTb, |
|
|
|
cptPopup, |
|
|
|
}, |
|
|
|
|
|
|
|
watch: {}, |
|
|
|
|
|
|
|
async mounted() { |
|
|
|
// 临时这么用吧 |
|
|
|
window._AMapSecurityConfig = { |
|
|
|
securityJsCode: "92ea2c965c6cf1ba7ee3a8fe01449ef2", |
|
|
|
}; |
|
|
|
|
|
|
|
this.iniMap(); |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
polygonData() { |
|
|
|
const { srcGridData } = this; |
|
|
|
@ -314,6 +301,20 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
async mounted() { |
|
|
|
console.log("指挥调度map初始化啦"); |
|
|
|
// 临时这么用吧 |
|
|
|
window._AMapSecurityConfig = { |
|
|
|
securityJsCode: "92ea2c965c6cf1ba7ee3a8fe01449ef2", |
|
|
|
}; |
|
|
|
|
|
|
|
this.iniMap(); |
|
|
|
|
|
|
|
// 为了避免刷新残留 |
|
|
|
searchMarker = null; |
|
|
|
searchBgLayer = null; |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
iniMap() { |
|
|
|
const { darkStyle, lightStyle, srcGridData } = this; |
|
|
|
@ -680,10 +681,11 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
if (searchBgLayer) { |
|
|
|
console.log("searchBgLayer已经存在了", searchBgLayer); |
|
|
|
searchBgLayer.setData(sourceData); |
|
|
|
} else { |
|
|
|
searchBgLayer = new PolygonLayer({ |
|
|
|
// autoFit: true, |
|
|
|
// autoFit: true, |
|
|
|
}) |
|
|
|
.source(sourceData) |
|
|
|
.color("#f0f") |
|
|
|
@ -733,10 +735,14 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
removeDotMarker() { |
|
|
|
console.log("removeDotMarker"); |
|
|
|
if (searchMarker) { |
|
|
|
searchMarker.remove(); |
|
|
|
} |
|
|
|
this.drawSearchBg(); |
|
|
|
if (searchBgLayer) { |
|
|
|
console.log("removeDotMarker-----searchBgLayer"); |
|
|
|
this.drawSearchBg(); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 把地图缩放等级在原来基础上大一点 |
|
|
|
|