|
@@ -18,7 +18,10 @@
|
|
|
</div>
|
|
|
|
|
|
<Dropdown placement="top">
|
|
|
- <div class="show-setting strengthen"><span>显示设置</span> <DownOutlined /></div>
|
|
|
+ <div class="show-setting strengthen">
|
|
|
+ <span>显示设置</span>
|
|
|
+ <DownOutlined />
|
|
|
+ </div>
|
|
|
<template #overlay>
|
|
|
<Menu>
|
|
|
<menu-item v-for="option in showOptions">
|
|
@@ -121,7 +124,7 @@ import {
|
|
|
} from "@/store";
|
|
|
import { Dialog } from "bill/index";
|
|
|
import { useViewStack } from "@/hook";
|
|
|
-import { computed, nextTick, onUnmounted, ref, watch, watchEffect } from "vue";
|
|
|
+import { computed, nextTick, onUnmounted, Ref, ref, watch, watchEffect } from "vue";
|
|
|
import {
|
|
|
showRightPanoStack,
|
|
|
showLeftCtrlPanoStack,
|
|
@@ -145,14 +148,24 @@ const paths = ref<GuidePaths>(getGuidePaths(props.data));
|
|
|
const current = ref<GuidePath>(paths.value[0]);
|
|
|
|
|
|
const showOptions = [
|
|
|
- { text: "标签", key: "tagging" },
|
|
|
- { text: "监控", key: "video" },
|
|
|
- { text: "路径", key: "path" },
|
|
|
- { text: "测量", key: "measure" },
|
|
|
+ { text: "标签", key: "showTagging" },
|
|
|
+ { text: "监控", key: "showVideo" },
|
|
|
+ { text: "路径", key: "showPath" },
|
|
|
+ { text: "测量", key: "showMeasure" },
|
|
|
];
|
|
|
const show = useSelects(ref(showOptions.map((item) => ({ id: item.key }))));
|
|
|
+const showAttrib = showOptions.reduce((t, c) => {
|
|
|
+ t[c.key] = computed(() => show.include(c.key));
|
|
|
+ return t;
|
|
|
+}, {} as Record<string, Ref<boolean>>);
|
|
|
show.all.value = true;
|
|
|
|
|
|
+watchEffect(() => {
|
|
|
+ for (const key in showAttrib) {
|
|
|
+ (props.data as any)[key] = showAttrib[key].value;
|
|
|
+ }
|
|
|
+});
|
|
|
+
|
|
|
const updatePathInfo = (index: number, calcInfo: CalcPathProps[1]) => {
|
|
|
const info = sdk.calcPathInfo(paths.value.slice(index, index + 2) as any, calcInfo);
|
|
|
Object.assign(paths.value[index], info);
|
|
@@ -164,9 +177,9 @@ useViewStack(() => {
|
|
|
showLeftCtrlPanoStack.push(ref(false)),
|
|
|
showLeftPanoStack.push(ref(false)),
|
|
|
showRightCtrlPanoStack.push(ref(false)),
|
|
|
- showTaggingsStack.push(computed(() => show.include("tagging"))),
|
|
|
- showPathsStack.push(computed(() => show.include("path"))),
|
|
|
- showMeasuresStack.push(computed(() => show.include("measure"))),
|
|
|
+ showTaggingsStack.push(showAttrib.showTagging),
|
|
|
+ showPathsStack.push(showAttrib.showPath),
|
|
|
+ showMeasuresStack.push(showAttrib.showMeasure),
|
|
|
]);
|
|
|
});
|
|
|
|
|
@@ -243,9 +256,14 @@ const play = async () => {
|
|
|
} else {
|
|
|
changeCurrent(paths.value[0]);
|
|
|
await asyncTimeout(400);
|
|
|
- playSceneGuide(paths.value, (index) => {
|
|
|
- current.value = paths.value[index - 1];
|
|
|
- });
|
|
|
+ playSceneGuide(
|
|
|
+ paths.value,
|
|
|
+ (index) => {
|
|
|
+ current.value = paths.value[index - 1];
|
|
|
+ },
|
|
|
+ false,
|
|
|
+ props.data
|
|
|
+ );
|
|
|
}
|
|
|
};
|
|
|
|