|
@@ -194,9 +194,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import {ref, onMounted, reactive, computed} from 'vue';
|
|
|
-import {BorderBox1,BorderBox2,BorderBox8,Decoration5 } from '@dataview/datav-vue3';
|
|
|
-import {ElContainer, ElButton, ElMessage, ElMessageBox} from 'element-plus';
|
|
|
+import {computed, onMounted, reactive, ref} from 'vue';
|
|
|
+import {BorderBox1, BorderBox8, Decoration5} from '@dataview/datav-vue3';
|
|
|
+import {ElButton, ElContainer, ElMessage, ElMessageBox} from 'element-plus';
|
|
|
import {
|
|
|
deviceBatchSwitch,
|
|
|
deviceLoopSwitch,
|
|
@@ -208,6 +208,9 @@ import {
|
|
|
} from "@/api/device.js";
|
|
|
import DeviceReplayTimeSet from "@/comm/deviceReplayTimeSet.vue";
|
|
|
import DeviceLoopReplayTimeSet from "@/comm/deviceLoopReplayTimeSet.vue";
|
|
|
+import * as THREE from 'three';
|
|
|
+import {OrbitControls} from 'three/addons/controls/OrbitControls.js';
|
|
|
+import {GLTFLoader} from "three/addons/loaders/GLTFLoader.js";
|
|
|
|
|
|
const buttons = ref([
|
|
|
{ text: '生活区', initialLeft: 500, initialTop: 1800 },
|
|
@@ -513,10 +516,6 @@ onMounted(() => {
|
|
|
});
|
|
|
|
|
|
// 3d图
|
|
|
-
|
|
|
-import * as THREE from 'three';
|
|
|
-import {OrbitControls} from 'three/addons/controls/OrbitControls.js';
|
|
|
-import {GLTFLoader} from "three/addons/loaders/GLTFLoader.js";
|
|
|
// 创建场景
|
|
|
const scene = new THREE.Scene();
|
|
|
|
|
@@ -571,7 +570,7 @@ function animate() {
|
|
|
|
|
|
// 鼠标点击事件处理
|
|
|
function onDocumentMouseDown(event) {
|
|
|
- event.preventDefault();
|
|
|
+ // event.preventDefault();
|
|
|
|
|
|
// 将鼠标位置归一化到 -1 到 1 的范围内
|
|
|
mouse.x = (event.clientX / window.innerWidth) * 2 - 1;
|