|
|
@ -42,10 +42,7 @@
|
|
|
|
<img
|
|
|
|
<img
|
|
|
|
@load="onImageLoad"
|
|
|
|
@load="onImageLoad"
|
|
|
|
:src="
|
|
|
|
:src="
|
|
|
|
'http://192.168.50.200:88/images/' +
|
|
|
|
hostName + '/images/' + parentdata.name + '/' + currentNodeData.name
|
|
|
|
parentdata.name +
|
|
|
|
|
|
|
|
'/' +
|
|
|
|
|
|
|
|
currentNodeData.name
|
|
|
|
|
|
|
|
"
|
|
|
|
"
|
|
|
|
alt=""
|
|
|
|
alt=""
|
|
|
|
class="img"
|
|
|
|
class="img"
|
|
|
@ -107,6 +104,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//获取的矩形数据
|
|
|
|
//获取的矩形数据
|
|
|
|
labelMarkArrs: [],
|
|
|
|
labelMarkArrs: [],
|
|
|
|
|
|
|
|
hostName: "",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
@ -147,6 +145,16 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
console.log(window.location.host);
|
|
|
|
|
|
|
|
const isProduction = process.env.NODE_ENV === "production";
|
|
|
|
|
|
|
|
if (isProduction) {
|
|
|
|
|
|
|
|
// 使用服务器IP或域名作为图片地址
|
|
|
|
|
|
|
|
this.hostName = window.location.origin;
|
|
|
|
|
|
|
|
console.log("aaaaaaaaaaaa");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// 使用代理的 target 作为图片地址(开发环境)
|
|
|
|
|
|
|
|
this.hostName = "http://192.168.1.190:88"; // 这里使用你的本地 target 地址
|
|
|
|
|
|
|
|
}
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
window.addEventListener("resize", this.updateImageSize);
|
|
|
|
window.addEventListener("resize", this.updateImageSize);
|
|
|
|
});
|
|
|
|
});
|
|
|
|