Browse Source

更新 AppConfig.vue 页面中 "应用部署" 相关接口

reghao 3 tháng trước cách đây
mục cha
commit
88499c62ec
1 tập tin đã thay đổi với 9 bổ sung6 xóa
  1. 9 6
      src/views/devops/app/AppConfig.vue

+ 9 - 6
src/views/devops/app/AppConfig.vue

@@ -796,10 +796,13 @@ export default {
     handleDeployConfig(index, row) {
       this.addDeployForm.appId = row.appId
       this.addDeployForm.packType = row.packType
-      getAppDeployConfigList(row.appId).then(resp => {
+      this.getAppDeployConfigListWrapper(row.appId)
+    },
+    getAppDeployConfigListWrapper(appId) {
+      getAppDeployConfigList(appId).then(resp => {
         if (resp.code === 0) {
           this.appDeployConfigList = resp.data
-          this.deployConfigDialogTitle = row.appId + ' 的部署配置列表'
+          this.deployConfigDialogTitle = appId + ' 的部署配置列表'
           this.showDeployConfigDialog = true
         } else {
           this.$message.error(resp.msg)
@@ -825,7 +828,7 @@ export default {
       formData.append('appId', this.addDeployForm.appId)
       addAppDeployConfig(formData).then(resp => {
         this.$message.info(resp.msg)
-        this.getData()
+        this.getAppDeployConfigListWrapper(this.addDeployForm.appId)
       }).catch(error => {
         this.$message.error(error.message)
       })
@@ -841,7 +844,7 @@ export default {
       formData.append('startScript', this.editDeployForm.startScript)
       updateAppDeployConfig(formData).then(resp => {
         this.$message.info(resp.msg)
-        this.getData()
+        this.getAppDeployConfigListWrapper(this.editDeployForm.appId)
       }).catch(error => {
         this.$message.error(error.message)
       }).finally(() => {
@@ -855,10 +858,10 @@ export default {
         type: 'warning'
       }).then(() => {
         const formData = new FormData()
-        formData.append('appId', row.appId)
+        formData.append('appDeployConfigId', row.appDeployConfigId)
         deleteAppDeployConfig(formData).then(resp => {
           this.$message.info(resp.msg)
-          this.getData()
+          this.getAppDeployConfigListWrapper(row.appId)
         }).catch(error => {
           this.$message.error(error.message)
         })