diff --git a/src/views/page/cameraCenter.vue b/src/views/page/cameraCenter.vue index 53e3c08..d513310 100644 --- a/src/views/page/cameraCenter.vue +++ b/src/views/page/cameraCenter.vue @@ -94,6 +94,7 @@ let cameraMap = storeToRefs(piniaStore).cameraMap let isActiveChoose = ref(false) let labelList = ref([]) let addLabel = storeToRefs(piniaStore).addLabel +let screenshot = storeToRefs(piniaStore).screenshot let addLabelLeft = ref(0); let addLabelTop = ref(0); var jessibuca = ref(); @@ -105,7 +106,21 @@ onMounted(() => { loadVideoCanvas(); } }) +watch(screenshot, (newVal, oldVal) => { + if (newVal) { + console.log(123); + + //jessibuca.value.isPlaying() 判断是否正在播放 + if (!jessibuca.value.isPlaying()) { + Msg.info("请先选择监控画面") + piniaStore.updateScreenshot(false) + return + } + jessibuca.value.screenshot("", "png", 1) + piniaStore.updateScreenshot(false) + } +}) watch(curSelectKey, (newVal, oldVal) => { switchCamera(newVal) }) @@ -197,9 +212,7 @@ function loadVideoCanvas() { } const onContextMenuClick = (item: any, menuKey: string,) => { - console.log(`labelId: ${item.id}, menuKey: ${menuKey}`); - // console.log(`item: ${item}`); - // console.log(item); + // console.log(`labelId: ${item.id}, menuKey: ${menuKey}`); //防止添加多个key值,再次点击不能关闭。数组去重 if (menuKey == "edit") { popup("编辑标签", [h(LabelEditModel, {modelData: item})], "editLabel"); @@ -271,7 +284,7 @@ function mouseDownVideo(e: MouseEvent) { }).then((res: any) => { if (judgeResponse(res)) return; let markLabelId: number = res.data.data; - console.log(markLabelId); + // console.log(markLabelId); if (markLabelId <= 0) return; markSearchApi.ActivateMarkLabel({ 'cameraId': cameraId, @@ -342,7 +355,6 @@ function switchCamera(cameraId: string) { }).then((res: any) => { if (judgeResponse(res)) return; let flag: boolean = res.data.data; - console.log(flag, res,111111111111111111111111111111111111111111); if (!flag) { console.log('not exist searcher.'); @@ -382,12 +394,10 @@ function getLabel(cbCameraId: string | number) { }); return item }) - console.log(labelList.value, 'labelList.value'); }); } function loadMarkLabelsByLoop(cameraObj: any, ms: number = 1000) { - console.log(curSelectKey.value,cameraObj.id); if (curSelectKey.value != cameraObj.id) { console.log('load camera labels end.');