考勤明细加一个表格导出
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) {
|
export function exportAbnormalRanking(query) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,10 @@
|
||||||
v-hasPermi="['att:attReport:export']"
|
v-hasPermi="['att:attReport:export']"
|
||||||
>导出
|
>导出
|
||||||
</el-button>
|
</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"
|
<el-button type="warning" icon="el-icon-download" size="mini" @click="abnormalRankingExport"
|
||||||
v-hasPermi="['att:attReport:abnormal']"
|
v-hasPermi="['att:attReport:abnormal']"
|
||||||
>异常排名导出
|
>异常排名导出
|
||||||
|
|
@ -402,6 +406,7 @@ import {
|
||||||
getOutCountList,
|
getOutCountList,
|
||||||
getAttCountList,
|
getAttCountList,
|
||||||
exportOutCountList,
|
exportOutCountList,
|
||||||
|
exportAttRecordTable,
|
||||||
getAttTempData,
|
getAttTempData,
|
||||||
getAttDataPull,
|
getAttDataPull,
|
||||||
getAbsenteeismData,
|
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() {
|
abnormalRankingExport() {
|
||||||
this.queryParams.exportType = '异常排名导出'
|
this.queryParams.exportType = '异常排名导出'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue