|
@ -94,6 +94,7 @@ let cameraMap = storeToRefs(piniaStore).cameraMap |
|
|
let isActiveChoose = ref(false) |
|
|
let isActiveChoose = ref(false) |
|
|
let labelList = ref<any[]>([]) |
|
|
let labelList = ref<any[]>([]) |
|
|
let addLabel = storeToRefs(piniaStore).addLabel |
|
|
let addLabel = storeToRefs(piniaStore).addLabel |
|
|
|
|
|
let screenshot = storeToRefs(piniaStore).screenshot |
|
|
let addLabelLeft = ref(0); |
|
|
let addLabelLeft = ref(0); |
|
|
let addLabelTop = ref(0); |
|
|
let addLabelTop = ref(0); |
|
|
var jessibuca = ref(); |
|
|
var jessibuca = ref(); |
|
@ -105,7 +106,21 @@ onMounted(() => { |
|
|
loadVideoCanvas(); |
|
|
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) => { |
|
|
watch(curSelectKey, (newVal, oldVal) => { |
|
|
switchCamera(newVal) |
|
|
switchCamera(newVal) |
|
|
}) |
|
|
}) |
|
@ -197,9 +212,7 @@ function loadVideoCanvas() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const onContextMenuClick = (item: any, menuKey: string,) => { |
|
|
const onContextMenuClick = (item: any, menuKey: string,) => { |
|
|
console.log(`labelId: ${item.id}, menuKey: ${menuKey}`); |
|
|
// console.log(`labelId: ${item.id}, menuKey: ${menuKey}`); |
|
|
// console.log(`item: ${item}`); |
|
|
|
|
|
// console.log(item); |
|
|
|
|
|
//防止添加多个key值,再次点击不能关闭。数组去重 |
|
|
//防止添加多个key值,再次点击不能关闭。数组去重 |
|
|
if (menuKey == "edit") { |
|
|
if (menuKey == "edit") { |
|
|
popup("编辑标签", [h(LabelEditModel, {modelData: item})], "editLabel"); |
|
|
popup("编辑标签", [h(LabelEditModel, {modelData: item})], "editLabel"); |
|
@ -271,7 +284,7 @@ function mouseDownVideo(e: MouseEvent) { |
|
|
}).then((res: any) => { |
|
|
}).then((res: any) => { |
|
|
if (judgeResponse(res)) return; |
|
|
if (judgeResponse(res)) return; |
|
|
let markLabelId: number = res.data.data; |
|
|
let markLabelId: number = res.data.data; |
|
|
console.log(markLabelId); |
|
|
// console.log(markLabelId); |
|
|
if (markLabelId <= 0) return; |
|
|
if (markLabelId <= 0) return; |
|
|
markSearchApi.ActivateMarkLabel({ |
|
|
markSearchApi.ActivateMarkLabel({ |
|
|
'cameraId': cameraId, |
|
|
'cameraId': cameraId, |
|
@ -342,7 +355,6 @@ function switchCamera(cameraId: string) { |
|
|
}).then((res: any) => { |
|
|
}).then((res: any) => { |
|
|
if (judgeResponse(res)) return; |
|
|
if (judgeResponse(res)) return; |
|
|
let flag: boolean = res.data.data; |
|
|
let flag: boolean = res.data.data; |
|
|
console.log(flag, res,111111111111111111111111111111111111111111); |
|
|
|
|
|
|
|
|
|
|
|
if (!flag) { |
|
|
if (!flag) { |
|
|
console.log('not exist searcher.'); |
|
|
console.log('not exist searcher.'); |
|
@ -382,12 +394,10 @@ function getLabel(cbCameraId: string | number) { |
|
|
}); |
|
|
}); |
|
|
return item |
|
|
return item |
|
|
}) |
|
|
}) |
|
|
console.log(labelList.value, 'labelList.value'); |
|
|
|
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function loadMarkLabelsByLoop(cameraObj: any, ms: number = 1000) { |
|
|
function loadMarkLabelsByLoop(cameraObj: any, ms: number = 1000) { |
|
|
console.log(curSelectKey.value,cameraObj.id); |
|
|
|
|
|
|
|
|
|
|
|
if (curSelectKey.value != cameraObj.id) { |
|
|
if (curSelectKey.value != cameraObj.id) { |
|
|
console.log('load camera labels end.'); |
|
|
console.log('load camera labels end.'); |
|
|