|
@@ -16,6 +16,24 @@
|
|
|
添加视角
|
|
|
</ui-button>
|
|
|
</div>
|
|
|
+
|
|
|
+ <Dropdown placement="top">
|
|
|
+ <div class="show-setting strengthen"><span>显示设置</span> <DownOutlined /></div>
|
|
|
+ <template #overlay>
|
|
|
+ <Menu>
|
|
|
+ <menu-item v-for="option in showOptions">
|
|
|
+ <ui-input
|
|
|
+ @click.stop
|
|
|
+ type="checkbox"
|
|
|
+ :modelValue="show.include(option.key)"
|
|
|
+ @update:modelValue="(s: boolean) => show.updateSelectId(option.key, s)"
|
|
|
+ :label="option.text"
|
|
|
+ />
|
|
|
+ </menu-item>
|
|
|
+ </Menu>
|
|
|
+ </template>
|
|
|
+ </Dropdown>
|
|
|
+
|
|
|
<div class="info" v-if="paths.length">
|
|
|
<div class="meta">
|
|
|
<div class="length">
|
|
@@ -30,6 +48,7 @@
|
|
|
<span>清空画面</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <attachAnimation :current="current" :paths="paths" />
|
|
|
|
|
|
<div class="photo-list" ref="listVm">
|
|
|
<template v-for="(path, i) in paths" :key="path.id">
|
|
@@ -81,6 +100,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
+import attachAnimation from "./attach-animation.vue";
|
|
|
+import { Dropdown, Menu, MenuItem } from "ant-design-vue";
|
|
|
import { loadPack, togetherCallback, getFileUrl, asyncTimeout } from "@/utils";
|
|
|
import {
|
|
|
sdk,
|
|
@@ -100,7 +121,7 @@ import {
|
|
|
} from "@/store";
|
|
|
import { Dialog } from "bill/index";
|
|
|
import { useViewStack } from "@/hook";
|
|
|
-import { nextTick, onUnmounted, ref, watch, watchEffect } from "vue";
|
|
|
+import { computed, nextTick, onUnmounted, ref, watch, watchEffect } from "vue";
|
|
|
import {
|
|
|
showRightPanoStack,
|
|
|
showLeftCtrlPanoStack,
|
|
@@ -108,28 +129,46 @@ import {
|
|
|
showRightCtrlPanoStack,
|
|
|
getResource,
|
|
|
custom,
|
|
|
+ showTaggingsStack,
|
|
|
+ showPathsStack,
|
|
|
+ showMeasuresStack,
|
|
|
} from "@/env";
|
|
|
|
|
|
import type { Guide, GuidePaths, GuidePath } from "@/store";
|
|
|
import type { CalcPathProps } from "@/sdk";
|
|
|
+import { DownOutlined } from "@ant-design/icons-vue";
|
|
|
+import { useSelects } from "@/hook/ids";
|
|
|
+import { mergeFuns } from "@/components/drawing/hook";
|
|
|
|
|
|
const props = defineProps<{ data: Guide }>();
|
|
|
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" },
|
|
|
+];
|
|
|
+const show = useSelects(ref(showOptions.map((item) => ({ id: item.key }))));
|
|
|
+show.all.value = true;
|
|
|
+
|
|
|
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);
|
|
|
};
|
|
|
|
|
|
-useViewStack(() =>
|
|
|
- togetherCallback([
|
|
|
+useViewStack(() => {
|
|
|
+ return togetherCallback([
|
|
|
showRightPanoStack.push(ref(false)),
|
|
|
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"))),
|
|
|
+ ]);
|
|
|
+});
|
|
|
|
|
|
useAutoSetMode(
|
|
|
paths,
|
|
@@ -265,6 +304,21 @@ onUnmounted(() => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .show-setting {
|
|
|
+ position: absolute;
|
|
|
+ right: 20px;
|
|
|
+ bottom: 100%;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ width: 160px;
|
|
|
+ background: rgba(27, 27, 28, 0.9);
|
|
|
+ border-radius: 4px;
|
|
|
+ height: 34px;
|
|
|
+ display: flex;
|
|
|
+ padding: 8px;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
+
|
|
|
.meta {
|
|
|
font-size: 12px;
|
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.16);
|
|
@@ -279,6 +333,7 @@ onUnmounted(() => {
|
|
|
.clear {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
+
|
|
|
.icon {
|
|
|
font-size: 1.4em;
|
|
|
margin-right: 5px;
|
|
@@ -307,12 +362,14 @@ onUnmounted(() => {
|
|
|
top: 50%;
|
|
|
transform: translateY(-50%);
|
|
|
}
|
|
|
+
|
|
|
&::before {
|
|
|
left: 0;
|
|
|
right: 7px;
|
|
|
height: 2px;
|
|
|
background-color: currentColor;
|
|
|
}
|
|
|
+
|
|
|
&::after {
|
|
|
right: -5px;
|
|
|
width: 0;
|
|
@@ -355,6 +412,7 @@ onUnmounted(() => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.un-video {
|
|
|
height: 100px;
|
|
|
line-height: 100px;
|
|
@@ -369,16 +427,20 @@ onUnmounted(() => {
|
|
|
.ui-input .text input {
|
|
|
padding: 8px 4px;
|
|
|
}
|
|
|
+
|
|
|
.ui-input .text {
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
+
|
|
|
.ui-input .text.suffix .retouch {
|
|
|
right: 4px;
|
|
|
}
|
|
|
+
|
|
|
.ui-input .text.suffix input {
|
|
|
padding-right: 28px;
|
|
|
text-align: right;
|
|
|
}
|
|
|
+
|
|
|
.ui-input.time .text.suffix input {
|
|
|
padding-right: 18px;
|
|
|
text-align: right;
|