diff --git a/src/api/home.js b/src/api/home.js index 67063e1..022ac1c 100644 --- a/src/api/home.js +++ b/src/api/home.js @@ -74,11 +74,11 @@ export function allInfoDatas(param) { }) } // 今日各场馆趋势 -export function allGcgNumDatas(param) { +export function allGcgNumDatas(params) { return request({ url: '/pass.passcc/toDayGroupsEnterNum', method: 'post', - param, + params, }) } @@ -126,10 +126,10 @@ export function getID(param) { } // 24小时场馆总趋势 -export function getAllfFlow(param) { +export function getAllfFlow(params) { return request({ url: '/pass.passcc/getPassHoursData', method: 'get', - param, + params, }) } \ No newline at end of file diff --git a/src/views/cultrue/index.vue b/src/views/cultrue/index.vue index b65cbc3..0b738db 100644 --- a/src/views/cultrue/index.vue +++ b/src/views/cultrue/index.vue @@ -126,7 +126,8 @@ export default { this.gethomeBarData();//24小时服务人次 this.getData24h();//24小时总服务 this.getGcgNumDatas();//人次趋势 - + + // 图书馆借阅查询 this.cultrue_bar3(); // this.addNumber(0, this.todayNum, 'insv') // this.addNumber(0, this.monthNum, 'insv2') @@ -140,7 +141,7 @@ export default { setTimeout(() => { this.cultrue_bar1();//24小时总服务 this.cultrue_bar2();//人次趋势 - }, 200); + }, 900); }, methods: { cultrue_bar1() { @@ -337,6 +338,8 @@ export default { }, 3000); }, 200); }, + + // 各场馆服务人次趋势 cultrue_bar2() { var chartDom = document.getElementById("pcgchart"); @@ -524,7 +527,7 @@ export default { cultrue_bar3() { // 获取图书馆的借阅信息 homeApi.libbrow().then(res=>{ - // console.log(res, '----') + console.log(res, '----') }); var chartDom = document.getElementById("tsgchart"); @@ -827,24 +830,6 @@ export default { } }, - // 三馆信息统计 - // sgstat(){ - // homeApi.libflow().then(res=>{ - // // - // const bwgdata = res.data.data - // this.todayNum = bwgdata.today.incount - // console.log(res) - // }); - // }, - - // 博物馆 - // bwugrs(){ - // homeApi.allTygGroupTimeNum({granularity:"daily",groupsId:"510"}).then(res=>{ - // let bwgrs = res.data.data.groupsData - // // this.bwg_num = bwgrs[0].noRepeatInNum - // }); - // }, - // 24小时服务人次 gethomeBarData(){ let that = this; @@ -923,11 +908,11 @@ export default { // console.log(res, '====='); let idArr = ""; res.data.data.map(item=>{ - if(item.type==1){ + if(item.type==0){ idArr += "|"+item.groupId; } }) - homeApi.getAllfFlow({groupsId:idArr}).then(res=>{ + homeApi.getAllfFlow({groupsId:"510"}).then(res=>{ // console.log(res, '====='); that.data24h = res.data.data.dvalue; that.data24hX = res.data.data.dkeys; @@ -939,14 +924,16 @@ export default { let that = this; homeApi.getID().then(res=>{ // console.log(res, '====='); - let idArr = ""; - res.data.data.map(item=>{ - if(item.type==2){ - idArr += "|"+item.groupId; - } - }) - homeApi.allGcgNumDatas({groupsId:idArr}).then(res=>{ - console.log(res, '====='); + // let idArr = ""; + // res.data.data.map(item=>{ + // if(item.type==2){ + // idArr += "|"+item.groupId; + // } + // idArr = idArr.slice(1) + // }) + + homeApi.allGcgNumDatas({groupsId:"510"}).then(res=>{ + console.log( 'toDayGroupsEnterNum',res); const tmpdata = res.data.data; tmpdata.forEach((item) => { that.rsqsDataName.push(item.groupName);