flat: 暂存

This commit is contained in:
Apcallover
2024-04-08 19:32:21 +08:00
parent 6c2e40a21b
commit f7f13e119f
8 changed files with 71 additions and 35 deletions

View File

@@ -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
})
},
},

View File

@@ -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
})
},