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