From ce8b40237e3cf5c424f99baa1c1bdcef8acc3536 Mon Sep 17 00:00:00 2001 From: chendingwei <1170506816@qq.com> Date: Fri, 6 Jan 2023 08:59:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9B=9E=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E5=87=BA=E9=94=99=E7=9A=84=E6=88=AA=E5=9B=BE=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E5=88=A0=E9=99=A4=E6=B2=A1=E7=94=A8log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/page/cameraCenter.vue | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) 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.');