flat: 暂存
This commit is contained in:
@@ -152,7 +152,7 @@
|
||||
>
|
||||
</template>
|
||||
<template slot="menuRight">
|
||||
<el-button size="small" @click.stop="downRecords" type="primary"
|
||||
<el-button size="small" :disabled="downloadButton" @click.stop="downRecords" type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
</template>
|
||||
@@ -186,8 +186,10 @@ import {
|
||||
complet,
|
||||
getDetail,
|
||||
download,
|
||||
Auditing
|
||||
Auditing,
|
||||
exportList
|
||||
} from "@/api/manage/mission";
|
||||
import {downloadEcxel} from '@/util/util'
|
||||
import { mapGetters } from "vuex";
|
||||
import missionView from "@/views/util/mission-view";
|
||||
import zpView from "./zpView";
|
||||
@@ -211,6 +213,7 @@ export default {
|
||||
recruitStatus,
|
||||
dataSourcesEnum,
|
||||
educationState,
|
||||
downloadButton: false,
|
||||
view: {},
|
||||
form: {},
|
||||
selectionList: [],
|
||||
@@ -601,13 +604,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