下载失败提示
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
4bee20d1cd
commit
e5f3257f81
|
|
@ -64,6 +64,13 @@ function downLoadFileConcurrency(obj, arr, callback) {
|
|||
let res = await downLoadFileConcurrency(obj, arr, callback)
|
||||
resolve(res)
|
||||
}
|
||||
}).catch(err => {
|
||||
if (callback) {
|
||||
callback({
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
console.log(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
handleClose(done) {
|
||||
this.downLoadType = ''
|
||||
this.downLoadType = 'start'
|
||||
this.percentage = 0
|
||||
this.downLoadImageCount = 0
|
||||
this.downloadVisible = false
|
||||
|
|
@ -338,6 +338,7 @@ export default {
|
|||
if (!confirm) return false
|
||||
this.downloadId = res.OtherInfo.downloadId
|
||||
this.downloadImage(res.Result, res.OtherInfo)
|
||||
this.downloadVisible = true
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
|
|
@ -356,7 +357,7 @@ export default {
|
|||
async downloadImage(data, OtherInfo) {
|
||||
try {
|
||||
let { files, name } = this.formatDownloadFile(data)
|
||||
let res = await downLoadFile(files, name, 'zip', (data) => {
|
||||
let res = await downLoadFile(files, name, 'zip', async (data) => {
|
||||
let { type } = data
|
||||
this.downloadType = type
|
||||
if (type === 'start') {
|
||||
|
|
@ -374,8 +375,15 @@ export default {
|
|||
}
|
||||
if (type === 'downLoaded') {
|
||||
}
|
||||
if (type === 'error') {
|
||||
let confirm = await this.$confirm(this.$t('trials:imageSummary:confirm:downloadError'))
|
||||
this.downLoadType = 'start'
|
||||
this.percentage = 0
|
||||
this.downLoadImageCount = 0
|
||||
this.downloadVisible = false
|
||||
}
|
||||
if (type === 'zipEnd') {
|
||||
this.downLoadType = ''
|
||||
this.downLoadType = 'start'
|
||||
this.percentage = 0
|
||||
this.downLoadImageCount = 0
|
||||
this.downloadVisible = false
|
||||
|
|
|
|||
Loading…
Reference in New Issue