Merge remote-tracking branch 'origin/master-fetch' into master-fetch

This commit is contained in:
huanghao1412 2024-05-21 11:20:56 +08:00
commit d6756fc584
3 changed files with 14 additions and 11 deletions

View File

@ -2,9 +2,9 @@
<BorderBox <BorderBox
:title="chartConfig?.customData?.title" :title="chartConfig?.customData?.title"
:select1="select1" :select1="select1"
@update:select1Value="v => select1.value = v" @update:select1Value="(v:any) => select1.value = v"
:select2="select2" :select2="select2"
@update:select2Value="v => select2.value = v" @update:select2Value="(v:any) => select2.value = v"
@clickBatch="clickBatch" @clickBatch="clickBatch"
v-model:checkAll="checkAll" v-model:checkAll="checkAll"
@jumpMore="jumpMore" @jumpMore="jumpMore"
@ -191,14 +191,16 @@ let alarmVideos = ref([])
// brand: '', // brand: '',
// plugin: '', // plugin: '',
// }) // })
let currentVideo: any = ref(null) let currentVideo: any = ref({})
const getVideos = (ids: number[], alarmIds: number[]) => { const getVideos = (ids: number[], alarmIds: number[]) => {
if(ids.length) { if(ids.length) {
publicInterface('/dcim/video_monitor/other_device', 'get_alarm_device', {device_uids: ids.toString()}).then((res: any) => { publicInterface('/dcim/video_monitor/other_device', 'get_alarm_device', {device_uids: ids.toString()}).then((res: any) => {
if(res.errcode !== '00000') return if(res.errcode !== '00000') return
let arr:any = [] let arr:any = []
ids.forEach(id => { ids.forEach(id => {
arr.push(res.data[id] ? res.data[id][0] : null) if(typeof id === 'number') {
arr.push(res.data[id] ? res.data[id][0] : null)
}
}) })
alarmVideos.value = arr.concat() alarmVideos.value = arr.concat()
@ -210,8 +212,8 @@ const getVideos = (ids: number[], alarmIds: number[]) => {
break break
} }
} }
if(!currentVideo.value && !last) return if(JSON.stringify(currentVideo.value) === '{}' && !last) return
let obj = currentVideo.value ? JSON.parse(JSON.stringify(currentVideo.value)) : { let obj = JSON.stringify(currentVideo.value) !== '{}' ? JSON.parse(JSON.stringify(currentVideo.value)) : {
ip: '', ip: '',
port: null, port: null,
account: '', account: '',
@ -226,7 +228,7 @@ const getVideos = (ids: number[], alarmIds: number[]) => {
} }
} }
obj.alarmId = alarmIds[index] obj.alarmId = alarmIds[index]
Object.assign(currentVideo, obj) currentVideo.value = obj
obj.showForce = false obj.showForce = false
postMessageToParent({ postMessageToParent({
type: 'openVideoV2', type: 'openVideoV2',
@ -311,7 +313,7 @@ const getData = () => {
serial_no: e.serial_no, serial_no: e.serial_no,
remark: e.remark, remark: e.remark,
})) }))
getVideos(arr.map(_ => _.device.uid), arr.map(_ => _.id)) getVideos(arr.map(_ => _.device?.uid), arr.map(_ => _.id))
if (checkAll.value) { if (checkAll.value) {
arr = arr.map((e:any) => ({ ...e, checked: e.confirm_status !== 'ok' })) arr = arr.map((e:any) => ({ ...e, checked: e.confirm_status !== 'ok' }))
} else if (lastTableData.length) { } else if (lastTableData.length) {

View File

@ -17,10 +17,11 @@
</div> </div>
<layout-header> <layout-header>
<template #left></template> <template #left></template>
<template #right> <!-- 报错注掉右插槽 -->
<!-- <template #right>
<go-lang-select></go-lang-select> <go-lang-select></go-lang-select>
<go-theme-select></go-theme-select> <go-theme-select></go-theme-select>
</template> </template> -->
</layout-header> </layout-header>
<div class="go-login"> <div class="go-login">
<div class="go-login-carousel"> <div class="go-login-carousel">

View File

@ -22,7 +22,7 @@
:groupIndex="index" :groupIndex="index"
:themeSetting="themeSetting" :themeSetting="themeSetting"
:themeColor="themeColor" :themeColor="themeColor"
@changeZIndex="z => changeZIndex(item.id, z)" @changeZIndex="(z:any) => changeZIndex(item.id, z)"
@fullScreen="fullScreen" @fullScreen="fullScreen"
></preview-render-group> ></preview-render-group>