Browse Source

修复数据调用

lite
453530270@qq.com 3 years ago
parent
commit
bdce49058c
  1. 8
      src/api/home.js
  2. 49
      src/views/cultrue/index.vue

8
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,
})
}

49
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);

Loading…
Cancel
Save