feat 杀死报警后直播进程

This commit is contained in:
Ironsp
2026-07-02 14:44:25 +08:00
parent 603c82939b
commit 55ff3d7777
2 changed files with 10 additions and 2 deletions

View File

@@ -53,6 +53,7 @@ import { initHls, destroyHls } from '@/utils/video';
import { onBeforeRouteLeave } from 'vue-router';
import { useWarningListStore } from '@/store/modules/warnningList';
import type { WarningListResult } from '@/api/WarningList/types';
import { addDemo } from '@/api/video/index';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -109,7 +110,9 @@ const parseNoticeItem = (notice: any) => {
};
//查看画面
const currentDeviceId = ref<string | number>();
const handleSee = async (row: any) => {
currentDeviceId.value = row?.deviceId;
const videoId = row?.deviceId;
console.log('查看画面', row, 'deviceId', videoId);
if (!videoId) {
@@ -127,6 +130,13 @@ const handleSee = async (row: any) => {
};
const handleMonitorDialogClose = async (done: () => void) => {
try {
addDemo(currentDeviceId.value as string).then(() => {
console.log('关闭视频111111');
});
} catch (error) {
console.log('关闭视频22222222', error);
}
// 卸载 Hls 与清理 video
destroyHls(monitorVideoRef);
done();

View File

@@ -604,8 +604,6 @@ const cleanupVisibilityChange = () => {
};
const handleMonitorDialogClose = (done: () => void) => {
console.log('idddddddddddd', form.value.id);
try {
addDemo(form.value.id).then(() => {
console.log('关闭视频111111');