From fe4f93d2a67ac78042b598f5038e60f8c2341227 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Fri, 30 Jan 2026 16:53:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/report/attendanceRate.js | 20 ++++++++++ src/views/report/attendanceRate/index.vue | 47 +++++++++++++++++++---- 2 files changed, 59 insertions(+), 8 deletions(-) diff --git a/src/api/report/attendanceRate.js b/src/api/report/attendanceRate.js index 9a858e0..124951c 100644 --- a/src/api/report/attendanceRate.js +++ b/src/api/report/attendanceRate.js @@ -37,3 +37,23 @@ export function getAttAbnormalDetailsList(query) { }) } +// 导出考勤率报表 +export function exportAttRateTypeList(query) { + return request({ + url: '/system/attRate/exportAttRateTypeList', + method: 'get', + responseType: 'blob', + params: query + }) +} + +// 导出异常考勤统计 +export function exportAbnormalList(query) { + return request({ + url: '/system/attRate/exportAttAbnormalList', + method: 'get', + responseType: 'blob', + params: query + }) +} + diff --git a/src/views/report/attendanceRate/index.vue b/src/views/report/attendanceRate/index.vue index 99db2e2..115cb83 100644 --- a/src/views/report/attendanceRate/index.vue +++ b/src/views/report/attendanceRate/index.vue @@ -169,7 +169,16 @@ v-show="showSearch" label-width="auto" > - + + + + - 查询 - - + 查询 + 重置 + 重置 + + + + 导出 + @@ -791,6 +808,8 @@ import { getLateEarlyAbsentList, getAttendanceRateDetail, getAttAbnormalDetailsList, + exportAttRateTypeList, + exportAbnormalList, } from '@/api/report/attendanceRate' import { listDeptTree } from '@/api/system/userInfo' @@ -1008,6 +1027,7 @@ export default { queryParamsAbnormal: { pageNum: 1, pageSize: 10, + year: '', attCurrentMonth: new Date() .toISOString() .split('T')[0] @@ -1257,15 +1277,25 @@ export default { delete query['orgIdList'] console.log(query) - exportMonthReport(query).then((res) => { + exportAttRateTypeList(query).then((res) => { this.downloadFile({ - fileName: `月报表记录_${new Date().getTime()}.xlsx`, + fileName: `考勤率报表_${new Date().getTime()}.xlsx`, fileData: res, fileType: 'application/vnd.ms-excel;charset=utf-8', }) }) }, + handleExportAbnormal() { + let query = _.cloneDeep(this.queryParamsAbnormal) + exportAbnormalList(query).then((res) => { + this.downloadFile({ + fileName: `异常考勤统计_${new Date().getTime()}.xlsx`, + fileData: res, + fileType: 'application/vnd.ms-excel;charset=utf-8', + }) + }) + }, /** 更新应该出勤天数按钮操作 */ handleDays() { // 显示加载中提示 @@ -1434,6 +1464,7 @@ export default { orgName: undefined, pageNum: 1, pageSize: 10, + year: '', } this.getAbnormalList() },