Commit 20381635 authored by 张伯涛's avatar 张伯涛

ar修改

parent fa5a43f7
...@@ -71,6 +71,7 @@ export default { ...@@ -71,6 +71,7 @@ export default {
document.removeEventListener('visibilitychange', this.handleVisibilityChange); document.removeEventListener('visibilitychange', this.handleVisibilityChange);
}, },
beforeDestroy() { beforeDestroy() {
console.log('销毁销毁销毁销毁销毁销毁销毁销毁销毁销毁销毁')
if (this.control) { if (this.control) {
this.control.setWindowStatus(2); this.control.setWindowStatus(2);
this.control = null; this.control = null;
...@@ -83,20 +84,23 @@ export default { ...@@ -83,20 +84,23 @@ export default {
next(); next();
}, },
methods: { methods: {
handleBeforeUnload(event) {
console.log('jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj')
},
handleVisibilityChange() { handleVisibilityChange() {
if (document.hidden) { if (document.hidden) {
console.log('隐藏隐藏隐藏隐藏隐藏隐藏隐藏隐藏隐藏隐藏隐藏') console.log('隐藏隐藏隐藏隐藏隐藏隐藏隐藏隐藏隐藏隐藏隐藏')
// this.control.setWindowStatus(1);
if (this.control) { if (this.control) {
this.control.setWindowStatus(2); this.control.setWindowStatus(2);
this.control = null; this.control = null;
} }
} else { } else {
console.log('显示显示显示显示显示显示显示显示显示显示显示') // setTimeout(function () {
// const container = document.getElementById('ar-div');
// console.log('显示显示显示显示显示显示显示显示显示显示显示',container)
// console.log('显示显示显示显示显示显示显示显示显示显示显示',this.control)
// this.control.setWindowStatus(0);
document.title = "AR车间"; document.title = "AR车间";
console.log("----state----", this.$store.state, document.title);
this.ip = window.location.hostname; this.ip = window.location.hostname;
this.protocolType = window.location.protocol.replace(':', '') this.protocolType = window.location.protocol.replace(':', '')
if (window.location.port) { if (window.location.port) {
...@@ -105,14 +109,15 @@ export default { ...@@ -105,14 +109,15 @@ export default {
this.port = this.protocolType === "https" ? "443" : "80"; this.port = this.protocolType === "https" ? "443" : "80";
} }
this.getClientInfo(); this.getClientInfo();
// }, 2000);
} }
}, },
init() { init() {
// // 初始化 // 初始化
// if (this.control) { if (this.control) {
// this.control.setWindowStatus(2); this.control.setWindowStatus(0);
// this.control = null; this.control = null;
// } }
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
const arIndexCode = urlParams.get('id'); const arIndexCode = urlParams.get('id');
console.log('id',arIndexCode) console.log('id',arIndexCode)
...@@ -285,8 +290,9 @@ body { ...@@ -285,8 +290,9 @@ body {
border-right: 1px solid #000; border-right: 1px solid #000;
} }
.panel-child { .panel-child {
width: 100%; padding-top: 45px;
height: 100%; width: 1920px;
height: 900px;
} }
.errorContent { .errorContent {
position: fixed; position: fixed;
......
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