diff --git a/src/api/video/aiBoxVideo.js b/src/api/video/aiBoxVideo.js index 43bc971..6d3be2b 100644 --- a/src/api/video/aiBoxVideo.js +++ b/src/api/video/aiBoxVideo.js @@ -14,6 +14,14 @@ const getVideoPassage=(deptId,projectId,passageType,importance)=> { }) } +const groupCountByAlarmType=(deptId,projectId)=> { + return request({ + url: `/bgscreen/aiBoxVideo/groupCountByAlarmType?deptId=${deptId||0}&projectId=${projectId||0}`, + method: 'get' + }) +} + + export default{ listView, getVideoPassage diff --git a/src/pages/index.vue b/src/pages/index.vue index 17d8c98..e40bfc9 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -829,6 +829,7 @@ export default { } } }) + console.log(tmps); this.availabilityData = tmps; this.elKey++; }) diff --git a/src/pages/toAIVideoProject.vue b/src/pages/toAIVideoProject.vue index 9609619..bc47d3e 100644 --- a/src/pages/toAIVideoProject.vue +++ b/src/pages/toAIVideoProject.vue @@ -56,7 +56,7 @@
-
今日预警 0
+
最新预警 0
-
+
{{item.projectName}}
@@ -208,10 +208,16 @@ export default { }, }, }, - overviewText: '项目数量', + overviewText: '预警数量', //原因类型分析 availabilityData: [], projectCategoryWidth: 200, + //预警概况 + typeDistributionData: [ + { name: '在建项目', value: '15' }, + { name: '项目总投资', value: '515.97' }, + { name: '项目年投资', value: '134.86' } + ], } }, mounted() { @@ -480,6 +486,16 @@ export default { this.$api.aiBoxVideo.listView(this.dept?.id||0,this.projectInfo?.projectId).then((response) => { this.warningList = response.data||[]; }); + + this.$api.aiBoxVideo.groupCountByAlarmType(this.dept?.id||0,this.projectInfo?.projectId).then((response) => { + this.typeDistributionData=[]; + if(response.data){ + response.data.forEach(datum => { + this.typeDistributionData.push({name:datum.alarmTypeName,value:sumValue}) + }) + } + }); + }, getAiVideoAlertorTypeCount(){ axios.post(Host + "/api/video/getAiVideoAlertorTypeCount", { @@ -529,7 +545,7 @@ export default { aiNav(n,id){ this.nav = n this.alertorId = id; - this.getAiVideoInfoList(alertorId,""); + this.getAiVideoInfoList(this.alertorId,""); }, getImageUrl(it){ return '/jhapi' + it.imageUrl + ".min.jpg";