Prechádzať zdrojové kódy

下发时优化提示信息

jiawuxian 1 rok pred
rodič
commit
0857ec29e8
1 zmenil súbory, kde vykonal 27 pridanie a 18 odobranie
  1. 27 18
      src/views/resumption/plan/index.vue

+ 27 - 18
src/views/resumption/plan/index.vue

@@ -647,25 +647,34 @@ export default {
       } else {
         msg = "本周期未完成任务应用最新任务内容";
       }
-      this.$refs["DialogThreeState"].show(msg, async (state) => {
-        if (state == 2) {
-          return;
-        }
 
-        this.distributeHS(row.id, state == 1);
-      });
-      // this.$modal
-      //   .confirm(msg, "提示")
-      //   .then(() => {
-      //     // 用户点击了确认按钮
-      //     console.log("执行操作...");
-      //     distributeHS(row.id, true);
-      //   })
-      //   .catch(() => {
-      //     // 用户点击了取消按钮
-      //     // console.log("取消操作...");
-      //     distributeHS(row.id, false);
-      //   });
+      if (row.planStatus == 0) {
+        msg = "请选择从当前轮次或周期开始生成任务?";
+        this.$refs["DialogThreeState"].show(
+          msg,
+          (state) => {
+            if (state == 0 || state == 1) {
+              this.distributeHS(row.id, state == 1);
+            }
+          },
+          {
+            yesText: "当前轮次",
+            noText: "下周期",
+            cancelText: "取消下发",
+          }
+        );
+      } else if (row.planStatus == 2) {
+        this.$modal
+          .confirm("因存在已完成任务,本次任务下发仅支持下周期生成任务", {
+            confirmButtonText: "下周期",
+            canelButtonText: "取消下发",
+          })
+          .then(() => {
+            this.distributeHS(row.id, false);
+          });
+      } else {
+        this.distributeHS(row.id, false);
+      }
     },
     distributeHS(id, immediateEffect) {
       this.loading = true;