下载失败提示
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)
|
let res = await downLoadFileConcurrency(obj, arr, callback)
|
||||||
resolve(res)
|
resolve(res)
|
||||||
}
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
if (callback) {
|
||||||
|
callback({
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log(err)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -313,7 +313,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClose(done) {
|
handleClose(done) {
|
||||||
this.downLoadType = ''
|
this.downLoadType = 'start'
|
||||||
this.percentage = 0
|
this.percentage = 0
|
||||||
this.downLoadImageCount = 0
|
this.downLoadImageCount = 0
|
||||||
this.downloadVisible = false
|
this.downloadVisible = false
|
||||||
|
|
@ -338,6 +338,7 @@ export default {
|
||||||
if (!confirm) return false
|
if (!confirm) return false
|
||||||
this.downloadId = res.OtherInfo.downloadId
|
this.downloadId = res.OtherInfo.downloadId
|
||||||
this.downloadImage(res.Result, res.OtherInfo)
|
this.downloadImage(res.Result, res.OtherInfo)
|
||||||
|
this.downloadVisible = true
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
|
|
@ -356,7 +357,7 @@ export default {
|
||||||
async downloadImage(data, OtherInfo) {
|
async downloadImage(data, OtherInfo) {
|
||||||
try {
|
try {
|
||||||
let { files, name } = this.formatDownloadFile(data)
|
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
|
let { type } = data
|
||||||
this.downloadType = type
|
this.downloadType = type
|
||||||
if (type === 'start') {
|
if (type === 'start') {
|
||||||
|
|
@ -374,8 +375,15 @@ export default {
|
||||||
}
|
}
|
||||||
if (type === 'downLoaded') {
|
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') {
|
if (type === 'zipEnd') {
|
||||||
this.downLoadType = ''
|
this.downLoadType = 'start'
|
||||||
this.percentage = 0
|
this.percentage = 0
|
||||||
this.downLoadImageCount = 0
|
this.downLoadImageCount = 0
|
||||||
this.downloadVisible = false
|
this.downloadVisible = false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue