Ver código fonte

样式及大小限制

zengyicheng 2 anos atrás
pai
commit
d4dab1491b

+ 40 - 1
src/components/pages/addCourse.vue

@@ -570,7 +570,9 @@
                 >
                   <div>
                     <div>
-                      <div style="font-size: 22px;color: #8e8e8e;">任务{{ itemTaskIndex + 1 }}</div>
+                      <div style="font-size: 22px; color: #8e8e8e">
+                        任务{{ itemTaskIndex + 1 }}
+                      </div>
                       <div
                         class="chapter_contentbox"
                         style="
@@ -3215,6 +3217,43 @@ export default {
 
       var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
       var _this = this;
+      if (type == 3) {
+        var b = [
+          "DOC",
+          "DOCX",
+          "DOCM",
+          "DOTM",
+          "DOTX",
+          "PPTX",
+          "PPSX",
+          "PPT",
+          "PPS",
+          "PPTM",
+          "POTM",
+          "PPAM",
+          "POTX",
+          "PPSM",
+        ];
+        if (
+          b.indexOf(
+            file.name
+              .split(".")
+              [file.name.split(".").length - 1].toLocaleUpperCase()
+          ) != -1
+        ) {
+          if (file.size / 1024 / 1024 > 10) {
+            this.$message.error("上传文件大于10兆,请重新选择文件!");
+            loading.close();
+            return;
+          }
+        } else {
+          if (file.size / 1024 / 1024 > 5) {
+            this.$message.error("添加成上传文件大于5兆,请重新选择文件!");
+            loading.close();
+            return;
+          }
+        }
+      }
 
       if (file) {
         var params = {

+ 1 - 1
src/components/pages/components/studentReport.vue

@@ -34,7 +34,7 @@
           </div>
         </div>
       </div>
-      <div>
+      <div style="height:100%">
         <worksDetail3 class="r_box" :cid="courseid" :uid="userid" :ooid="scoid"></worksDetail3>
       </div>
     </div>

+ 10 - 5
src/components/pages/components/worksDetail3.vue

@@ -1,12 +1,13 @@
 <template>
-  <div class="pb_content" style="background: unset">
+  <div class="pb_content" style="background: unset; height: 100%">
     <div class="zyBoxC">
       <div class="courseTitle" v-if="allWorks.course">
-        <div class="txName">
+        <!-- <div class="txName">
           <div class="tx"><img :src="tx" alt="" /></div>
           <div>{{ allWorks.sName }}</div>
         </div>
-        <div>{{ allWorks.course }}</div>
+        <div>{{ allWorks.course }}</div> -->
+        <div>查看作业</div>
       </div>
       <div class="cBox">
         <div class="pb_left">
@@ -1158,7 +1159,7 @@ export default {
           }
           this.dyList = dyList;
           this.userAarray = res.data[1];
-          this.lookWork()
+          this.lookWork();
         })
         .catch((err) => {
           console.error(err);
@@ -2026,6 +2027,7 @@ export default {
   justify-content: center;
   padding: 20px 0px;
   flex-direction: column;
+  height: 100%;
 }
 
 .zyBox {
@@ -2331,6 +2333,7 @@ export default {
   flex-wrap: nowrap;
   align-items: flex-start;
   width: 100%;
+  height: calc(100% - 40px);
 }
 .right_score {
   min-width: 370px;
@@ -2344,7 +2347,7 @@ export default {
   margin-right: 10px;
   background: rgb(255, 255, 255);
   /* padding-right: 10px; */
-  height: 500px;
+  height: 100%;
 }
 .cTitle {
   background: #205cc6;
@@ -2508,6 +2511,8 @@ export default {
   align-items: center;
   width: 100%;
   flex-wrap: nowrap;
+  height: 100%;
+  overflow: auto;
 }
 .answerbox {
   display: flex;