소스 검색

学生端打包

zengyicheng 3 년 전
부모
커밋
f090848c59

+ 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.3634948b05eb950e69ec2bd2daa2a7c0.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.deec116227fdc82db9e5.js></script><script type=text/javascript src=./static/js/app.6149fd30f3b1dd2403c4.js></script></body></html>
+<!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.96dbf7f00dc8cc27e1410348ae4a77d8.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.deec116227fdc82db9e5.js></script><script type=text/javascript src=./static/js/app.2476eeb8f0c928854b90.js></script></body></html>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/css/app.96dbf7f00dc8cc27e1410348ae4a77d8.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/css/app.96dbf7f00dc8cc27e1410348ae4a77d8.css.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/app.2476eeb8f0c928854b90.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/app.2476eeb8f0c928854b90.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/app.6149fd30f3b1dd2403c4.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/app.6149fd30f3b1dd2403c4.js.map


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


+ 128 - 48
src/components/study.vue

@@ -15,11 +15,11 @@
         <div class="ml">目录</div>
         <div
           class="blue_box_one"
-          v-for="(item, index) in chapInfoList"
-          :key="index"
-          @click="get(index)"
+          v-for="(item, stageIndex) in chapInfoList"
+          :key="stageIndex"
+          @click="get(stageIndex)"
         >
-          <div>第{{ index + 1 }}阶段</div>
+          <div>第{{ stageIndex + 1 }}阶段</div>
           <div>{{ item.dyName }}</div>
         </div>
       </div>
@@ -76,7 +76,11 @@
                 style="width: 70.5% !important; height: 90px"
                 v-model="chapInfo.taskDetail"
               ></textarea> -->
-              {{ chapInfo.taskDetail }}
+              {{
+                chapInfo.taskDetail != undefined
+                  ? chapInfo.taskDetail
+                  : "暂无描述"
+              }}
             </div>
           </div>
         </div>
@@ -259,7 +263,13 @@
             <div class="filebox" v-else>
               <div style="display: flex; padding: 20px 0 20px 30px">
                 <div style="margin-right: 10px">工具描述:</div>
-                <div>{{ chapInfo.toolText }}</div>
+                <div>
+                  {{
+                    chapInfo.toolText != undefined
+                      ? chapInfo.toolText
+                      : "暂无描述"
+                  }}
+                </div>
               </div>
               <div class="chooseWho">
                 <div
@@ -472,7 +482,7 @@
                   class="addEditor"
                   style="margin-top: 23px"
                   @click="openAddWork"
-                  v-if="studyJuri.length == 0"
+                  v-if="!isNoHomeWork"
                 >
                   选择文件
                 </div>
@@ -711,6 +721,7 @@ export default {
       toolType: 0,
       toolTypeList: [],
       dialogVisible4: false,
+      isNoHomeWork: false,
     };
   },
   methods: {
@@ -887,6 +898,26 @@ export default {
     },
     get(i) {
       this.courseType = i;
+      this.isNoHomeWork = false;
+      this.goTo(
+        "/study?type=" +
+          i +
+          "&courseId=" +
+          this.id +
+          "&userid=" +
+          this.userid +
+          "&oid=" +
+          this.oid
+      );
+      (this.studyJuri = [
+        {
+          content: "",
+          cover: [],
+          upVedio: [],
+          upFile: [],
+        },
+      ]),
+        this.getHomeWork();
       this.getCourseDetail();
     },
     addQuestion() {
@@ -1026,7 +1057,12 @@ export default {
       this.ajax
         .get(this.$store.state.api + "selectWork", params)
         .then((res) => {
-          this.studyJuri = JSON.parse(res.data[0][0].content);
+          if (res.data[0].length > 0) {
+            this.studyJuri = JSON.parse(res.data[0][0].content);
+            this.isNoHomeWork = true;
+          } else {
+            console.log("没有作业");
+          }
         })
         .catch((err) => {
           console.error(err);
@@ -1066,7 +1102,7 @@ export default {
     },
     openAddWork() {
       this.dialogVisible = true;
-      this.getHomeWork();
+      // this.getHomeWork();
       // this.studyJuri = [
       //   {
       //     content: "",
@@ -1077,47 +1113,91 @@ export default {
       // ];
     },
     addWork() {
-      this.$confirm(
-        "您已经提交了该作业了,如果您再提交将覆盖上次提交的作业!",
-        "提示",
-        {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }
-      )
-        .then(() => {
-          let params = [
-            {
-              uid: this.userid,
-              cid: this.id,
-              stage: this.courseType,
-              content: JSON.stringify(this.studyJuri),
-            },
-          ];
-          this.ajax
-            .post(this.$store.state.api + "addWorks", params)
-            .then((res) => {
-              this.$message({
-                message: "提交成功",
-                type: "success",
+      if (this.studyJuri[0].content == "") {
+        this.$message.error("请将信息填写完整");
+        return;
+      } else if (this.studyJuri[0].cover.length == 0) {
+        this.$message.error("请将信息填写完整");
+        return;
+      } else if (this.studyJuri[0].upVedio.length == 0) {
+        this.$message.error("请将信息填写完整");
+        return;
+      }
+      if (this.isNoHomeWork) {
+        this.$confirm(
+          "您已经提交了该作业了,如果您再提交将覆盖上次提交的作业!",
+          "提示",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+          }
+        )
+          .then(() => {
+            let params = [
+              {
+                uid: this.userid,
+                cid: this.id,
+                stage: this.courseType,
+                content: JSON.stringify(this.studyJuri),
+              },
+            ];
+            this.ajax
+              .post(this.$store.state.api + "addWorks", params)
+              .then((res) => {
+                this.$message({
+                  message: "提交成功",
+                  type: "success",
+                });
+                this.isNoHomeWork = true;
+                this.dialogVisible = false;
+                // this.studyJuri.push([
+                // 	{
+                // 		content: "",
+                // 		cover: [],
+                // 		upVedio: [],
+                // 		upFile: [],
+                // 	},
+                // ]);
+              })
+              .catch((err) => {
+                this.$message.error("提交失败");
+                console.error(err);
               });
-              this.dialogVisible = false;
-              // this.studyJuri.push([
-              // 	{
-              // 		content: "",
-              // 		cover: [],
-              // 		upVedio: [],
-              // 		upFile: [],
-              // 	},
-              // ]);
-            })
-            .catch((err) => {
-              this.$message.error("提交失败");
-              console.error(err);
+          })
+          .catch(() => {});
+      } else {
+        let params = [
+          {
+            uid: this.userid,
+            cid: this.id,
+            stage: this.courseType,
+            content: JSON.stringify(this.studyJuri),
+          },
+        ];
+        this.ajax
+          .post(this.$store.state.api + "addWorks", params)
+          .then((res) => {
+            this.$message({
+              message: "提交成功",
+              type: "success",
             });
-        })
-        .catch(() => {});
+            this.isNoHomeWork = true;
+            this.dialogVisible = false;
+            // this.studyJuri.push([
+            // 	{
+            // 		content: "",
+            // 		cover: [],
+            // 		upVedio: [],
+            // 		upFile: [],
+            // 	},
+            // ]);
+          })
+          .catch((err) => {
+            this.$message.error("提交失败");
+            console.error(err);
+          });
+      }
     },
     selectCount() {
       let params = {

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.