Compare commits

...

4 Commits

6 changed files with 56 additions and 26 deletions

View File

@ -241,6 +241,10 @@
//获取左侧区域删除图形或断面成功后返回的数据
function getdeleData(data){
console.log("id",data)
if(data != null){
window.parent.delSuccess()
}
}
document.body.appendChild(script);

View File

@ -1,7 +1,7 @@
<template>
<div class="content-box">
<!-- v-if="videoTypeShow" -->
<div class="videoTypeBox" v-if="videoTypeShow">
<div class="videoTypeBox" v-if="videoTypeShow" >
<el-form :inline="true" :model="videoTypeForm" class="demo-form-inline" >
<el-form-item label="视频源类型:" >
<el-radio-group v-model="videoTypeForm.videoType">
@ -60,7 +60,7 @@
</el-card>
</el-col>
</el-row>
<div class="btn">
<div class="btn" v-if="videoTypeForm.videoType=='实时视频'">
<el-button type="primary" @click="applicationBtn">保存</el-button>
<!-- <el-button type="primary" @click="stopAlgorithmBtn">关闭程序</el-button> -->

View File

@ -22,7 +22,7 @@
</div>
</el-tab-pane>
<el-tab-pane label="数据看板" name="second">
<dataBoard :activeName="activeName" :triggerData="triggerData" :triggerListData="triggerListData"></dataBoard>
<dataBoard :activeName="activeName" :triggerData="triggerData" :triggerListData="triggerListData" :cycleTimeData='cycleTimeData'></dataBoard>
</el-tab-pane>
<el-tab-pane label="分析配置" name="third">
<analysisConfiguration :analysisConfigurationdata="analysisConfigurationdata"></analysisConfiguration>
@ -71,7 +71,7 @@
</div>
</el-drawer>
<!-- 组件弹框 -->
<el-dialog :title="componentTitle + '指标组件'" width="40%" :visible.sync="component">
<el-dialog :title="componentTitle + '指标组件'" width="40%" :visible.sync="component" :close-on-click-modal ="false">
<el-form ref="form" :model="componentForm" label-width="150px" @close="closeComponentForm()">
<el-form-item label="名称:">
<el-input v-model="componentForm.componentName"></el-input>
@ -331,6 +331,8 @@ export default {
//
triggerData: [],
triggerListData:[],
//
cycleTimeData:[],
//
videoType: '',
videoAnalysisShow: false,
@ -345,7 +347,7 @@ export default {
videoName:'',
videoPath:'',
videoTotalFrames:'',
videoType:''
videoType:'实时视频'
},
description:'请点击视频分析'
};
@ -364,6 +366,7 @@ export default {
window.getSingleComponentId = this.getSingleComponentIdN;
window.getSimulationAreaEdit = this.getSimulationAreaEdit;
window.OnScene = this.OnSceneN;
window.delSuccess= this.delSuccess;
this.getAllSectionalData(this.$route.query.id);
this.VideoId = this.$route.query.id;
this.number = this.$route.query.num;
@ -374,7 +377,7 @@ export default {
this.trafficAnalysisShow = false;
this.createMqtt();
document.getElementById('mapModule').contentWindow.lixianVideo(JSON.stringify(this.analysis));
// document.getElementById('mapModule').contentWindow.lixianVideo(JSON.stringify(this.analysis));
} else if (this.$route.query.type == '离线视频'){
this.videoAnalysisShow = true;
this.trafficAnalysisShow = true;
@ -394,7 +397,7 @@ export default {
/** 创建mqtt */
createMqtt() {
//
this.topicSends = ['stream' + this.number, 'trajectory' + this.number, 'detection' + this.number,'trigger-'+ this.$route.query.id];
this.topicSends = ['stream' + this.number, 'trajectory' + this.number, 'detection' + this.number,'trigger-'+ this.$route.query.id,'cycle_time-'+ this.$route.query.id];
window.PubScribe(this.topicSends, this.number, this.realInfo);
// mqtt = mqttConfig;
/*mqtt = new mqttConfig(this.topicSends);
@ -464,18 +467,18 @@ export default {
message: '启动成功',
type: 'success'
});
if(this.videoAnalysisSta=='已分析'){
}else if(this.videoAnalysisSta=='分析中'){
this.description = '正在分析中'
setTimeout(() => {
setTimeout(() => {
this.getAnalysisStatus()
}, 5000);
}else if(this.videoAnalysisSta=='未分析'){
// setTimeout(() => {
// this.getAnalysisStatus()
// }, 5000);
}
}, 5000);
// if(this.videoAnalysisSta==''){
// }else if(this.videoAnalysisSta==''){
// this.description = ''
// setTimeout(() => {
// this.getAnalysisStatus()
// }, 5000);
// }else if(this.videoAnalysisSta==''){
// }
}
});
},
@ -501,14 +504,13 @@ export default {
analysisData(){
getAnalysisData(this.$route.query.id).then(res => {
console.log("res.data.data",res.data.data)
this.analysis.trafficAnalysisPath1 = res.data.data.trafficAnalysisPath1
this.analysis.trafficAnalysisPath2 = res.data.data.trafficAnalysisPath2
this.analysis.videoAnalysisPath = res.data.data.videoAnalysisPath
this.analysis.videoName = res.data.data.videoName
this.analysis.videoPath = res.data.data.videoPath
this.analysis.videoTotalFrames = res.data.data.videoTotalFrames
this.analysis.videoType=this.$route.query.type
this.analysis.trafficAnalysisPath1 = res.data.data.trafficAnalysisPath1
this.analysis.trafficAnalysisPath2 = res.data.data.trafficAnalysisPath2
this.analysis.videoAnalysisPath = res.data.data.videoAnalysisPath
this.analysis.videoName = res.data.data.videoName
this.analysis.videoPath = res.data.data.videoPath
this.analysis.videoTotalFrames = res.data.data.videoTotalFrames
this.analysis.videoType=this.$route.query.type
});
},
//mqtt
@ -585,6 +587,19 @@ export default {
this.triggerListData = msgN;
} catch (error) {}
break;
case 'cycle_time-'+this.$route.query.id:
try {
// console.log("trigger_msgN",message)
const utf8decoder = new TextDecoder();
const u8arr = new Uint8Array(message);
const temp = utf8decoder.decode(u8arr); //
var detId = [];
const msgN = JSON.parse(temp);
// console.log("trigger_msgN",msgN)
this.cycleTimeData = msgN;
} catch (error) {}
break;
}
this.receiveNews = '';
},
@ -604,6 +619,17 @@ export default {
document.getElementById('mapModule').contentWindow.postVideoId(JSON.stringify(this.$route.query.id));
document.getElementById('mapModule').contentWindow.lixianVideo(JSON.stringify(this.analysis));
},
//
delSuccess(){
if(this.$route.query.type=='离线视频'){
this.$message({
type: "warning",
message: "请点击交通分析,获取最新数据!",
showClose: true,
duration:0,
});
}
},
// //id
getSingleComponentIdN(id, type, name) {
console.log('id', id);