|
|
|
@ -243,7 +243,11 @@ export default { |
|
|
|
this.showorders() |
|
|
|
// 环图数据 |
|
|
|
const ccdata = res.data.data.groupsData |
|
|
|
let tcdata =new Array;that.circularData.groupName=[];that.circularData.proportion=[]; |
|
|
|
|
|
|
|
let tcdata =new Array; |
|
|
|
that.circularData.groupName=[]; |
|
|
|
that.circularData.proportion=[]; |
|
|
|
|
|
|
|
ccdata.forEach(function(item,idx){ |
|
|
|
// idx |
|
|
|
tcdata.push({ |
|
|
|
@ -650,10 +654,6 @@ export default { |
|
|
|
homeApi.allGroupNum().then(res => { |
|
|
|
// get allTimeData |
|
|
|
const tmpdata = res.data.returnData |
|
|
|
// that.day_num = tmpdata.day.noRepeatInNum |
|
|
|
// that.week_num = tmpdata.week.noRepeatInNum |
|
|
|
// that.mon_num = tmpdata.month.noRepeatInNum |
|
|
|
// that.year_num = tmpdata.year.noRepeatInNum |
|
|
|
|
|
|
|
//年度总人数 |
|
|
|
const ycount= tmpdata.year.noRepeatInNum |
|
|
|
@ -694,16 +694,33 @@ export default { |
|
|
|
|
|
|
|
// 饼图、各场馆实时服务人次数据 |
|
|
|
const pieData = jstr.realTimeData.data; |
|
|
|
that.circularData.groupName=[];that.circularData.proportion=[];that.kcdata=[]; |
|
|
|
pieData.forEach((item) => { |
|
|
|
// 对数据进行排序 |
|
|
|
const yord=[2,0,4,5,1,3] |
|
|
|
// array |
|
|
|
that.circularData.groupName=[]; |
|
|
|
that.circularData.proportion=[]; |
|
|
|
that.kcdata=[]; |
|
|
|
// 按照yord 进行填充 |
|
|
|
for(let x=0;x<yord.length;x++){ |
|
|
|
let item = pieData[yord[x]] // 取对应的值 |
|
|
|
console.log("yord_item",item.groupName) |
|
|
|
that.circularData.groupName.push(item.groupName) |
|
|
|
that.circularData.proportion.push(item.proportion) |
|
|
|
that.kcdata.push({ |
|
|
|
name:item.groupName, |
|
|
|
value:item.proportion.split('%')[0] |
|
|
|
// value: item.noRepeatInNum, |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
// 注释的方法未排序 |
|
|
|
// pieData.forEach((item) => { |
|
|
|
// that.circularData.groupName.push(item.groupName) |
|
|
|
// that.circularData.proportion.push(item.proportion) |
|
|
|
// that.kcdata.push({ |
|
|
|
// name:item.groupName, |
|
|
|
// value:item.proportion.split('%')[0] |
|
|
|
// // value: item.noRepeatInNum, |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
// 环形图 |
|
|
|
this.cgchart() |
|
|
|
|
|
|
|
|