|
@@ -55,15 +55,17 @@
|
|
|
|
|
|
<div class="split-screen-btn">
|
|
<div class="split-screen-btn">
|
|
<a-dropdown @select="handleTypeChange">
|
|
<a-dropdown @select="handleTypeChange">
|
|
- <a-button size="mini">
|
|
|
|
- <template #icon>
|
|
|
|
- <Icon
|
|
|
|
- icon="stash:arrows-switch"
|
|
|
|
- width="25"
|
|
|
|
- height="25"
|
|
|
|
- />
|
|
|
|
- </template>
|
|
|
|
- </a-button>
|
|
|
|
|
|
+ <a-tooltip :content="$t('previewList.msqh')">
|
|
|
|
+ <a-button>
|
|
|
|
+ <template #icon>
|
|
|
|
+ <Icon
|
|
|
|
+ icon="stash:arrows-switch"
|
|
|
|
+ width="25"
|
|
|
|
+ height="25"
|
|
|
|
+ />
|
|
|
|
+ </template>
|
|
|
|
+ </a-button>
|
|
|
|
+ </a-tooltip>
|
|
<template #content>
|
|
<template #content>
|
|
<a-doption
|
|
<a-doption
|
|
v-for="item in typeList"
|
|
v-for="item in typeList"
|
|
@@ -75,15 +77,18 @@
|
|
</template>
|
|
</template>
|
|
</a-dropdown>
|
|
</a-dropdown>
|
|
<a-dropdown @select="handleRadioChange">
|
|
<a-dropdown @select="handleRadioChange">
|
|
- <a-button size="mini">
|
|
|
|
- <template #icon>
|
|
|
|
- <Icon
|
|
|
|
- icon="carbon:split-screen"
|
|
|
|
- width="20"
|
|
|
|
- height="20"
|
|
|
|
- />
|
|
|
|
- </template>
|
|
|
|
- </a-button>
|
|
|
|
|
|
+ <a-tooltip :content="$t('previewList.fp')">
|
|
|
|
+ <a-button>
|
|
|
|
+ <template #icon>
|
|
|
|
+ <Icon
|
|
|
|
+ icon="carbon:split-screen"
|
|
|
|
+ width="20"
|
|
|
|
+ height="20"
|
|
|
|
+ />
|
|
|
|
+ </template>
|
|
|
|
+ </a-button>
|
|
|
|
+ </a-tooltip>
|
|
|
|
+
|
|
<template #content>
|
|
<template #content>
|
|
<a-doption
|
|
<a-doption
|
|
v-for="item in btnList"
|
|
v-for="item in btnList"
|
|
@@ -157,22 +162,6 @@
|
|
</template>
|
|
</template>
|
|
</a-button>
|
|
</a-button>
|
|
</a-tooltip>
|
|
</a-tooltip>
|
|
- <!-- 对讲 -->
|
|
|
|
- <a-tooltip :content="$t('previewList.dj')">
|
|
|
|
- <a-button
|
|
|
|
- v-if="activeObj[i].isCloseBtn"
|
|
|
|
- type="text"
|
|
|
|
- size="mini"
|
|
|
|
- >
|
|
|
|
- <template #icon>
|
|
|
|
- <Icon
|
|
|
|
- icon="material-symbols:record-voice-over-outline"
|
|
|
|
- width="22"
|
|
|
|
- height="22"
|
|
|
|
- />
|
|
|
|
- </template>
|
|
|
|
- </a-button>
|
|
|
|
- </a-tooltip>
|
|
|
|
<!-- 关闭 -->
|
|
<!-- 关闭 -->
|
|
<a-tooltip :content="$t('previewList.close')">
|
|
<a-tooltip :content="$t('previewList.close')">
|
|
<a-button
|
|
<a-button
|
|
@@ -195,7 +184,10 @@
|
|
<canvas
|
|
<canvas
|
|
v-if="activeObj[i].isReset"
|
|
v-if="activeObj[i].isReset"
|
|
:id="'video-canvas-' + i"
|
|
:id="'video-canvas-' + i"
|
|
- style="width: 100%"
|
|
|
|
|
|
+ :style="{
|
|
|
|
+ width: '100%',
|
|
|
|
+ transform: `rotateZ(${rotateZ}deg)`,
|
|
|
|
+ }"
|
|
></canvas>
|
|
></canvas>
|
|
</div>
|
|
</div>
|
|
</a-grid-item>
|
|
</a-grid-item>
|
|
@@ -262,22 +254,6 @@
|
|
</template>
|
|
</template>
|
|
</a-button>
|
|
</a-button>
|
|
</a-tooltip>
|
|
</a-tooltip>
|
|
- <!-- 对讲 -->
|
|
|
|
- <a-tooltip :content="$t('previewList.dj')">
|
|
|
|
- <template #icon>
|
|
|
|
- <a-button
|
|
|
|
- v-if="activeObj[i].isCloseBtn"
|
|
|
|
- type="text"
|
|
|
|
- size="mini"
|
|
|
|
- >
|
|
|
|
- <Icon
|
|
|
|
- icon="material-symbols:record-voice-over-outline"
|
|
|
|
- width="22"
|
|
|
|
- height="22"
|
|
|
|
- />
|
|
|
|
- </a-button>
|
|
|
|
- </template>
|
|
|
|
- </a-tooltip>
|
|
|
|
<!-- 关闭 -->
|
|
<!-- 关闭 -->
|
|
<a-tooltip :content="$t('previewList.close')">
|
|
<a-tooltip :content="$t('previewList.close')">
|
|
<a-button
|
|
<a-button
|
|
@@ -438,17 +414,21 @@
|
|
nextTick,
|
|
nextTick,
|
|
reactive,
|
|
reactive,
|
|
defineAsyncComponent,
|
|
defineAsyncComponent,
|
|
|
|
+ onUnmounted,
|
|
} from 'vue';
|
|
} from 'vue';
|
|
import { useI18n } from 'vue-i18n';
|
|
import { useI18n } from 'vue-i18n';
|
|
import { queryPolicyList, PolicyRecord, PolicyParams } from '@/api/list';
|
|
import { queryPolicyList, PolicyRecord, PolicyParams } from '@/api/list';
|
|
- import { getPreview } from '@/api/system';
|
|
|
|
|
|
+ import { getCropFullInfo } from '@/api/system';
|
|
import { Message } from '@arco-design/web-vue';
|
|
import { Message } from '@arco-design/web-vue';
|
|
|
|
+ import { useDebounceFn } from '@vueuse/core';
|
|
|
|
|
|
|
|
+ const resizeArr: any[] = [];
|
|
const { loading, setLoading } = useLoading(true);
|
|
const { loading, setLoading } = useLoading(true);
|
|
const app = useAppStore();
|
|
const app = useAppStore();
|
|
const comName = ref('index');
|
|
const comName = ref('index');
|
|
const comNameList = ['index'];
|
|
const comNameList = ['index'];
|
|
const comData: any = ref({});
|
|
const comData: any = ref({});
|
|
|
|
+ const rotateZ = ref(0);
|
|
|
|
|
|
const PreviewInfo = defineAsyncComponent(
|
|
const PreviewInfo = defineAsyncComponent(
|
|
() => import('./children/preview-info.vue')
|
|
() => import('./children/preview-info.vue')
|
|
@@ -623,6 +603,7 @@
|
|
const res = Array.isArray(data) ? data : [];
|
|
const res = Array.isArray(data) ? data : [];
|
|
originTreeData.value = res.map((item: TreeNodeData & PolicyRecord) => ({
|
|
originTreeData.value = res.map((item: TreeNodeData & PolicyRecord) => ({
|
|
key: item.id,
|
|
key: item.id,
|
|
|
|
+ id: item.id,
|
|
title: item.alias,
|
|
title: item.alias,
|
|
port: item.port,
|
|
port: item.port,
|
|
status: item.status,
|
|
status: item.status,
|
|
@@ -655,6 +636,7 @@
|
|
activeObj.value[v].isReset = false;
|
|
activeObj.value[v].isReset = false;
|
|
activeObj.value[v].loading = false;
|
|
activeObj.value[v].loading = false;
|
|
activeObj.value[v].workerObj.close();
|
|
activeObj.value[v].workerObj.close();
|
|
|
|
+ resizeArr.splice(v, 1);
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
activeObj.value[v].isSignal = false;
|
|
activeObj.value[v].isSignal = false;
|
|
activeObj.value[v].workerObj = null;
|
|
activeObj.value[v].workerObj = null;
|
|
@@ -674,7 +656,7 @@
|
|
}
|
|
}
|
|
): void => {
|
|
): void => {
|
|
try {
|
|
try {
|
|
- if ((data?.node as PolicyRecord).status === 'Offline') {
|
|
|
|
|
|
+ if ((data.node as PolicyRecord).status === 'Offline') {
|
|
Message.warning({
|
|
Message.warning({
|
|
content: t('previewList.tip'),
|
|
content: t('previewList.tip'),
|
|
duration: 5 * 1000,
|
|
duration: 5 * 1000,
|
|
@@ -686,17 +668,10 @@
|
|
const ao = activeObj.value[screenActive.value];
|
|
const ao = activeObj.value[screenActive.value];
|
|
ao.isReset = true;
|
|
ao.isReset = true;
|
|
ao.loading = true;
|
|
ao.loading = true;
|
|
- const res = await getPreview(
|
|
|
|
- `${app.ip}:${(data?.node as PolicyRecord).port}/`,
|
|
|
|
- {
|
|
|
|
- type: 0,
|
|
|
|
- lowRate: 0,
|
|
|
|
- }
|
|
|
|
- );
|
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
- const videoUrl = `wss://${(app as any).ip.split('//')[1]}:${
|
|
|
|
- (data?.node as PolicyRecord).port
|
|
|
|
- }/VideoShow/Common?UUID=${res.data.wss}`;
|
|
|
|
|
|
+ const videoUrl = `${app.ip}/VideoShow/Preview/Full/Main?GUID=${
|
|
|
|
+ (data.node as PolicyRecord).id
|
|
|
|
+ }`;
|
|
ao.workerObj = useWorker(
|
|
ao.workerObj = useWorker(
|
|
videoUrl,
|
|
videoUrl,
|
|
`#video-canvas-${screenActive.value}`,
|
|
`#video-canvas-${screenActive.value}`,
|
|
@@ -704,6 +679,25 @@
|
|
() => {
|
|
() => {
|
|
ao.loading = false;
|
|
ao.loading = false;
|
|
ao.isSignal = true;
|
|
ao.isSignal = true;
|
|
|
|
+
|
|
|
|
+ getCropFullInfo({ GUID: (data.node as PolicyRecord).id }).then(
|
|
|
|
+ (res) => {
|
|
|
|
+ rotateZ.value = res.data.Rotate;
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ const vc: any = document.querySelector(
|
|
|
|
+ `#video-canvas-${screenActive.value}`
|
|
|
|
+ );
|
|
|
|
+ resizeArr.push(vc);
|
|
|
|
+ if (vc.offsetWidth > vc.parentNode.offsetWidth) {
|
|
|
|
+ vc.style.width = '100%';
|
|
|
|
+ vc.style.height = 'auto';
|
|
|
|
+ } else {
|
|
|
|
+ vc.style.height = '100%';
|
|
|
|
+ vc.style.width = 'auto';
|
|
|
|
+ }
|
|
|
|
+ }, 50);
|
|
}
|
|
}
|
|
);
|
|
);
|
|
});
|
|
});
|
|
@@ -786,6 +780,22 @@
|
|
},
|
|
},
|
|
{ immediate: true }
|
|
{ immediate: true }
|
|
);
|
|
);
|
|
|
|
+
|
|
|
|
+ const resize = useDebounceFn(() => {
|
|
|
|
+ resizeArr.forEach((vc) => {
|
|
|
|
+ if (vc.offsetWidth > vc.parentNode.offsetWidth) {
|
|
|
|
+ vc.style.width = '100%';
|
|
|
|
+ vc.style.height = 'auto';
|
|
|
|
+ } else {
|
|
|
|
+ vc.style.height = '100%';
|
|
|
|
+ vc.style.width = 'auto';
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }, 200);
|
|
|
|
+ window.addEventListener('resize', resize);
|
|
|
|
+ onUnmounted(() => {
|
|
|
|
+ window.removeEventListener('resize', resize);
|
|
|
|
+ });
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
@@ -795,8 +805,8 @@
|
|
.split-screen-btn {
|
|
.split-screen-btn {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
justify-content: flex-end;
|
|
- gap: 15px;
|
|
|
|
- padding-bottom: 15px;
|
|
|
|
|
|
+ gap: 4px;
|
|
|
|
+ padding-bottom: 8px;
|
|
}
|
|
}
|
|
.general-card {
|
|
.general-card {
|
|
height: calc(100% - 60px);
|
|
height: calc(100% - 60px);
|