Commit e0df0994 authored by zhengke's avatar zhengke

s

parent 3ee15d67
......@@ -289,66 +289,104 @@ export default {
console.log(r,'rrrrr');
if(r.data.resultCode==1){
this.dataList = r.data.data;
let data= r.data.data;
if(this.dataList&&this.dataList.length>0){
this.getCompany(this.dataList);
this.dataList.forEach(x=>{
if(x.OutBranchName=='成都印象'&&x.MonthStr<=12){
this.cdList.push(x.PreferPrice);
this.cdGuest.push(x.GuestNum);
}
if(x.OutBranchName=='昆明印象'&&x.MonthStr<=12){
this.kmList.push(x.PreferPrice);
this.kmGuest.push(x.GuestNum);
}
if(x.OutBranchName=='西安印象'&&x.MonthStr<=12){
this.xaList.push(x.PreferPrice);
this.xaGuest.push(x.GuestNum);
}
if(x.OutBranchName=='武汉印象'&&x.MonthStr<=12){
this.whList.push(x.PreferPrice);
this.whGuest.push(x.GuestNum);
}
if(x.OutBranchName=='西宁印象'&&x.MonthStr<=12){
this.nnList.push(x.PreferPrice);
this.xnGuest.push(x.GuestNum);
}
if(x.OutBranchName=='贵阳印象'&&x.MonthStr<=12){
this.gyList.push(x.PreferPrice);
this.gyGuest.push(x.GuestNum);
}
if(x.OutBranchName=='南昌印象'&&x.MonthStr<=12){
this.ncList.push(x.PreferPrice);
this.ncGuest.push(x.GuestNum);
}
if(x.OutBranchName=='合肥印象'&&x.MonthStr<=12){
this.hfList.push(x.PreferPrice);
this.hfGuest.push(x.GuestNum);
}
if(x.OutBranchName=='长沙印象'&&x.MonthStr<=12){
this.csList.push(x.PreferPrice);
this.csGuest.push(x.GuestNum);
}
if(x.OutBranchName=='厦门印象'&&x.MonthStr<=12){
this.xmList.push(x.PreferPrice);
this.xmGuest.push(x.GuestNum);
}
if(x.OutBranchName=='南京印象'&&x.MonthStr<=12){
this.njList.push(x.PreferPrice);
this.njGuest.push(x.GuestNum);
}
if(x.OutBranchName=='重庆印象'&&x.MonthStr<=12){
this.cqList.push(x.PreferPrice);
this.cqGuest.push(x.GuestNum);
}
if(x.OutBranchName=='入境印象'&&x.MonthStr<=12){
this.rjList.push(x.PreferPrice);
this.rjGuest.push(x.GuestNum);
}
// this.dataList.forEach(x=>{
// if(x.OutBranchName=='成都印象'&&x.MonthStr<=12){
// this.cdList.push(x.PreferPrice);
// this.cdGuest.push(x.GuestNum);
// }
// if(x.OutBranchName=='昆明印象'&&x.MonthStr<=12){
// this.kmList.push(x.PreferPrice);
// this.kmGuest.push(x.GuestNum);
// }
// if(x.OutBranchName=='西安印象'&&x.MonthStr<=12){
// this.xaList.push(x.PreferPrice);
// this.xaGuest.push(x.GuestNum);
// }
// if(x.OutBranchName=='武汉印象'&&x.MonthStr<=12){
// this.whList.push(x.PreferPrice);
// this.whGuest.push(x.GuestNum);
// }
// if(x.OutBranchName=='西宁印象'&&x.MonthStr<=12){
// this.nnList.push(x.PreferPrice);
// this.xnGuest.push(x.GuestNum);
// }
// if(x.OutBranchName=='贵阳印象'&&x.MonthStr<=12){
// this.gyList.push(x.PreferPrice);
// this.gyGuest.push(x.GuestNum);
// }
// if(x.OutBranchName=='南昌印象'&&x.MonthStr<=12){
// this.ncList.push(x.PreferPrice);
// this.ncGuest.push(x.GuestNum);
// }
// if(x.OutBranchName=='合肥印象'&&x.MonthStr<=12){
// this.hfList.push(x.PreferPrice);
// this.hfGuest.push(x.GuestNum);
// }
// if(x.OutBranchName=='长沙印象'&&x.MonthStr<=12){
// this.csList.push(x.PreferPrice);
// this.csGuest.push(x.GuestNum);
// }
// if(x.OutBranchName=='厦门印象'&&x.MonthStr<=12){
// this.xmList.push(x.PreferPrice);
// this.xmGuest.push(x.GuestNum);
// }
// if(x.OutBranchName=='南京印象'&&x.MonthStr<=12){
// this.njList.push(x.PreferPrice);
// this.njGuest.push(x.GuestNum);
// }
// if(x.OutBranchName=='重庆印象'&&x.MonthStr<=12){
// this.cqList.push(x.PreferPrice);
// this.cqGuest.push(x.GuestNum);
// }
// if(x.OutBranchName=='入境印象'&&x.MonthStr<=12){
// this.rjList.push(x.PreferPrice);
// this.rjGuest.push(x.GuestNum);
// }
// })
let tempArr = [];
let bb=[];
setTimeout(()=>{
data.forEach((x,index)=>{
this.companyList.forEach(y=>{
y.list=[];
if(y.OutBranchName==x.OutBranchName){
console.log(y,'xxxx');
y.list.push(x);
}
})
})
console.log(this.companyList,'bbbbbbbbbbbbb');
},2000)
// for (let i = 0; i < data.length; i++) {
// if (tempArr.indexOf(data[i].OutBranchName) === -1) {
// bb.push({
// name: data[i].OutBranchName,
// List: [data[i]]
// });
// tempArr.push(data[i].MonthStr);
// } else {
// for (let j = 0; j < bb.length; j++) {
// if (bb[j].OutBranchName == data[i].OutBranchName) {
// bb[j].List.push(data[i]);
// break;
// }
// }
// }
// }
this.companyList.forEach(item=>{
// let obj={
// name:item.OutBranchName.replace('印象',''),
// type:'bar',
// data:that.kmList
// };
})
}
this.init();
console.log(this.cdList,'cdllist');
console.log(this.whGuest,'this.whGuestwhGuestwhGuest');
}
})
},
......@@ -393,6 +431,7 @@ export default {
}
}
}
console.log(this.companyList,'company');
},
getName(item){
return item.replace('印象','');
......@@ -432,6 +471,10 @@ export default {
title: {
color:"#2C3343"
},
legend: {
data:that.companyList
},
grid: {
        left: '4%',   //距离左边的距离
        right: '6%', //距离右边的距离
......@@ -604,7 +647,6 @@ export default {
smooth: true,
showSymbol: false,
data:that.cdGuest
//data:[50,60, 100, 150, 200, 250,300, 350, 355, 356, 400, 401]
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment