|
@@ -222,7 +222,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
<!--设备详情弹窗-->
|
|
<!--设备详情弹窗-->
|
|
|
- <el-dialog v-model="viewDialog.visible" :title="viewDialog.title" width="1000px" style="height: 680px"
|
|
|
|
|
|
|
+ <el-dialog v-model="viewDialog.visible" :title="viewDialog.title" width="1050px" style="height: 680px"
|
|
|
append-to-body>
|
|
append-to-body>
|
|
|
<el-tabs v-model="activeName" style="height: 500px" @tab-click="handleClickTab">
|
|
<el-tabs v-model="activeName" style="height: 500px" @tab-click="handleClickTab">
|
|
|
<el-tab-pane label="设备详情" name="info">
|
|
<el-tab-pane label="设备详情" name="info">
|
|
@@ -377,7 +377,8 @@
|
|
|
<el-dialog v-model="watchDialog.visible" :title="watchDialog.title" width="900px" append-to-body
|
|
<el-dialog v-model="watchDialog.visible" :title="watchDialog.title" width="900px" append-to-body
|
|
|
@closed="onDialogClosed">
|
|
@closed="onDialogClosed">
|
|
|
<div v-if="watchDialog.visible" style="width: 100%; height: 500px">
|
|
<div v-if="watchDialog.visible" style="width: 100%; height: 500px">
|
|
|
- <video ref="flvPlayerRef" style="width: 100%; height: 100%" controls></video>
|
|
|
|
|
|
|
+<!-- <video ref="flvPlayerRef" style="width: 100%; height: 100%" controls></video>-->
|
|
|
|
|
+ <VideoPlayer :url="watchDialog.url" />
|
|
|
</div>
|
|
</div>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
<div class="dialog-footer">
|
|
@@ -493,7 +494,7 @@ import {
|
|
|
stopDevicePowerSchedule,
|
|
stopDevicePowerSchedule,
|
|
|
updateDevicePowerSchedule
|
|
updateDevicePowerSchedule
|
|
|
} from "@/api/smsb/device/device_power_schedule";
|
|
} from "@/api/smsb/device/device_power_schedule";
|
|
|
-
|
|
|
|
|
|
|
+import VideoPlayer from '../../../components/VideoPlayer/index.vue'
|
|
|
const screenshotStore = storeToRefs(useScreenshotStore());
|
|
const screenshotStore = storeToRefs(useScreenshotStore());
|
|
|
const screenshotImageUrl = ref<string>();
|
|
const screenshotImageUrl = ref<string>();
|
|
|
const alarmList = ref<DeviceErrorRecordVO[]>([]);
|
|
const alarmList = ref<DeviceErrorRecordVO[]>([]);
|
|
@@ -586,7 +587,8 @@ const flvPlayer = ref<flvjs.Player | null>(null);
|
|
|
const flvPlayerRef = ref<HTMLVideoElement | null>(null);
|
|
const flvPlayerRef = ref<HTMLVideoElement | null>(null);
|
|
|
const watchDialog = reactive<DialogOption>({
|
|
const watchDialog = reactive<DialogOption>({
|
|
|
visible: false,
|
|
visible: false,
|
|
|
- title: ''
|
|
|
|
|
|
|
+ title: '',
|
|
|
|
|
+ url: ''
|
|
|
});
|
|
});
|
|
|
const shotDialog = reactive<DialogOption>({
|
|
const shotDialog = reactive<DialogOption>({
|
|
|
visible: false,
|
|
visible: false,
|
|
@@ -963,26 +965,7 @@ const startMonitor = async (row?: DeviceVO) => {
|
|
|
destroyPlayer();
|
|
destroyPlayer();
|
|
|
watchDialog.visible = true;
|
|
watchDialog.visible = true;
|
|
|
watchDialog.title = '回采画面';
|
|
watchDialog.title = '回采画面';
|
|
|
- // 确保DOM已更新
|
|
|
|
|
- await nextTick();
|
|
|
|
|
- if (flvPlayerRef.value && res.data.viewUrl) {
|
|
|
|
|
- flvPlayer.value = flvjs.createPlayer({
|
|
|
|
|
- type: 'flv',
|
|
|
|
|
- url: res.data.viewUrl
|
|
|
|
|
- });
|
|
|
|
|
- // 错误处理
|
|
|
|
|
- /*flvPlayer.value.on(flvjs.Events.ERROR, (errType, errDetail) => {
|
|
|
|
|
- console.error('播放错误:', errType, errDetail);
|
|
|
|
|
- proxy?.$modal.msgError('视频播放失败,请检查流地址');
|
|
|
|
|
- destroyPlayer();
|
|
|
|
|
- });*/
|
|
|
|
|
- flvPlayer.value.attachMediaElement(flvPlayerRef.value);
|
|
|
|
|
- flvPlayer.value.load();
|
|
|
|
|
- // 处理浏览器自动播放策略
|
|
|
|
|
- flvPlayer.value.play().catch(() => {
|
|
|
|
|
- // proxy?.$modal.msgWarning('请点击视频播放按钮以开始播放');
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ watchDialog.url = res.data.viewUrl;
|
|
|
} else {
|
|
} else {
|
|
|
proxy?.$modal.msgError('开启推流失败!');
|
|
proxy?.$modal.msgError('开启推流失败!');
|
|
|
}
|
|
}
|