This commit is contained in:
parent
63d0f9f5e4
commit
8d57fde6ab
|
|
@ -47,39 +47,39 @@ export default {
|
|||
this.$refs.rightBtn.style.background = `url(${require("@/assets/img/right-hover.png")})`;
|
||||
}
|
||||
|
||||
let wPath = window.document.location.href;
|
||||
let pathName = this.$route.path;
|
||||
let pos = wPath.indexOf(pathName);
|
||||
let localhostPath = wPath.substring(0, pos);
|
||||
this.uploadUrl =
|
||||
process.env.VUE_APP_API_URL === "/"
|
||||
? localhostPath
|
||||
: process.env.VUE_APP_API_URL;
|
||||
let graphicLayer = window.marsMap.getLayerById("devLog");
|
||||
graphicLayer.eachGraphic((graphic) => {
|
||||
console.log(graphic, value, "graphic");
|
||||
if (value === 1) {
|
||||
graphic.setOptions({
|
||||
style: {
|
||||
image: require(`@/assets/img/device/deviceIcon/${graphic.attr.icon}.png`)
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (graphic.attr.img !== null) {
|
||||
graphic.setOptions({
|
||||
style: {
|
||||
image: this.uploadUrl + graphic.attr.img
|
||||
}
|
||||
});
|
||||
} else {
|
||||
graphic.setOptions({
|
||||
style: {
|
||||
image: require("@/assets/img/group.png")
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
// let wPath = window.document.location.href;
|
||||
// let pathName = this.$route.path;
|
||||
// let pos = wPath.indexOf(pathName);
|
||||
// let localhostPath = wPath.substring(0, pos);
|
||||
// this.uploadUrl =
|
||||
// process.env.VUE_APP_API_URL === "/"
|
||||
// ? localhostPath
|
||||
// : process.env.VUE_APP_API_URL;
|
||||
// let graphicLayer = window.marsMap.getLayerById("devLog");
|
||||
// graphicLayer.eachGraphic((graphic) => {
|
||||
// console.log(graphic, value, "graphic");
|
||||
// if (value === 1) {
|
||||
// graphic.setOptions({
|
||||
// style: {
|
||||
// image: require(`@/assets/img/device/deviceIcon/${graphic.attr.icon}.png`)
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// if (graphic.attr.img !== null) {
|
||||
// graphic.setOptions({
|
||||
// style: {
|
||||
// image: this.uploadUrl + graphic.attr.img
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// graphic.setOptions({
|
||||
// style: {
|
||||
// image: require("@/assets/img/group.png")
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue