|
|
@ -5,10 +5,11 @@ |
|
|
|
<div class="database-left"> |
|
|
|
<h3 class="database-title">到馆统计</h3> |
|
|
|
<ul class="inLib-num"> |
|
|
|
<!-- , {'lastYearTotal': item.id === 'lastYearTotal'} --> |
|
|
|
<li |
|
|
|
v-for="(item, index) in leftData" |
|
|
|
:key="index" |
|
|
|
:class="[{'totayTotal': item.id === 'totayTotal'}, {'lastYearTotal': item.id === 'lastYearTotal'}]" |
|
|
|
v-for="item in leftData" |
|
|
|
:key="item.timestamp" |
|
|
|
:class="[{'totayTotal': item.id === 'totayTotal'}]" |
|
|
|
> |
|
|
|
<div class="pageLeft-flop-box"> |
|
|
|
<div> |
|
|
@ -306,29 +307,40 @@ export default { |
|
|
|
} |
|
|
|
) |
|
|
|
|
|
|
|
this.leftData.push( |
|
|
|
{ |
|
|
|
// name: '今日到馆', |
|
|
|
// value: result.todayVisitBase, |
|
|
|
// type: 1 |
|
|
|
id: 'totayTotal', |
|
|
|
name: '今日到馆', |
|
|
|
value: this.$parent.formatter(result.todayVisitBase), |
|
|
|
valueArr: this.$parent.formatter(result.todayVisitBase).split('') |
|
|
|
} |
|
|
|
// { |
|
|
|
// id: 'allTotal', |
|
|
|
// name: '本年累计到馆', |
|
|
|
// value: this.$parent.formatter(result.visitBase), |
|
|
|
// valueArr: this.$parent.formatter(result.visitBase).split('') |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// id: 'lastYearTotal', |
|
|
|
// name: '去年累计到馆', |
|
|
|
// value: this.$parent.formatter(result.lastYearVisitBase), |
|
|
|
// valueArr: this.$parent.formatter(result.lastYearVisitBase).split('') |
|
|
|
// } |
|
|
|
) |
|
|
|
// this.leftData.push( |
|
|
|
// { |
|
|
|
// // name: '今日到馆', |
|
|
|
// // value: result.todayVisitBase, |
|
|
|
// // type: 1 |
|
|
|
// id: 'totayTotal', |
|
|
|
// name: '今日到馆', |
|
|
|
// value: this.$parent.formatter(result.todayVisitBase), |
|
|
|
// valueArr: this.$parent.formatter(result.todayVisitBase) |
|
|
|
// } |
|
|
|
// // { |
|
|
|
// // id: 'allTotal', |
|
|
|
// // name: '本年累计到馆', |
|
|
|
// // value: this.$parent.formatter(result.visitBase), |
|
|
|
// // valueArr: this.$parent.formatter(result.visitBase).split('') |
|
|
|
// // }, |
|
|
|
// // { |
|
|
|
// // id: 'lastYearTotal', |
|
|
|
// // name: '去年累计到馆', |
|
|
|
// // value: this.$parent.formatter(result.lastYearVisitBase), |
|
|
|
// // valueArr: this.$parent.formatter(result.lastYearVisitBase).split('') |
|
|
|
// // } |
|
|
|
// ) |
|
|
|
|
|
|
|
// 更新数据 |
|
|
|
const newData = [{ |
|
|
|
id: 'totayTotal', |
|
|
|
name: '今日到馆', |
|
|
|
value: this.$parent.formatter(result.todayVisitBase), |
|
|
|
valueArr: this.$parent.formatter(result.todayVisitBase).split(''), |
|
|
|
timestamp: Date.now() |
|
|
|
}] |
|
|
|
|
|
|
|
this.$set(this, 'leftData', newData) |
|
|
|
|
|
|
|
this.$parent.timedRefresh(this.leftData, 'left') |
|
|
|
}, |
|
|
|