Prechádzať zdrojové kódy

Merge branch 'master' of git.sagacloud.cn:web/ibms

zhangyu 5 rokov pred
rodič
commit
9925a44a45
1 zmenil súbory, kde vykonal 30 pridanie a 8 odobranie
  1. 30 8
      src/views/point/dynamicdata/index.vue

+ 30 - 8
src/views/point/dynamicdata/index.vue

@@ -88,6 +88,7 @@ export default {
       allApplyFlag: false, //全量执行flag
       allApplyFlag: false, //全量执行flag
       force: false, //默认增量执行 ----- false - 增量 true - 全量执行
       force: false, //默认增量执行 ----- false - 增量 true - 全量执行
       isPending: false, //是否执行中:执行中禁用所有功能 true即为执行中
       isPending: false, //是否执行中:执行中禁用所有功能 true即为执行中
+      missionID: '', //任务id
     };
     };
   },
   },
   components: {
   components: {
@@ -109,8 +110,29 @@ export default {
       let param = { Related: true };
       let param = { Related: true };
       //对象类型
       //对象类型
       this.getTypeNames();
       this.getTypeNames();
-      //获取 执行反馈
-      this.getPrompt();
+      //获取 任务列表
+      this.getMissionList();
+    },
+    //查询任务列表
+    getMissionList() {
+      dynamicExecuteFeedback({ Id: null }, res => {
+        let missionList = res.Content
+        missionList.map(mission => {
+          if ('Success/Fail'.indexOf(mission.Completed) > -1) {
+
+          } else {
+            this.missionID = mission.Id
+          }
+        })
+        if (this.missionID) {
+          this.isPending = true;
+          this.tipsType = 0;
+          this.getExecuteFeedback(this.missionID)
+        } else {
+          this.isPending = false;
+          this.getPrompt()
+        }
+      })
     },
     },
     //获取提示消息
     //获取提示消息
     getPrompt() {
     getPrompt() {
@@ -198,16 +220,16 @@ export default {
         dynamicExecuteFeedback(param, res => {
         dynamicExecuteFeedback(param, res => {
           this.allApplyClose()
           this.allApplyClose()
           let response = res.Content[0]
           let response = res.Content[0]
-          if (response.Completed == 'Waiting' || response.Completed == 'Pending') {
-            this.isPending = true;
-            this.tipsType = 0;
+          if ('Success/Fail'.indexOf(response.Completed) > -1) {
             setTimeout(() => {
             setTimeout(() => {
-              this.getExecuteFeedback(missionID)
+              this.isPending = false;
+              this.getPrompt()
             }, 2000)
             }, 2000)
           } else {
           } else {
+            this.isPending = true;
+            this.tipsType = 0;
             setTimeout(() => {
             setTimeout(() => {
-              this.isPending = false;
-              this.getPrompt()
+              this.getExecuteFeedback(missionID)
             }, 2000)
             }, 2000)
           }
           }
         })
         })