Merge branch 'master' of http://git.lgzn.space/chengdandan/TransFlow
This commit is contained in:
commit
509260c8d9
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -241,6 +241,10 @@
|
||||||
//获取左侧区域删除图形或断面成功后返回的数据
|
//获取左侧区域删除图形或断面成功后返回的数据
|
||||||
function getdeleData(data){
|
function getdeleData(data){
|
||||||
console.log("id",data)
|
console.log("id",data)
|
||||||
|
if(data != null){
|
||||||
|
window.parent.delSuccess()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
document.body.appendChild(script);
|
document.body.appendChild(script);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="content-box">
|
<div class="content-box">
|
||||||
<!-- v-if="videoTypeShow" -->
|
<!-- 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 :inline="true" :model="videoTypeForm" class="demo-form-inline" >
|
||||||
<el-form-item label="视频源类型:" >
|
<el-form-item label="视频源类型:" >
|
||||||
<el-radio-group v-model="videoTypeForm.videoType">
|
<el-radio-group v-model="videoTypeForm.videoType">
|
||||||
|
@ -60,10 +60,10 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</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="applicationBtn">保存</el-button>
|
||||||
<!-- <el-button type="primary" @click="stopAlgorithmBtn">关闭程序</el-button> -->
|
<el-button type="primary" @click="stopAlgorithmBtn">关闭程序</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div id="dialog" class="margin-top: 0px !important;"> -->
|
<!-- <div id="dialog" class="margin-top: 0px !important;"> -->
|
||||||
|
@ -223,6 +223,7 @@ destroyed: function () {
|
||||||
const msg = JSON.parse(temp) //这一步报错则返回的是二进制流图片,不报错则返回的是JSON的错误提示数据
|
const msg = JSON.parse(temp) //这一步报错则返回的是二进制流图片,不报错则返回的是JSON的错误提示数据
|
||||||
// var newArr = []
|
// var newArr = []
|
||||||
//msg为转换后的JSON数据
|
//msg为转换后的JSON数据
|
||||||
|
console.log("msg",msg)
|
||||||
if(msg.rate=='low'){
|
if(msg.rate=='low'){
|
||||||
// console.log("msg", msg)
|
// console.log("msg", msg)
|
||||||
if(this.videoList.length!=0){
|
if(this.videoList.length!=0){
|
||||||
|
@ -247,7 +248,7 @@ destroyed: function () {
|
||||||
const u8arr = new Uint8Array(message)
|
const u8arr = new Uint8Array(message)
|
||||||
const temp = utf8decoder.decode(u8arr) // 将二进制数据转为字符串
|
const temp = utf8decoder.decode(u8arr) // 将二进制数据转为字符串
|
||||||
const msg = JSON.parse(temp) //这一步报错则返回的是二进制流图片,不报错则返回的是JSON的错误提示数据
|
const msg = JSON.parse(temp) //这一步报错则返回的是二进制流图片,不报错则返回的是JSON的错误提示数据
|
||||||
// console.log("hert", msg) //msg为转换后的JSON数据
|
console.log("hert", msg) //msg为转换后的JSON数据
|
||||||
if(msg==''){
|
if(msg==''){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,8 +56,7 @@
|
||||||
style="font-weight: 600;font-size: 18px;margin-right: 5px;"
|
style="font-weight: 600;font-size: 18px;margin-right: 5px;"
|
||||||
></i>
|
></i>
|
||||||
<p class="board-title">坐标转换</p>
|
<p class="board-title">坐标转换</p>
|
||||||
<i class="el-icon-warning" style="color: #409eff; margin: 0 3px 0 10px"></i
|
<i class="el-icon-warning" style="color: #409eff; margin: 0 3px 0 10px"></i>通过将图像坐标系转换为物理坐标系,地理参考使您能够将像素测量转换为真实速度和距离。
|
||||||
>通过将图像坐标系转换为物理坐标系,地理参考使您能够将像素测量转换为真实速度和距离。
|
|
||||||
</div>
|
</div>
|
||||||
<el-form ref="form" :model="coordinateForm" label-width="fit-content" v-if="contentShow.coordinate">
|
<el-form ref="form" :model="coordinateForm" label-width="fit-content" v-if="contentShow.coordinate">
|
||||||
<!-- <el-form-item label="坐标转换开关:">
|
<!-- <el-form-item label="坐标转换开关:">
|
||||||
|
@ -130,6 +129,10 @@
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="imageXCoordinate" label="横坐标" align="center">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="imageYCoordinate" label="纵坐标" align="center">
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="oldName" label="旧名字" align="center" v-if="laneform.laneClose == true">
|
<el-table-column prop="oldName" label="旧名字" align="center" v-if="laneform.laneClose == true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.oldName" maxlength="20" placeholder="请输入" />
|
<el-input v-model="scope.row.oldName" maxlength="20" placeholder="请输入" />
|
||||||
|
|
|
@ -16,13 +16,11 @@
|
||||||
></iframe>
|
></iframe>
|
||||||
<!-- <iframe src="./VideoWeb/index.html" style="height: 100%; width: 100%;border: none" ref="iframe"></iframe> -->
|
<!-- <iframe src="./VideoWeb/index.html" style="height: 100%; width: 100%;border: none" ref="iframe"></iframe> -->
|
||||||
<el-empty :description="description" v-if="videoAnalysisShow">
|
<el-empty :description="description" v-if="videoAnalysisShow">
|
||||||
<!-- <el-button type="primary">按钮</el-button> -->
|
|
||||||
<!-- <el-button type="primary" size="mini" @click="videoAnalysisBtn" v-if="videoAnalysisShow">视频分析</el-button> -->
|
|
||||||
</el-empty>
|
</el-empty>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="数据看板" name="second">
|
<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>
|
||||||
<el-tab-pane label="分析配置" name="third">
|
<el-tab-pane label="分析配置" name="third">
|
||||||
<analysisConfiguration :analysisConfigurationdata="analysisConfigurationdata"></analysisConfiguration>
|
<analysisConfiguration :analysisConfigurationdata="analysisConfigurationdata"></analysisConfiguration>
|
||||||
|
@ -71,7 +69,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</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 ref="form" :model="componentForm" label-width="150px" @close="closeComponentForm()">
|
||||||
<el-form-item label="名称:">
|
<el-form-item label="名称:">
|
||||||
<el-input v-model="componentForm.componentName"></el-input>
|
<el-input v-model="componentForm.componentName"></el-input>
|
||||||
|
@ -331,6 +329,8 @@ export default {
|
||||||
//触发数据
|
//触发数据
|
||||||
triggerData: [],
|
triggerData: [],
|
||||||
triggerListData:[],
|
triggerListData:[],
|
||||||
|
//周期时刻
|
||||||
|
cycleTimeData:[],
|
||||||
//视频类型
|
//视频类型
|
||||||
videoType: '',
|
videoType: '',
|
||||||
videoAnalysisShow: false,
|
videoAnalysisShow: false,
|
||||||
|
@ -345,9 +345,9 @@ export default {
|
||||||
videoName:'',
|
videoName:'',
|
||||||
videoPath:'',
|
videoPath:'',
|
||||||
videoTotalFrames:'',
|
videoTotalFrames:'',
|
||||||
videoType:''
|
videoType:'实时视频'
|
||||||
},
|
},
|
||||||
description:'请点击视频分析'
|
description:'请等待排队'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -364,6 +364,7 @@ export default {
|
||||||
window.getSingleComponentId = this.getSingleComponentIdN;
|
window.getSingleComponentId = this.getSingleComponentIdN;
|
||||||
window.getSimulationAreaEdit = this.getSimulationAreaEdit;
|
window.getSimulationAreaEdit = this.getSimulationAreaEdit;
|
||||||
window.OnScene = this.OnSceneN;
|
window.OnScene = this.OnSceneN;
|
||||||
|
window.delSuccess= this.delSuccess;
|
||||||
this.getAllSectionalData(this.$route.query.id);
|
this.getAllSectionalData(this.$route.query.id);
|
||||||
this.VideoId = this.$route.query.id;
|
this.VideoId = this.$route.query.id;
|
||||||
this.number = this.$route.query.num;
|
this.number = this.$route.query.num;
|
||||||
|
@ -374,11 +375,12 @@ export default {
|
||||||
this.trafficAnalysisShow = false;
|
this.trafficAnalysisShow = false;
|
||||||
|
|
||||||
this.createMqtt();
|
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 == '离线视频'){
|
} else if (this.$route.query.type == '离线视频'){
|
||||||
this.videoAnalysisShow = true;
|
this.videoAnalysisShow = true;
|
||||||
this.trafficAnalysisShow = true;
|
this.trafficAnalysisShow = true;
|
||||||
this.getAnalysisStatus()
|
this.getAnalysisStatus()
|
||||||
|
// this.createMqtt();
|
||||||
// if(this.$route.query.status=='未分析'){
|
// if(this.$route.query.status=='未分析'){
|
||||||
// }
|
// }
|
||||||
// if(this.$route.query.status=='未分析'){
|
// if(this.$route.query.status=='未分析'){
|
||||||
|
@ -394,7 +396,7 @@ export default {
|
||||||
/** 创建mqtt */
|
/** 创建mqtt */
|
||||||
createMqtt() {
|
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);
|
window.PubScribe(this.topicSends, this.number, this.realInfo);
|
||||||
// mqtt = mqttConfig;
|
// mqtt = mqttConfig;
|
||||||
/*mqtt = new mqttConfig(this.topicSends);
|
/*mqtt = new mqttConfig(this.topicSends);
|
||||||
|
@ -429,19 +431,18 @@ export default {
|
||||||
//视频分析状态
|
//视频分析状态
|
||||||
if(res.data.data.videoAnalysisStatus == '未分析'){
|
if(res.data.data.videoAnalysisStatus == '未分析'){
|
||||||
this.disabledTrafficAnalysis= true
|
this.disabledTrafficAnalysis= true
|
||||||
// this.videoUnityShow = false
|
|
||||||
this.videoUnityShow = true
|
this.videoUnityShow = true
|
||||||
this.analysisData()
|
this.analysisData()
|
||||||
}else if(res.data.data.videoAnalysisStatus == '分析中'){
|
}else if(res.data.data.videoAnalysisStatus == '分析中'){
|
||||||
this.disabledVideoAnalysis= true
|
this.disabledVideoAnalysis= true
|
||||||
this.videoUnityShow = false
|
this.videoUnityShow = false
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.getAnalysisStatus()
|
this.getAnalysisStatus()
|
||||||
}, 5000);
|
}, 5000);
|
||||||
}else if(res.data.data.videoAnalysisStatus == '已分析'){
|
}else if(res.data.data.videoAnalysisStatus == '已分析'){
|
||||||
this.videoUnityShow = true
|
this.videoUnityShow = true
|
||||||
this.videoAnalysisSta = res.data.data.videoAnalysisStatus
|
this.videoAnalysisSta = res.data.data.videoAnalysisStatus
|
||||||
this.disabledTrafficAnalysis= false
|
this.disabledTrafficAnalysis= false
|
||||||
this.analysisData()
|
this.analysisData()
|
||||||
//交通分析状态
|
//交通分析状态
|
||||||
}else if(res.data.data.trafficAnalysisStatus=='未分析'){
|
}else if(res.data.data.trafficAnalysisStatus=='未分析'){
|
||||||
|
@ -464,18 +465,18 @@ export default {
|
||||||
message: '启动成功',
|
message: '启动成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
if(this.videoAnalysisSta=='已分析'){
|
setTimeout(() => {
|
||||||
|
|
||||||
}else if(this.videoAnalysisSta=='分析中'){
|
|
||||||
this.description = '正在分析中'
|
|
||||||
setTimeout(() => {
|
|
||||||
this.getAnalysisStatus()
|
this.getAnalysisStatus()
|
||||||
}, 5000);
|
}, 5000);
|
||||||
}else if(this.videoAnalysisSta=='未分析'){
|
// if(this.videoAnalysisSta=='已分析'){
|
||||||
// setTimeout(() => {
|
|
||||||
// this.getAnalysisStatus()
|
// }else if(this.videoAnalysisSta=='分析中'){
|
||||||
// }, 5000);
|
// this.description = '正在分析中'
|
||||||
}
|
// setTimeout(() => {
|
||||||
|
// this.getAnalysisStatus()
|
||||||
|
// }, 5000);
|
||||||
|
// }else if(this.videoAnalysisSta=='未分析'){
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -501,14 +502,13 @@ export default {
|
||||||
analysisData(){
|
analysisData(){
|
||||||
getAnalysisData(this.$route.query.id).then(res => {
|
getAnalysisData(this.$route.query.id).then(res => {
|
||||||
console.log("res.data.data",res.data.data)
|
console.log("res.data.data",res.data.data)
|
||||||
this.analysis.trafficAnalysisPath1 = res.data.data.trafficAnalysisPath1
|
this.analysis.trafficAnalysisPath1 = res.data.data.trafficAnalysisPath1
|
||||||
this.analysis.trafficAnalysisPath2 = res.data.data.trafficAnalysisPath2
|
this.analysis.trafficAnalysisPath2 = res.data.data.trafficAnalysisPath2
|
||||||
this.analysis.videoAnalysisPath = res.data.data.videoAnalysisPath
|
this.analysis.videoAnalysisPath = res.data.data.videoAnalysisPath
|
||||||
this.analysis.videoName = res.data.data.videoName
|
this.analysis.videoName = res.data.data.videoName
|
||||||
this.analysis.videoPath = res.data.data.videoPath
|
this.analysis.videoPath = res.data.data.videoPath
|
||||||
this.analysis.videoTotalFrames = res.data.data.videoTotalFrames
|
this.analysis.videoTotalFrames = res.data.data.videoTotalFrames
|
||||||
this.analysis.videoType=this.$route.query.type
|
this.analysis.videoType=this.$route.query.type
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//停止订阅mqtt
|
//停止订阅mqtt
|
||||||
|
@ -528,7 +528,9 @@ export default {
|
||||||
const u8arr = new Uint8Array(message);
|
const u8arr = new Uint8Array(message);
|
||||||
const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串
|
const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串
|
||||||
const msg = JSON.parse(temp); //这一步报错则返回的是二进制流图片,不报错则返回的是JSON的错误提示数据
|
const msg = JSON.parse(temp); //这一步报错则返回的是二进制流图片,不报错则返回的是JSON的错误提示数据
|
||||||
|
// console.log("msg",msg)
|
||||||
document.getElementById('mapModule').contentWindow.getDestination(JSON.stringify(msg));
|
document.getElementById('mapModule').contentWindow.getDestination(JSON.stringify(msg));
|
||||||
|
|
||||||
if (msg.rate == 'high') {
|
if (msg.rate == 'high') {
|
||||||
document.getElementById('mapModule').contentWindow.getDestination(JSON.stringify(msg));
|
document.getElementById('mapModule').contentWindow.getDestination(JSON.stringify(msg));
|
||||||
} else {
|
} else {
|
||||||
|
@ -543,6 +545,7 @@ export default {
|
||||||
const u8arr = new Uint8Array(message);
|
const u8arr = new Uint8Array(message);
|
||||||
const temp = utf8decoder1.decode(u8arr); // 将二进制数据转为字符串
|
const temp = utf8decoder1.decode(u8arr); // 将二进制数据转为字符串
|
||||||
const msg = JSON.parse(temp);
|
const msg = JSON.parse(temp);
|
||||||
|
// console.log("msg",msg)
|
||||||
document.getElementById('mapModule').contentWindow.getData(JSON.stringify(msg));
|
document.getElementById('mapModule').contentWindow.getData(JSON.stringify(msg));
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
break;
|
break;
|
||||||
|
@ -553,6 +556,7 @@ export default {
|
||||||
const u8arr = new Uint8Array(message);
|
const u8arr = new Uint8Array(message);
|
||||||
const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串
|
const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串
|
||||||
const msg = JSON.parse(temp);
|
const msg = JSON.parse(temp);
|
||||||
|
// console.log("msg",msg)
|
||||||
document.getElementById('mapModule').contentWindow.getGuiJi(JSON.stringify(msg));
|
document.getElementById('mapModule').contentWindow.getGuiJi(JSON.stringify(msg));
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
break;
|
break;
|
||||||
|
@ -564,6 +568,7 @@ export default {
|
||||||
const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串
|
const temp = utf8decoder.decode(u8arr); // 将二进制数据转为字符串
|
||||||
var detId = [];
|
var detId = [];
|
||||||
const msgN = JSON.parse(temp);
|
const msgN = JSON.parse(temp);
|
||||||
|
// console.log("msgN",msgN)
|
||||||
this.triggerData = msgN;
|
this.triggerData = msgN;
|
||||||
if (temp.length != 0) {
|
if (temp.length != 0) {
|
||||||
for (let i = 0; i < msgN.length; i++) {
|
for (let i = 0; i < msgN.length; i++) {
|
||||||
|
@ -585,6 +590,18 @@ export default {
|
||||||
this.triggerListData = msgN;
|
this.triggerListData = msgN;
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
break;
|
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 = '';
|
this.receiveNews = '';
|
||||||
},
|
},
|
||||||
|
@ -604,6 +621,17 @@ export default {
|
||||||
document.getElementById('mapModule').contentWindow.postVideoId(JSON.stringify(this.$route.query.id));
|
document.getElementById('mapModule').contentWindow.postVideoId(JSON.stringify(this.$route.query.id));
|
||||||
document.getElementById('mapModule').contentWindow.lixianVideo(JSON.stringify(this.analysis));
|
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获取单个组件数据
|
// //新增组件根据组件id获取单个组件数据
|
||||||
getSingleComponentIdN(id, type, name) {
|
getSingleComponentIdN(id, type, name) {
|
||||||
console.log('id', id);
|
console.log('id', id);
|
||||||
|
|
Loading…
Reference in New Issue