Compare commits

..

No commits in common. "9fd05640696916773f58d52e1f21bb27d6c4ff57" and "b2de06b12ea78aa98fc4553f4b43240acfcc40a2" have entirely different histories.

3 changed files with 95 additions and 164 deletions

View File

@ -14,17 +14,9 @@ const getVideoPassage=(deptId,projectId,passageType,importance)=> {
})
}
const groupCountByAlarmType=(deptId,projectId,now)=> {
const groupCountByAlarmType=(deptId,projectId)=> {
return request({
url: `/bgscreen/aiBoxVideo/groupCountByAlarmType?deptId=${deptId||0}&projectId=${projectId||0}&now=${now}`,
method: 'get'
})
}
// 查询视频分布汇总
const selectGroupCountVideoConfig=(deptId,projectId)=> {
return request({
url: `/bgscreen/aiBoxVideo/selectGroupCountVideoConfig?deptId=${deptId||0}&projectId=${projectId||0}`,
url: `/bgscreen/aiBoxVideo/groupCountByAlarmType?deptId=${deptId||0}&projectId=${projectId||0}`,
method: 'get'
})
}
@ -32,7 +24,5 @@ const selectGroupCountVideoConfig=(deptId,projectId)=> {
export default{
listView,
getVideoPassage,
groupCountByAlarmType,
selectGroupCountVideoConfig
getVideoPassage
}

View File

@ -804,7 +804,6 @@ export default {
sum += it.value;
})
this.overviewTotal = sum;
console.log(tmps);
this.typeDistributionData = tmps;
this.elKey++;
})

View File

@ -3,36 +3,66 @@
<div class="screen-content">
<el-row>
<el-col :span="6">
<module-one-2-1 label="预警概况">
<div class="labour-warning-title">
<div class="labour-warning-img">
<div class="labour-warning-bgd">
<img src="/images/labour_warning_icon.png">
</div>
</div>
<div class="labour-warning-data">
<p>今日预警</p>
<div class="labour-warning-number">
<span>{{overviewTotalDay}}</span>
</div>
</div>
<div class="labour-warning-data">
<p>累计预警</p></p></p>
<div class="labour-warning-number">
<span>{{overviewTotal}}</span>
</div>
</div></div>
<project-overview-chart :key="overviewDay" :sp="''"
:maintitle="overviewTotalDay" :legend-opt="legendOpt2" :typedata="typeDistributionDataDay"
:text="overviewTextDay" :height="250"></project-overview-chart>
<project-overview-chart :key="overview" :sp="''"
:maintitle="overviewTotal" :legend-opt="legendOpt1" :typedata="typeDistributionData"
:text="overviewText" :height="250"></project-overview-chart>
</module-one-2-1>
<module-one-1-1 label="预警分布">
<rank-chart :data="availabilityData" :showval="true" :height="300"></rank-chart>
<module-one-1-1 label="预警概况" :amplify="true" name="amplify-spjk">
<div class="equipment-list-max">
<el-row>
<el-col :span="12">
<div class="equipment-list-min">
<div class="equipment-list-gif">
<img src="images/video_1.png">
</div>
<div class="equipment-list-data">
<p>项目监控</p>
<div><span v-cloak>{{ 0 }}</span></div>
</div>
</div>
</el-col>
<el-col :span="12">
<div class="equipment-list-min">
<div class="equipment-list-gif">
<img src="images/video_2.png">
</div>
<div class="equipment-list-data">
<p>吊钩监控</p>
<div><span v-cloak>{{ 0 }}</span></div>
</div>
</div>
</el-col>
<el-col :span="12">
<div class="equipment-list-min">
<div class="equipment-list-gif">
<img src="images/video_3.png">
</div>
<div class="equipment-list-data">
<p>AI识别监控</p>
<div><span v-cloak>{{ 0 }}</span></div>
</div>
</div>
</el-col>
<el-col :span="12">
<div class="equipment-list-min">
<div class="equipment-list-gif">
<img src="images/video_4.png">
</div>
<div class="equipment-list-data">
<p>离线视频</p>
<div><span v-cloak>{{ 0 }}</span></div>
</div>
</div>
</el-col>
</el-row>
</div>
</module-one-1-1>
<module-one-2-1 label="预警分布">
<div class="video-field-layout">
<project-overview-chart :key="overview" :sp="''"
:maintitle="overviewTotal" :legend-opt="legendOpt1" :typedata="typeDistributionData"
:text="overviewText" :height="230"></project-overview-chart>
<rank-chart :data="availabilityData" :showval="true" :height="300"
:width="projectCategoryWidth"></rank-chart>
</div>
</module-one-2-1>
</el-col>
<el-col :span="12">
<div class="ai-video-info">
@ -161,7 +191,7 @@ export default {
//
overview: 0,
overviewInterval: '',
overviewTotal: 0,
overviewTotal: 100,
legendOpt1: {
icon: "rect",
textStyle: {
@ -178,39 +208,15 @@ export default {
},
},
},
overviewText: '累计预警',
overviewText: '预警数量',
//
availabilityData: [],
projectCategoryWidth: 200,
//
typeDistributionData: [
{ name: '未戴安全帽', value: '0' },
{ name: '未穿工服', value: '0' },
{ name: '反光衣/带检测', value: '0' }
],
overviewTextDay: '今日预警',
overviewTotalDay: 0,
overviewDay: 999,
legendOpt2: {
icon: "rect",
textStyle: {
fontSize: 14,
rich: {
name: {
color: "#c3dbfd",
padding: [10, 5, 20, 5],
},
percent: {
color: "#f73647",
padding: [10, 5, 20, 5],
},
},
},
},
typeDistributionDataDay: [
{ name: '未戴安全帽', value: '0' },
{ name: '未穿工服', value: '0' },
{ name: '反光衣/带检测', value: '0' }
{ name: '在建项目', value: '15' },
{ name: '项目总投资', value: '515.97' },
{ name: '项目年投资', value: '134.86' }
],
}
},
@ -343,8 +349,11 @@ export default {
this.getAiVideoInfoList("","");
this.getMajorAiVideoInfoList();
this.getAnalysisDetailList();
this.getAiVideoAlertorTypeCount();
this.initAiVideoAlertorTypeDistribution();
//
// this.getAiVideoAlertorTypeCount();
// this.getAiVideoAlertorTypeWarningCount();
},
//head
onItemData(e){
@ -477,66 +486,32 @@ 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", {
// projectId: JSON.parse(localStorage.getItem("data")).aqzg
// }).then(res => {
// var data = res.data;
// var num = 0;
// data.forEach(item =>{
// num += item.value;
// })
// data.forEach(item =>{
// item.percent = (item.value/num*100)
// })
// this.scaleData = data;
// }).catch(err => {
// })
//
this.$api.aiBoxVideo.groupCountByAlarmType(this.dept?.id||0,this.projectInfo?.projectId,"Y").then((response) => {
if(response.data){
let sum = 0;
response.data.forEach(datum => {
sum+=datum.value;
})
this.overviewTotalDay = sum;
this.typeDistributionDataDay = response.data;
this.overviewDay++;
}
});
//
this.$api.aiBoxVideo.groupCountByAlarmType(this.dept?.id||0,this.projectInfo?.projectId,"N").then((response) => {
if(response.data){
let sum = 0;
response.data.forEach(datum => {
sum+=datum.value;
})
this.overviewTotal = sum;
this.typeDistributionData = response.data;
this.overview++;
}
});
},
initAiVideoAlertorTypeDistribution(){
this.$api.aiBoxVideo.selectGroupCountVideoConfig(this.dept?.id||0,this.projectInfo?.projectId).then((response) => {
let list=[];
if(response.data){
let sum = 0;
response.data.forEach(datum => {
sum += datum.value;
})
response.data.forEach(datum => {
datum.text = datum.name;
datum.prop = (datum.value/sum*100).toFixed(2)
list.push(datum);
})
this.availabilityData = list;
}
});
axios.post(Host + "/api/video/getAiVideoAlertorTypeCount", {
projectId: JSON.parse(localStorage.getItem("data")).aqzg
}).then(res => {
var data = res.data;
var num = 0;
data.forEach(item =>{
num += item.value;
})
data.forEach(item =>{
item.percent = (item.value/num*100).toFixed(2)
})
this.scaleData = data;
}).catch(err => {
})
},
getAiVideoAlertorTypeWarningCount(){
axios.post(Host + "/api/video/getAiVideoAlertorTypeWarningCount", {
@ -724,37 +699,4 @@ export default {
text-align: center;
line-height: 420px;
}
.my-svg-icon {
width: 40px;
height: 40px;
margin-bottom: 20px;
}
.my-svg-icon * {
fill: #389DE3;
}
.people-number-con div.is-split {
background: none;
}
.labour-education .number-unit {
position: relative;
bottom: -8px;
}
.number-unit {
word-break: keep-all;
}
.cost-out {
.labour-education {
height: 70px;
.people-number-con {
padding: 0px;
}
}
}
</style>