diff --git a/src/views/ty/index.vue b/src/views/ty/index.vue index 71c904b..dfe2f51 100644 --- a/src/views/ty/index.vue +++ b/src/views/ty/index.vue @@ -58,15 +58,16 @@ +
24小时进馆人数
- {{ cgdata[0]&&cgdata[0].gval }} + {{ cgdata[2]&&cgdata[2].gval }} 体育场 - {{ cgdata[1]&&cgdata[1].gval }} + {{ cgdata[0]&&cgdata[0].gval }} 体育馆 - {{ cgdata[2]&&cgdata[2].gval }} + {{ cgdata[1]&&cgdata[1].gval }} 游泳场馆
@@ -692,8 +693,8 @@ export default { myChart.clear(); option && myChart.setOption(option); run(myChart); - }, 3000); - }, 2000) + }, 2000); + }, 600) }, ty_pieDo(){ let that = this; @@ -890,33 +891,38 @@ export default { idArr += "|"+item.groupId; } }) + + // alert(idArr) // that.groupsData = []; + + // 场馆人次占比 + homeApi.homeBarData({groupsId:idArr}).then(res=>{ + // console.log(res, '=场馆人次占比='); + that.groupsData = []; + console.log(res.data.data.groupsData) + res.data.data.groupsData.forEach(item=>{ + that.groupsData.push(item); + that.cgdata.push({ + gname:item.groupName, + grate:item.proportion, + gval:item.noRepeatInNum + }) + }); + // console.log(that.groupsData, 'that.groupsData') + that.cgn_1 = that.groupsData[0].groupName; + that.cgv_1 = that.groupsData[0].noRepeatInNum; + that.cgp_1 = that.groupsData[0].proportion; + that.cgn_2 = that.groupsData[1].groupName; + that.cgv_2 = that.groupsData[1].noRepeatInNum; + that.cgp_2 = that.groupsData[1].proportion; + that.cgn_3 = that.groupsData[2].groupName; + that.cgv_3 = that.groupsData[2].noRepeatInNum; + that.cgp_3 = that.groupsData[2]?that.groupsData[2].proportion:''; + }); + }); - // 场馆人次占比 - homeApi.homeBarData({groupsId:idArr}).then(res=>{ - // console.log(res, '=场馆人次占比='); - that.groupsData = []; - console.log(res.data.data.groupsData) - res.data.data.groupsData.forEach(item=>{ - that.groupsData.push(item); - that.cgdata.push({ - gname:item.groupName, - grate:item.proportion, - gval:item.noRepeatInNum - }) - }); - // console.log(that.groupsData, 'that.groupsData') - that.cgn_1 = that.groupsData[0].groupName; - that.cgv_1 = that.groupsData[0].noRepeatInNum; - that.cgp_1 = that.groupsData[0].proportion; - that.cgn_2 = that.groupsData[1].groupName; - that.cgv_2 = that.groupsData[1].noRepeatInNum; - that.cgp_2 = that.groupsData[1].proportion; - that.cgn_3 = that.groupsData[2].groupName; - that.cgv_3 = that.groupsData[2].noRepeatInNum; - that.cgp_3 = that.groupsData[2]?that.groupsData[2].proportion:''; - }); + }, // 总计 体育场馆的总数 @@ -931,9 +937,8 @@ export default { groups += "|"+item.groupId; } }) - }); - homeApi.allGroupNum({granularity:"daily",groupsId:groups}).then(res=>{ + homeApi.allGroupNum({granularity:"daily",groupsId:groups}).then(res=>{ const rtdata = res.data.returnData that.todayNum = rtdata.day.noRepeatInNum that.weekNum = rtdata.week.noRepeatInNum @@ -941,6 +946,10 @@ export default { that.yearNum = rtdata.year.noRepeatInNum // }); + + }); + + },