Browse Source

修复数据调用

lite
453530270@qq.com 3 years ago
parent
commit
bdce49058c
  1. 8
      src/api/home.js
  2. 47
      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({ return request({
url: '/pass.passcc/toDayGroupsEnterNum', url: '/pass.passcc/toDayGroupsEnterNum',
method: 'post', method: 'post',
param, params,
}) })
} }
@ -126,10 +126,10 @@ export function getID(param) {
} }
// 24小时场馆总趋势 // 24小时场馆总趋势
export function getAllfFlow(param) { export function getAllfFlow(params) {
return request({ return request({
url: '/pass.passcc/getPassHoursData', url: '/pass.passcc/getPassHoursData',
method: 'get', method: 'get',
param, params,
}) })
} }

47
src/views/cultrue/index.vue

@ -127,6 +127,7 @@ export default {
this.getData24h();//24 this.getData24h();//24
this.getGcgNumDatas();// this.getGcgNumDatas();//
//
this.cultrue_bar3(); this.cultrue_bar3();
// this.addNumber(0, this.todayNum, 'insv') // this.addNumber(0, this.todayNum, 'insv')
// this.addNumber(0, this.monthNum, 'insv2') // this.addNumber(0, this.monthNum, 'insv2')
@ -140,7 +141,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.cultrue_bar1();//24 this.cultrue_bar1();//24
this.cultrue_bar2();// this.cultrue_bar2();//
}, 200); }, 900);
}, },
methods: { methods: {
cultrue_bar1() { cultrue_bar1() {
@ -337,6 +338,8 @@ export default {
}, 3000); }, 3000);
}, 200); }, 200);
}, },
//
cultrue_bar2() { cultrue_bar2() {
var chartDom = document.getElementById("pcgchart"); var chartDom = document.getElementById("pcgchart");
@ -524,7 +527,7 @@ export default {
cultrue_bar3() { cultrue_bar3() {
// //
homeApi.libbrow().then(res=>{ homeApi.libbrow().then(res=>{
// console.log(res, '----') console.log(res, '----')
}); });
var chartDom = document.getElementById("tsgchart"); 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 // 24
gethomeBarData(){ gethomeBarData(){
let that = this; let that = this;
@ -923,11 +908,11 @@ export default {
// console.log(res, '====='); // console.log(res, '=====');
let idArr = ""; let idArr = "";
res.data.data.map(item=>{ res.data.data.map(item=>{
if(item.type==1){ if(item.type==0){
idArr += "|"+item.groupId; idArr += "|"+item.groupId;
} }
}) })
homeApi.getAllfFlow({groupsId:idArr}).then(res=>{ homeApi.getAllfFlow({groupsId:"510"}).then(res=>{
// console.log(res, '====='); // console.log(res, '=====');
that.data24h = res.data.data.dvalue; that.data24h = res.data.data.dvalue;
that.data24hX = res.data.data.dkeys; that.data24hX = res.data.data.dkeys;
@ -939,14 +924,16 @@ export default {
let that = this; let that = this;
homeApi.getID().then(res=>{ homeApi.getID().then(res=>{
// console.log(res, '====='); // console.log(res, '=====');
let idArr = ""; // let idArr = "";
res.data.data.map(item=>{ // res.data.data.map(item=>{
if(item.type==2){ // if(item.type==2){
idArr += "|"+item.groupId; // idArr += "|"+item.groupId;
} // }
}) // idArr = idArr.slice(1)
homeApi.allGcgNumDatas({groupsId:idArr}).then(res=>{ // })
console.log(res, '=====');
homeApi.allGcgNumDatas({groupsId:"510"}).then(res=>{
console.log( 'toDayGroupsEnterNum',res);
const tmpdata = res.data.data; const tmpdata = res.data.data;
tmpdata.forEach((item) => { tmpdata.forEach((item) => {
that.rsqsDataName.push(item.groupName); that.rsqsDataName.push(item.groupName);

Loading…
Cancel
Save