From b60049c4fd341d6a0d109408aa998e02528fc6d6 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 17 五月 2024 14:49:48 +0800
Subject: [PATCH] pdf

---
 src/views/onlineStudy/file.vue |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/views/onlineStudy/file.vue b/src/views/onlineStudy/file.vue
index 668b580..609f826 100644
--- a/src/views/onlineStudy/file.vue
+++ b/src/views/onlineStudy/file.vue
@@ -37,8 +37,8 @@
             class="showContent" />
           <img v-if="scope.row.contentType === 'img'" :src="'/api/files/' + scope.row.contentUrl.url"
             class="showContent" />
-          <el-link type="primary" v-if="scope.row.contentType === 'pdf'" :src="'/api/files/' + scope.row.contentUrl.url"
-            class="showContent">鐐瑰嚮鏌ョ湅</el-link>
+          <el-link type="primary" v-if="scope.row.contentType === 'pdf'"
+            class="showContent" @click="checkPdf('/api/files/' + scope.row.contentUrl.url)">鐐瑰嚮鏌ョ湅</el-link>
         </template>
       </el-table-column>
       <el-table-column prop="attachment" label="闄勪欢">
@@ -102,6 +102,7 @@
 import OnlineStudyAPI from '@/api/online-study';
 import StudyTypeAPI from '@/api/study-type';
 import Upload from '@/components/UploadC';
+
 export default {
   name: 'type',
   components: { Upload, Pagination },
@@ -117,12 +118,13 @@
       typeList: [],
       searchForm: {
         pageNum: 1,
-        pageSize: 10,
+        pageSize: 5,
         typeName: ''
       },
       total: 0,
       tableData: [],
       open: false,
+      pdfDialog: false,
       form: {
         contentType: 'video',
         subject: '',
@@ -148,6 +150,12 @@
     };
   },
   methods: {
+    checkPdf(url) {
+      window.open('/#/online/study/pdf/view?pdfUrl=' + url, '_blank')
+    },
+    closePdfDialog() {
+      this.pdfDialog = false;
+    },
     fileChange() {
       this.form.contentUrl = [];
     },
@@ -236,7 +244,7 @@
         contentUrl: [],
         attachment: [],
         temp: []
-      }
+      };
     },
     handleClose() {
       this.open = false;

--
Gitblit v1.8.0