Browse Source

调整切换调用异常

master
453530270@qq.com 3 years ago
parent
commit
06cd51e665
  1. 29
      src/views/HomeView.vue

29
src/views/HomeView.vue

@ -151,7 +151,9 @@ export default {
yygra:[], yygra:[],
// bwg // bwg
bwgra:[], bwgra:[],
//
//
crqt:"daily",
day_num: 0, day_num: 0,
week_num: 0, week_num: 0,
@ -170,7 +172,7 @@ export default {
// }, // },
mounted() { mounted() {
// //
this.getDataIn() // this.getDataIn()
// //
this.getGcgNumDatas() this.getGcgNumDatas()
// //
@ -189,12 +191,13 @@ export default {
case 'm': nrq = "monthly"; break; case 'm': nrq = "monthly"; break;
case 'y': nrq = "yearly"; break; case 'y': nrq = "yearly"; break;
} }
return nrq; //return nrq;
this.getDataIn(nrq)
}, },
// //
getDataIn(){ getDataIn(reqType){
const reqType = this.btgetdata(this.klselt); //const reqType = this.crqt
// //
btApi.allGroupTimeNum({ 'granularity': reqType }).then(res => { btApi.allGroupTimeNum({ 'granularity': reqType }).then(res => {
const kldata = res.data.data.allTimeData const kldata = res.data.data.allTimeData
@ -248,6 +251,7 @@ export default {
// //
selitem(type) { selitem(type) {
this.klselt = type; this.klselt = type;
this.btgetdata(type)
}, },
// //
showorders() { showorders() {
@ -635,13 +639,12 @@ export default {
}, },
//
getStat() { getStat() {
let that = this let that = this
console.log("stat");
homeApi.allGroupNum().then(res => { homeApi.allGroupNum().then(res => {
// get allTimeData // get allTimeData
const tmpdata = res.data.returnData const tmpdata = res.data.returnData
console.log(tmpdata);
that.day_num = tmpdata.day.noRepeatInNum that.day_num = tmpdata.day.noRepeatInNum
that.week_num = tmpdata.week.noRepeatInNum that.week_num = tmpdata.week.noRepeatInNum
that.mon_num = tmpdata.month.noRepeatInNum that.mon_num = tmpdata.month.noRepeatInNum
@ -650,27 +653,19 @@ export default {
// //
numGrow(that.$refs.dynum,tmpdata.day.noRepeatInNum) 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() { getInfoDatas() {
let that = this
console.log(that);
homeApi.allInfoDatas().then(res => { homeApi.allInfoDatas().then(res => {
// get allTimeData // get allTimeData
this.ssjgNumDatas = res.data.returnData this.ssjgNumDatas = res.data.returnData
}); });
}, },
//
getGcgNumDatas() { getGcgNumDatas() {
let that = this
homeApi.allGcgNumDatas().then(res => { homeApi.allGcgNumDatas().then(res => {
// get allTimeData // get allTimeData
const tmpdata = res.data.returnData const tmpdata = res.data.returnData

Loading…
Cancel
Save