Commit 4f8d0409 authored by 张伯涛's avatar 张伯涛

时间轴 注释

parent 067509eb
......@@ -50,6 +50,7 @@ export default {
};
},
mounted() {
document.addEventListener('visibilitychange', this.handleVisibilityChange);
document.title = "AR车间";
console.log("----state----", this.$store.state, document.title);
this.ip = window.location.hostname;
......@@ -61,6 +62,9 @@ export default {
}
this.getClientInfo();
},
unmounted() {
document.removeEventListener('visibilitychange', this.handleVisibilityChange);
},
beforeDestroy() {
if (this.control) {
this.control.setWindowStatus(0);
......@@ -74,6 +78,27 @@ export default {
next();
},
methods: {
handleVisibilityChange() {
if (document.hidden) {
console.log('隐藏隐藏隐藏隐藏隐藏隐藏隐藏隐藏隐藏隐藏隐藏')
if (this.control) {
this.control.setWindowStatus(2);
this.control = null;
}
} else {
console.log('显示显示显示显示显示显示显示显示显示显示显示')
document.title = "AR车间";
console.log("----state----", this.$store.state, document.title);
this.ip = window.location.hostname;
this.protocolType = window.location.protocol.replace(':', '')
if (window.location.port) {
this.port = window.location.port;
} else {
this.port = this.protocolType === "https" ? "443" : "80";
}
this.getClientInfo();
}
},
init() {
// 初始化
if (this.control) {
......@@ -86,9 +111,9 @@ export default {
const userName = this.raData.username;
const loginKey = this.raData.tgc;
const left = '10';
const top = '100';
const top = '150';
const width = '1900';
const height = '953';
const height = '850';
// const protocolType = this.protocolType
const protocolType = 'https'
const domainId = 103
......
......@@ -622,10 +622,10 @@ import store from "@/store/index.js";
canRun = false
setTimeout(function() {
var _this$_getDomPosition2 = _this._getDomPosition(),
left = '103',
top = '103',
width = '1919',
height = '937'
left = _this$_getDomPosition2.left,
top = _this$_getDomPosition2.top,
width = _this$_getDomPosition2.width,
height = _this$_getDomPosition2.height
_this.setPosition(left, top, width, height)
......@@ -738,10 +738,10 @@ import store from "@/store/index.js";
this.timer = setInterval(function() {
var _this$_getDomPosition3 = _this._getDomPosition(),
left = '103',
top = '103',
width = '1919',
height = '937'
left = _this$_getDomPosition3.left,
top = _this$_getDomPosition3.top,
width = _this$_getDomPosition3.width,
height = _this$_getDomPosition3.height
if (
_this.lastPosition.x != left ||
......
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