|
@@ -8,7 +8,7 @@
|
|
|
<template v-if="item.UUID">
|
|
|
<div :style="{ maxWidth: '100%', maxHeight: '100%', aspectRatio: 16 / 9 }">
|
|
|
<!-- 视频 -->
|
|
|
- <pub-video :new-class="'ps-video' + item.UUID" :is-scale="true" />
|
|
|
+ <pub-video :new-class="'part ps-video' + item.UUID" :is-scale="true" />
|
|
|
<!-- 工具面板 -->
|
|
|
<!-- <OperationPanel :op-class="'ps-video' + item.UUID" :uuid="item.UUID" /> -->
|
|
|
<!-- 加载 -->
|
|
@@ -31,14 +31,7 @@
|
|
|
<span style="animation: fadeIn 0.8s alternate infinite">请双击全景画面</span>
|
|
|
</div>
|
|
|
<!-- 操作按钮 -->
|
|
|
- <div
|
|
|
- class="panoramic-situation-main-btn-box"
|
|
|
- absolute
|
|
|
- top-1vw
|
|
|
- right-1vw
|
|
|
- flex
|
|
|
- flex-row-reverse
|
|
|
- >
|
|
|
+ <div class="panoramic-situation-main-btn-box" absolute top-1vw right-1vw flex flex-row-reverse>
|
|
|
<OperatingButton
|
|
|
@closeWorker="closeWorker"
|
|
|
@setPart="setPart"
|
|
@@ -50,6 +43,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
+import { v4 as uuidv4 } from 'uuid'
|
|
|
import OperationPanel from './OperationPanel.vue'
|
|
|
import OperatingButton from './OperatingButton.vue'
|
|
|
|
|
@@ -78,25 +72,23 @@ const item = reactive({
|
|
|
const workerObj = {}
|
|
|
const setPart = (newV, lowRate = 0, index) => {
|
|
|
item.loading = true
|
|
|
- const pub = (apiN, params, active) => {
|
|
|
- api[apiN](params).then((res) => {
|
|
|
- const url = `wss://${useSystem.ip.split('//')[1]}/VideoShow/Common?UUID=${res.wss}`
|
|
|
- closeWorker(active)
|
|
|
-
|
|
|
+ const pub = async (apiN, params, active) => {
|
|
|
+ const url = await useSystem.getVideoUrl({ X: params.x, Y: params.y }, 'Part')
|
|
|
+ closeWorker(active)
|
|
|
+ item.loading = true
|
|
|
+ nextTick(() => {
|
|
|
+ item.url = url
|
|
|
+ item.UUID = uuidv4()
|
|
|
+ item.PartCenterX = params.x
|
|
|
+ item.PartCenterY = params.y
|
|
|
+ item.lowRateV = params.lowRate
|
|
|
nextTick(() => {
|
|
|
- item.url = url
|
|
|
- item.UUID = res.wss
|
|
|
- item.PartCenterX = params.x
|
|
|
- item.PartCenterY = params.y
|
|
|
- item.lowRateV = params.lowRate
|
|
|
- nextTick(() => {
|
|
|
- workerObj[active] = useWorker(url, '.ps-video' + res.wss, () => {
|
|
|
- const partV = document.querySelector('.ps-video' + res.wss)
|
|
|
- useSystem.videoWorkerCache[route.name + active] = Object.assign({}, item)
|
|
|
- useWheel(document.querySelectorAll('.ps-part-box-item')[active], item)
|
|
|
- item.loading = false
|
|
|
- partV.style.transform = useSystem.canvasStyle[res.wss]
|
|
|
- })
|
|
|
+ workerObj[active] = useWorker(url, '.ps-video' + item.UUID, () => {
|
|
|
+ const partV = document.querySelector('.ps-video' + item.UUID)
|
|
|
+ useSystem.videoWorkerCache[route.name + active] = Object.assign({}, item)
|
|
|
+ // useWheel(document.querySelectorAll('.ps-part-box-item')[active], item)
|
|
|
+ item.loading = false
|
|
|
+ partV.style.transform = useSystem.canvasStyle[item.UUID]
|
|
|
})
|
|
|
})
|
|
|
})
|