Przeglądaj źródła

上传及打包

zengyicheng 2 lat temu
rodzic
commit
de9c65ab75

+ 1 - 1
dist/index.html

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>pbl-student</title><link href=./static/css/app.d13b3492e9a96dc7c4e3e31f07edeef3.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.026c632084ce19e78a6f.js></script><script type=text/javascript src=./static/js/app.135a867721980d3df814.js></script></body></html><script>document.domain = "cocorobo.cn"</script>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>pbl-student</title><link href=./static/css/app.5865d610d91997b8e1812ee292ab53a0.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.026c632084ce19e78a6f.js></script><script type=text/javascript src=./static/js/app.6e16c5e0d83ae8132ca9.js></script></body></html><script>document.domain = "cocorobo.cn"</script>

Plik diff jest za duży
+ 0 - 0
dist/static/css/app.5865d610d91997b8e1812ee292ab53a0.css


Plik diff jest za duży
+ 0 - 0
dist/static/css/app.5865d610d91997b8e1812ee292ab53a0.css.map


BIN
dist/static/img/trainPlatform.04f67a1.png → dist/static/img/trainPlatform.118b448.png


Plik diff jest za duży
+ 0 - 0
dist/static/js/app.135a867721980d3df814.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/app.135a867721980d3df814.js.map


Plik diff jest za duży
+ 0 - 0
dist/static/js/app.6e16c5e0d83ae8132ca9.js


Plik diff jest za duży
+ 0 - 0
dist/static/js/app.6e16c5e0d83ae8132ca9.js.map


Plik diff jest za duży
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


BIN
src/assets/icon/thirdToolList/trainPlatform.png


+ 78 - 73
src/components/study.vue

@@ -468,7 +468,7 @@
                           <img
                             src="../assets/icon/secondToolList/library.png"
                             alt
-                            @click="addTools(tooC, toolIndex)"
+                            @click="addTools(tooC, toolIndex, index)"
                           />
                           <div style="margin: 5px 0">素材库</div>
                         </div>
@@ -476,13 +476,13 @@
                           <img
                             src="../assets/icon/secondToolList/library.png"
                             alt
-                            @click="addTools(tooC, toolIndex)"
+                            @click="addTools(tooC, toolIndex, index)"
                           />
                           <div style="margin: 5px 0">学习资料</div>
                         </div>
                         <div v-if="tooC == 2">
                           <img
-                            @click="addTools(tooC, toolIndex)"
+                            @click="addTools(tooC, toolIndex, index)"
                             src="../assets/icon/secondToolList/note.png"
                             alt
                           />
@@ -490,7 +490,7 @@
                         </div>
                         <div v-if="tooC == 4">
                           <img
-                            @click="addTools(tooC, toolIndex)"
+                            @click="addTools(tooC, toolIndex, index)"
                             src="../assets/icon/thirdToolList/ask.png"
                             alt
                           />
@@ -498,7 +498,7 @@
                         </div>
                         <div v-if="tooC == 5">
                           <img
-                            @click="addTools(tooC, toolIndex)"
+                            @click="addTools(tooC, toolIndex, index)"
                             src="../assets/icon/thirdToolList/score.png"
                             alt
                           />
@@ -506,7 +506,7 @@
                         </div>
                         <div v-if="tooC == 10">
                           <img
-                            @click="addTools(tooC, toolIndex)"
+                            @click="addTools(tooC, toolIndex, index)"
                             src="../assets/icon/thirdToolList/time.png"
                             alt
                           />
@@ -514,7 +514,7 @@
                         </div>
                         <div v-if="tooC == 15">
                           <img
-                            @click="addTools(tooC, toolIndex)"
+                            @click="addTools(tooC, toolIndex, index)"
                             src="../assets/icon/thirdToolList/answer.png"
                             alt
                           />
@@ -522,11 +522,11 @@
                         </div>
                         <div v-if="tooC == 18">
                           <img
-                            @click="addTools(tooC, toolIndex)"
+                            @click="addTools(tooC, toolIndex, index)"
                             src="../assets/icon/thirdToolList/trainPlatform.png"
                             alt
                           />
-                          <div style="margin: 5px 0">训练平台</div>
+                          <div style="margin: 5px 0">训练服务器</div>
                         </div>
                         <!-- <div v-if="tooC == 16">
                         <img
@@ -1099,6 +1099,8 @@ export default {
         askTitle: "",
         askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
       },
+      askList: [],
+      answerList: [],
       navList: [],
     };
   },
@@ -1154,7 +1156,6 @@ export default {
           cid: this.id,
           stage: this.courseType,
           task: i,
-          // chid: this.chapInfoList[this.courseType - 0].chapterInfo[0].chapterid,
           content: this.upToolImg,
           type: 1,
         },
@@ -1367,23 +1368,28 @@ export default {
       // }, 0);
     },
     addQuestion() {
+      this.answerList.push({
+        answerTitle: this.answerQ,
+        answer: this.questionAnswer,
+      });
       let params = [
         {
-          cid: this.id,
-          // chid: this.chapInfoList[this.courseType - 0].chapterInfo[0].chapterid,
-          chid: this.courseType,
-          t: this.questionAnswer,
           uid: this.userid,
+          cid: this.id,
+          stage: this.courseType,
+          task: this.taskCount,
+          content: JSON.stringify(this.answerList),
+          type: 3,
         },
       ];
       this.ajax
-        .post(this.$store.state.api + "addProblem", params)
+        .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
           this.$message({
             message: "提交成功",
             type: "success",
           });
-          this.questionAnswer = "";
+          this.answerDialogVisible = false;
         })
         .catch((err) => {
           this.$message.error("提交失败");
@@ -1674,58 +1680,60 @@ export default {
       // ];
     },
     addStudentAsk() {
-      if (this.isAsk == true) {
-        this.dialogVisible5 = false;
-      } else {
-        let params = [
-          {
-            cid: this.id,
-            stage: this.courseType,
-            task: this.taskCount,
-            content: this.radio.join(","),
-            uid: this.userid,
-          },
-        ];
-        this.ajax
-          .post(this.$store.state.api + "addAskList", params)
-          .then((res) => {
-            this.$message({
-              message: "提交成功",
-              type: "success",
-            });
-            this.dialogVisible5 = false;
-            this.radio = [];
-            this.getStudentAsk();
-          })
-          .catch((err) => {
-            this.$message.error("提交失败");
-            console.error(err);
-          });
-      }
-    },
-    getStudentAsk() {
-      let params = {
-        cid: this.id,
-        stage: this.courseType,
-        task: this.taskCount,
-      };
+      // if (this.isAsk == true) {
+      //   this.dialogVisible5 = false;
+      // } else {
+      this.askList.push({ askJson: this.askJson, anwer: this.radio.join(",") });
+      let params = [
+        {
+          uid: this.userid,
+          cid: this.id,
+          stage: this.courseType,
+          task: this.taskCount,
+          content: JSON.stringify(this.askList),
+          type: 2,
+        },
+      ];
       this.ajax
-        .get(this.$store.state.api + "getAskListByCidStage", params)
+        .post(this.$store.state.api + "addCourseWorks", params)
         .then((res) => {
-          if (res.data[0].length > 0) {
-            var a = res.data[0][0].content.split(",");
-            for (var i = 0; i < a.length; i++) {
-              this.radio.push(parseInt(a[i]));
-            }
-            this.isAsk = true;
-          } else {
-            this.isAsk = false;
-          }
+          this.$message({
+            message: "提交成功",
+            type: "success",
+          });
+          this.dialogVisible5 = false;
+          // this.radio = [];
+          // this.getStudentAsk();
         })
         .catch((err) => {
+          this.$message.error("提交失败");
           console.error(err);
         });
+      // }
     },
+    // getStudentAsk() {
+    //   let params = {
+    //     cid: this.id,
+    //     stage: this.courseType,
+    //     task: this.taskCount,
+    //   };
+    //   this.ajax
+    //     .get(this.$store.state.api + "getAskListByCidStage", params)
+    //     .then((res) => {
+    //       if (res.data[0].length > 0) {
+    //         var a = res.data[0][0].content.split(",");
+    //         for (var i = 0; i < a.length; i++) {
+    //           this.radio.push(parseInt(a[i]));
+    //         }
+    //         this.isAsk = true;
+    //       } else {
+    //         this.isAsk = false;
+    //       }
+    //     })
+    //     .catch((err) => {
+    //       console.error(err);
+    //     });
+    // },
     addWork() {
       if (this.studyJuri[0].content == "") {
         this.$message.error("请将信息填写完整");
@@ -1878,8 +1886,9 @@ export default {
     //     }
     //   }
     // },
-    addTools(t, i) {
+    addTools(t, i, index) {
       var a = 0;
+      this.taskCount = index;
       if (t == 1) {
         if (this.wbCount > 0) {
           this.updateCount(this.wbCount, t);
@@ -1917,17 +1926,13 @@ export default {
         }
         if (!this.dialogVisible2) {
           this.askJson.askJson =
-            this.chapInfo.chapterInfo[0].taskJson[this.taskCount].toolChoose[
+            this.chapInfo.chapterInfo[0].taskJson[index].toolChoose[
               i
             ].askJson[0];
           this.askJson.askTitle =
-            this.chapInfo.chapterInfo[0].taskJson[this.taskCount].toolChoose[
-              i
-            ].askTitle;
+            this.chapInfo.chapterInfo[0].taskJson[index].toolChoose[i].askTitle;
           this.askJson.askCount =
-            this.chapInfo.chapterInfo[0].taskJson[this.taskCount].toolChoose[
-              i
-            ].askCount;
+            this.chapInfo.chapterInfo[0].taskJson[index].toolChoose[i].askCount;
         } else {
           this.askJson.askJson = this.chapTools.askJson.askJson[0];
           this.askJson.askTitle = this.chapTools.askJson.askTitle;
@@ -2016,10 +2021,10 @@ export default {
           a = this.answerCount;
           this.toolsCount(a, t);
         }
-        this.answerQ = this.chapInfo.chapterInfo[0].taskJson[this.taskCount]
-          .toolChoose[i].answerQ
-          ? this.chapInfo.chapterInfo[0].taskJson[this.taskCount].toolChoose[i]
-              .answerQ
+        this.answerQ = this.chapInfo.chapterInfo[0].taskJson[index].toolChoose[
+          i
+        ].answerQ
+          ? this.chapInfo.chapterInfo[0].taskJson[index].toolChoose[i].answerQ
           : "";
         this.answerDialogVisible = true;
       }

+ 2 - 2
src/config/config.js

@@ -9,8 +9,8 @@ const store = new Vuex.Store({
         luyou: 1,
         userInfo: {},
         nCount: 0,
-        api: 'https://pbl.cocorobo.cn/api/pbl/',
-        // api: 'http://localhost:7003/api/pbl/',
+        // api: 'https://pbl.cocorobo.cn/api/pbl/',
+        api: 'http://localhost:7003/api/pbl/',
     },
 
     mutations: {

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików