Skip to content

Commit

Permalink
Merge pull request #10603 from useryuyu/issue_10555
Browse files Browse the repository at this point in the history
feat:制品下载无反应问题 #10555
  • Loading branch information
bkci-bot authored Jul 9, 2024
2 parents 4095780 + 3d6b2cc commit 247c89a
Showing 1 changed file with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<template>
<div v-if="artifactoryType !== 'IMAGE'">
<bk-popover
:disabled="!hasPermission || !disabled"
:disabled="!btnDisabled || isLoading"
>
<i
v-if="downloadIcon"
v-if="isLoading"
class="devops-icon icon-circle-2-1 spin-icon"
@click.stop=""
/>
<i
v-else-if="downloadIcon"
:class="['devops-icon icon-download', {
'artifactory-download-icon-disabled': btnDisabled
}]"
Expand All @@ -19,9 +24,7 @@
{{ $t("download") }}
</bk-button>
<template slot="content">
<template v-if="disabled">
<p>{{ disabled ? $t('downloadDisabledTips') : $t('details.noDownloadPermTips') }}</p>
</template>
<p>{{ disabled ? $t('downloadDisabledTips') : $t('details.noDownloadPermTips') }}</p>
</template>
</bk-popover>
<bk-dialog
Expand Down Expand Up @@ -72,7 +75,8 @@
data () {
return {
visible: false,
signingMap: new Map()
signingMap: new Map(),
isLoading: false
}
},
computed: {
Expand All @@ -85,7 +89,7 @@
return false
},
btnDisabled () {
return !this.hasPermission || this.disabled
return !this.hasPermission || this.disabled || this.isLoading
}
},
beforeDestroy () {
Expand All @@ -98,11 +102,13 @@
},
async downLoadFile () {
try {
if (this.btnDisabled) return
if (this.signingMap.get(this.path)) {
// this.apkSigningDialogVisible = true
this.setVisible(true)
return
}
this.isLoading = true
const { url2 } = await this.$store
.dispatch('common/requestDownloadUrl', {
projectId: this.$route.params.projectId,
Expand Down Expand Up @@ -131,6 +137,8 @@
}
} catch (err) {
this.$bkMessage({ theme: 'error', message: err.message || err })
} finally {
this.isLoading = false
}
},
pollingCheckSignedApk (url) {
Expand Down

0 comments on commit 247c89a

Please sign in to comment.