Browse Source

Merge branch 'master' of ssh://git.xingtongworld.com:10022/xioayue/btgym

# Conflicts:
#	src/views/ty/index.vue
lite
luyisha 3 years ago
parent
commit
c99d6fb96c
  1. 71
      src/views/ty/index.vue

71
src/views/ty/index.vue

@ -58,15 +58,16 @@
</div> </div>
<!-- 0801 #0750 紧急预案 -->
<div class="center"> <div class="center">
<div class="c_title">24小时进馆人数</div> <div class="c_title">24小时进馆人数</div>
<div class="c_l" id="animationA"></div> <div class="c_l" id="animationA"></div>
<div class="c_r"> <div class="c_r">
<span class="c_r_num">{{ cgdata[0]&&cgdata[0].gval }}</span> <span class="c_r_num">{{ cgdata[2]&&cgdata[2].gval }}</span>
<span class="c_r_txt">体育场</span> <span class="c_r_txt">体育场</span>
<span class="c_r_num">{{ cgdata[1]&&cgdata[1].gval }}</span> <span class="c_r_num">{{ cgdata[0]&&cgdata[0].gval }}</span>
<span class="c_r_txt">体育馆</span> <span class="c_r_txt">体育馆</span>
<span class="c_r_num">{{ cgdata[2]&&cgdata[2].gval }}</span> <span class="c_r_num">{{ cgdata[1]&&cgdata[1].gval }}</span>
<span class="c_r_txt">游泳场馆</span> <span class="c_r_txt">游泳场馆</span>
</div> </div>
@ -692,8 +693,8 @@ export default {
myChart.clear(); myChart.clear();
option && myChart.setOption(option); option && myChart.setOption(option);
run(myChart); run(myChart);
}, 3000); }, 2000);
}, 2000) }, 600)
}, },
ty_pieDo(){ ty_pieDo(){
let that = this; let that = this;
@ -890,33 +891,38 @@ export default {
idArr += "|"+item.groupId; idArr += "|"+item.groupId;
} }
}) })
// alert(idArr)
// that.groupsData = []; // 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; groups += "|"+item.groupId;
} }
}) })
});
homeApi.allGroupNum({granularity:"daily",groupsId:groups}).then(res=>{ homeApi.allGroupNum({granularity:"daily",groupsId:groups}).then(res=>{
const rtdata = res.data.returnData const rtdata = res.data.returnData
that.todayNum = rtdata.day.noRepeatInNum that.todayNum = rtdata.day.noRepeatInNum
that.weekNum = rtdata.week.noRepeatInNum that.weekNum = rtdata.week.noRepeatInNum
@ -941,6 +946,10 @@ export default {
that.yearNum = rtdata.year.noRepeatInNum that.yearNum = rtdata.year.noRepeatInNum
// //
}); });
});
}, },

Loading…
Cancel
Save