From bb584963c6abe77c5577cbcad3c9956b69444ae9 Mon Sep 17 00:00:00 2001
From: zhongshujie <2862698242@qq.com>
Date: 星期二, 01 七月 2025 17:17:30 +0800
Subject: [PATCH] 无人机样章

---
 src/components/pdfview/index.vue |   24 +++++++++---------------
 1 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/src/components/pdfview/index.vue b/src/components/pdfview/index.vue
index a712e0f..845bf08 100644
--- a/src/components/pdfview/index.vue
+++ b/src/components/pdfview/index.vue
@@ -1,15 +1,7 @@
 <!-- @format -->
 <template>
-  <el-dialog
-    :visible.sync="localDialogVisible"
-    @open="hadleOpenDialog"
-    width="60vw"
-    top="2vh"
-    append-to-body
-    lock-scroll
-    :show-close="false"
-    class="custom-dialog"
-  >
+  <el-dialog :visible.sync="localDialogVisible" @open="hadleOpenDialog" width="60vw" top="2vh" append-to-body
+    lock-scroll :show-close="false" class="custom-dialog">
     <div slot="title" class="header_title">
       <span>{{ pdfTitle }}</span>
       <span @click="closeDialog"> x </span>
@@ -54,7 +46,7 @@
     return {
       localDialogVisible: false,
       currentPageSrc: "",
-      currentPage: 1,
+      currentPage: 3,
       totalPage: 1,
       viewerCon: null,
       preViewMd5: "",
@@ -92,7 +84,7 @@
   methods: {
     hadleOpenDialog() {
       this.preViewMd5 = this.md5;
-      this.currentPage = 1;
+      this.currentPage = 3;
       this.currentPageSrc = "";
       this.totalPage = 1;
       this.viewerCon?.destroy();
@@ -174,7 +166,7 @@
             if (this.currentPage < this.totalPage) {
               this.currentPage++;
               if (this.currentPage <= this.totalPage) {
-                this.createDom(this.currentPage, ele);
+                this.createDom(this.currentPage);
               }
             }
           }
@@ -182,6 +174,7 @@
         });
       }
     },
+
 
     getFileInfo() {
       // 鑾峰彇鐩綍
@@ -198,8 +191,8 @@
           } catch (error) {
             console.log(error, "pdf杩斿洖鍊肩被鍨嬮敊璇�");
           }
-          Math.min(3, res.totalPages);
-          for (let i = 0; i <= Math.min(3, res.totalPages); i++) {
+          const maxPages = Math.min(3, this.totalPage);
+          for (let i = 0; i < maxPages; i++) {
             this.createDom(i + 1);
           }
           this.loading = false;
@@ -211,6 +204,7 @@
           this.loading = false;
         });
     },
+
     getPageImage(page) {
       const ctx = process.env.VUE_APP_API_URL;
       return (

--
Gitblit v1.9.1