From 35a6fe6070921f83ce5af0f35b4cd4047c134c47 Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Tue, 12 Aug 2025 17:24:38 +0800 Subject: [PATCH] =?UTF-8?q?0812=E9=9C=80=E6=B1=82=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/archivesMIOD/miodRecord/index.vue | 43 ++++++++++++++++++++- src/views/home.vue | 17 ++++++-- 2 files changed, 55 insertions(+), 5 deletions(-) diff --git a/src/views/archivesMIOD/miodRecord/index.vue b/src/views/archivesMIOD/miodRecord/index.vue index 34d0b47..9cf18eb 100644 --- a/src/views/archivesMIOD/miodRecord/index.vue +++ b/src/views/archivesMIOD/miodRecord/index.vue @@ -29,7 +29,6 @@ -

借阅时间

@@ -41,6 +40,10 @@ 搜索 重置
+ + + 导出 +
@@ -52,7 +55,7 @@ class="archives-table" :data="crud.data" style="width: 100%;" - height="calc(100vh - 288px)" + height="calc(100vh - 340px)" @cell-dblclick="tableDoubleClick" > @@ -118,6 +121,9 @@ import pagination from '@crud/Pagination' import DateRangePicker from '@/components/DateRangePicker' import MidoArchivesInfo from '@/views/archivesMIOD/miodLibrary/module/detail' // import { parseTime } from '@/utils/index' +import { exportFile } from '@/utils/index' +import qs from 'qs' +import { mapGetters } from 'vuex' export default { name: 'MiodRecord', @@ -157,6 +163,11 @@ export default { returnBtnLoading: [] } }, + computed: { + ...mapGetters([ + 'baseApi' + ]) + }, watch: { }, created() { @@ -274,6 +285,34 @@ export default { }) }, handleCloseDialog(done) { + }, + doExport() { + console.log('doExport', this.crud.page.total) + if (this.crud.page.total > 10000) { + this.handleExport('导出数据大于10000条,时间可能较长') + } else { + this.handleExport('此操作将导出所有数据') + } + }, + handleExport(message) { + this.$confirm(message + '你是否还要继续?', '提示', { + confirmButtonText: '继续', + cancelButtonText: '取消', + type: 'warning', + dangerouslyUseHTMLString: true + }).then(() => { + const params = { + 'search': this.crud.query.search, + 'readType': this.crud.query.readType, + 'borrowStartTime': this.crud.query.borrowStartTime, + 'borrowEndTime': this.crud.query.borrowEndTime, + 'lastStartTime': this.crud.query.lastStartTime, + 'lastEndTime': this.crud.query.lastEndTime + } + exportFile(this.baseApi + '/api/documentArchives/downloadBorrowLog?' + qs.stringify(params, { indices: false })) + }).catch(() => { + console.log('取消') + }) } } } diff --git a/src/views/home.vue b/src/views/home.vue index e3ebd3f..8d12c21 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -9,7 +9,10 @@

公文传阅 - {{ miodTableData.length }} +
+ 仅显示原件 + {{ miodTableData.length }} +