月异常报表导出

This commit is contained in:
jjLv 2024-10-10 09:51:06 +08:00
parent 4e518578d1
commit 105b60fbc5
2 changed files with 10 additions and 5 deletions

View File

@ -21,9 +21,9 @@ export function getDetail(query) {
// 导出工程
export function exportEngineering(query) {
export function exportMonthlyError(query) {
return request({
url: '/bracelet/export/exportEngineering',
url: '/system/attDetailByMonth/export',
method: 'get',
responseType: 'blob',
params: query

View File

@ -128,7 +128,7 @@
/>
<!-- 相关记录 -->
<el-dialog :title="title" :visible.sync="showRecord" width="1200px" height="1000px" append-to-body @close="cancelRecord">
<el-dialog :title="title" :visible.sync="showRecord" width="1200px" height="1000px" append-to-body >
<el-form :model="queryRecord" ref="queryFormRecord" size="small" :inline="true" v-show="showSearch" label-width="110px">
<el-form-item label="选择考勤时间段">
<el-date-picker
@ -209,7 +209,7 @@
</template>
<script>
import { listMonthlyError,getDetail} from "@/api/attendanceReport/monthlyError";
import { listMonthlyError,getDetail,exportMonthlyError} from "@/api/attendanceReport/monthlyError";
import { downloadFile } from '@/utils/download'
// import { getEngineeringList } from "@/api/select";
import { getToken } from '@/utils/auth'
@ -361,7 +361,12 @@
this.getListRecord();
},
/** 导出按钮操作 */
handleExport() {
exportMonthlyError(this.queryParams).then(res => {
downloadFile({ fileName: `月异常报表_${new Date().getTime()}.xlsx`, fileData: res, fileType: 'application/vnd.ms-excel;charset=utf-8' })
})
},
}
};