20230203
This commit is contained in:
parent
e1caab6602
commit
e391f08dc4
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "成功",
|
||||||
|
"data": [{
|
||||||
|
"graphicId": "35fb0709596841e5b005fb1bc33a0fa4",
|
||||||
|
"graphicName": "测试区域",
|
||||||
|
"graphicType": "区域",
|
||||||
|
"coordinate": "218.6106 984.2285,453.5649 994.1006,267.9708 820.3528,218.6106 984.2285"
|
||||||
|
}, {
|
||||||
|
"graphicId": "957eb7cba61240f5a099ee6080bd29f0",
|
||||||
|
"graphicName": "测试路线2",
|
||||||
|
"graphicType": "轨迹",
|
||||||
|
"coordinate": "157.404 236.9287,179.1225 260.6216,192.9433 300.1097,202.8154 329.7258,214.6618 357.3675,222.5594 392.9068,236.3803 424.4973,258.0987 446.2157,289.6892 465.9598,317.3309 485.7039,350.8958 503.4735,382.4863 509.3967,420 517.2943,467.3858 521.2432,508.8483 525.192,556.234 525.192,599.671 525.192,631.2614 525.192,662.8519 513.3455,690.4936 499.5247,712.2121 477.8062,724.0585 444.2413,728.0073 412.6508,745.777 386.9836,775.3931 377.1115,806.9836 379.0859"
|
||||||
|
}, {
|
||||||
|
"graphicId": "7c24aa16e12840859164780d71827f5f",
|
||||||
|
"graphicName": "测试线2",
|
||||||
|
"graphicType": "断面",
|
||||||
|
"coordinate": "437.7697 642.6563,880.0366 737.4278"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
@ -128,13 +128,21 @@
|
||||||
//unity初始化
|
//unity初始化
|
||||||
function OnSceneLoaded(){
|
function OnSceneLoaded(){
|
||||||
window.parent.OnScene();
|
window.parent.OnScene();
|
||||||
|
|
||||||
|
}
|
||||||
|
//初始化传离线视频数据功能
|
||||||
|
function lixianVideo(string){
|
||||||
|
console.log("string",string)
|
||||||
|
if(unity!=null){
|
||||||
|
unity.SendMessage('AAA','Unity_OfflineDataPrepare', string);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//获取图像
|
//获取图像
|
||||||
function getDestination(string){
|
function getDestination(string){
|
||||||
// console.log("string",string)
|
// console.log("string",string)
|
||||||
if(unity!=null){
|
if(unity!=null){
|
||||||
unity.SendMessage('AAA', 'SendImage', string);
|
unity.SendMessage('AAA', 'SendImage', string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//获取图像id等数据
|
//获取图像id等数据
|
||||||
function getData(string){
|
function getData(string){
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="content-box">
|
<div class="content-box">
|
||||||
<!-- v-if="videoTypeShow" -->
|
<!-- v-if="videoTypeShow" -->
|
||||||
<div class="videoTypeBox" >
|
<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">
|
||||||
|
|
@ -19,16 +19,17 @@
|
||||||
<img src="@/assets/img/AnalysisMain/leftTop.png" alt="" v-if="item.type=='实时视频'">
|
<img src="@/assets/img/AnalysisMain/leftTop.png" alt="" v-if="item.type=='实时视频'">
|
||||||
<img src="@/assets/img/AnalysisMain/leftTop2.png" alt="" v-if="item.type=='离线视频'">
|
<img src="@/assets/img/AnalysisMain/leftTop2.png" alt="" v-if="item.type=='离线视频'">
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<img src="@/assets/img/AnalysisMain/ssVideo.png" alt="" v-if="item.type=='实时视频'">
|
<img src="@/assets/img/AnalysisMain/ssVideo.png" alt="" v-if="item.type=='实时视频'">
|
||||||
<img src="@/assets/img/AnalysisMain/lxVideo.png" alt="" v-if="item.type=='离线视频'">
|
<img src="@/assets/img/AnalysisMain/lxVideo.png" alt="" v-if="item.type=='离线视频'">
|
||||||
</div>
|
</div>
|
||||||
<div class="statusN" v-if="item.type=='实时视频'|| item.status=='已分析'">
|
<div class="statusN">
|
||||||
<img src="@/assets/img/AnalysisMain/status.png" alt="" v-if="item.type=='实时视频'">
|
<img src="@/assets/img/AnalysisMain/status.png" alt="" >
|
||||||
<span class="statusName">{{ item.status }}</span>
|
<span class="statusName">{{ item.status }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="del" @click="open(item.id)"> <i class='el-icon-delete'></i></div> -->
|
<!-- <div class="del" @click="open(item.id)"> <i class='el-icon-delete'></i></div> -->
|
||||||
<img :src="item.img" class="image" @click="goToPage(item.id,item.num,item.title,item.type)">
|
<img :src="item.img" class="image" @click="goToPage(item.id,item.num,item.title,item.type,item.status)">
|
||||||
<div class="bot">
|
<div class="bot">
|
||||||
<span style=" vertical-align: middle;">
|
<span style=" vertical-align: middle;">
|
||||||
<img src="@/assets/img/AnalysisMain/video (1).png" alt="">
|
<img src="@/assets/img/AnalysisMain/video (1).png" alt="">
|
||||||
|
|
@ -69,8 +70,7 @@
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="视频源配置"
|
title="视频源配置"
|
||||||
width="40%"
|
width="40%"
|
||||||
:visible.sync="dialogFormVisible"
|
:visible.sync="dialogFormVisible"
|
||||||
|
|
||||||
>
|
>
|
||||||
<!-- <editModal ></editModal> -->
|
<!-- <editModal ></editModal> -->
|
||||||
<el-form :model="form">
|
<el-form :model="form">
|
||||||
|
|
@ -300,7 +300,12 @@ destroyed: function () {
|
||||||
let formData = new FormData();
|
let formData = new FormData();
|
||||||
formData.append("VideoName",form.videoName);
|
formData.append("VideoName",form.videoName);
|
||||||
formData.append("VideoType",this.videoTypeForm.videoType);
|
formData.append("VideoType",this.videoTypeForm.videoType);
|
||||||
formData.append("VideoStreamAddress",form.videoStreamAddress);
|
if(this.videoTypeForm.videoType=='离线视频'){
|
||||||
|
formData.append("VideoPath",form.videoStreamAddress);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
formData.append("VideoStreamAddress",form.videoStreamAddress);
|
||||||
|
}
|
||||||
axios({
|
axios({
|
||||||
method: "post",
|
method: "post",
|
||||||
url: serverUrl.dataUrl,
|
url: serverUrl.dataUrl,
|
||||||
|
|
@ -427,9 +432,10 @@ destroyed: function () {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
goToPage(id,num,name,type) {
|
goToPage(id,num,name,type,status) {
|
||||||
|
|
||||||
this.$router.push({path:'index',query: {id:id,num:num,name:name,type:type}})
|
this.$router.push({path:'index',query: {id:id,num:num,name:name,type:type,status:status
|
||||||
|
}})
|
||||||
|
|
||||||
},
|
},
|
||||||
//获取视频数据
|
//获取视频数据
|
||||||
|
|
|
||||||
|
|
@ -348,7 +348,7 @@ export default {
|
||||||
sections[i].style.height = 500
|
sections[i].style.height = 500
|
||||||
return
|
return
|
||||||
} else if (sections[i].firstChild.offsetHeight + 30 <1030) {
|
} else if (sections[i].firstChild.offsetHeight + 30 <1030) {
|
||||||
this.$refs.dataBoard.style.height = '1030px'
|
// this.$refs.dataBoard.style.height = '1030px'
|
||||||
}
|
}
|
||||||
sections[i].style.height = sections[i].firstChild.offsetHeight + 20 + 'px';
|
sections[i].style.height = sections[i].firstChild.offsetHeight + 20 + 'px';
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -390,7 +390,7 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
let dataBoard = document.querySelector('.dataBoard')
|
let dataBoard = document.querySelector('.dataBoard')
|
||||||
if (this.regionData.length <= 2 || this.sectionData.length <= 2) {
|
if (this.regionData.length <= 2 || this.sectionData.length <= 2) {
|
||||||
dataBoard.style.height = '1030px'
|
// dataBoard.style.height = '1030px'
|
||||||
} else {
|
} else {
|
||||||
dataBoard.style.height = 'auto'
|
dataBoard.style.height = 'auto'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,14 @@
|
||||||
frameborder="0"
|
frameborder="0"
|
||||||
style="width: 100%; height:100%;"
|
style="width: 100%; height:100%;"
|
||||||
scrolling="no"
|
scrolling="no"
|
||||||
|
v-if="videoUnityShow"
|
||||||
></iframe>
|
></iframe>
|
||||||
<!-- <iframe src="./VideoWeb/index.html" style="height: 100%; width: 100%;border: none"
|
<!-- <iframe src="./VideoWeb/index.html" style="height: 100%; width: 100%;border: none"
|
||||||
ref="iframe"></iframe> -->
|
ref="iframe"></iframe> -->
|
||||||
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="数据看板" name="second">
|
<el-tab-pane label="数据看板" name="second">
|
||||||
|
|
@ -31,33 +36,10 @@
|
||||||
<el-button class="videoAnalysis" type="primary" size="mini" @click="videoAnalysisBtn" v-if="videoAnalysisShow"
|
<el-button class="videoAnalysis" type="primary" size="mini" @click="videoAnalysisBtn" v-if="videoAnalysisShow"
|
||||||
>视频分析</el-button
|
>视频分析</el-button
|
||||||
>
|
>
|
||||||
<el-button class="trafficAnalysis" type="primary" plain size="mini" @click="trafficAnalysisBtn" v-if="trafficAnalysisShow"
|
<el-button class="trafficAnalysis" type="primary" plain size="mini" @click="trafficAnalysisBtn" v-if="trafficAnalysisShow" :disabled='disabledTrafficAnalysis'
|
||||||
>交通分析</el-button
|
>交通分析</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div id="dialog" style="height:500px"> -->
|
|
||||||
<!-- <el-dialog class="new-dialog" :title="title+'组件'" :modal="false" :close-on-click-modal="false" :visible.sync="dialogFormVisible" v-alterELDialogMarginTop="{marginTop:'0vh'}" customClass='customWidth' width="100%" @close='closeForm(form)'>
|
|
||||||
<el-form ref="form" :model="form" label-width="80px">
|
|
||||||
<el-form-item label="组件名称">
|
|
||||||
<el-input v-model="form.name"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="断面方向" v-if="form.type=='断面'">
|
|
||||||
<el-select v-model="form.Direction" placeholder="请选择类型">
|
|
||||||
<el-option label="正向" value="正向"></el-option>
|
|
||||||
<el-option label="反向" value="反向"></el-option>
|
|
||||||
<el-option label="双向" value="双向"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="速度阈值" v-if="form.type=='区域'">
|
|
||||||
<el-input-number v-model="form.StoppingSpeed" :precision="1" :step="0.1"></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" @click="onSubmit(form)">确认</el-button>
|
|
||||||
<el-button @click="closeFigure(form)">取消</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
</el-dialog> -->
|
|
||||||
<el-drawer
|
<el-drawer
|
||||||
class="new-dialog"
|
class="new-dialog"
|
||||||
:visible.sync="dialogFormVisible"
|
:visible.sync="dialogFormVisible"
|
||||||
|
|
@ -104,11 +86,6 @@
|
||||||
<el-form-item label="类型筛选:" v-if="componentForm.componentType == '类型'">
|
<el-form-item label="类型筛选:" v-if="componentForm.componentType == '类型'">
|
||||||
<el-checkbox-group v-model="componentForm.type" @change="handleTypeData">
|
<el-checkbox-group v-model="componentForm.type" @change="handleTypeData">
|
||||||
<el-checkbox v-for="item in typeData" :label="item" :key="item">{{ item }}</el-checkbox>
|
<el-checkbox v-for="item in typeData" :label="item" :key="item">{{ item }}</el-checkbox>
|
||||||
<!-- <el-checkbox label="小汽车" name="type" ></el-checkbox>
|
|
||||||
<el-checkbox label="公交车" name="type" ></el-checkbox>
|
|
||||||
<el-checkbox label="卡车" name="type" ></el-checkbox>
|
|
||||||
<el-checkbox label="非机动车" name="type" ></el-checkbox>
|
|
||||||
<el-checkbox label="行人" name="type" ></el-checkbox> -->
|
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="数值筛选:" v-if="componentForm.componentType != 'OD'">
|
<el-form-item label="数值筛选:" v-if="componentForm.componentType != 'OD'">
|
||||||
|
|
@ -229,6 +206,7 @@ export default {
|
||||||
dialogFormVisible: false,
|
dialogFormVisible: false,
|
||||||
areaComponent: false,
|
areaComponent: false,
|
||||||
indexModule: false,
|
indexModule: false,
|
||||||
|
disabledTrafficAnalysis:true,
|
||||||
//判断模拟区,画布区
|
//判断模拟区,画布区
|
||||||
numberNew: 1,
|
numberNew: 1,
|
||||||
speed: false,
|
speed: false,
|
||||||
|
|
@ -357,7 +335,20 @@ export default {
|
||||||
//视频类型
|
//视频类型
|
||||||
videoType: '',
|
videoType: '',
|
||||||
videoAnalysisShow: false,
|
videoAnalysisShow: false,
|
||||||
trafficAnalysisShow: false
|
trafficAnalysisShow: false,
|
||||||
|
//控制unity展示
|
||||||
|
videoUnityShow:true,
|
||||||
|
videoAnalysisSta:'',
|
||||||
|
analysis:{
|
||||||
|
trafficAnalysisPath1:'',
|
||||||
|
trafficAnalysisPath2:'',
|
||||||
|
videoAnalysisPath:'',
|
||||||
|
videoName:'',
|
||||||
|
videoPath:'',
|
||||||
|
videoTotalFrames:'',
|
||||||
|
videoType:''
|
||||||
|
},
|
||||||
|
description:'请点击视频分析'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -378,13 +369,22 @@ export default {
|
||||||
this.VideoId = this.$route.query.id;
|
this.VideoId = this.$route.query.id;
|
||||||
this.number = this.$route.query.num;
|
this.number = this.$route.query.num;
|
||||||
this.titName = this.$route.query.name;
|
this.titName = this.$route.query.name;
|
||||||
this.videoType = this.$route.query.type;
|
// this.videoType = this.$route.query.type;
|
||||||
if (this.videoType != '实时视频') {
|
if (this.$route.query.type == '实时视频') {
|
||||||
this.videoAnalysisShow = false;
|
this.videoAnalysisShow = false;
|
||||||
this.trafficAnalysisShow = false;
|
this.trafficAnalysisShow = false;
|
||||||
|
document.getElementById('mapModule').contentWindow.lixianVideo("实时视频");
|
||||||
} else {
|
} else {
|
||||||
this.videoAnalysisShow = true;
|
this.videoAnalysisShow = true;
|
||||||
this.trafficAnalysisShow = true;
|
this.trafficAnalysisShow = true;
|
||||||
|
// if(this.$route.query.status=='未分析'){
|
||||||
|
// // document.getElementById('mapModule').contentWindow.lixianVideo("实时视频");
|
||||||
|
|
||||||
|
// }else{
|
||||||
|
|
||||||
|
// }
|
||||||
|
this.getAnalysisStatus()
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -393,6 +393,7 @@ export default {
|
||||||
// this.getSingleComponentIdN()
|
// this.getSingleComponentIdN()
|
||||||
this.componentForm.company = this.timeSelect[0].value;
|
this.componentForm.company = this.timeSelect[0].value;
|
||||||
this.createMqtt();
|
this.createMqtt();
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 创建mqtt */
|
/** 创建mqtt */
|
||||||
|
|
@ -429,10 +430,50 @@ export default {
|
||||||
}
|
}
|
||||||
});*/
|
});*/
|
||||||
},
|
},
|
||||||
|
//获取视频分析,交通分析状态数据
|
||||||
|
getAnalysisStatus(){
|
||||||
|
getVideoStatus(this.$route.query.id).then(res => {
|
||||||
|
console.log("res.data",res.data)
|
||||||
|
if(res.data.data.videoAnalysisStatus == '未分析'){
|
||||||
|
this.disabledTrafficAnalysis= true
|
||||||
|
this.videoUnityShow = false
|
||||||
|
// this.videoUnityShow = true
|
||||||
|
// this.analysisData()
|
||||||
|
}else if(res.data.data.videoAnalysisStatus == '分析中'){
|
||||||
|
|
||||||
|
}else if(res.data.data.videoAnalysisStatus == '已分析'){
|
||||||
|
this.videoUnityShow = true
|
||||||
|
this.videoAnalysisSta = res.data.data.videoAnalysisStatus
|
||||||
|
this.analysisData()
|
||||||
|
}else if(res.data.data.trafficAnalysisStatus==''){
|
||||||
|
|
||||||
|
}else if(res.data.data.trafficAnalysisStatus==''){
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
//分析视频按钮
|
//分析视频按钮
|
||||||
videoAnalysisBtn() {
|
videoAnalysisBtn() {
|
||||||
startVideoAnalysis(this.$route.query.id).then(res => {
|
startVideoAnalysis(this.$route.query.id).then(res => {
|
||||||
//
|
//
|
||||||
|
if(res.data.msg=='请求成功'){
|
||||||
|
this.$message({
|
||||||
|
message: '启动成功',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
if(this.videoAnalysisSta=='已分析'){
|
||||||
|
|
||||||
|
}else if(this.videoAnalysisSta=='分析中'){
|
||||||
|
this.description = '正在分析中'
|
||||||
|
setTimeout(() => {
|
||||||
|
this.getAnalysisStatus()
|
||||||
|
}, 5000);
|
||||||
|
}else if(this.videoAnalysisSta=='未分析'){
|
||||||
|
// setTimeout(() => {
|
||||||
|
// this.getAnalysisStatus()
|
||||||
|
// }, 5000);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//交通分析
|
//交通分析
|
||||||
|
|
@ -441,6 +482,20 @@ 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
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
//停止订阅mqtt
|
//停止订阅mqtt
|
||||||
disConnect() {
|
disConnect() {
|
||||||
/*if (client != null) {
|
/*if (client != null) {
|
||||||
|
|
@ -539,6 +594,7 @@ export default {
|
||||||
//初始化unity
|
//初始化unity
|
||||||
OnSceneN() {
|
OnSceneN() {
|
||||||
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));
|
||||||
},
|
},
|
||||||
// //新增组件根据组件id获取单个组件数据
|
// //新增组件根据组件id获取单个组件数据
|
||||||
getSingleComponentIdN(id, type, name) {
|
getSingleComponentIdN(id, type, name) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue