fix: bug#10540、10542
This commit is contained in:
parent
7c9028dab4
commit
efcfa42adb
|
@ -22,10 +22,18 @@
|
||||||
: '停止录像'
|
: '停止录像'
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="tool-item">刷新</div>
|
<div class="tool-item" @click.stop="handleRefresh">
|
||||||
|
刷新
|
||||||
|
</div>
|
||||||
<div class="tool-item" @click.stop="handleReset">重置</div>
|
<div class="tool-item" @click.stop="handleReset">重置</div>
|
||||||
</div>
|
</div>
|
||||||
<LivePlayer :live="true" :url="url" :protocol="mediaType" autoplay />
|
<LivePlayer
|
||||||
|
ref="player"
|
||||||
|
:live="true"
|
||||||
|
:url="url"
|
||||||
|
:protocol="mediaType"
|
||||||
|
autoplay
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<MediaTool
|
<MediaTool
|
||||||
@onMouseDown="handleMouseDown"
|
@onMouseDown="handleMouseDown"
|
||||||
|
@ -70,6 +78,8 @@ const _vis = computed({
|
||||||
set: (val) => emit('update:visible', val),
|
set: (val) => emit('update:visible', val),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 播放器
|
||||||
|
const player = ref();
|
||||||
// 视频地址
|
// 视频地址
|
||||||
const url = ref('');
|
const url = ref('');
|
||||||
// 视频类型
|
// 视频类型
|
||||||
|
@ -126,6 +136,13 @@ const handleRecord = async () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 刷新
|
||||||
|
*/
|
||||||
|
const handleRefresh = () => {
|
||||||
|
player.value.play();
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置
|
* 重置
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -131,7 +131,10 @@
|
||||||
style="padding: 0px"
|
style="padding: 0px"
|
||||||
:hasPermission="
|
:hasPermission="
|
||||||
'media/Device:' +
|
'media/Device:' +
|
||||||
(i.key !== 'updateChannel' ? i.key : 'update')
|
(i.key !== 'updateChannel' &&
|
||||||
|
i.key !== 'viewDevice'
|
||||||
|
? i.key
|
||||||
|
: 'update')
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<template #icon><AIcon :type="i.icon" /></template>
|
<template #icon><AIcon :type="i.icon" /></template>
|
||||||
|
@ -325,6 +328,17 @@ const getActions = (
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 'viewDevice',
|
||||||
|
text: '查看',
|
||||||
|
tooltip: {
|
||||||
|
title: '查看',
|
||||||
|
},
|
||||||
|
icon: 'EyeOutlined',
|
||||||
|
onClick: () => {
|
||||||
|
menuStory.jumpPage('device/Instance/Detail', { id: data.id });
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'updateChannel',
|
key: 'updateChannel',
|
||||||
text: '更新通道',
|
text: '更新通道',
|
||||||
|
@ -374,8 +388,21 @@ const getActions = (
|
||||||
icon: 'DeleteOutlined',
|
icon: 'DeleteOutlined',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
return data.provider === 'fixed-media'
|
|
||||||
? actions.filter((f: any) => f.key !== 'updateChannel')
|
let acts: any = [];
|
||||||
: actions;
|
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;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue