+
导出
-
-
+
+
+
+ {{ scope.row.isSummary ? '-' : scope.$index + 1 }}
+
+
@@ -74,7 +78,7 @@
import { FetchFondsAll } from '@/api/system/fonds'
import { FetchBorrowdCountStatisticsList, FetchArchivedAllYear } from '@/api/statistics/statistics'
import qs from 'qs'
-import { exportFile } from '@/utils/index'
+import { exportFileToken, getCurrentTime } from '@/utils/index'
import { mapGetters } from 'vuex'
export default {
@@ -92,13 +96,34 @@ export default {
page: 0,
size: 10,
total: 0
- }
+ },
+ totalStatistics: null,
+ exportLoading: false
}
},
computed: {
...mapGetters([
'baseApi'
- ])
+ ]),
+ displayData() {
+ const data = [...this.allData]
+ if (this.totalStatistics) {
+ data.push({
+ archiveNo: '-',
+ maintitle: '全库合计',
+ categoryName: '-',
+ archiveYear: '-',
+ retention: '-',
+ entityBorrowCount: this.totalStatistics.totalEntityBorrowCount,
+ electronicBorrowCount: this.totalStatistics.totalElectronicBorrowCount,
+ viewCount: this.totalStatistics.totalViewCount,
+ downloadCount: this.totalStatistics.totalDownloadCount,
+ printCount: this.totalStatistics.totalPrintCount,
+ isSummary: true
+ })
+ }
+ return data
+ }
},
mounted() {
this.getFondsDatas()
@@ -138,6 +163,7 @@ export default {
console.log(res)
this.allData = res.records
this.page.total = res.total
+ this.totalStatistics = res.totalStatistics
this.loading = false
})
},
@@ -151,16 +177,31 @@ export default {
this.page.size = 10
this.getBorrowdCountStatisticsList()
},
+ tableRowClassName({ row }) {
+ if (row.isSummary) {
+ return 'summary-row'
+ }
+ return ''
+ },
doExport() {
+ this.exportLoading = true
this.$confirm('此操作将导出当前统计数据' + '你是否还要继续?', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
- exportFile(this.baseApi + '/api/control/exportBusinessFlow?' + qs.stringify({}, { indices: false }))
+ const params = {
+ fondsIds: this.fondsIds,
+ years: this.years,
+ search: this.search
+ }
+ exportFileToken(this.baseApi + '/api/control/exportBorrowdCountStatisticsList?' + qs.stringify(params, { indices: false }), '利用次数统计' + getCurrentTime() + '.xlsx').then(() => {
+ this.exportLoading = false
+ })
}).catch(() => {
console.log('取消')
+ this.exportLoading = false
})
}
}
@@ -179,6 +220,13 @@ export default {
::v-deep .el-table__footer{
font-size: 14px;
}
+ ::v-deep .summary-row {
+ background-color: #f5f7fa !important;
+ td{
+ border-top: 1px solid #dfe6ec !important;
+ border-bottom: 1px solid #dfe6ec !important;
+ }
+ }
// ::v-deep .el-table__body{
// border-bottom: 1px solid #e4e7ed;
// }
diff --git a/src/views/archivesStatistics/utilizeRegistrationStatistics/index.vue b/src/views/archivesStatistics/utilizeRegistrationStatistics/index.vue
index 23ef0b1..e3d8cc0 100644
--- a/src/views/archivesStatistics/utilizeRegistrationStatistics/index.vue
+++ b/src/views/archivesStatistics/utilizeRegistrationStatistics/index.vue
@@ -53,7 +53,7 @@
查询
重置
-
+
导出
@@ -61,15 +61,23 @@
-
-
+
+
+
+ {{ scope.row.isSummary ? '-' : scope.$index + 1 }}
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
{
this.allData = res.records
this.page.total = res.total
+ this.totalStatistics = res.totalStatistics
this.loading = false
})
},
+ tableRowClassName({ row }) {
+ if (row.isSummary) {
+ return 'summary-row'
+ }
+ return ''
+ },
handleSizeChange(size) {
this.page.size = size
this.page.page = 0
@@ -225,15 +262,27 @@ export default {
this.getBorrowdRegisterStatisticsList()
},
doExport() {
+ this.exportLoading = true
this.$confirm('此操作将导出当前统计数据' + '你是否还要继续?', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
- exportFile(this.baseApi + '/api/control/exportBusinessFlow?' + qs.stringify({}, { indices: false }))
+ const params = {
+ fondsIds: this.fondsIds,
+ startTime: this.blurryTime ? this.blurryTime[0] : null,
+ endTime: this.blurryTime ? this.blurryTime[1] : null,
+ search: this.query.search || null,
+ borrowReason: this.query.borrowReason || null,
+ deptId: this.deptId || null
+ }
+ exportFileToken(this.baseApi + '/api/control/exportBorrowdRegisterStatisticsList?' + qs.stringify(params, { indices: false }), '利用登记统计' + getCurrentTime() + '.xlsx').then(() => {
+ this.exportLoading = false
+ })
}).catch(() => {
console.log('取消')
+ this.exportLoading = false
})
}
}
@@ -252,6 +301,13 @@ export default {
::v-deep .el-table__footer{
font-size: 14px;
}
+ ::v-deep .summary-row {
+ background-color: #f5f7fa !important;
+ td{
+ border-top: 1px solid #dfe6ec !important;
+ border-bottom: 1px solid #dfe6ec !important;
+ }
+ }
// ::v-deep .el-table__body,
// ::v-deep .el-table__body-wrapper{
// border-bottom: 1px solid #e4e7ed;