lsc 2 years ago
parent
commit
fb68d12c28
2 changed files with 25 additions and 19 deletions
  1. 4 4
      src/components/study.vue
  2. 21 15
      src/components/studyStudent.vue

+ 4 - 4
src/components/study.vue

@@ -2078,12 +2078,12 @@
             查看文档
           </div>
           <el-form class="textBox" style="height: 90%">
-            <el-form-item label="文档标题" class="textTitle">
+            <el-form-item  class="textTitle">
               <div style="font-size: 22px; max-height: 100px; overflow: auto">
                 {{ fullUrl.name }}
               </div>
             </el-form-item>
-            <div style="color: #918f8f; width: 85%">文档内容</div>
+            <!-- <div style="color: #918f8f; width: 85%">文档内容</div> -->
             <div
               v-html="fullUrl.url"
               class="textContent"
@@ -4829,7 +4829,7 @@ export default {
   flex-direction: row;
   flex-wrap: nowrap;
   align-items: center;
-  width: 85%;
+  width: 95%;
 }
 .textTitle >>> .el-form-item__label {
   font-size: 22px;
@@ -5149,7 +5149,7 @@ export default {
   font-size: 18px;
   padding: 30px 0px 0px;
   height: 300px;
-  width: 90%;
+  width: 95%;
   overflow: auto;
   line-height: 30px;
 }

+ 21 - 15
src/components/studyStudent.vue

@@ -2344,12 +2344,12 @@
             查看文档
           </div>
           <el-form class="textBox" style="height: 90%">
-            <el-form-item label="文档标题" class="textTitle">
+            <el-form-item class="textTitle">
               <div style="font-size: 22px; max-height: 100px; overflow: auto">
                 {{ fullUrl.name }}
               </div>
             </el-form-item>
-            <div style="color: #918f8f; width: 85%">文档内容</div>
+            <!-- <div style="color: #918f8f; width: 85%">文档内容</div> -->
             <div
               v-html="fullUrl.url"
               class="textContent"
@@ -3000,7 +3000,11 @@ export default {
           this.$message.error("上传文件大于10兆,请重新选择文件!");
           return;
         }
-      } else {
+      } else if (
+        file.name
+          .split(".")
+          [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
+      ) {
         if (file.size / 1024 / 1024 > 5) {
           this.$message.error("添加成上传文件大于5兆,请重新选择文件!");
           return;
@@ -3215,16 +3219,16 @@ export default {
         // }
       }
       this.navId = this.navList[this.courseType].task[this.taskCount].id;
-      if (this.vedio[this.taskCount].length > 0) {
-        var a =
-          document.getElementsByClassName("box_course")[this.taskCount]
-            .offsetHeight;
-        document.getElementsByClassName("vedioList")[
-          this.taskCount
-        ].style.height = a + "px";
-        document.getElementsByClassName("navBox")[this.taskCount].style.height =
-          a - 40 + "px";
-      }
+      // if (this.vedio[this.taskCount].length > 0) {
+      //   var a =
+      //     document.getElementsByClassName("box_course")[this.taskCount]
+      //       .offsetHeight;
+      //   document.getElementsByClassName("vedioList")[
+      //     this.taskCount
+      //   ].style.height = a + "px";
+      //   document.getElementsByClassName("navBox")[this.taskCount].style.height =
+      //     a - 40 + "px";
+      // }
 
       this.isNoHomeWork = false;
       (this.studyJuri = [
@@ -3236,8 +3240,10 @@ export default {
         },
       ]),
         (this.radio = []);
+      this.isClickNav = "";
       this.getHomeWork();
       this.getCourseDetail();
+      this.$forceUpdate();
     },
     openTask(s, n, i) {
       this.courseType = s;
@@ -5110,7 +5116,7 @@ export default {
   flex-direction: row;
   flex-wrap: nowrap;
   align-items: center;
-  width: 85%;
+  width: 95%;
 }
 .textTitle >>> .el-form-item__label {
   font-size: 22px;
@@ -5435,7 +5441,7 @@ export default {
   font-size: 18px;
   padding: 30px 0px 0px;
   height: 300px;
-  width: 85%;
+  width: 95%;
   overflow: auto;
   margin: 0 0 0 10px;
   line-height: 30px;