考勤明细加一个表格导出
This commit is contained in:
parent
724f8222e9
commit
8a5d2668f6
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -32,6 +32,10 @@
|
|||
v-hasPermi="['att:attReport:export']"
|
||||
>导出
|
||||
</el-button>
|
||||
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExportTable"
|
||||
v-hasPermi="['att:attReport:export']"
|
||||
>表格导出
|
||||
</el-button>
|
||||
<el-button type="warning" icon="el-icon-download" size="mini" @click="abnormalRankingExport"
|
||||
v-hasPermi="['att:attReport:abnormal']"
|
||||
>异常排名导出
|
||||
|
|
@ -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 = '异常排名导出'
|
||||
|
|
|
|||
Loading…
Reference in New Issue