diff --git a/public/config.js b/public/config.js index b6e4843..c8d086e 100644 --- a/public/config.js +++ b/public/config.js @@ -1,4 +1,4 @@ window.publicConfig = { // 请求地址 - BASE_API:'http://192.168.66.16/api/', + BASE_API:'http://10.97.121.2/api/', } \ No newline at end of file diff --git a/src/api/home.js b/src/api/home.js index 08076b3..c5cc604 100644 --- a/src/api/home.js +++ b/src/api/home.js @@ -32,7 +32,7 @@ export function allGroupNum(param) { param, }) } - +// 实时进馆人数 export function allInfoDatas(param) { return request({ url: '/pass.passcc/realTimeData', @@ -40,7 +40,7 @@ export function allInfoDatas(param) { param, }) } - +// 今日各场馆的趋势 export function allGcgNumDatas(param) { return request({ url: '/pass.passcc/toDayGroupsEnterNum', @@ -48,8 +48,8 @@ export function allGcgNumDatas(param) { param, }) } - -export function allTsgInfoDatas(param) { +// 图书馆人流趋势 +export function tsgTrends(param) { return request({ url: '/library.pass/allFlowTrends', method: 'post', diff --git a/src/utils/comm.js b/src/utils/comm.js index 0a35e4d..d12e0f3 100644 --- a/src/utils/comm.js +++ b/src/utils/comm.js @@ -24,7 +24,7 @@ export function ecMaxVal(arr){ const narr = []; const maxval = Math.max(...arr); for(let i=0;i { - // get allTimeData - const tmpdata = res.data.data.allTimeData - - let datas = [] - Object.values(tmpdata).forEach((value) => { - console.log(value.num); - datas.push(value.num) - - }); - console.log(datas); - this.klqsDatas = datas - console.log(tmpdata); - // this.day_num = tmpdata.day.noRepeatInNum - // this.week_num_num = tmpdata.week.noRepeatInNum - // this.mon_num = tmpdata.month.noRepeatInNum - // this.year_num = tmpdata.year.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 - // let ssjgNumDatas = this.ssjgNumDatas - // ssjgNumDatas.forEach(item => { - // console.log(parseInt(item.proportion)); - // let proportion = parseInt(item.proportion) - // if (proportion >= 80 && proportion <= 90) { - // console.log('11111111'); - // this.$refs.proportionbox.addClass('rbrate2') - // } - // if (proportion > 90) { - // console.log('222222'); - // // console.log(this.$refs.proportionbox) - // this.$refs.proportionbox.addClass('rbrate3') - // } - // }) - // console.log(tmpdata); - // console.log(tmpdata.01.proportion); - // let arr = JSON.stringify(tmpdata) - // console.log(arr); - // this.day_num = tmpdata.day.noRepeatInNum - // this.week_num_num = tmpdata.week.noRepeatInNum - // this.mon_num = tmpdata.month.noRepeatInNum - // this.year_num = tmpdata.year.noRepeatInNum - - // let btdata = new Array(); - // let bvdata = new Array(); - // tmpdata.foreach(function(item,index){ - // console.log(item); - // console.log(index); - // }); - }); }, getGcgNumDatas() { let that = this - console.log(that); homeApi.allGcgNumDatas().then(res => { // get allTimeData const tmpdata = res.data.returnData - console.log(tmpdata); - // this.day_num = tmpdata.day.noRepeatInNum - // this.week_num_num = tmpdata.week.noRepeatInNum - // this.mon_num = tmpdata.month.noRepeatInNum - // this.year_num = tmpdata.year.noRepeatInNum - - // let btdata = new Array(); - // let bvdata = new Array(); - // tmpdata.foreach(function(item,index){ - // console.log(item); - // console.log(index); - // }); - + // 场馆人流趋势线面图 + this.cgrs_line(); }); }