From 8a5d2668f695b110faa90b29f0c9583fcb6fba21 Mon Sep 17 00:00:00 2001
From: fl <3098731433@qq.com>
Date: Wed, 14 May 2025 09:43:20 +0800
Subject: [PATCH] =?UTF-8?q?=E8=80=83=E5=8B=A4=E6=98=8E=E7=BB=86=E5=8A=A0?=
=?UTF-8?q?=E4=B8=80=E4=B8=AA=E8=A1=A8=E6=A0=BC=E5=AF=BC=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/report/attReport.js | 10 ++++++++++
src/views/report/attReport/index.vue | 22 ++++++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/src/api/report/attReport.js b/src/api/report/attReport.js
index d4e5b98..767199d 100644
--- a/src/api/report/attReport.js
+++ b/src/api/report/attReport.js
@@ -46,6 +46,16 @@ export function exportAttRecord(query) {
})
}
+// 表格导出
+export function exportAttRecordTable(query) {
+ return request({
+ url: '/system/export/exportAttRecordTable',
+ method: 'get',
+ responseType: 'blob',
+ params: query
+ })
+}
+
// 异常排名导出
export function exportAbnormalRanking(query) {
return request({
diff --git a/src/views/report/attReport/index.vue b/src/views/report/attReport/index.vue
index 75ee452..8df4671 100644
--- a/src/views/report/attReport/index.vue
+++ b/src/views/report/attReport/index.vue
@@ -32,6 +32,10 @@
v-hasPermi="['att:attReport:export']"
>导出
+ 表格导出
+
异常排名导出
@@ -402,6 +406,7 @@ import {
getOutCountList,
getAttCountList,
exportOutCountList,
+ exportAttRecordTable,
getAttTempData,
getAttDataPull,
getAbsenteeismData,
@@ -856,7 +861,24 @@ export default {
})
})
},
+/** 表格导出按钮操作 */
+handleExportTable() {
+ this.queryParams.exportType = '考勤明细'
+ if (this.queryParams.orgIdList && this.queryParams.orgIdList.length > 0) {
+ this.queryParams.orgIds = this.queryParams.orgIdList.map(id => id.toString());
+ } else {
+ this.queryParams.orgIds = undefined
+ }
+
+ exportAttRecordTable(this.queryParams).then(res => {
+ this.downloadFile({
+ fileName: `考勤记录表格_${new Date().getTime()}.xlsx`,
+ fileData: res,
+ fileType: 'application/vnd.ms-excel;charset=utf-8'
+ })
+ })
+},
/** 异常排名导出 */
abnormalRankingExport() {
this.queryParams.exportType = '异常排名导出'