flat: 暂存
This commit is contained in:
@@ -126,6 +126,11 @@
|
||||
v-if="vaildData(permission.manage_mission_zpview, false)"
|
||||
>报名详情</el-button> -->
|
||||
</template>
|
||||
<template slot="menuRight">
|
||||
<el-button size="small" :disabled="downloadButton" @click.stop="downRecords" type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
</template>
|
||||
</avue-crud>
|
||||
<delay-dialog
|
||||
ref="delay"
|
||||
@@ -146,6 +151,7 @@ import {
|
||||
review,
|
||||
getDetail,
|
||||
download,
|
||||
exportList
|
||||
} from "@/api/workstation/post";
|
||||
import { mapGetters } from "vuex";
|
||||
import postView from "@/views/util/post-view";
|
||||
@@ -179,6 +185,7 @@ export default {
|
||||
recruitStatus,
|
||||
dataSourcesEnum,
|
||||
educationState,
|
||||
downloadButton: false,
|
||||
view: {},
|
||||
form: {},
|
||||
selectionList: [],
|
||||
@@ -570,12 +577,21 @@ export default {
|
||||
})
|
||||
},
|
||||
downRecords() {
|
||||
if (this.query.time) {
|
||||
this.query.stime = this.query.time[0];
|
||||
this.query.etime = this.query.time[1];
|
||||
// delete this.query.time;
|
||||
}
|
||||
window.open(download(this.query));
|
||||
this.downloadButton = true
|
||||
exportList(
|
||||
this.page.currentPage,
|
||||
this.page.pageSize,
|
||||
this.query
|
||||
).then((response) => {
|
||||
const blob = window.URL.createObjectURL(new Blob([response.data], { type: response.headers['content-type']}));
|
||||
let fileName = decodeURI(response.headers['content-disposition'].split(';')[1].split('filename=')[1])
|
||||
let a = document.createElement('a')
|
||||
let event = new MouseEvent('click')
|
||||
a.download = fileName || Date.now() + '.xlsx'
|
||||
a.href = blob
|
||||
a.dispatchEvent(event)
|
||||
this.downloadButton = false
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user