类型:开发

描述:
This commit is contained in:
2025-12-11 10:20:01 +08:00
parent 20049de695
commit 1b4226d325
6 changed files with 42 additions and 26 deletions

View File

@@ -1,8 +1,8 @@
import request from './request'
export function getTrafficEventsApi() {
export function getTrafficEventsApi(type) {
return request({
url: '/fjtcc-api/api/largeScreen/monitor/trafficEvents',
url: '/fjtcc-api/api/largeScreen/monitor/trafficEvents?type='+type,
method: 'get'
})
}

View File

@@ -17,7 +17,7 @@
:end-val="aiAnalyzeData.allAnalysisPoints"
/>
</div>
<div class="traffic-item" @click="showAbnormalList">
<div class="traffic-item" @click="showAbnormalList('curr')">
<span class="traffic-item__title">异常点位</span>
<countup :class="aiAnalyzeData.abnormalPoints>0?'traffic-item__value--error':'traffic-item__value--success'" :end-val="aiAnalyzeData.abnormalPoints" />
</div>
@@ -28,15 +28,15 @@
<span class="scenic-item__label">核心景区分析点位</span>
<countup class="scenic-item__value" :end-val="scenicAiAnalyzeData.coreMonitoringPoints" />
</div>
<div class="scenic-item" @click="showAbnormalList" style="cursor: pointer;" >
<div class="scenic-item" @click="showAbnormalList('curr')" style="cursor: pointer;" >
<span class="scenic-item__label">异常点位</span>
<countup class="scenic-item__value" :end-val="scenicAiAnalyzeData.abnormalPoints" />
</div>
<div class="scenic-item" @click="showAbnormalList" style="cursor: pointer;" >
<div class="scenic-item" @click="showAbnormalList('curr')" style="cursor: pointer;" >
<span class="scenic-item__label">异常告警</span>
<countup class="scenic-item__value" :end-val="scenicAiAnalyzeData.abnormalAlarm" />
</div>
<div class="scenic-item">
<div class="scenic-item" @click="showAbnormalList('deal')" style="cursor: pointer;">
<span class="scenic-item__label">已解除</span>
<countup class="scenic-item__value" :end-val="scenicAiAnalyzeData.handled" />
</div>
@@ -67,15 +67,15 @@
:end-val="trafficAiAnalyzeData.coreMonitoringPoints"
/>
</div>
<div class="scenic-item" style="cursor: pointer" @click="showTrafficEvent">
<div class="scenic-item" style="cursor: pointer" @click="showTrafficEvent('curr')">
<span class="scenic-item__label">拥堵点位</span>
<countup class="scenic-item__value" :end-val="trafficAiAnalyzeData.abnormalPoints" />
</div>
<div class="scenic-item" style="cursor: pointer" @click="showTrafficEvent">
<div class="scenic-item" style="cursor: pointer" @click="showTrafficEvent('curr')">
<span class="scenic-item__label">拥堵告警</span>
<countup class="scenic-item__value" :end-val="trafficAiAnalyzeData.abnormalWarnings" />
</div>
<div class="scenic-item">
<div class="scenic-item" style="cursor: pointer" @click="showTrafficEvent('deal')">
<span class="scenic-item__label">已解除</span>
<countup class="scenic-item__value" :end-val="trafficAiAnalyzeData.handled" />
</div>
@@ -130,7 +130,7 @@
:end-val="pointAlarmData.analysisPoints"
/>
</div>
<div class="monitor-statistics-item" @click="showAbnormalList" style="cursor: pointer;" >
<div class="monitor-statistics-item" @click="showAbnormalList('curr')" style="cursor: pointer;" >
<span class="monitor-statistics-item__label">异常点位</span>
<countup
class="monitor-statistics-item__value"
@@ -140,7 +140,7 @@
</div>
</div>
<div class="bg" style="cursor: pointer;" >
<Title3 title="今日异常告警" @click="showAbnormalList" />
<Title3 title="今日异常告警" @click="showAbnormalList('all')" />
<Line
:width="370"
:height="180"
@@ -155,20 +155,20 @@
</div>
<div class="traffic-alarm-statistics">
<img class="traffic-alarm-statistics-icon" src="@/assets/images/t-ico-2.png" />
<div class="traffic-alarm-statistics-item" @click="showAbnormalList" style="cursor: pointer;">
<div class="traffic-alarm-statistics-item" @click="showAbnormalList('curr')" style="cursor: pointer;">
<span class="traffic-alarm-statistics-item__label">当前告警</span>
<countup
:class="pointAlarmData.abnormalAlarm>0?'traffic-alarm-statistics-item__error':'traffic-alarm-statistics-item__value'"
:end-val="pointAlarmData.abnormalAlarm"
/>
</div>
<div class="traffic-alarm-statistics-item">
<div class="traffic-alarm-statistics-item" @click="showAbnormalList('all')" style="cursor: pointer;">
<span class="traffic-alarm-statistics-item__label">异常告警</span>
<countup class="traffic-alarm-statistics-item__value"
:end-val="pointAlarmData.allAbnormalAlarm"
/>
</div>
<div class="traffic-alarm-statistics-item">
<div class="traffic-alarm-statistics-item" @click="showAbnormalList('deal')" style="cursor: pointer;">
<span class="traffic-alarm-statistics-item__label">已解除告警</span>
<countup
class="traffic-alarm-statistics-item__value traffic-alarm-statistics-item__value"
@@ -188,8 +188,8 @@
</template>
</div>
<video-dialog v-model="videoShow" :src="src" :cameraIndexCode="cameraIndexCode" />
<warn-list v-model="warnShow" :scenicSpotId="scenicSpotId" />
<traffic-list v-model="trafficEventShow" />
<warn-list v-model="warnShow" :type="warnType" :scenicSpotId="scenicSpotId" />
<traffic-list v-model="trafficEventShow" :type="trafficEventType" />
</template>
<script setup>
@@ -247,11 +247,15 @@
let cameraIndexCode = ref('')
let videoShow = ref(false)
let warnShow = ref(false)
let warnType = ref('')
let trafficEventShow = ref(false)
const showAbnormalList = function (){
let trafficEventType = ref('curr')
const showAbnormalList = function (type){
warnType.value = type;
warnShow.value = true;
}
const showTrafficEvent = function(){
const showTrafficEvent = function(type){
trafficEventType.value = type;
trafficEventShow.value = true;
}
window.addEventListener("message", async(e) => {

View File

@@ -32,6 +32,10 @@
import pubSub from 'pubsub-js'
let props = defineProps({
type: {
type: String,
default: 'curr'
},
events: {
type: String,
default: ''
@@ -127,7 +131,7 @@
}
let cond = ref(false)
const getVideoList = async () => {
let res = await getTrafficEventsApi();
let res = await getTrafficEventsApi(props.type);
list.value = res.data
setTimeout(()=>{cond.value = true},1500)
}

View File

@@ -1,10 +1,10 @@
<template>
<div class="z-dialog">
<el-dialog title="异常点位告警" v-model="modelValue" align-center :modal="false" :show-close="false">
<el-dialog :title="props.type=='deal'?'已解除异常':'异常点位告警'" v-model="modelValue" align-center :modal="false" :show-close="false">
<img class="close" src="@/assets/images/close.png" @click="handleClose" />
<div class="no-data" v-if="cond&&!list.length">
暂无异常情况
</div>
<div class="no-data" v-if="cond&&!list.length">
{{props.type=='deal'?'暂无数据':'暂无异常情况'}}
</div>
<div v-else>
<ul class="list" >
<li
@@ -44,6 +44,10 @@
type: String,
default: ''
},
type: {
type: String,
default: 'curr'
},
events: {
type: String,
default: ''
@@ -135,7 +139,7 @@
}
let cond = ref(false)
const getVideoList = async () => {
let res = await getVideoEventApi(props.scenicSpotId);
let res = await getVideoEventApi(props.scenicSpotId,props.type);
list.value = res.data
setTimeout(()=>{cond.value = true},1500)
nextTick(() => {

View File

@@ -414,6 +414,10 @@
const showAbnormalList = function (item){
if(item.name=='今日异常总数'){
warnType.value = 'all'
}else if(item.name=='当前异常数'){
warnType.value = 'curr'
}else if(item.name=='已解除异常数'){
warnType.value = 'deal'
}
warnShow.value = true;
}

View File

@@ -1,9 +1,9 @@
<template>
<div class="z-dialog">
<el-dialog title="异常点位告警" v-model="modelValue" align-center :modal="false" :show-close="false">
<el-dialog :title="props.type=='deal'?'已解除异常':'异常点位告警'" v-model="modelValue" align-center :modal="false" :show-close="false">
<img class="close" src="@/assets/images/close.png" @click="handleClose" />
<div class="no-data" v-if="cond&&!list.length">
暂无异常情况
{{props.type=='deal'?'暂无数据':'暂无异常情况'}}
</div>
<div v-else>
<ul class="list" >