|
@@ -1,12 +1,12 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div class="container" v-show="isOpen3d">
|
|
|
+ <div class="container" v-if="isOpen3d">
|
|
|
<SearchBarMain/>
|
|
|
<div class="vr-bg" id="vr-bg-container"></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" />
|
|
|
</div>
|
|
|
- <div class="ordinary-container" v-show="!isOpen3d" @click="onBlur">
|
|
|
+ <div class="ordinary-container" v-else @click="onBlur">
|
|
|
<div class="ordinary-left">
|
|
|
<SearchBar
|
|
|
class="search-container"
|
|
@@ -57,7 +57,7 @@
|
|
|
<div class="ordinary-map" id="ordinary-map">
|
|
|
<!-- <img src="../../images/map.png" /> -->
|
|
|
<div class="vr-bg" id="vr-bg-container"></div>
|
|
|
- <div id="player"></div>
|
|
|
+ <div id="playersmall"></div>
|
|
|
<dropdown :is-open="isOpen" ref="dropdown">
|
|
|
<template v-slot:table>
|
|
|
<table-component
|
|
@@ -758,9 +758,11 @@ export default {
|
|
|
orderkey: "id",
|
|
|
},
|
|
|
benchImgUpper: "",
|
|
|
+ benchImgUpperMap: {},
|
|
|
currentScreen: "upper",
|
|
|
benchDisplayLowerVisible: false,
|
|
|
benchImgLower: "",
|
|
|
+ benchImgLowerMap: {},
|
|
|
isPlaying: false,
|
|
|
isRecording: false,
|
|
|
loopSendAudioTime: null,
|
|
@@ -838,7 +840,7 @@ export default {
|
|
|
}),
|
|
|
},
|
|
|
created() {
|
|
|
- uwbMain(window.innerWidth, window.innerHeight, "panorama");
|
|
|
+ uwbMain('player', window.innerWidth, window.innerHeight, "panorama");
|
|
|
ws.open().then((res) => {
|
|
|
// console.log("res", res);
|
|
|
});
|
|
@@ -887,11 +889,6 @@ export default {
|
|
|
},
|
|
|
async mounted() {
|
|
|
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();
|
|
|
console.log(this.benchList, "benchList");
|
|
|
this.tabs[0].list = this.benchList;
|
|
@@ -1051,32 +1048,6 @@ export default {
|
|
|
clearMyInterval(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() {},
|
|
|
clickBackToTaskList() {
|
|
|
this.isShowPlanList = false;
|
|
@@ -2466,9 +2437,11 @@ export default {
|
|
|
func();
|
|
|
if (screenType == 1) {
|
|
|
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 });
|
|
|
} else {
|
|
|
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 });
|
|
|
}
|
|
|
// let screen = res.data.screen_type;
|
|
@@ -2484,6 +2457,8 @@ export default {
|
|
|
}, 500);
|
|
|
},
|
|
|
handleDblClickImg(benchId) {
|
|
|
+ this.benchImgUpper = this.benchImgUpperMap[benchId];
|
|
|
+ this.benchImgLower = this.benchImgLowerMap[benchId];
|
|
|
this.$store.dispatch('common/setSquareStatus', false)
|
|
|
},
|
|
|
handleClickImg(benchId, indexParam) {
|
|
@@ -2597,6 +2572,20 @@ export default {
|
|
|
}, 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>
|