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

View File

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

View File

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

View File

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

View File

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