|
@@ -1,16 +1,16 @@
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import { computed, onMounted, onUnmounted, ref } from "vue";
|
|
import { computed, onMounted, onUnmounted, ref } from "vue";
|
|
|
|
+import { deepClone } from "@meta2d/core";
|
|
import { monitorRoomData } from "./pens/monitorRoom";
|
|
import { monitorRoomData } from "./pens/monitorRoom";
|
|
import { monitorNoRoomData } from "./pens/monitorNoRoom";
|
|
import { monitorNoRoomData } from "./pens/monitorNoRoom";
|
|
-import { deepClone } from "@meta2d/core";
|
|
|
|
|
|
+import { monitorPointData } from "./pens/monitorPoint";
|
|
|
|
|
|
type AssetsType = "space" | "monitor";
|
|
type AssetsType = "space" | "monitor";
|
|
|
|
|
|
const activeAssets = ref<AssetsType>("space");
|
|
const activeAssets = ref<AssetsType>("space");
|
|
const monitorPoints = ref([
|
|
const monitorPoints = ref([
|
|
{ name: "3F-R1", disabled: true },
|
|
{ name: "3F-R1", disabled: true },
|
|
- { name: "3F-R2" },
|
|
|
|
- { name: "3F-R3" },
|
|
|
|
|
|
+ { name: "3F-R2", data: monitorPointData },
|
|
]);
|
|
]);
|
|
|
|
|
|
const roomList = [
|
|
const roomList = [
|
|
@@ -104,6 +104,9 @@ const assetsChange = () => {
|
|
v-for="(item, index) in monitorPoints"
|
|
v-for="(item, index) in monitorPoints"
|
|
:key="index"
|
|
:key="index"
|
|
:draggable="!item.disabled"
|
|
:draggable="!item.disabled"
|
|
|
|
+ @dragstart="handleDragStart(item)"
|
|
|
|
+ @click.stop="handleDragStart(item)"
|
|
|
|
+ @touchstart.passive="handleDragStart(item)"
|
|
>
|
|
>
|
|
<div class="monitor-item-circle"></div>
|
|
<div class="monitor-item-circle"></div>
|
|
<div class="monitor-item-title">{{ item.name }}</div>
|
|
<div class="monitor-item-title">{{ item.name }}</div>
|