second commit
This commit is contained in:
@@ -90,7 +90,7 @@ import FilterCom from '@/components/Filter/index.vue'
|
||||
import { nextTick, onBeforeUnmount, onMounted, onUnmounted, reactive, ref } from 'vue'
|
||||
import TableComponent from '@/components/Table/index2.vue'
|
||||
import TitleComponent from '@/components/Title/index.vue'
|
||||
// import { videoIdentificationPage, removeVideoIdentification } from '@/api/identification.js'
|
||||
import { videoIdentificationPage, removeVideoIdentification } from '@/api/identification.js'
|
||||
import HikPlayerBackCom from '@/components/Player/HikPlayer-back.vue'
|
||||
import { dayjs, ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { useRoute } from 'vue-router'
|
||||
@@ -337,20 +337,20 @@ const edit = reactive({
|
||||
|
||||
const initData = () => {
|
||||
loading.value = true
|
||||
const params = new FormData()
|
||||
const obj = {
|
||||
...model,
|
||||
// illegalType: illegalType.value.join(','),
|
||||
illegalType: illegalType.value,
|
||||
beginTime: model.time && model.time[0] ? model.time[0] : '',
|
||||
endTime: model.time && model.time[1] ? model.time[1] : '',
|
||||
pageNo: pagination.current,
|
||||
pageSize: pagination.size
|
||||
}
|
||||
delete obj.time
|
||||
Object.keys(obj).forEach((key) => {
|
||||
params.append(key, obj[key])
|
||||
})
|
||||
// const params = new FormData()
|
||||
// const obj = {
|
||||
// ...model,
|
||||
// // illegalType: illegalType.value.join(','),
|
||||
// illegalType: illegalType.value,
|
||||
// beginTime: model.time && model.time[0] ? model.time[0] : '',
|
||||
// endTime: model.time && model.time[1] ? model.time[1] : '',
|
||||
// pageNo: pagination.current,
|
||||
// pageSize: pagination.size
|
||||
// }
|
||||
// delete obj.time
|
||||
// Object.keys(obj).forEach((key) => {
|
||||
// params.append(key, obj[key])
|
||||
// })
|
||||
// videoIdentificationPage(params).then(res => {
|
||||
// if (res.success) {
|
||||
// tableData.value = res.result.records.map(i => {
|
||||
@@ -368,7 +368,7 @@ const initData = () => {
|
||||
// // 有识别记录数据,默认查看第一条详情
|
||||
// handle('check', res.result.total > 0 ? tableData.value[0] : {})
|
||||
// } else {
|
||||
// Message.error(res.msg || '查询失败!')
|
||||
// ElMessage.error(res.msg || '查询失败!')
|
||||
// }
|
||||
// }).finally(() => {
|
||||
loading.value = false
|
||||
@@ -464,7 +464,6 @@ const handle = (type, data) => {
|
||||
}
|
||||
case 'check': {
|
||||
closeVideo()
|
||||
console.log(data, 'datatata')
|
||||
detail.data = [ { ...data,
|
||||
videoName: '',
|
||||
trackerPicPath: data.trackerPicPath.split(',')
|
||||
@@ -497,10 +496,10 @@ const handle = (type, data) => {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// removeVideoIdentification({ id: data.id }).then(() => {
|
||||
// ElMessage.success('删除成功')
|
||||
// initData()
|
||||
// })
|
||||
removeVideoIdentification({ id: data.id }).then(() => {
|
||||
ElMessage.success('删除成功')
|
||||
initData()
|
||||
})
|
||||
})
|
||||
break
|
||||
default:
|
||||
@@ -538,6 +537,9 @@ onBeforeUnmount(() => {
|
||||
closeVideo()
|
||||
|
||||
})
|
||||
defineExpose({
|
||||
appPlayer
|
||||
})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.content-container{
|
||||
|
||||
@@ -1,25 +1,44 @@
|
||||
<template>
|
||||
<!-- 识别记录页面 -->
|
||||
<DialogComponent :style="{ resize: 'both', overflow: 'auto' }" v-if="type === 'alarm'" title="识别记录" width="1800" :draggable="true" :modal="false" @close="close">
|
||||
<AlarmCom/>
|
||||
<DialogComponent @mousedown="drag" :style="{ resize: 'both', overflow: 'auto' }" title="识别记录" width="1800" :draggable="true" :modal="false" @close="close">
|
||||
<AlarmCom ref="alarm"/>
|
||||
</DialogComponent>
|
||||
</template>
|
||||
<script setup>
|
||||
import { computed } from 'vue'
|
||||
import { computed, ref } from 'vue'
|
||||
import DialogComponent from '@/components/Dialog/screen.vue'
|
||||
import AlarmCom from './alarm/index.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import useMapStore from '@/store/modules/map'
|
||||
import { dragEvent, resizeEvent } from '@/utils/common'
|
||||
|
||||
const mapStore = useMapStore()
|
||||
const router = useRouter()
|
||||
const type = computed(() => mapStore.dialogVisible.type)
|
||||
|
||||
const alarm = ref(null)
|
||||
const close = () => {
|
||||
mapStore.updateDialog('')
|
||||
router.back()
|
||||
mapStore.updateDialog(false)
|
||||
}
|
||||
/**
|
||||
* 拖拽事件
|
||||
* @param e
|
||||
*
|
||||
*/
|
||||
const drag = (e) => {
|
||||
if(e.target.className.includes('el-dialog-title')) {
|
||||
dragEvent(e, 'el-dialog-title', () => {
|
||||
if(alarm.value.appPlayer) {
|
||||
alarm.value.appPlayer[0].onResize(false)
|
||||
}
|
||||
})
|
||||
}else{
|
||||
resizeEvent(e, 'el-dialog', () => {
|
||||
if(alarm.value?.appPlayer) {
|
||||
alarm.value.appPlayer[0].onResize()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.el-tabs {
|
||||
|
||||
Reference in New Issue
Block a user