diff --git a/project/oms/apps/AppDeploy/AppDeploy.vue b/project/oms/apps/AppDeploy/AppDeploy.vue index cadff14d..4c4af996 100644 --- a/project/oms/apps/AppDeploy/AppDeploy.vue +++ b/project/oms/apps/AppDeploy/AppDeploy.vue @@ -18,7 +18,8 @@ @@ -91,6 +92,9 @@ export default { }) }, handleDownload(row) { + + }, + handleZip(row) { let loading = this.$loading({ lock: true, text: "正在打包文件...", spinner: 'el-icon-loading', @@ -99,11 +103,22 @@ export default { this.instance.post("/node/autodeploy/getZip", null, { params: {id} }).then(res => { - loading.close() if (res?.code == 0) { - + let count = 0, timer = setInterval(() => { + if (count == 30) { + clearInterval(timer) + loading.close() + } else this.instance.post("/node/autodeploy/confirmZip", null, { + params: {id} + }).then(res => { + if (res?.code == 0) { + clearInterval(timer) + loading.close() + } else count++ + }, 10000) + }) } - }) + }).catch(() => loading.close()) }, handleEdit(row) { this.form = JSON.parse(JSON.stringify(row))