客流统计3
This commit is contained in:
parent
f7dc20e431
commit
90a72b2d62
|
|
@ -174,17 +174,31 @@ export default {
|
|||
},
|
||||
initChart(){
|
||||
if(this.flowData.presentFlowVOList&&this.flowData.presentFlowVOList.length>0){
|
||||
//this.flowData.presentFlowVOList[0].exitList
|
||||
let xData = []
|
||||
let line1=[]
|
||||
let line2=[]
|
||||
this.flowData.presentFlowVOList[0].presentList.forEach((item,index)=>{
|
||||
if(Number(item)>0){
|
||||
xData.push((index+1)+"点")
|
||||
line1.push(this.flowData.presentFlowVOList[0].enterList[index])
|
||||
line2.push(this.flowData.presentFlowVOList[0].exitList[index])
|
||||
}
|
||||
})
|
||||
let xIndex = 0
|
||||
let index1 = this.flowData.presentFlowVOList[0].enterList.findIndex(v=>Number(v)>0)
|
||||
let index2 = this.flowData.presentFlowVOList[0].exitList.findIndex(v=>Number(v)>0)
|
||||
console.log(index1)
|
||||
console.log(index2)
|
||||
if(index1<=index2){
|
||||
this.flowData.presentFlowVOList[0].enterList.forEach((item,index)=>{
|
||||
if(index>=index1){
|
||||
xData.push((index+1)+"点")
|
||||
line1.push(this.flowData.presentFlowVOList[0].enterList[index])
|
||||
line2.push(this.flowData.presentFlowVOList[0].exitList[index])
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.flowData.presentFlowVOList[0].exitList.forEach((item,index)=>{
|
||||
if(index>=index2){
|
||||
xData.push((index+1)+"点")
|
||||
line1.push(this.flowData.presentFlowVOList[0].enterList[index])
|
||||
line2.push(this.flowData.presentFlowVOList[0].exitList[index])
|
||||
}
|
||||
})
|
||||
}
|
||||
console.log(xData)
|
||||
var lineData = {
|
||||
categories: xData,
|
||||
|
|
|
|||
Loading…
Reference in New Issue