mirror of
https://gitee.com/dromara/go-view.git
synced 2025-10-13 22:12:11 +08:00
feat: 告警增加摄像头弹窗
This commit is contained in:
parent
8ee2d6657f
commit
67f0706fdd
@ -21,6 +21,7 @@
|
|||||||
"@types/crypto-js": "^4.1.1",
|
"@types/crypto-js": "^4.1.1",
|
||||||
"@types/keymaster": "^1.6.30",
|
"@types/keymaster": "^1.6.30",
|
||||||
"@types/lodash": "^4.14.184",
|
"@types/lodash": "^4.14.184",
|
||||||
|
"@vicons/fa": "^0.12.0",
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.4.0",
|
||||||
"color": "^4.2.3",
|
"color": "^4.2.3",
|
||||||
|
@ -27,7 +27,10 @@
|
|||||||
<LocationIcon @click.stop="jumpTo(item)" class="mr10" style="width: 20px;height: 20px;color: #4196ff;"/>
|
<LocationIcon @click.stop="jumpTo(item)" class="mr10" style="width: 20px;height: 20px;color: #4196ff;"/>
|
||||||
<CheckCircleOutlinedIcon @click.stop="clickSingle(item.id)" v-if="item.confirm_status === 'not'" class="mr10" style="width: 20px;height: 20px;color: #4196ff;"/>
|
<CheckCircleOutlinedIcon @click.stop="clickSingle(item.id)" v-if="item.confirm_status === 'not'" class="mr10" style="width: 20px;height: 20px;color: #4196ff;"/>
|
||||||
<div v-else class="mr10" style="width: 20px"></div>
|
<div v-else class="mr10" style="width: 20px"></div>
|
||||||
<PlayCircle16FilledIcon v-if="alarmVideos[i]" @click.stop="showVideo(alarmVideos[i], item.id)" style="width: 20px;height: 20px;color: #4196ff;"/>
|
<template v-if="alarmVideos[i]">
|
||||||
|
<SpinnerIcon v-if="showLoading && currentVideo.alarmId === item.id" class="rotate" style="width: 18px;height: 18px;color: #4196ff;"/>
|
||||||
|
<PlayCircle16FilledIcon v-else @click.stop="showVideo(alarmVideos[i], item.id)" style="width: 20px;height: 20px;color: #4196ff;"/>
|
||||||
|
</template>
|
||||||
<div v-else style="width: 20px"></div>
|
<div v-else style="width: 20px"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -46,7 +49,7 @@ import type { Ref } from 'vue'
|
|||||||
import { CreateComponentType } from '@/packages/index.d'
|
import { CreateComponentType } from '@/packages/index.d'
|
||||||
import { publicInterface } from '@/api/path/business.api'
|
import { publicInterface } from '@/api/path/business.api'
|
||||||
import BorderBox from './BorderBoxV2.vue'
|
import BorderBox from './BorderBoxV2.vue'
|
||||||
import {isPreview, postMessageToParent} from '@/utils'
|
import {isPreview, postMessageToParent, useGetMessageByParent} from '@/utils'
|
||||||
import moment from "moment"
|
import moment from "moment"
|
||||||
import {selectTimeOptions} from "@/views/chart/ContentConfigurations/components/ChartData/index.d";
|
import {selectTimeOptions} from "@/views/chart/ContentConfigurations/components/ChartData/index.d";
|
||||||
import {RequestHttpIntervalEnum} from "@/enums/httpEnum";
|
import {RequestHttpIntervalEnum} from "@/enums/httpEnum";
|
||||||
@ -58,6 +61,7 @@ import { useOriginStore } from '@/store/modules/originStore/originStore'
|
|||||||
const { LocationIcon } = icon.carbon
|
const { LocationIcon } = icon.carbon
|
||||||
const { CheckCircleOutlinedIcon } = icon.material
|
const { CheckCircleOutlinedIcon } = icon.material
|
||||||
const { PlayCircle16FilledIcon } = icon.fluent
|
const { PlayCircle16FilledIcon } = icon.fluent
|
||||||
|
const { SpinnerIcon } = icon.fa
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
chartConfig: {
|
chartConfig: {
|
||||||
@ -232,6 +236,13 @@ const getVideos = (ids: number[], alarmIds: number[]) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const showLoading = ref(false)
|
||||||
|
const {getMessageByParent} = useGetMessageByParent()
|
||||||
|
getMessageByParent('', (e) => {
|
||||||
|
if(e.data.type === 'openVideoV2_closeLoading' && e.data.page === 'customLargeScreen') {
|
||||||
|
showLoading.value = false
|
||||||
|
}
|
||||||
|
})
|
||||||
const showVideo = (obj: any, id: number) => {
|
const showVideo = (obj: any, id: number) => {
|
||||||
let a: {[k: string]: string | null | boolean | number} = {
|
let a: {[k: string]: string | null | boolean | number} = {
|
||||||
ip: '',
|
ip: '',
|
||||||
@ -248,6 +259,8 @@ const showVideo = (obj: any, id: number) => {
|
|||||||
// 点击时强制打开
|
// 点击时强制打开
|
||||||
a.showForce = true
|
a.showForce = true
|
||||||
a.alarmId = id
|
a.alarmId = id
|
||||||
|
currentVideo.value = a
|
||||||
|
showLoading.value = true
|
||||||
postMessageToParent({
|
postMessageToParent({
|
||||||
type: 'openVideoV2',
|
type: 'openVideoV2',
|
||||||
data: a
|
data: a
|
||||||
@ -490,6 +503,20 @@ onUnmounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@keyframes rotate {
|
||||||
|
from {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 应用动画到目标元素 */
|
||||||
|
.rotate {
|
||||||
|
animation: rotate 1s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
.mr5{
|
.mr5{
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
@ -122,6 +122,10 @@ import {
|
|||||||
AccessTimeFilled as AccessTimeFilledIcon,
|
AccessTimeFilled as AccessTimeFilledIcon,
|
||||||
} from '@vicons/material'
|
} from '@vicons/material'
|
||||||
|
|
||||||
|
import {
|
||||||
|
Spinner as SpinnerIcon
|
||||||
|
} from '@vicons/fa'
|
||||||
|
|
||||||
const ionicons5 = {
|
const ionicons5 = {
|
||||||
// 新增
|
// 新增
|
||||||
AddIcon,
|
AddIcon,
|
||||||
@ -346,11 +350,16 @@ const material = {
|
|||||||
AccessTimeFilledIcon,
|
AccessTimeFilledIcon,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const fa = {
|
||||||
|
SpinnerIcon
|
||||||
|
}
|
||||||
|
|
||||||
// https://www.xicons.org/#/ 还有很多
|
// https://www.xicons.org/#/ 还有很多
|
||||||
|
|
||||||
export const icon = {
|
export const icon = {
|
||||||
ionicons5,
|
ionicons5,
|
||||||
carbon,
|
carbon,
|
||||||
fluent,
|
fluent,
|
||||||
material
|
material,
|
||||||
|
fa
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user