From defdf4a6af629cb55b9bc12b9a365be4f924cc96 Mon Sep 17 00:00:00 2001
From: 阳洁 <2077506045@qq.com>
Date: 星期一, 22 五月 2023 16:49:30 +0800
Subject: [PATCH] 调整价值观中文

---
 src/views/report/reportView.vue |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/src/views/report/reportView.vue b/src/views/report/reportView.vue
new file mode 100644
index 0000000..43e6adb
--- /dev/null
+++ b/src/views/report/reportView.vue
@@ -0,0 +1,46 @@
+<template>
+  <div class="m-pdf">
+    <div id="pdf-content"></div>
+  </div>
+</template>
+<script>
+import Pdfh5 from 'pdfh5'
+import 'pdfh5/css/pdfh5.css'
+
+export default {
+  name: 'Pdfh5',
+  data () {
+    return {
+      pdfh5: null,
+      // 鍙紩鍏ョ綉缁滄枃浠舵垨鑰呮湰鍦版枃浠�
+      pdfUrl: this.$route.query.fileUrl
+      // 濡傛灉寮曞叆鏈湴pdf鏂囦欢锛岄渶瑕佸皢pdf鏀惧湪public鏂囦欢澶逛笅锛屽紩鐢ㄦ椂浣跨敤缁濆璺緞锛�/锛氳〃绀簆ublic鏂囦欢澶癸級
+    }
+  },
+  mounted () {
+    console.log(this.pdfUrl)
+    this.initPdf()
+  },
+  methods: {
+    initPdf () {
+      // pdfh5瀹炰緥鍖栨椂浼犱袱涓弬鏁帮細selector閫夋嫨鍣紝options閰嶇疆椤瑰弬鏁帮紝浼氳繑鍥炰竴涓猵dfh5瀹炰緥瀵硅薄锛屽彲浠ョ敤鏉ユ搷浣減df锛岀洃鍚浉鍏充簨浠�
+      // pdfh5 = new Pdfh5(selector, options) goto鍒濆鍒扮鍑犻〉锛宭ogo璁剧疆姣忎竴椤祊df涓婄殑姘村嵃
+      this.pdfh5 = new Pdfh5('#report-content', {
+        pdfurl: this.pdfUrl,
+        goto: 1
+        // 璁剧疆姣忎竴椤祊df涓婄殑姘村嵃
+        // logo: { src: require('@/assets/images/bus/icon_head@2x.png'), x: 420, y: 700, width: 120, height: 120 }
+      })
+      this.pdfh5.scrollEnable(true) // 鍏佽pdf婊氬姩
+      // 鐩戝惉pdf鍑嗗寮�濮嬫覆鏌擄紝姝ゆ椂鍙互鎷垮埌pdf鎬婚〉鏁�
+      this.pdfh5.on('ready', function () {
+        console.log('鎬婚〉鏁�:' + this.totalNum)
+      })
+      // 鐩戝惉pdf鍔犺浇瀹屾垚浜嬩欢锛屽姞杞藉け璐ャ�佹覆鏌撴垚鍔熼兘浼氳Е鍙�
+      this.pdfh5.on('complete', (status, msg, time) => {
+        console.log('鐘舵��:' + status + '锛屼俊鎭�:' + msg + '锛岃�楁椂:' + time + '姣')
+      })
+    }
+  }
+}
+</script>

--
Gitblit v1.9.1