Merge branch 'master' of https://git.lgzn.space/chengdandan/TransFlow
This commit is contained in:
commit
cfb4fe70a1
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -29,11 +29,14 @@
|
|||
<span class="statusName" v-if="item.type=='离线视频'">{{ item.videoAnalysisStatus }}</span>
|
||||
</div>
|
||||
<!-- <div class="middleN" v-if="item.type=='离线视频'&&item.videoAnalysisStatus=='分析中'"> -->
|
||||
<div class="middleN" v-if=" (item.type=='离线视频' && item.videoAnalysisStatus=='分析中') || (item.type=='离线视频' &&item.videoAnalysisStatus=='未分析')">
|
||||
<!-- <div class="middleN" v-if=" (item.type=='离线视频' && item.videoAnalysisStatus=='分析中') || (item.type=='离线视频' &&item.videoAnalysisStatus=='未分析')">
|
||||
|
||||
<el-progress type="circle" :percentage="item.numSatus" text-color='#fff'></el-progress>
|
||||
</div> -->
|
||||
<div class="middleN" v-if="item.type=='离线视频' && item.videoAnalysisStatus=='分析中'">
|
||||
|
||||
<el-progress type="circle" :percentage="item.numSatus" text-color='#fff'></el-progress>
|
||||
</div>
|
||||
|
||||
<div class="typeRight">
|
||||
<el-button type="primary" icon="el-icon-refresh-right" @click="openRight(item)" v-if="item.type=='离线视频'&&item.videoAnalysisStatus=='分析异常'"></el-button>
|
||||
</div>
|
||||
|
@ -238,7 +241,7 @@ this.getVideoList()
|
|||
},
|
||||
/** 创建mqtt */
|
||||
createMqtt() {
|
||||
|
||||
console.log("this.videoTypeForm.videoType",this.videoTypeForm.videoType)
|
||||
//创建链接,接收数据
|
||||
if(this.videoTypeForm.videoType=='实时视频'){
|
||||
console.log("this.videoTypeForm.videoType",this.videoTypeForm.videoType)
|
||||
|
@ -336,7 +339,6 @@ this.getVideoList()
|
|||
|
||||
if(msg.type=='video_under_analysis'&&msg.video_id==this.videoList[i].id){
|
||||
var numSatusN=''
|
||||
// loadingcard.close();
|
||||
this.videoList[i].videoAnalysisStatus = '分析中'
|
||||
numSatusN=msg.number_frames/msg.total_frames*100
|
||||
this.videoList[i].numSatus =parseFloat(numSatusN.toFixed(2))
|
||||
|
@ -344,6 +346,10 @@ this.getVideoList()
|
|||
//已分析
|
||||
console.log("已分析")
|
||||
this.videoList[i].videoAnalysisStatus = '已分析'
|
||||
var ip = window.location.host;
|
||||
var ipData = 'http://' + ip.split(':')[0] + ':5000';
|
||||
// var ipData ='http://172.16.1.168:5000/'
|
||||
this.videoList[i].img = ipData+msg.pic_path
|
||||
}else if(msg.type=='video_analyse_unusual'&&msg.video_id==this.videoList[i].id){
|
||||
//分析异常
|
||||
console.log("分析异常")
|
||||
|
@ -648,7 +654,31 @@ this.getVideoList()
|
|||
}
|
||||
// console.log("this.videoTypeForm.videoType",this.videoTypeForm.videoType)
|
||||
var arr = [];
|
||||
var ip = window.location.host;
|
||||
var ipData = 'http://' + ip.split(':')[0] + ':5000';
|
||||
// var ipData ='http://172.16.1.168:5000/'
|
||||
res.data.data.forEach((item)=>{
|
||||
if(this.videoTypeForm.videoType=='离线视频'&&item.videoAnalysisStatus=='已分析'){
|
||||
arr.push({
|
||||
id: item.videoId,
|
||||
type: item.videoType,
|
||||
title: item.videoName,
|
||||
num:item.number,
|
||||
status:item.status,
|
||||
videoStreamAddress:item.videoStreamAddress,
|
||||
videoPath:item.videoPath,
|
||||
// img: require('@/assets/img/AnalysisMain/img1.png'),
|
||||
// img:'',
|
||||
trafficAnalysisStatus:item.trafficAnalysisStatus,
|
||||
videoAnalysisStatus:item.videoAnalysisStatus,
|
||||
numberFrames:item.numberFrames,
|
||||
totalFrames:item.totalFrames,
|
||||
numSatus:0,
|
||||
msg:{},
|
||||
img:ipData+item.picPath,
|
||||
});
|
||||
|
||||
}else{
|
||||
arr.push({
|
||||
id: item.videoId,
|
||||
type: item.videoType,
|
||||
|
@ -658,16 +688,18 @@ this.getVideoList()
|
|||
videoStreamAddress:item.videoStreamAddress,
|
||||
videoPath:item.videoPath,
|
||||
img: require('@/assets/img/AnalysisMain/img1.png'),
|
||||
// img:'',
|
||||
trafficAnalysisStatus:item.trafficAnalysisStatus,
|
||||
videoAnalysisStatus:item.videoAnalysisStatus,
|
||||
numberFrames:item.numberFrames,
|
||||
totalFrames:item.totalFrames,
|
||||
numSatus:0,
|
||||
numSatus:parseFloat((item.numberFrames/item.totalFrames*100).toFixed(2)),
|
||||
msg:{},
|
||||
});
|
||||
})
|
||||
// img:ipData+item.picPath,
|
||||
});
|
||||
}
|
||||
})
|
||||
this.videoList=arr
|
||||
console.log("arr",this.videoList)
|
||||
if(this.videoList.length=='0'){
|
||||
this.videoTypeShow = true
|
||||
}else{
|
||||
|
|
|
@ -192,34 +192,14 @@ export default {
|
|||
this.classify.push(val);
|
||||
item.children.push(val);
|
||||
if (val.timeMode == '周期统计' || this.cycleStatisticsData.length == 0) {
|
||||
// if(this.$route.query.type=='离线视频'){
|
||||
// if(this.cycleHistoryData.CycleStatisticsData!=undefined){
|
||||
// this.cycleHistoryData.CycleStatisticsData.forEach(ele => {
|
||||
// if(val.analogAreaComponentId == ele.component_id){
|
||||
// item.cycleStatisticsData = ele.cycleStatisticsData
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
|
||||
// }else{
|
||||
item.cycleStatisticsData = val.cycleStatisticsData
|
||||
// }
|
||||
|
||||
}
|
||||
if (val.timeMode == '周期时刻' || this.cycleTimeData.length == 0) {
|
||||
// if(this.$route.query.type=='离线视频'){
|
||||
// if(this.cycleHistoryData.CycleTimeData!=undefined){
|
||||
// this.cycleHistoryData.CycleTimeData.forEach(ele => {
|
||||
// if(val.analogAreaComponentId == ele.component_id){
|
||||
// item.cycleTimeData = ele.cycleTimeData
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
// }else{
|
||||
|
||||
item.cycleTimeData = val.cycleTimeData
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
this.acticveName.push([val.analogAreaComponentId]);
|
||||
|
@ -298,7 +278,7 @@ export default {
|
|||
if (newVal != undefined && newVal.length != 0) {
|
||||
newVal.forEach(ele => {
|
||||
if (ele.timeMode == '周期统计'&&this.$route.query.type=='实时视频') {
|
||||
console.log("实时视频")
|
||||
console.log("实时视频",'周期统计')
|
||||
this.$nextTick(() => {
|
||||
// var thatNN = this;
|
||||
ele.cycleStatisticsData.forEach(item => {
|
||||
|
@ -312,6 +292,25 @@ export default {
|
|||
}
|
||||
})
|
||||
}
|
||||
if (ele.timeMode == '周期时刻'&&this.$route.query.type=='实时视频') {
|
||||
console.log("实时视频",'周期时刻')
|
||||
this.$nextTick(() => {
|
||||
ele.cycleTimeData.forEach(item => {
|
||||
if (item.type_data != null) {
|
||||
item.time = item.time.split('.')[0];
|
||||
|
||||
this.typeCycleStatistics = item;
|
||||
}
|
||||
// thatN.$nextTick(() => {
|
||||
|
||||
})
|
||||
if (this.$refs.typeChartRef1 != undefined) {
|
||||
// // 轮循周期时刻生成的各类组件
|
||||
this.getRef(this.$refs.typeChartRef1, ele.timeMode)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
if(ele.timeMode == '周期统计'&&this.$route.query.type=='离线视频'){
|
||||
|
||||
if(this.cycleHistoryData.CycleStatisticsData!=undefined&&this.cycleHistoryData.CycleStatisticsData.lenght!=0){
|
||||
|
@ -323,7 +322,7 @@ export default {
|
|||
})
|
||||
this.$nextTick(() => {
|
||||
ele.cycleStatisticsData.forEach(item => {
|
||||
var timeNew = item.time.split('.')[0]
|
||||
var timeNew = item.time.split('.')[0]
|
||||
var dateLength = timeNew.length;
|
||||
var key = timeNew.substring(dateLength-8,dateLength);
|
||||
item.time = key;
|
||||
|
@ -342,25 +341,7 @@ export default {
|
|||
|
||||
|
||||
}
|
||||
if (ele.timeMode == '周期时刻'&&this.$route.query.type=='实时视频') {
|
||||
console.log("实时视频")
|
||||
this.$nextTick(() => {
|
||||
ele.cycleTimeData.forEach(item => {
|
||||
if (item.type_data != null) {
|
||||
item.time = item.time.split('.')[0];
|
||||
|
||||
this.typeCycleStatistics = item;
|
||||
}
|
||||
// thatN.$nextTick(() => {
|
||||
|
||||
})
|
||||
if (this.$refs.typeChartRef1 != undefined) {
|
||||
// // 轮循周期时刻生成的各类组件
|
||||
this.getRef(this.$refs.typeChartRef1, ele.timeMode)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
} if(ele.timeMode == '周期时刻'&&this.$route.query.type=='离线视频'){
|
||||
|
|
|
@ -122,7 +122,8 @@
|
|||
<el-option label="小时" value="小时" v-if="this.$route.query.type != '离线视频'||(this.$route.query.type == '实时视频'&&componentForm.timeMode == '周期统计')"></el-option>
|
||||
</el-select>
|
||||
<!-- <el-slider v-model="componentForm.cycleInterval" :max="max" :min="min"> </el-slider> -->
|
||||
<el-slider v-model="componentForm.cycleInterval" :max="60" :min="1" v-if="componentForm.company != '小时'"> </el-slider>
|
||||
<el-slider v-model="componentForm.cycleInterval" :max="60" :min="5" v-if="componentForm.company == '秒'"> </el-slider>
|
||||
<el-slider v-model="componentForm.cycleInterval" :max="60" :min="1" v-if="componentForm.company == '分钟'"> </el-slider>
|
||||
<el-slider v-model="componentForm.cycleInterval" :max="24" :min="1" v-if="componentForm.company == '小时'"> </el-slider>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
@ -792,8 +793,15 @@ export default {
|
|||
console.log('val', val);
|
||||
if (val == '小时') {
|
||||
this.max = '24';
|
||||
} else {
|
||||
this.max = '100';
|
||||
this.componentForm.cycleInterval = 1;
|
||||
} else if (val == '分钟') {
|
||||
|
||||
this.max = '60';
|
||||
this.componentForm.cycleInterval = 1;
|
||||
}else if (val == '秒') {
|
||||
|
||||
this.max = '60';
|
||||
this.componentForm.cycleInterval = 5;
|
||||
}
|
||||
},
|
||||
changeStatus(msg){
|
||||
|
|
|
@ -59,6 +59,9 @@ export default {
|
|||
dialogClosed() {
|
||||
this.password = '';
|
||||
},
|
||||
mounted() {
|
||||
this.getUser();
|
||||
},
|
||||
//保存密码
|
||||
savePassword() {
|
||||
// console.log(serverUrl);
|
||||
|
@ -139,9 +142,7 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getUser();
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue