zengyicheng 2 years ago
parent
commit
2757d6fd94

+ 1 - 1
dist/index.html

@@ -25,4 +25,4 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.4d669fb5a1ec190f9a4b2ee2330c6f83.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.093df9138434d51e559a.js></script><script type=text/javascript src=./static/js/vendor.70beac01daea730bb60f.js></script><script type=text/javascript src=./static/js/app.9653dddda08db9e0d964.js></script></body></html><script>document.domain = document.domain.split(".").slice(-2).join(".");</script>
+    }</style><link href=./static/css/app.f79e1afaf764eb3d89183685a87f5317.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.093df9138434d51e559a.js></script><script type=text/javascript src=./static/js/vendor.70beac01daea730bb60f.js></script><script type=text/javascript src=./static/js/app.1aac3c92c66377cf948a.js></script></body></html><script>document.domain = document.domain.split(".").slice(-2).join(".");</script>

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.4d669fb5a1ec190f9a4b2ee2330c6f83.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.f79e1afaf764eb3d89183685a87f5317.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.f79e1afaf764eb3d89183685a87f5317.css.map


BIN
dist/static/img/e_picture.9e664a5.png


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.1aac3c92c66377cf948a.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.1aac3c92c66377cf948a.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.9653dddda08db9e0d964.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.9653dddda08db9e0d964.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.093df9138434d51e559a.js.map


+ 41 - 12
src/components/pages/addCourse.vue

@@ -2935,14 +2935,41 @@ export default {
       this.dialogVisible4 = false;
     },
     addTools(i, itemTaskIndex, toolIndex) {
+      // if (
+      //   this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
+      //     .toolChoose[toolIndex].tool.length == 0
+      // ) {
+      //   this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+      //     itemTaskIndex
+      //   ].toolChoose[toolIndex].tool.push(i);
+      // } else {
+      //   if (
+      //     this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+      //       itemTaskIndex
+      //     ].toolChoose[toolIndex].tool.indexOf(i) != -1
+      //   ) {
+      //     this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+      //       itemTaskIndex
+      //     ].toolChoose[toolIndex].tool.splice(
+      //       this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+      //         itemTaskIndex
+      //       ].toolChoose[toolIndex].tool.indexOf(i),
+      //       1
+      //     );
+      //   } else {
+      //     this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+      //       itemTaskIndex
+      //     ].toolChoose[toolIndex].tool.push(i);
+      //   }
+      //   console.log(
+      //     this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
+      //       .toolChoose[toolIndex].tool
+      //   );
+      // }
       if (
         this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
-          .toolChoose[toolIndex].tool.length == 0
+          .toolChoose[toolIndex].tool.length > 0
       ) {
-        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
-          itemTaskIndex
-        ].toolChoose[toolIndex].tool.push(i);
-      } else {
         if (
           this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
             itemTaskIndex
@@ -2957,15 +2984,17 @@ export default {
             1
           );
         } else {
-          this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
-            itemTaskIndex
-          ].toolChoose[toolIndex].tool.push(i);
+          this.$message({
+            message: "每个工具只能添加一个",
+            type: "error",
+          });
         }
-        console.log(
-          this.unitJson[this.unitIndex].chapterInfo[0].taskJson[itemTaskIndex]
-            .toolChoose[toolIndex].tool
-        );
+      } else {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[
+          itemTaskIndex
+        ].toolChoose[toolIndex].tool.push(i);
       }
+
       this.$forceUpdate();
     },
     addAskList() {

Some files were not shown because too many files changed in this diff