20230224
This commit is contained in:
parent
5b6f5db431
commit
4a2589d11e
|
|
@ -31,23 +31,23 @@
|
||||||
<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">{{ typeValue.speed }}</span> -->
|
<!-- <span style="font-size: 30px; font-weight: bold">{{ typeValue.speed }}</span> -->
|
||||||
<span style="font-size: 30px; font-weight: bold">{{ dataArr[0].speed }}</span>
|
<span style="font-size: 30px; font-weight: bold">{{ dataArrNew[0].speed }}</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 />
|
||||||
<span style="font-size: 30px; font-weight: bold">{{ dataArr[0].flow }}</span>
|
<span style="font-size: 30px; font-weight: bold">{{ dataArrNew[0].flow }}</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 />
|
||||||
<span style="font-size: 30px; font-weight: bold">{{ dataArr[0].headway }}</span>
|
<span style="font-size: 30px; font-weight: bold">{{ dataArrNew[0].headway }}</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 />
|
||||||
<span style="font-size: 30px; font-weight: bold">{{ queue }}</span>
|
<span style="font-size: 30px; font-weight: bold">{{ dataArrNew[0].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 />
|
||||||
<span style="font-size: 30px; font-weight: bold">{{ dataArr[0].n_stay }}</span>
|
<span style="font-size: 30px; font-weight: bold">{{ dataArrNew[0].n_stay }}</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 />
|
||||||
|
|
@ -139,6 +139,22 @@ export default {
|
||||||
valueShow: {},
|
valueShow: {},
|
||||||
//排队数
|
//排队数
|
||||||
queue:'',
|
queue:'',
|
||||||
|
dataArrNew:[{
|
||||||
|
//总和
|
||||||
|
//速度
|
||||||
|
speed:0,
|
||||||
|
//流量
|
||||||
|
flow:0 ,
|
||||||
|
//车头时距
|
||||||
|
headway:0,
|
||||||
|
//排队数
|
||||||
|
queue:0,
|
||||||
|
//检测数
|
||||||
|
n_stay:0,
|
||||||
|
//延误
|
||||||
|
ave_delay:0,
|
||||||
|
time:'2023-02-24 15:07:14'
|
||||||
|
}]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -156,9 +172,9 @@ export default {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
if(dataArr[0].n_queue){
|
if(dataArr[0].n_queue){
|
||||||
this.queue = dataArr[0].n_queue
|
this.dataArrNew.queue = dataArr[0].n_queue
|
||||||
}else if(dataArr[0].ave_queue){
|
}else if(dataArr[0].ave_queue){
|
||||||
this.queue = dataArr[0].ave_queue
|
this.dataArrNew.queue = dataArr[0].ave_queue
|
||||||
}else if(dataArr[0].timeMode=='周期时刻'){
|
}else if(dataArr[0].timeMode=='周期时刻'){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -177,9 +193,14 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
// 监听触发数据
|
// 监听触发数据
|
||||||
dataArr: {
|
dataArr: {
|
||||||
handler(newVal) {
|
handler(oldVal,newVal) {
|
||||||
|
console.log('oldValdataArr', oldVal);
|
||||||
console.log('dataArr', newVal);
|
console.log('dataArr', newVal);
|
||||||
this.getNewQueue(newVal)
|
this.dataArrNew = newVal
|
||||||
|
if(newVal!=undefined&&newVal.length!=0){
|
||||||
|
this.getNewQueue(newVal)
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
immediate: true
|
immediate: true
|
||||||
|
|
@ -188,11 +209,11 @@ export default {
|
||||||
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;
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// cycleTimeData: {
|
// cycleTimeData: {
|
||||||
|
|
|
||||||
|
|
@ -147,23 +147,20 @@ export default {
|
||||||
this.componentList = res.data.data;
|
this.componentList = res.data.data;
|
||||||
this.sectionArr=[]
|
this.sectionArr=[]
|
||||||
this.sectionData=[]
|
this.sectionData=[]
|
||||||
this.$nextTick(() => {
|
this.siftData();
|
||||||
this.siftData(this.componentList);
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
siftData(newComponentList) {
|
siftData() {
|
||||||
|
|
||||||
newComponentList.forEach(val => {
|
this.componentList.forEach(val => {
|
||||||
this.sectionArr.push(val.combinationName);
|
this.sectionArr.push(val.combinationName);
|
||||||
this.sectionArr = Array.from(new Set(this.sectionArr));
|
this.sectionArr = Array.from(new Set(this.sectionArr));
|
||||||
});
|
});
|
||||||
this.sectionData = this.sectionArr.map(item => {
|
this.sectionData = this.sectionArr.map(item => {
|
||||||
item = { title: item, children: [] };
|
item = { title: item, children: [] };
|
||||||
this.acticveName = [];
|
this.acticveName = [];
|
||||||
newComponentList.forEach(val => {
|
this.componentList.forEach(val => {
|
||||||
if (item.title == val.combinationName) {
|
if (item.title == val.combinationName) {
|
||||||
this.classify.push(val)
|
this.classify.push(val)
|
||||||
item.children.push(val);
|
item.children.push(val);
|
||||||
|
|
@ -172,9 +169,7 @@ export default {
|
||||||
});
|
});
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
console.log("this.classify",this.classify)
|
|
||||||
// console.log("this.sectionData",this.sectionData[0].children[0].trigger)
|
|
||||||
console.log("this.sectionData",this.sectionData[0].children[0])
|
|
||||||
},
|
},
|
||||||
// 组件图标点击下拉事件
|
// 组件图标点击下拉事件
|
||||||
sectionHandle(i) {
|
sectionHandle(i) {
|
||||||
|
|
@ -238,16 +233,13 @@ export default {
|
||||||
console.log(newVal, 'triggerlistData');
|
console.log(newVal, 'triggerlistData');
|
||||||
var _this = this
|
var _this = this
|
||||||
if (newVal.length != 0 && _this.sectionData) {
|
if (newVal.length != 0 && _this.sectionData) {
|
||||||
console.log("classify",_this.classify)
|
_this.classify.forEach((ele, index) => {
|
||||||
if(_this.classify.length!=0){
|
|
||||||
_this.classify.forEach((ele, index) => {
|
|
||||||
// console.log("classify",ele)
|
// console.log("classify",ele)
|
||||||
if (ele.trigger == undefined && ele.timeMode == '触发') {
|
if (ele.trigger == undefined && ele.timeMode == '触发') {
|
||||||
ele.trigger = [];
|
ele.trigger = [];
|
||||||
}
|
}
|
||||||
newVal.forEach((item) => {
|
newVal.forEach((item) => {
|
||||||
// console.log("ele",ele)
|
// console.log("ele",ele)
|
||||||
// console.log("newVal",newVal)
|
|
||||||
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '触发') {
|
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '触发') {
|
||||||
if (ele.trigger.length == 10) {
|
if (ele.trigger.length == 10) {
|
||||||
ele.trigger.splice(newVal.length - 1, 1);
|
ele.trigger.splice(newVal.length - 1, 1);
|
||||||
|
|
@ -258,10 +250,10 @@ export default {
|
||||||
_this.typeTimeMode = item
|
_this.typeTimeMode = item
|
||||||
}
|
}
|
||||||
ele.trigger.unshift(item);
|
ele.trigger.unshift(item);
|
||||||
console.log("ele.trigger",ele.trigger)
|
// console.log("ele.trigger",ele.trigger)
|
||||||
_this.$nextTick(() => {
|
_this.$nextTick(() => {
|
||||||
if (_this.$refs.typeChartRef[index] != undefined) {
|
if (_this.$refs.typeChartRef[index] != undefined) {
|
||||||
console.log(_this.$refs.typeChartRef[index].trigger, '数据');
|
// console.log(_this.$refs.typeChartRef[index].dataArr, '数据');
|
||||||
_this.$refs.typeChartRef[index].$refs.lineChartRef.drawLine(ele.trigger, ele.componentName.split('_')[0])
|
_this.$refs.typeChartRef[index].$refs.lineChartRef.drawLine(ele.trigger, ele.componentName.split('_')[0])
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -271,8 +263,6 @@ export default {
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue