diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index c248779..25b184d 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -151,7 +151,9 @@ export default { yygra:[], // bwg bwgra:[], - // + + // 当前请求类型 + crqt:"daily", day_num: 0, week_num: 0, @@ -170,7 +172,7 @@ export default { // }, mounted() { // 客流趋势 - this.getDataIn() + // this.getDataIn() // 各场馆客流趋势 this.getGcgNumDatas() //统计日月年进馆总数 @@ -189,12 +191,13 @@ export default { case 'm': nrq = "monthly"; break; case 'y': nrq = "yearly"; break; } - return nrq; + //return nrq; + this.getDataIn(nrq) }, // 获取不同时期的数据 - getDataIn(){ - const reqType = this.btgetdata(this.klselt); + getDataIn(reqType){ + //const reqType = this.crqt // btApi.allGroupTimeNum({ 'granularity': reqType }).then(res => { const kldata = res.data.data.allTimeData @@ -248,6 +251,7 @@ export default { //选择年月日中的某个 selitem(type) { this.klselt = type; + this.btgetdata(type) }, // 圆柱图 showorders() { @@ -635,13 +639,12 @@ export default { }, + // 统计概况 getStat() { let that = this - console.log("stat"); homeApi.allGroupNum().then(res => { // get allTimeData const tmpdata = res.data.returnData - console.log(tmpdata); that.day_num = tmpdata.day.noRepeatInNum that.week_num = tmpdata.week.noRepeatInNum that.mon_num = tmpdata.month.noRepeatInNum @@ -650,27 +653,19 @@ export default { // 增加数字动画效果 numGrow(that.$refs.dynum,tmpdata.day.noRepeatInNum) - // let btdata = new Array(); - // let bvdata = new Array(); - // tmpdata.foreach(function(item,index){ - // console.log(item); - // console.log(index); - // }); - }); }, + // 获取实时数据 getInfoDatas() { - let that = this - console.log(that); homeApi.allInfoDatas().then(res => { // get allTimeData this.ssjgNumDatas = res.data.returnData }); }, + // 各个场馆的人流 getGcgNumDatas() { - let that = this homeApi.allGcgNumDatas().then(res => { // get allTimeData const tmpdata = res.data.returnData