祁阳图书馆智慧大屏
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

51 lines
1.2 KiB

<template>
<!-- 今日图书借还 -->
<div class="screen-item total-lending">
<div class="common-title">今日图书借还</div>
<div class="small-module module-content">
<div class="chart-wrapper" style="height: calc(100%);">
<LineChartService :chart-data="chartData" />
</div>
</div>
</div>
</template>
<script>
import LineChartService from '@/components/echart/lineChartService'
import { FetchHalfYearBRNum } from '@/api/library'
export default {
name: 'TodayBorrowed',
components: {
LineChartService
},
data() {
return {
chartData: {
returnData: [],
borrowedData: []
}
}
},
created() {
},
mounted() {
this.getHalfYearBRNum()
},
methods: {
getHalfYearBRNum() {
FetchHalfYearBRNum().then(res => {
if (res.errCode === 0) {
this.chartData.borrowedData = res.data.borrow
this.chartData.returnData = res.data.return
} else {
this.$message.error('接口错误')
}
})
}
}
}
</script>
<style lang="scss">
@import "~@/assets/styles/index.scss";
</style>