Browse Source

添加回合并出错的截图功能,删除没用log

master
chendingwei 2 years ago
parent
commit
ce8b40237e
  1. 24
      src/views/page/cameraCenter.vue

24
src/views/page/cameraCenter.vue

@ -94,6 +94,7 @@ let cameraMap = storeToRefs(piniaStore).cameraMap
let isActiveChoose = ref(false)
let labelList = ref<any[]>([])
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.');

Loading…
Cancel
Save