This commit is contained in:
chengdandan 2023-02-23 09:15:58 +08:00
parent a0e97c56ee
commit 9b76524fd3
9 changed files with 79 additions and 20 deletions

View File

@ -0,0 +1,24 @@
{
"code": 200,
"msg": "成功",
"data": {
"analysisSettingId": "e1af117da47e402d9b30e7cc499a158f",
"cameraPositionLongitude": "1",
"cameraPositionLatitude": "3",
"licensePlateRecognitionSwitch": "1",
"parkingDisplacement": 1,
"parkingSpeed": 6,
"coordinateTransformationId": "7ab32c790ec34b95a58e18b8bad8e46c",
"utmArea": 10,
"hemisphere": "南",
"coordinateTransformation": "其他",
"pointData": [{
"pointId": "b0c734bfa81f41d8909b74b983429146",
"pointName": "点2",
"longitude": "1",
"latitude": "1",
"imageXCoordinate": "17.17",
"imageYCoordinate": "1065.16"
}]
}
}

View File

@ -152,6 +152,7 @@ export default {
watch: {
list: {
handler(newVal) {
console.log("newVal",newVal)
if (newVal.length!=0) {
// x
@ -266,9 +267,11 @@ export default {
return val.headway;
});
} else if (this.title == '排队数') {
console.log("排队数",newVal)
this.series[0].data = newVal.map(val => {
return val.n_queue;
});
} else if (this.title == '检测数') {
this.series[0].data = newVal.map(val => {
return val.n_stay;
@ -281,6 +284,7 @@ export default {
this.series[0].data = newVal.map(val => {});
}
if (this.$refs.lineChart) {
console.log("1111111")
this.$nextTick(() => {
this.drawLine();
});

View File

@ -43,7 +43,7 @@
</div>
<div style="font-size: 30px; font-weight: bold" v-if="title == '排队数'">
<span style="font-size: 15px;">排队数</span><br />
<span style="font-size: 30px; font-weight: bold">{{ dataArr[0].n_queue }}</span>
<span style="font-size: 30px; font-weight: bold">{{ queue }}</span>
</div>
<div style="font-size: 30px; font-weight: bold" v-if="title == '检测数'">
<span style="font-size: 15px;">检测数</span><br />
@ -86,7 +86,7 @@
<div class="border" v-if="echartArr.includes('曲线图')">
<detailDialog />
<lineChart
v-if="dataArr && dataArr.length != 0 && dataArr!=undefined"
:componentName="componentName"
:chartName="chartName"
:pageType="pageType"
@ -166,12 +166,31 @@ export default {
flow: 0,
isRefer: true,
valueShow: {}
valueShow: {},
//
queue:'',
};
},
created() {},
methods: {
//
getNewQueue(dataArr){
console.log("计算类型的数值",dataArr)
// if(dataArr[0].timeMode==''){
// this.queue = dataArr[0].n_queue
// }else if(dataArr[0].timeMode==''){
// this.queue = dataArr[0].ave_queue
// }else if(dataArr[0].timeMode==''){
// }
if(dataArr[0].n_queue){
this.queue = dataArr[0].n_queue
}else if(dataArr[0].ave_queue){
this.queue = dataArr[0].ave_queue
}else if(dataArr[0].timeMode=='周期时刻'){
}
}
},
computed: {},
@ -181,6 +200,7 @@ export default {
dataArr: {
handler(newVal) {
console.log('dataArr', newVal);
this.getNewQueue(newVal)
},
immediate: true
@ -188,6 +208,7 @@ export default {
typeValue: {
handler(newVal) {
this.total = 0;
if (this.title == '类型') {
newVal.type_data.forEach(ele => {
this.total += ele.quantity;

View File

@ -737,7 +737,6 @@ export default {
OnSceneload(newV) {
var ip = window.location.host;
this.ipData = 'http://' + ip.split(':')[0] + ':5000';
document.getElementById('mapModule').contentWindow.getIpData(this.ipData);
this.$refs.analysisWeb.contentWindow.getIpData('http://172.16.1.168:5000');
// this.$refs.analysisWeb.contentWindow.getDianwei(this.$route.query.id);
this.unityDone = true;

View File

@ -64,7 +64,7 @@
:pageType="o.graphicType"
:triggerType="o.timeMode"
:componentName="o.componentName"
:dataArr="o.cycleStatistics"
:dataArr="o.cycleStatisticsData"
:echartArr="o.presentationForm"
:title="o.componentName.split('_')[0]"
:chartName="o.combinationName"
@ -118,7 +118,7 @@ export default {
}
},
//
cycleStatistics: {
cycleStatisticsData: {
type: Array,
default() {
return [];
@ -377,8 +377,9 @@ export default {
methods: {
getNew(){
// this.idVal = ;
getComponentSection({ VideoId: this.$route.query.id }).then(res => {
getComponentSection({ VideoId: this.$route.query.id ,Number:10}).then(res => {
if (res.data.code == 200) {
console.log("res.data.data",res.data.data)
this.componentList = res.data.data;
this.siftData();
}
@ -388,20 +389,28 @@ export default {
// this.sectionArr=[]
// this.sectionData=[]
this.componentList.forEach(val => {
this.sectionArr.push(val.combinationName);
// var newSectionArr = []
// newSectionArr.push(val.combinationName)
// this.sectionArr = newSectionArr
this.sectionArr.push(val.combinationName)
this.sectionArr = Array.from(new Set(this.sectionArr));
});
// var newSectionData = []
this.sectionData = this.sectionArr.map(item => {
item = { title: item, children: [] };
this.acticveName = [];
this.componentList.forEach(val => {
if (item.title == val.combinationName) {
console.log("val.combinationName",val.combinationName)
item.children.push(val);
}
this.acticveName.push(val.analogAreaComponentId);
});
return item;
});
console.log( "this.sectionData",this.sectionData)
// = newSectionData
},
//
sectionHandle(i) {
@ -454,7 +463,7 @@ export default {
this.triggerList = newVal;
//
// console.log(newVal, 'triggerlistData');
console.log(this.componentList, 'this.componentList');
this.componentList.forEach(ele => {
if (ele.trigger == undefined && ele.timeMode == '触发') {
ele.trigger = [];
@ -464,6 +473,7 @@ export default {
if (ele.trigger.length == 10) {
ele.trigger.pop();
} else {
console.log("item",item)
item.time = item.time.split('.')[0];
//
if (item.type_data != null) {
@ -491,8 +501,8 @@ export default {
newVal.forEach(item => {
if (
ele.analogAreaComponentId == item.component_id &&
ele.timeMode == '周期时刻' &&
ele.analogAreaGraphId == item.graphical_id
ele.timeMode == '周期时刻'
) {
if (ele.cycleTimeData.length == 10) {
ele.cycleTimeData.slice(ele.cycleTimeData.length - 1, 0);
@ -517,26 +527,27 @@ export default {
// console.log(newVal,'');
// }
// }
cycleStatistics: {
cycleStatisticsData: {
handler(newVal) {
console.log(newVal, '周期统计');
if (newVal.length != 0) {
this.componentList.forEach(ele => {
if (ele.cycleStatistics == undefined && ele.timeMode == '周期统计') {
ele.cycleStatistics = [];
if (ele.cycleStatisticsData == undefined && ele.timeMode == '周期统计') {
ele.cycleStatisticsData = [];
}
newVal.forEach(item => {
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '周期统计') {
if (ele.cycleStatistics.length == 10) {
ele.cycleStatistics.pop();
if (ele.cycleStatisticsData.length == 10) {
ele.cycleStatisticsData.pop();
} else {
item.time = item.time.split('.')[0];
if (item.type_data != null) {
//
this.typeCycleStatistics = item;
}
ele.cycleStatistics.unshift(item);
ele.cycleStatisticsData.unshift(item);
}
}
});
@ -547,7 +558,7 @@ export default {
// activeName: {
// handler(newVal) {
// if (newVal == "second") {
// getComponentSection({ VideoId: this.$route.query.id }).then(res => {
// getComponentSection({ VideoId: this.$route.query.id ,Number:10}).then(res => {
// if (res.data.code == 200) {
// this.componentList = res.data.data;
// this.siftData();

View File

@ -24,7 +24,7 @@
:triggerData="triggerData"
:triggerListData="triggerListData"
:cycleTimeData="cycleTimeData"
:cycleStatistics="cycleStatistics"
:cycleStatisticsData="cycleStatisticsData"
></dataBoard>
</el-tab-pane>
<el-tab-pane label="分析配置" name="third">
@ -352,7 +352,7 @@ export default {
//
cycleTimeData: [],
//
cycleStatistics: [],
cycleStatisticsData: [],
//
videoType: '',
videoAnalysisShow: false,