From 64cff21f7baf958b1566c35631f94bc96987f1a2 Mon Sep 17 00:00:00 2001 From: "453530270@qq.com" Date: Tue, 1 Aug 2023 09:56:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=AD=E9=97=B4=E9=83=A8?= =?UTF-8?q?=E5=88=86=E5=9C=BA=E9=A6=86=E6=95=B0=E6=8D=AE=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ty/index.vue | 71 ++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 31 deletions(-) diff --git a/src/views/ty/index.vue b/src/views/ty/index.vue index 86f4c3a..c1b248b 100644 --- a/src/views/ty/index.vue +++ b/src/views/ty/index.vue @@ -58,15 +58,16 @@ +
24小时进馆人数
- {{ cgdata[0].gval }} + {{ cgdata[2].gval }} 体育场 - {{ cgdata[1].gval }} + {{ cgdata[0].gval }} 体育馆 - {{ cgdata[2].gval }} + {{ 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 // }); + + }); + + },