Compare commits

..

No commits in common. "1bae6a255cfabfc6498635888c71e4d73cccd536" and "6fc3855ff1a4e65177f2b1bb5e7b2086af0ba986" have entirely different histories.

10 changed files with 372 additions and 343 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -45,8 +45,7 @@ export default {
default() {
return {};
}
},
}
},
data() {
return {
@ -80,11 +79,6 @@ export default {
myChart = this.$echarts.init(this.$refs.lineChart);
}
// var series = []
if (newVal) {
this.xData = newVal.map(val => {
return val.time;
});
}
@ -161,7 +155,9 @@ export default {
getMessage(newVal, title,timeMode) {
if(newVal){
this.xData = newVal.map(val => {
return val.time;
});
var series = [
{
@ -293,12 +289,7 @@ export default {
},
mounted() {
// if (this.historyData.length != 0) {
// this.drawLine(this.historyData, this.title, this.status);
// }
// this.drawLine();
// this.getMessage(this.list)
// console.log(this.$parent.dataArr, 'dataArr');
// this.$set(this.$parent.dataArr)

View File

@ -152,9 +152,8 @@ export default {
};
},
created() {
// console.log(this.title);
console.log(this.componentName);
},
methods: {
//
@ -180,10 +179,6 @@ export default {
this.newDataArr[0].headway = val[0].headway;
} else if (val[0].ave_headway) {
this.newDataArr[0].headway = val[0].ave_headway;
}else if (val[0].n_stay) {
this.newDataArr[0].n_stay = val[0].n_stay;
} else if (val[0].ave_stay) {
this.newDataArr[0].n_stay = val[0].ave_stay;
}
},

View File

@ -36,9 +36,7 @@
:componentName="o.componentName" :dataArr="o.cycleTimeData"
:echartArr="o.presentationForm" :title="o.componentName.split('_')[0]"
:chartName="o.combinationName" :typeValue="typeCycleTimeData"
:startEndData="{ start: o.startSectionNames, end: o.endSectionNames }"
:historyData="o.cycleTimeData
" />
:startEndData="{ start: o.startSectionNames, end: o.endSectionNames }" />
<!-- 周期统计的组件 -->
<typeChart ref="typeChartRef2" style="width: 100%;"
@ -47,8 +45,7 @@
:dataArr="o.cycleStatisticsData" :echartArr="o.presentationForm"
:title="o.componentName.split('_')[0]" :chartName="o.combinationName"
:typeValue="typeCycleStatistics"
:startEndData="{ start: o.startSectionNames, end: o.endSectionNames }"
:historyData="o.cycleStatisticsData" />
:startEndData="{ start: o.startSectionNames, end: o.endSectionNames }" />
</el-collapse-item>
</div>
</el-collapse>
@ -158,7 +155,7 @@ export default {
// this.idVal = ;
getComponentSection({ VideoId: this.$route.query.id, Number: 10 }).then(res => {
if (res.data.code == 200) {
console.log(res.data.data, '组件的数据');
// console.log(res.data.data, '');
this.componentList = res.data.data;
this.siftData();
}
@ -216,36 +213,19 @@ export default {
}
}
},
channge(oldVal, newVal) {
if (oldVal == 'second') {
this.sectionArr = [];
this.sectionData = [];
this.getNew();
} else if (newVal == 'second') {
this.sectionArr = [];
this.sectionData = [];
this.getNew();
}
}
//
//
getRef(data,timeMode) {
console.log(timeMode);
for (let i = 0; i < data.length; i++) {
let refItem = data[i]
if (data.length != 0 && refItem.dataArr != undefined && refItem.dataArr.length != 0) {
if (refItem.echartArr.includes('时间曲线图')) {
refItem.$refs.lineChartRef.drawLine(refItem.dataArr,refItem.componentName.split('_')[0],timeMode)
}
if (refItem.echartArr.includes('数值')) {
refItem.getDataArr(refItem.dataArr)
}
if (refItem.echartArr.includes('直方图') && refItem.$refs.barChartRef.drawBar) {
//
refItem.$refs.barChartRef.drawBar(refItem.dataArr[0])
}
if (refItem.echartArr.includes('饼状图') && refItem.$refs.pieChartRef.drawPie) {
//
refItem.$refs.pieChartRef.drawPie(refItem.dataArr[0])
}
if (refItem.echartArr.includes('均值图') && refItem.$refs.avgChartRef != undefined) {
refItem.$refs.avgChartRef.drawBar(refItem.dataArr[0])
}
}
}
}
},
mounted() { },
watch: {
@ -270,44 +250,95 @@ export default {
if (newVal!= undefined&&newVal.length != 0 ) {
newVal.forEach(ele => {
if( ele.timeMode == '周期统计'){
this.$nextTick(() => {
// var thatNN = this;
var thatNN = this;
ele.cycleStatisticsData.forEach(item => {
if (item.type_data != null) {
this.typeCycleStatistics = item;
}
})
if (this.$refs.typeChartRef2 != undefined) {
// //
this.getRef(this.$refs.typeChartRef2,ele.timeMode)
}
})
}
if (ele.timeMode == '周期时刻') {
this.$nextTick(()=>{
ele.cycleStatisticsData.forEach(item => {
if (item.type_data != null) {
this.typeCycleStatistics = item;
//
thatNN.typeCycleStatistics = item;
}
console.log("thatNN.$refs.typeChartRef2",thatNN.$refs.typeChartRef2)
// thatN.$nextTick(() => {
})
if (this.$refs.typeChartRef1 != undefined) {
if(thatNN.$refs.typeChartRef2!=undefined){
// //
this.getRef(this.$refs.typeChartRef1,ele.timeMode)
for (let i = 0; i < thatNN.$refs.typeChartRef2.length; i++) {
let itemTypeChartRef2 = thatNN.$refs.typeChartRef2[i]
if (itemTypeChartRef2.length!=0&&itemTypeChartRef2.dataArr!= undefined && itemTypeChartRef2.dataArr.length != 0) {
console.log("itemTypeChartRef2.echartArr",itemTypeChartRef2.echartArr)
if (itemTypeChartRef2.echartArr.includes('时间曲线图')) {
thatNN.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(thatNN.$refs.typeChartRef2[i].dataArr, thatNN.$refs.typeChartRef2[i].componentName.split('_')[0],'周期统计')
}
if (itemTypeChartRef2.echartArr.includes('数值')) {
thatNN.$refs.typeChartRef2[i].getDataArr(thatNN.$refs.typeChartRef2[i].dataArr)
}
if (itemTypeChartRef2.echartArr.includes('直方图') &&itemTypeChartRef2.$refs.barChartRef.drawBar) {
//
itemTypeChartRef2.$refs.barChartRef.drawBar(itemTypeChartRef2.dataArr[0])
}
if (itemTypeChartRef2.echartArr.includes('饼状图') &&itemTypeChartRef2.$refs.pieChartRef.drawPie) {
//
itemTypeChartRef2.$refs.pieChartRef.drawPie(itemTypeChartRef2.dataArr[0])
}
if (itemTypeChartRef2.echartArr.includes('均值图') && itemTypeChartRef2.$refs.avgChartRef != undefined) {
itemTypeChartRef2.$refs.avgChartRef.drawBar(itemTypeChartRef2.dataArr[0])
}
}
}
}
})
}
// if ( ele.timeMode == '') {
// var thatN = this;
// if (ele.cycleTimeData.length == 10) {
// ele.cycleTimeData.pop();
// } else {
// ele.cycleTimeData.forEach(item => {
// if (item.type_data != null) {
// //
// thatN.typeCycleTimeData = item;
// }
// ele.cycleTimeData.unshift(item);
// // thatN.$nextTick(() => {
// if(thatN.$refs.typeChartRef1!=undefined){
// // console.log("thatN.$refs.typeChartRef1",thatN.$refs.typeChartRef1)
// //
// for (let i = 0; i < thatN.$refs.typeChartRef1.length; i++) {
// let itemTypeChartRef1 = thatN.$refs.typeChartRef1[i]
// if (itemTypeChartRef1.length!=0&&itemTypeChartRef1.dataArr!= undefined && itemTypeChartRef1.dataArr.length != 0) {
// if (itemTypeChartRef1.echartArr.includes('线')) {
// thatN.$refs.typeChartRef1[i].$refs.lineChartRef.drawLine(thatN.$refs.typeChartRef1[i].dataArr, thatN.$refs.typeChartRef1[i].componentName.split('_')[0],'')
// }
// if (itemTypeChartRef1.echartArr.includes('')) {
// thatN.$refs.typeChartRef1[i].getDataArr(thatN.$refs.typeChartRef1[i].dataArr)
// }
// if (itemTypeChartRef1.echartArr.includes('') &&itemTypeChartRef1.$refs.barChartRef.drawBar) {
// //
// itemTypeChartRef1.$refs.barChartRef.drawBar(itemTypeChartRef1.dataArr[0])
// }
// if (itemTypeChartRef1.echartArr.includes('') &&itemTypeChartRef1.$refs.pieChartRef.drawPie) {
// //
// itemTypeChartRef1.$refs.pieChartRef.drawPie(itemTypeChartRef1.dataArr[0])
// }
// if (itemTypeChartRef1.echartArr.includes('') && itemTypeChartRef1.$refs.avgChartRef != undefined) {
// itemTypeChartRef1.$refs.avgChartRef.drawBar(itemTypeChartRef1.dataArr[0])
// }
// }
// }
// }
// })
// }
// }
});
}
},
immediate: true,
deep: true,
}
},
// activeName:'channge',
//
@ -376,7 +407,11 @@ export default {
if (newVal!= undefined&&newVal.length != 0 && this.sectionData) {
var thatN = this;
thatN.classify.forEach((ele, index) => {
// if (ele.cycleTimeData == undefined && ele.timeMode == '') {
// ele.cycleTimeData = [];
// }else{
// }
newVal.forEach(item => {
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '周期时刻') {
if (ele.cycleTimeData.length == 10) {
@ -429,7 +464,11 @@ export default {
} else {
var _thatN = this
_thatN.classify.forEach((ele, index) => {
// if (ele.cycleTimeData == undefined && ele.timeMode == '') {
// ele.cycleTimeData = [];
// }else{
// }
// newVal.forEach(item => {
if (ele.timeMode == '周期时刻') {
if (ele.cycleTimeData.length == 10) {
@ -486,10 +525,15 @@ export default {
//
cycleStatisticsData: {
handler(newVal) {
// console.log("newVal", newVal)
console.log("newVal",newVal)
if (newVal!= undefined&& newVal.length != 0 && this.sectionData) {
var that = this;
that.classify.forEach((ele, index) => {
// if (ele.cycleStatisticsData == undefined && ele.timeMode == '') {
// ele.cycleStatisticsData = [];
// }else{
// // ele.cycleStatisticsData =
// }
newVal.forEach(item => {
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '周期统计') {
if (ele.cycleStatisticsData.length == 10) {
@ -592,8 +636,7 @@ export default {
});
}
},
immediate: true
}
}
// activeName: {
// handler(newVal) {