lsc 2 years ago
parent
commit
5a77f40536
2 changed files with 17 additions and 7 deletions
  1. 12 4
      src/components/components/vpdf.vue
  2. 5 3
      src/components/studyStudent.vue

+ 12 - 4
src/components/components/vpdf.vue

@@ -1,15 +1,16 @@
 <template>
   <!--使用 pdfvuer 实现 滑动浏览 单印章-->
   <div class="pdf">
-    <!-- <div class="loading" v-show="loading">
+    <div class="loading" v-show="loading">
       <span>pdf可能会加载时间有点长,请耐心等待...</span>
     </div>
-    <div id="contentArea" class="show" v-if="!loading">
+    <!-- <div id="contentArea" class="show" v-if="!loading">
       <pdf :scale.sync="scale" :resize="true" ref="wrapper" class="p-pdf" :src="pdfData" v-for="i in numPages" :key="i"
         :id="i" :page="i" style="width: 100%">
       </pdf>
     </div> -->
-    <iframe style="width: 100%; height: 99%; border: none" :src="'https://cloud.cocorobo.cn/pdf.js/web/viewer.html?file='+pdfUrl"></iframe>
+    <iframe ref="viframe" style="width: 100%; height: 99%; border: none"
+      :src="'https://cloud.cocorobo.cn/pdf.js/web/viewer.html?file=' + pdfUrl"></iframe>
     <!-- <div class="rightArea">
       <div class="toolGroup">
         <div class="page">第 {{ page }} / {{ numPages }} 页</div>
@@ -61,6 +62,9 @@ export default {
     //   spinner: "",
     // });
     this.loading = true;
+    this.$refs.viframe.onload = function () {
+      this.loading = false
+    }
     this.getPdf();
   },
   beforeDestroy() { },
@@ -73,6 +77,9 @@ export default {
       //   spinner: "",
       // });
       this.loading = true;
+      this.$refs.viframe.onload = function () {
+        this.loading = false
+      }
       this.getPdf();
     },
   },
@@ -118,7 +125,8 @@ export default {
   display: flex;
   align-items: center;
   justify-content: center;
-  background-color: rgba(255, 255, 255, 0.7);
+  /* background-color: rgba(255, 255, 255, 0.7); */
+  background-color: rgba(255, 255, 255, 1);
   z-index: 9;
   font-size: 20px;
   color: #007fff;

+ 5 - 3
src/components/studyStudent.vue

@@ -3498,11 +3498,11 @@
                     <div v-if="courseDetail.userid == userid && groupJson.islock == 2"
                       @click="deleteGroupChair(gindex)">移除组员</div>
                     <div @click="selectGroup(gindex)"
-                      v-else-if="courseDetail.userid != userid && groupStudentUid[toolindex] && groupStudentUid[toolindex][gindex].indexOf(userid) == -1">
+                      v-else-if="groupStudentUid[toolindex] && groupStudentUid[toolindex][gindex].indexOf(userid) == -1">
                       加入分组</div>
                     <div
                       @click="exitGroup(groupStudent[toolindex][gindex] && groupStudent[toolindex][gindex][groupStudentUid[toolindex][gindex].indexOf(userid)].id)"
-                      v-else-if="courseDetail.userid != userid && groupStudentUid[toolindex] && groupStudentUid[toolindex][gindex].indexOf(userid) != -1">
+                      v-else-if="groupStudentUid[toolindex] && groupStudentUid[toolindex][gindex].indexOf(userid) != -1">
                       退出分组</div>
                   </div>
                 </div>
@@ -4034,6 +4034,7 @@ export default {
       var el = e.currentTarget;
       // this.$message.success('触发上传')
       el.getElementsByTagName("input")[0].click();
+      e.target.value = "";
     },
     addSelectAnswer() {
       let params = [
@@ -5718,7 +5719,7 @@ export default {
                   url: data.Location,
                   uid: file.uid,
                   fileType: _ftype,
-                  username: '',
+                  username: _this.plworkFile.length+1 > 10 ? _this.plworkFile.length+1 : ('0' + (_this.plworkFile.length+1)),
                 })
               }
               _this.imgChange(null, null, type);
@@ -9504,6 +9505,7 @@ export default {
   font-size: 18px;
   height: 450px;
   width: 95%;
+  max-width: 95%;
   overflow: auto;
   line-height: 30px;
 }