Commit cff7ac23 authored by “yiyousong”'s avatar “yiyousong”

perf: 优化站点详情icon显示

parent b5ae35fd
......@@ -157,7 +157,12 @@ export default {
contentRender(h, params) {
//console.log(params.extData.extData.productId)
let value = params.extData.extData.productName;
try {
require(`../assets/images/${value}.png`);
return <img src={require(`../assets/images/${value}.png`)} />;
} catch (error) {
return <img src={require(`../assets/images/dn.png`)} />;
}
},
getDeviceDetial() {
//获取设备列表
......@@ -165,8 +170,11 @@ export default {
refresh(data) {
// this.markersGroupData = data;
//this.$refs.map.clear();
this.$nextTick(() => {
let map = this.amapManager.getMap();
if (map) {
map.clearMap();
}
for (let group of data) {
for (let item of group.deviceList) {
......@@ -174,6 +182,7 @@ export default {
this.setMarker(item);
}
}
});
},
relocate(center) {
......@@ -328,6 +337,3 @@ export default {
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment