|
|
|
@ -94,12 +94,14 @@ export default { |
|
|
|
todayNum: 0, |
|
|
|
monthNum: 0, |
|
|
|
yearNum: 0, |
|
|
|
//24h data |
|
|
|
whdata:[], |
|
|
|
// 博物馆 |
|
|
|
bwg_num:1000, |
|
|
|
// |
|
|
|
whg_num:5160, |
|
|
|
// |
|
|
|
tsg_num:8662, |
|
|
|
bwg_num:0, |
|
|
|
// 文化馆 |
|
|
|
whg_num:0, |
|
|
|
// 图书馆 |
|
|
|
tsg_num:0, |
|
|
|
data24h: [], |
|
|
|
data24hX: [], |
|
|
|
// 趋势图 |
|
|
|
@ -120,20 +122,20 @@ export default { |
|
|
|
} |
|
|
|
}, 200); |
|
|
|
// 博物馆人数 |
|
|
|
this.bwugrs(); |
|
|
|
// this.bwugrs(); |
|
|
|
this.gethomeBarData();//24小时服务人次 |
|
|
|
this.getData24h();//24小时总服务 |
|
|
|
this.getGcgNumDatas();//人次趋势 |
|
|
|
|
|
|
|
this.cultrue_bar3(); |
|
|
|
this.addNumber(0, this.todayNum, 'insv') |
|
|
|
this.addNumber(0, this.monthNum, 'insv2') |
|
|
|
this.addNumber(0, this.yearNum, 'insv3') |
|
|
|
// this.addNumber(0, this.todayNum, 'insv') |
|
|
|
// this.addNumber(0, this.monthNum, 'insv2') |
|
|
|
// this.addNumber(0, this.yearNum, 'insv3') |
|
|
|
// |
|
|
|
// this.addNumber(0, this.bwg_num, 'cmdval1') |
|
|
|
// this.addNumber(0, this.whg_num, 'cmdval2') |
|
|
|
// this.addNumber(0, this.tsg_num, 'cmdval3') |
|
|
|
this.getTsgInfoDatas() |
|
|
|
// this.getTsgInfoDatas() |
|
|
|
// var name = ['图书馆', '文化馆', '博物馆'] |
|
|
|
setTimeout(() => { |
|
|
|
this.cultrue_bar1();//24小时总服务 |
|
|
|
@ -825,38 +827,50 @@ 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 |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 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; |
|
|
|
homeApi.getID().then(res=>{ |
|
|
|
// console.log(res, '====='); |
|
|
|
let idArr = ""; |
|
|
|
res.data.data.map(item=>{ |
|
|
|
if(item.type==2){ |
|
|
|
idArr += "|"+item.groupId; |
|
|
|
} |
|
|
|
homeApi.libflow().then(res=>{ |
|
|
|
const rtdata = res.data.data |
|
|
|
// |
|
|
|
that.todayNum = rtdata.today.incount |
|
|
|
that.monthNum = rtdata.month.incount |
|
|
|
that.yearNum = rtdata.year.incount |
|
|
|
// 24小时的数据 |
|
|
|
const hour24 = rtdata.hour24 |
|
|
|
hour24.forEach(function(item){ |
|
|
|
that.whdata.push({ |
|
|
|
gname: item.groupName, |
|
|
|
gval: item.incount |
|
|
|
}) |
|
|
|
}) |
|
|
|
homeApi.homeBarData({groupsId:idArr}).then(res=>{ |
|
|
|
let groupsData = []; |
|
|
|
res.data.data.groupsData.forEach(item=>{ |
|
|
|
groupsData.push(item); |
|
|
|
}); |
|
|
|
// todayNum: 0, |
|
|
|
// monthNum: 0, |
|
|
|
// yearNum: 0, |
|
|
|
that.bwg_num = groupsData[0].noRepeatInNum; |
|
|
|
that.whg_num = groupsData[1].noRepeatInNum; |
|
|
|
that.tsg_num = groupsData[2]?that.groupsData[2].noRepeatInNum:''; |
|
|
|
}); |
|
|
|
}); |
|
|
|
// bind data |
|
|
|
that.tsg_num = that.whdata[0].gval |
|
|
|
that.bwg_num = that.whdata[1].gval |
|
|
|
that.whg_num = that.whdata[2].gval |
|
|
|
// |
|
|
|
// that.todayNum = |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
// 图书馆 |
|
|
|
getTsgInfoDatas() { |
|
|
|
@ -866,9 +880,9 @@ export default { |
|
|
|
const tmpdata = res.data.data |
|
|
|
// console.log(tmpdata); |
|
|
|
// console.log(typeof(tmpdata.today.incount)); |
|
|
|
this.todayNum = this.toLocaleString(tmpdata.today.incount) |
|
|
|
this.monthNum = this.toLocaleString(tmpdata.month.incount) |
|
|
|
this.yearNum = this.toLocaleString(tmpdata.year.incount) |
|
|
|
// this.todayNum = this.toLocaleString(tmpdata.today.incount) |
|
|
|
// this.monthNum = this.toLocaleString(tmpdata.month.incount) |
|
|
|
// this.yearNum = this.toLocaleString(tmpdata.year.incount) |
|
|
|
// console.log(this.todayNum, this.monthNum, this.yearNum); |
|
|
|
|
|
|
|
// this.day_num = tmpdata.day.noRepeatInNum |
|
|
|
@ -901,24 +915,7 @@ export default { |
|
|
|
// 返回这个字符串 |
|
|
|
return str |
|
|
|
}, |
|
|
|
// 不知道是什么 |
|
|
|
getAAAA(){ |
|
|
|
let that = this; |
|
|
|
homeApi.getID().then(res=>{ |
|
|
|
// console.log(res, '====='); |
|
|
|
let id = res.data.data[1].groupId; |
|
|
|
homeApi.homeBarData({groupsId:id}).then(res=>{ |
|
|
|
// console.log(res.data.data, '=====') |
|
|
|
|
|
|
|
const tmpdata = res.data.data.allTimeData; |
|
|
|
let datas = [] |
|
|
|
Object.values(tmpdata).forEach((value) => { |
|
|
|
datas.push(value.num) |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
// 24小时趋势 |
|
|
|
getData24h(){ |
|
|
|
let that = this; |
|
|
|
|