lsc 2 lat temu
rodzic
commit
650750325c
1 zmienionych plików z 36 dodań i 53 usunięć
  1. 36 53
      src/components/pages/student/addCourse.vue

+ 36 - 53
src/components/pages/student/addCourse.vue

@@ -1713,25 +1713,18 @@ export default {
           j++
         ) {
           if (
-            this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
-              .length > 1
+            !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].people
           ) {
-            for (
-              var z = 0;
-              z <
-              this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
-                .length;
-              z++
-            ) {
-              if (
-                !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
-                  .toolChoose[z].tool.length
-              ) {
-                this.$message.error("请把工具添加完整");
-                cPan = 2;
-                break;
-              }
-            }
+            this.$message.error("请填写负责人");
+            cPan = 2
+            break;
+          }
+          if (
+            !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].time
+          ) {
+            this.$message.error("请填写任务完成时间");
+            cPan = 2
+            break;
           }
           if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
             this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
@@ -1934,7 +1927,7 @@ export default {
         if (s == 4 && this.cidType == 0) {
           this.$message.error("请将信息填写完整");
           return;
-        }else if(s == 4){
+        } else if (s == 4) {
           this.steps = 4;
         }
       }
@@ -2624,6 +2617,7 @@ export default {
                     askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
                   },
                 ],
+                toolArray: [],
                 isShowTools: false,
                 askCount: 1,
                 isFold: 0,
@@ -2963,26 +2957,18 @@ export default {
         j++
       ) {
         if (
-          this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
-            .length > 1
+          !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].people
         ) {
-          for (
-            var z = 0;
-            z <
-            this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
-              .length;
-            z++
-          ) {
-            if (
-              !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose[
-                z
-              ].tool.length
-            ) {
-              this.$message.error("请把工具添加完整");
-              cPan = 2;
-              break;
-            }
-          }
+          this.$message.error("请填写负责人");
+          cPan = 2
+          break;
+        }
+        if (
+          !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].time
+        ) {
+          this.$message.error("请填写任务完成时间");
+          cPan = 2
+          break;
         }
         if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
           this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
@@ -3030,22 +3016,18 @@ export default {
           j++
         ) {
           if (
-            this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length > 1
+            !this.unitJson[i].chapterInfo[0].taskJson[j].people
           ) {
-            for (
-              var z = 0;
-              z < this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose.length;
-              z++
-            ) {
-              if (
-                !this.unitJson[i].chapterInfo[0].taskJson[j].toolChoose[z].tool
-                  .length
-              ) {
-                this.$message.error("请把工具添加完整");
-                cPan = 2;
-                break;
-              }
-            }
+            this.$message.error("请填写负责人");
+            cPan = 2
+            break;
+          }
+          if (
+            !this.unitJson[i].chapterInfo[0].taskJson[j].time
+          ) {
+            this.$message.error("请填写任务完成时间");
+            cPan = 2
+            break;
           }
           if (this.unitJson[i].chapterInfo[0].taskJson[j].eList) {
             this.unitJson[i].chapterInfo[0].taskJson[j].eList = this.unitJson[
@@ -3259,6 +3241,7 @@ export default {
                           ],
                         },
                       ],
+                      toolArray: [],
                       isShowTools: false,
                       askCount: 1,
                       isFold: 0,