客流统计3

This commit is contained in:
zzyuan 2025-06-10 15:51:20 +08:00
parent f7dc20e431
commit 90a72b2d62
1 changed files with 22 additions and 8 deletions

View File

@ -174,17 +174,31 @@ export default {
}, },
initChart(){ initChart(){
if(this.flowData.presentFlowVOList&&this.flowData.presentFlowVOList.length>0){ if(this.flowData.presentFlowVOList&&this.flowData.presentFlowVOList.length>0){
//this.flowData.presentFlowVOList[0].exitList
let xData = [] let xData = []
let line1=[] let line1=[]
let line2=[] let line2=[]
this.flowData.presentFlowVOList[0].presentList.forEach((item,index)=>{ let xIndex = 0
if(Number(item)>0){ let index1 = this.flowData.presentFlowVOList[0].enterList.findIndex(v=>Number(v)>0)
xData.push((index+1)+"点") let index2 = this.flowData.presentFlowVOList[0].exitList.findIndex(v=>Number(v)>0)
line1.push(this.flowData.presentFlowVOList[0].enterList[index]) console.log(index1)
line2.push(this.flowData.presentFlowVOList[0].exitList[index]) 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) console.log(xData)
var lineData = { var lineData = {
categories: xData, categories: xData,