|
@@ -1,12 +1,12 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <div class="container" v-show="isOpen3d">
|
|
|
|
|
|
+ <div class="container" v-if="isOpen3d">
|
|
<SearchBarMain/>
|
|
<SearchBarMain/>
|
|
<div class="vr-bg" id="vr-bg-container"></div>
|
|
<div class="vr-bg" id="vr-bg-container"></div>
|
|
<div id="player" style="width: 100%; height: 100%"></div>
|
|
<div id="player" style="width: 100%; height: 100%"></div>
|
|
<bench-detail :is-detail-visible="isDetailVisible" :is-remote-btn-visible="isRemoteBtnVisible" :closeDetail="closeDetail" :bench="currentBench" />
|
|
<bench-detail :is-detail-visible="isDetailVisible" :is-remote-btn-visible="isRemoteBtnVisible" :closeDetail="closeDetail" :bench="currentBench" />
|
|
</div>
|
|
</div>
|
|
- <div class="ordinary-container" v-show="!isOpen3d" @click="onBlur">
|
|
|
|
|
|
+ <div class="ordinary-container" v-else @click="onBlur">
|
|
<div class="ordinary-left">
|
|
<div class="ordinary-left">
|
|
<SearchBar
|
|
<SearchBar
|
|
class="search-container"
|
|
class="search-container"
|
|
@@ -57,7 +57,7 @@
|
|
<div class="ordinary-map" id="ordinary-map">
|
|
<div class="ordinary-map" id="ordinary-map">
|
|
<!-- <img src="../../images/map.png" /> -->
|
|
<!-- <img src="../../images/map.png" /> -->
|
|
<div class="vr-bg" id="vr-bg-container"></div>
|
|
<div class="vr-bg" id="vr-bg-container"></div>
|
|
- <div id="player"></div>
|
|
|
|
|
|
+ <div id="playersmall"></div>
|
|
<dropdown :is-open="isOpen" ref="dropdown">
|
|
<dropdown :is-open="isOpen" ref="dropdown">
|
|
<template v-slot:table>
|
|
<template v-slot:table>
|
|
<table-component
|
|
<table-component
|
|
@@ -758,9 +758,11 @@ export default {
|
|
orderkey: "id",
|
|
orderkey: "id",
|
|
},
|
|
},
|
|
benchImgUpper: "",
|
|
benchImgUpper: "",
|
|
|
|
+ benchImgUpperMap: {},
|
|
currentScreen: "upper",
|
|
currentScreen: "upper",
|
|
benchDisplayLowerVisible: false,
|
|
benchDisplayLowerVisible: false,
|
|
benchImgLower: "",
|
|
benchImgLower: "",
|
|
|
|
+ benchImgLowerMap: {},
|
|
isPlaying: false,
|
|
isPlaying: false,
|
|
isRecording: false,
|
|
isRecording: false,
|
|
loopSendAudioTime: null,
|
|
loopSendAudioTime: null,
|
|
@@ -838,7 +840,7 @@ export default {
|
|
}),
|
|
}),
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- uwbMain(window.innerWidth, window.innerHeight, "panorama");
|
|
|
|
|
|
+ uwbMain('player', window.innerWidth, window.innerHeight, "panorama");
|
|
ws.open().then((res) => {
|
|
ws.open().then((res) => {
|
|
// console.log("res", res);
|
|
// console.log("res", res);
|
|
});
|
|
});
|
|
@@ -887,11 +889,6 @@ export default {
|
|
},
|
|
},
|
|
async mounted() {
|
|
async mounted() {
|
|
that = this;
|
|
that = this;
|
|
- let mapDom = document.getElementsByClassName("ordinary-map")[0];
|
|
|
|
- let style = getComputedStyle(mapDom);
|
|
|
|
- let width = parseFloat(style.width);
|
|
|
|
- let height = parseFloat(style.height);
|
|
|
|
- // uwbMain(width, height, "floorplan");
|
|
|
|
//this.getBenchList();
|
|
//this.getBenchList();
|
|
console.log(this.benchList, "benchList");
|
|
console.log(this.benchList, "benchList");
|
|
this.tabs[0].list = this.benchList;
|
|
this.tabs[0].list = this.benchList;
|
|
@@ -1051,32 +1048,6 @@ export default {
|
|
clearMyInterval(intervalId) {
|
|
clearMyInterval(intervalId) {
|
|
delete this.timerIdMap[intervalId]
|
|
delete this.timerIdMap[intervalId]
|
|
},
|
|
},
|
|
- loadBench() {
|
|
|
|
- const bench = new FBXLoader();
|
|
|
|
- bench.load("../models/flower.gltf", function (fbx) {
|
|
|
|
- console.log("控制台查看加载gltf文件返回的对象结构", fbx);
|
|
|
|
- //fbx.translateY(0);
|
|
|
|
- //fbx.translateY(2);
|
|
|
|
- //fbx.translateY(0);
|
|
|
|
- fbx.setScale(100, 100, 100)
|
|
|
|
- fbx.geometry = new THREE.ConeGeometry(radius, height, segments);
|
|
|
|
- fbx.material = new THREE.MeshBasicMaterial({color: color,opacity:0.2,transparent: true,});;
|
|
|
|
- cone.add(fbx)
|
|
|
|
- //cone.add(fbx)
|
|
|
|
-
|
|
|
|
- meshes[0].push(fbx);
|
|
|
|
- sdkInstance.sceneRenderer.scene.add(fbx.scene)
|
|
|
|
- console.log("meshes", fbx);
|
|
|
|
-
|
|
|
|
- fbx.scene.traverse((child) => {
|
|
|
|
- //if (child instanceof THREE.Mesh)
|
|
|
|
- {
|
|
|
|
- console.log("Mesh", child);
|
|
|
|
- meshes[0].push(child);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
turnToNextManualCase() {},
|
|
turnToNextManualCase() {},
|
|
clickBackToTaskList() {
|
|
clickBackToTaskList() {
|
|
this.isShowPlanList = false;
|
|
this.isShowPlanList = false;
|
|
@@ -2466,9 +2437,11 @@ export default {
|
|
func();
|
|
func();
|
|
if (screenType == 1) {
|
|
if (screenType == 1) {
|
|
self.benchImgUpper = "data:image/png;base64," + res.data.data;
|
|
self.benchImgUpper = "data:image/png;base64," + res.data.data;
|
|
|
|
+ self.benchImgUpperMap[benchId] = "data:image/png;base64," + res.data.data;
|
|
bus.emit("benchImgChange", { benchImgUpper: self.benchImgUpper });
|
|
bus.emit("benchImgChange", { benchImgUpper: self.benchImgUpper });
|
|
} else {
|
|
} else {
|
|
self.benchImgLower = "data:image/png;base64," + res.data.data;
|
|
self.benchImgLower = "data:image/png;base64," + res.data.data;
|
|
|
|
+ self.benchImgLowerMap[benchId] = "data:image/png;base64," + res.data.data;
|
|
bus.emit("benchImgChange", { benchImgLower: self.benchImgLower });
|
|
bus.emit("benchImgChange", { benchImgLower: self.benchImgLower });
|
|
}
|
|
}
|
|
// let screen = res.data.screen_type;
|
|
// let screen = res.data.screen_type;
|
|
@@ -2484,6 +2457,8 @@ export default {
|
|
}, 500);
|
|
}, 500);
|
|
},
|
|
},
|
|
handleDblClickImg(benchId) {
|
|
handleDblClickImg(benchId) {
|
|
|
|
+ this.benchImgUpper = this.benchImgUpperMap[benchId];
|
|
|
|
+ this.benchImgLower = this.benchImgLowerMap[benchId];
|
|
this.$store.dispatch('common/setSquareStatus', false)
|
|
this.$store.dispatch('common/setSquareStatus', false)
|
|
},
|
|
},
|
|
handleClickImg(benchId, indexParam) {
|
|
handleClickImg(benchId, indexParam) {
|
|
@@ -2597,6 +2572,20 @@ export default {
|
|
}, 300);
|
|
}, 300);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ isOpen3d(newValue, oldValue) {
|
|
|
|
+ if (!newValue) {
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ let mapDom = document.getElementsByClassName("ordinary-map")[0];
|
|
|
|
+ let style = getComputedStyle(mapDom);
|
|
|
|
+ let width = parseFloat(style.width);
|
|
|
|
+ let height = parseFloat(style.height);
|
|
|
|
+ uwbMain('playersmall', width, height, "floorplan");
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ uwbMain('player', window.innerWidth, window.innerHeight, "panorama");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|