From efcfa42adb93ec4497cea4935192be36d85803a0 Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Fri, 17 Mar 2023 18:20:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20bug#10540=E3=80=8110542?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/media/Device/Channel/Live/index.vue | 21 +++++++++-- src/views/media/Device/index.vue | 35 ++++++++++++++++--- 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/src/views/media/Device/Channel/Live/index.vue b/src/views/media/Device/Channel/Live/index.vue index 53856333..e5440491 100644 --- a/src/views/media/Device/Channel/Live/index.vue +++ b/src/views/media/Device/Channel/Live/index.vue @@ -22,10 +22,18 @@ : '停止录像' }} -
刷新
+
+ 刷新 +
重置
- + emit('update:visible', val), }); +// 播放器 +const player = ref(); // 视频地址 const url = ref(''); // 视频类型 @@ -126,6 +136,13 @@ const handleRecord = async () => { } }; +/** + * 刷新 + */ +const handleRefresh = () => { + player.value.play(); +}; + /** * 重置 */ diff --git a/src/views/media/Device/index.vue b/src/views/media/Device/index.vue index 3dd5dab0..490736b0 100644 --- a/src/views/media/Device/index.vue +++ b/src/views/media/Device/index.vue @@ -131,7 +131,10 @@ style="padding: 0px" :hasPermission=" 'media/Device:' + - (i.key !== 'updateChannel' ? i.key : 'update') + (i.key !== 'updateChannel' && + i.key !== 'viewDevice' + ? i.key + : 'update') " > @@ -325,6 +328,17 @@ const getActions = ( ); }, }, + { + key: 'viewDevice', + text: '查看', + tooltip: { + title: '查看', + }, + icon: 'EyeOutlined', + onClick: () => { + menuStory.jumpPage('device/Instance/Detail', { id: data.id }); + }, + }, { key: 'updateChannel', text: '更新通道', @@ -374,8 +388,21 @@ const getActions = ( icon: 'DeleteOutlined', }, ]; - return data.provider === 'fixed-media' - ? actions.filter((f: any) => f.key !== 'updateChannel') - : actions; + + let acts: any = []; + if (type === 'card') { + // 卡片不展示查看按钮 + const tempActs = actions.filter((f: any) => f.key !== 'viewDevice'); + acts = + data.provider === 'fixed-media' + ? tempActs.filter((f: any) => f.key !== 'updateChannel') + : tempActs; + } else { + acts = + data.provider === 'fixed-media' + ? actions.filter((f: any) => f.key !== 'updateChannel') + : actions; + } + return acts; };