培训功能数据未能及时更新bug修复
parent
e921d03320
commit
521ce5f73f
|
@ -317,19 +317,21 @@ export default {
|
||||||
axios.get(config.httpurl + '/classMessage/excel?CLASS_MESSAGE_ID=' + id, {
|
axios.get(config.httpurl + '/classMessage/excel?CLASS_MESSAGE_ID=' + id, {
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
|
setTimeout(() => {
|
||||||
const downloadElement = document.createElement('a')
|
const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
|
||||||
const href = window.URL.createObjectURL(blob)
|
const downloadElement = document.createElement('a')
|
||||||
downloadElement.style.display = 'none'
|
const href = window.URL.createObjectURL(blob)
|
||||||
downloadElement.href = href
|
downloadElement.style.display = 'none'
|
||||||
downloadElement.download = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
downloadElement.href = href
|
||||||
document.body.appendChild(downloadElement)
|
downloadElement.download = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
||||||
downloadElement.click()
|
document.body.appendChild(downloadElement)
|
||||||
document.body.removeChild(downloadElement)
|
downloadElement.click()
|
||||||
window.URL.revokeObjectURL(href)
|
document.body.removeChild(downloadElement)
|
||||||
this.$emit('getResult', '')
|
window.URL.revokeObjectURL(href)
|
||||||
loading.close()
|
this.$emit('getResult', '')
|
||||||
this.close()
|
loading.close()
|
||||||
|
this.close()
|
||||||
|
}, 2000)
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
loading.close()
|
loading.close()
|
||||||
|
@ -362,6 +364,7 @@ export default {
|
||||||
})
|
})
|
||||||
this.visible = false
|
this.visible = false
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
this.close()
|
||||||
this.$emit('getResult', '')
|
this.$emit('getResult', '')
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|
Loading…
Reference in New Issue