feat 添加刷新功能
This commit is contained in:
@@ -134,6 +134,7 @@
|
||||
<div class="flex w-full items-center justify-between gap-2 min-w-0 pr-8">
|
||||
<span class="truncate">{{ videoName }}-{{ monitoringArea }}监控</span>
|
||||
<div>
|
||||
<el-button type="primary" class="shrink-0" @click="handleRefresh">刷新</el-button>
|
||||
<el-button v-if="!seeSee" type="primary" class="shrink-0" @click="drawImage()">绘制区域</el-button>
|
||||
<el-button v-if="seeSee" type="primary" class="shrink-0" @click="clearImage()">清空区域</el-button>
|
||||
<el-button v-if="seeSee" type="primary" class="shrink-0" @click="saveImage()">保存区域</el-button>
|
||||
@@ -688,6 +689,19 @@ watch(
|
||||
videoName.value = newValue === 1 ? '绘制区域' : '实时监控';
|
||||
}
|
||||
);
|
||||
|
||||
/** 刷新按钮操作 */
|
||||
const handleRefresh = async () => {
|
||||
if (!form.value.id) return;
|
||||
destroyHls(monitorVideoRef);
|
||||
monitorVideoUrl.value = '';
|
||||
await videosStore.getVideos(form.value.id);
|
||||
monitorVideoUrl.value = videosStore.hisUrl || '';
|
||||
if (monitorVideoUrl.value) {
|
||||
await nextTick();
|
||||
initHls(monitorVideoUrl, monitorVideoRef);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user