Browse Source

Merge branch 'master' of https://git.cocorobo.cn/CocoRoboLabs/pbl-student-table

zengyicheng 2 years ago
parent
commit
a7e081292a
2 changed files with 120 additions and 2 deletions
  1. 61 2
      src/components/study.vue
  2. 59 0
      src/components/studyStudent.vue

+ 61 - 2
src/components/study.vue

@@ -468,6 +468,24 @@
                     </div>
                   </div>
                 </div>
+                <div
+                  style="padding: 0px 30px"
+                  v-if="
+                    showType[jdIndex][rwIndex] == 2 ||
+                    showType[jdIndex][rwIndex] == 3
+                  "
+                >
+                  <el-button
+                    type="primary"
+                    @click="
+                      checkFileFull(
+                        showType[jdIndex][rwIndex],
+                        pptImgUrl1[jdIndex][rwIndex]
+                      )
+                    "
+                    >查看全屏</el-button
+                  >
+                </div>
               </div>
             </div>
 
@@ -1908,6 +1926,30 @@
         <el-button @click="timeDialogVisible = false">关 闭</el-button>
       </div>
     </el-dialog>
+    <el-dialog
+      title="查看文档"
+      :visible.sync="fullDialogVisible"
+      :append-to-body="true"
+      width="100%"
+      :before-close="handleClose"
+      class="dialog_diy full_diy"
+    >
+      <div style="height:100%">
+        <iframe
+          v-if="fulltype == 2"
+          style="width: 100%; height: 100%; border: none"
+          :src="fullUrl"
+        ></iframe>
+        <pdf
+          v-else-if="fulltype == 3"
+          :pdfUrl="fullUrl"
+          style="width: 100%; height: 100%; overflow: auto"
+        ></pdf>
+      </div>
+      <div slot="footer">
+        <el-button @click="fullDialogVisible = false">关 闭</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -2069,6 +2111,9 @@ export default {
         format: "node_array",
         data: [{ id: "root", isroot: true, topic: "" }],
       },
+      fullDialogVisible: false,
+      fulltype: "",
+      fullUrl: "",
     };
   },
   methods: {
@@ -3587,6 +3632,11 @@ export default {
       }
       this.$forceUpdate();
     },
+    checkFileFull(type, url) {
+      this.fullDialogVisible = true;
+      this.fulltype = type;
+      this.fullUrl = url;
+    },
   },
   destroyed() {
     window.onresize = null;
@@ -3653,7 +3703,7 @@ export default {
   /* .btnAll{
     width: 55% !important;
   } */
-  .taskBox{
+  .taskBox {
     width: 550px !important;
   }
 }
@@ -4587,7 +4637,7 @@ export default {
   justify-content: flex-start;
   padding: 0 10px;
   width: 100%;
-  box-sizing:border-box;
+  box-sizing: border-box;
 }
 .navTaskname {
   white-space: nowrap;
@@ -5145,4 +5195,13 @@ export default {
   height: 100% !important;
   margin: 0 !important;
 }
+
+.full_diy >>> .el-dialog {
+  margin: 0 !important;
+  height: 100%;
+}
+
+.full_diy >>> .el-dialog__body {
+  height: calc(100% - 200px);
+}
 </style>

+ 59 - 0
src/components/studyStudent.vue

@@ -506,6 +506,24 @@
                   </div>
                 </div>
               </div>
+              <div
+                  style="padding: 0px 30px"
+                  v-if="
+                    showType == 2 ||
+                    showType == 3
+                  "
+                >
+                  <el-button
+                    type="primary"
+                    @click="
+                      checkFileFull(
+                        showType,
+                        pptImgUrl1
+                      )
+                    "
+                    >查看全屏</el-button
+                  >
+                </div>
             </div>
           </div>
 
@@ -1649,6 +1667,30 @@
         <el-button @click="timeDialogVisible = false">关 闭</el-button>
       </div>
     </el-dialog>
+    <el-dialog
+      title="查看文档"
+      :visible.sync="fullDialogVisible"
+      :append-to-body="true"
+      width="100%"
+      :before-close="handleClose"
+      class="dialog_diy full_diy"
+    >
+      <div style="height:100%">
+        <iframe
+          v-if="fulltype == 2"
+          style="width: 100%; height: 100%; border: none"
+          :src="fullUrl"
+        ></iframe>
+        <pdf
+          v-else-if="fulltype == 3"
+          :pdfUrl="fullUrl"
+          style="width: 100%; height: 100%; overflow: auto"
+        ></pdf>
+      </div>
+      <div slot="footer">
+        <el-button @click="fullDialogVisible = false">关 闭</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -1810,6 +1852,9 @@ export default {
         format: "node_array",
         data: [{ id: "root", isroot: true, topic: "" }],
       },
+      fullDialogVisible: false,
+      fulltype: "",
+      fullUrl: "",
     };
   },
   methods: {
@@ -3289,6 +3334,11 @@ export default {
       }
       this.$forceUpdate();
     },
+    checkFileFull(type, url) {
+      this.fullDialogVisible = true;
+      this.fulltype = type;
+      this.fullUrl = url;
+    },
   },
   destroyed() {
     window.onresize = null;
@@ -4822,4 +4872,13 @@ export default {
   height: 100% !important;
   margin:0 !important;
 }
+
+.full_diy >>> .el-dialog {
+  margin: 0 !important;
+  height: 100%;
+}
+
+.full_diy >>> .el-dialog__body {
+  height: calc(100% - 200px);
+}
 </style>