|
@@ -276,11 +276,23 @@ export default {
|
|
|
if (moment(params.endDate).diff(moment(params.beginDate), 'months', true) > 3) {
|
|
|
this.$message.error('单次最多只能导出3个月的数据,请缩小查询区间后再进行导出!')
|
|
|
}
|
|
|
- this.loading = true
|
|
|
- exportLuckyDrawWin(params).then(res => {
|
|
|
- this.loading = false
|
|
|
- this.download(res)
|
|
|
+ this.$confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: '导出过程可能需要一段时间,且导出期间不可进行其他操作,确认要导出吗?',
|
|
|
+ onOk: () => {
|
|
|
+ this.loading = true
|
|
|
+ exportLuckyDrawWin(params).then(res => {
|
|
|
+ this.loading = false
|
|
|
+ this.download(res)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onCancel () {}
|
|
|
})
|
|
|
+ // this.loading = true
|
|
|
+ // exportLuckyDrawWin(params).then(res => {
|
|
|
+ // this.loading = false
|
|
|
+ // this.download(res)
|
|
|
+ // })
|
|
|
},
|
|
|
download (data) {
|
|
|
if (!data) {
|
|
@@ -292,7 +304,7 @@ export default {
|
|
|
link.href = url
|
|
|
// const a = moment().format('YYYY-MM-DD')
|
|
|
const a = moment(this.queryParam.beginDate).format('LL') + '-' + moment(this.queryParam.endDate).format('LL')
|
|
|
- console.log(a)
|
|
|
+ console.log(a)
|
|
|
const fname = a + '中奖记录表'
|
|
|
link.setAttribute('download', fname + '.xlsx')
|
|
|
document.body.appendChild(link)
|