|
|
|
@ -13,17 +13,17 @@ |
|
|
|
|
|
|
|
<div class="jgitem"> |
|
|
|
<div class="jgimg"><img src="../assets/img/icon01.png" /></div> |
|
|
|
<span class="jgival">{{ tdjg }}</span> |
|
|
|
<span class="jgival" id="wtdjg">{{ tdjg }}</span> |
|
|
|
<span class="jgdesc">今日进馆人数</span> |
|
|
|
</div> |
|
|
|
<div class="jgitem"> |
|
|
|
<div class="jgimg"><img src="../assets/img/icon02.png" /></div> |
|
|
|
<span class="jgival"> {{ tmjg }} </span> |
|
|
|
<span class="jgival" id="wtmjg"> {{ tmjg }} </span> |
|
|
|
<span class="jgdesc">本月进馆人数</span> |
|
|
|
</div> |
|
|
|
<div class="jgitem"> |
|
|
|
<div class="jgimg"><img src="../assets/img/icon03.png" /></div> |
|
|
|
<span class="jgival"> {{ tyjg }} </span> |
|
|
|
<span class="jgival" id="wtyjg"> {{ tyjg }} </span> |
|
|
|
<span class="jgdesc">本年进馆人数</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -322,6 +322,7 @@ import * as echarts from 'echarts'; |
|
|
|
|
|
|
|
// 引入api |
|
|
|
import * as homeApi from '@/api/home' |
|
|
|
import { ecMaxVal,numGrow } from '@/utils/comm'; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'TycView', |
|
|
|
@ -335,6 +336,11 @@ export default { |
|
|
|
gkbwg:0, |
|
|
|
gktsg:0, |
|
|
|
gkwhg:0, |
|
|
|
// 24小时总服务人次趋势 |
|
|
|
wh24xdata:[], |
|
|
|
wh24ydata:[], |
|
|
|
// 图书馆借阅 |
|
|
|
libleaData:[], |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
@ -342,33 +348,47 @@ export default { |
|
|
|
// 三馆人数 |
|
|
|
this.sgrsStat() |
|
|
|
|
|
|
|
// 24h ins k line |
|
|
|
this.cgsf_line() |
|
|
|
// 24小时总服务人次趋势 |
|
|
|
this.getWh24hdata() |
|
|
|
// |
|
|
|
this.gc_line() |
|
|
|
// |
|
|
|
this.tsg_line() |
|
|
|
this.libinfoData() |
|
|
|
//this.tsg_line() |
|
|
|
|
|
|
|
this.getTsgInfoDatas() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 三馆人数概况 |
|
|
|
sgrsStat(){ |
|
|
|
// let guid="510|" |
|
|
|
// |
|
|
|
homeApi.allGroupNum({type:2}).then(res=>{ |
|
|
|
const tdata = res.data.returnData; |
|
|
|
this.tdjg = tdata.day.noRepeatInNum |
|
|
|
this.tmjg = tdata.month.noRepeatInNum |
|
|
|
this.tyjg = tdata.year.noRepeatInNum |
|
|
|
}); |
|
|
|
homeApi.tsgTrends().then(res=>{ |
|
|
|
const tdata = res.data.data; |
|
|
|
this.tdjg = tdata.today.incount |
|
|
|
this.tmjg = tdata.month.incount |
|
|
|
this.tyjg = tdata.year.incount |
|
|
|
|
|
|
|
//24小时的情况 |
|
|
|
// //24小时的情况 |
|
|
|
const sgdata = tdata.hour24 |
|
|
|
this.gktsg = sgdata[0].incount |
|
|
|
this.gkbwg = sgdata[1].incount |
|
|
|
this.gkwhg = sgdata[2].incount |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 24 小时总服务人次趋势 |
|
|
|
getWh24hdata(){ |
|
|
|
homeApi.wh24ServiceTrends().then(res=>{ |
|
|
|
const whtdata = res.data.data |
|
|
|
this.wh24xdata=whtdata.dkeys |
|
|
|
this.wh24ydata=whtdata.dvalue |
|
|
|
// console.log("dvv",whtdata.dvalue) |
|
|
|
//this.wh24hdata = res.data.data |
|
|
|
// do line |
|
|
|
this.cgsf_line() |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 山峰图---24小时总服务人次趋势 |
|
|
|
cgsf_line() { |
|
|
|
var chartDom = document.getElementById('gcins_charts'); |
|
|
|
@ -376,15 +396,6 @@ export default { |
|
|
|
var option; |
|
|
|
|
|
|
|
option = { |
|
|
|
tooltip: { |
|
|
|
trigger: 'axis', |
|
|
|
axisPointer: { |
|
|
|
type: 'shadow' |
|
|
|
}, |
|
|
|
formatter: function (params) { |
|
|
|
return params[0].name + "</br>" + params[0].value |
|
|
|
} |
|
|
|
}, |
|
|
|
grid: { |
|
|
|
left: '-8%', |
|
|
|
right: '4%', |
|
|
|
@ -393,9 +404,7 @@ export default { |
|
|
|
containLabel: true |
|
|
|
}, |
|
|
|
xAxis: [{ |
|
|
|
data: [ |
|
|
|
'08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', |
|
|
|
], |
|
|
|
data:this.wh24xdata, |
|
|
|
axisLine: { |
|
|
|
lineStyle: { |
|
|
|
color: '#0095FF', |
|
|
|
@ -439,7 +448,6 @@ export default { |
|
|
|
}, |
|
|
|
}], |
|
|
|
series: [{ |
|
|
|
// name: '厂用电量', |
|
|
|
type: 'bar', |
|
|
|
barGap: '5%', |
|
|
|
barWidth: '10%', |
|
|
|
@ -461,41 +469,32 @@ export default { |
|
|
|
) |
|
|
|
} |
|
|
|
}, |
|
|
|
data: [ |
|
|
|
14000, |
|
|
|
11000, |
|
|
|
10000, |
|
|
|
9000, |
|
|
|
8000, |
|
|
|
7000, |
|
|
|
5000, |
|
|
|
4000, |
|
|
|
3000, |
|
|
|
], |
|
|
|
data: this.wh24ydata, |
|
|
|
zlevel: 11 |
|
|
|
}, |
|
|
|
{ |
|
|
|
// name: '厂用电量', |
|
|
|
type: 'scatter', |
|
|
|
stack: 1, |
|
|
|
xAxisIndex: 0, |
|
|
|
symbolOffset: [0, 0], //相对于原本位置的偏移量 |
|
|
|
data: [0, 0, 0, 0, 0, 0, 0, 0, 0], |
|
|
|
data: this.wh24ydata, |
|
|
|
// data: [0, 0, 0, 0, 0, 0, 0, 0, 0], |
|
|
|
itemStyle: { |
|
|
|
normal: { |
|
|
|
color: '#fff' |
|
|
|
color: '#f0f0f0' |
|
|
|
} |
|
|
|
}, |
|
|
|
symbolSize: 13, |
|
|
|
zlevel: 10, |
|
|
|
z: 2, |
|
|
|
}, |
|
|
|
// 背景柱 |
|
|
|
{ |
|
|
|
name: '背景', |
|
|
|
type: 'bar', |
|
|
|
barWidth: '10%', |
|
|
|
barGap: '-100%', |
|
|
|
data: [15000, 15000, 15000, 15000, 15000, 15000, 15000, 15000, 15000], |
|
|
|
data: ecMaxVal(this.wh24ydata), |
|
|
|
// data: [15000, 15000, 15000, 15000, 15000, 15000, 15000, 15000, 15000], |
|
|
|
itemStyle: { |
|
|
|
normal: { |
|
|
|
color: '#004298', |
|
|
|
@ -677,6 +676,14 @@ export default { |
|
|
|
|
|
|
|
option && myChart.setOption(option); |
|
|
|
}, |
|
|
|
// 图书馆借阅查询 |
|
|
|
libinfoData(){ |
|
|
|
homeApi.libLeaseData().then(res=>{ |
|
|
|
this.libleaData = res.data.data |
|
|
|
// |
|
|
|
this.tsg_line() |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 图书馆 |
|
|
|
tsg_line() { |
|
|
|
var chartDom = document.getElementById("tsgchart"); |
|
|
|
@ -685,15 +692,15 @@ export default { |
|
|
|
|
|
|
|
var data = [{ |
|
|
|
name: '今日办证人数', |
|
|
|
value: 323, |
|
|
|
value: this.libleaData.newreader, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '今日还书册数', |
|
|
|
value: 209, |
|
|
|
value: this.libleaData.returncount, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '今日借书册数', |
|
|
|
value: 323, |
|
|
|
value: this.libleaData.servcount, |
|
|
|
}, |
|
|
|
]; |
|
|
|
// 值颜色 |
|
|
|
@ -729,7 +736,6 @@ export default { |
|
|
|
return arr; |
|
|
|
} |
|
|
|
|
|
|
|
console.log(getSymbolData(data)); |
|
|
|
option = { |
|
|
|
grid: { |
|
|
|
show: false, |
|
|
|
@ -746,11 +752,8 @@ export default { |
|
|
|
{ |
|
|
|
triggerEvent: true, |
|
|
|
show: true, |
|
|
|
// inverse: true, |
|
|
|
// data: getArrByKey(data, 'name'), |
|
|
|
data: [ |
|
|
|
'Lend', 'Still', 'Accreditation' |
|
|
|
// '../assets/img/wh_right1.png','../assets/img/wh_right1.png','../assets/img/wh_right1.png' |
|
|
|
], |
|
|
|
// max:80, |
|
|
|
axisLine: { |
|
|
|
|