From f312c93d1886b599b37889d226691476145c0c23 Mon Sep 17 00:00:00 2001
From: 林致杰 <1003392067@qq.com>
Date: 星期二, 25 四月 2023 00:39:12 +0800
Subject: [PATCH] CIAQ报告预览支持
---
src/lang/th.js | 2
src/lang/zh.js | 2
src/views/exam/paper/finish.vue | 10 ++
src/views/pdf/h5.vue | 45 +++++++++++
package-lock.json | 98 ++++++++++++++++-------
src/lang/en.js | 2
src/views/exam/paper/career_interests.vue | 10 ++
public/SETPOINT职业兴趣量表反馈报告1.0.pdf | 0
package.json | 1
src/router.js | 12 +++
10 files changed, 149 insertions(+), 33 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index ea0fc38..5ce68fb 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2514,8 +2514,8 @@
},
"async-validator": {
"version": "1.8.5",
- "resolved": "http://registry.npm.taobao.org/async-validator/download/async-validator-1.8.5.tgz",
- "integrity": "sha1-3D4I7B/Q3dtn5ghC8CwM0c7G1/A=",
+ "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.5.tgz",
+ "integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
"requires": {
"babel-runtime": "6.x"
}
@@ -2717,8 +2717,8 @@
},
"babel-helper-vue-jsx-merge-props": {
"version": "2.0.3",
- "resolved": "http://registry.npm.taobao.org/babel-helper-vue-jsx-merge-props/download/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
- "integrity": "sha1-Iq69OzOQIyjlEyk6jkmSs4T58bY="
+ "resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
+ "integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
},
"babel-loader": {
"version": "8.0.6",
@@ -3568,7 +3568,8 @@
"version": "4.6.0",
"resolved": "http://registry.npm.taobao.org/co/download/co-4.6.0.tgz",
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
- "dev": true
+ "dev": true,
+ "optional": true
},
"coa": {
"version": "2.0.2",
@@ -4364,8 +4365,7 @@
"de-indent": {
"version": "1.0.2",
"resolved": "http://registry.npm.taobao.org/de-indent/download/de-indent-1.0.2.tgz",
- "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=",
- "dev": true
+ "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0="
},
"debug": {
"version": "4.1.1",
@@ -4737,9 +4737,9 @@
"dev": true
},
"element-ui": {
- "version": "2.10.1",
- "resolved": "https://registry.npm.taobao.org/element-ui/download/element-ui-2.10.1.tgz?cache=0&sync_timestamp=1562053824530&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felement-ui%2Fdownload%2Felement-ui-2.10.1.tgz",
- "integrity": "sha1-EBEBblDnb12ub7+chuU7blP8ues=",
+ "version": "2.15.13",
+ "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.13.tgz",
+ "integrity": "sha512-LJoatEYX6WV74FqXBss8Xfho9fh9rjDSzrDrTyREdGb1h1R3uRvmLh5jqp2JU137aj4/BgqA3K06RQpQBX33Bg==",
"requires": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
@@ -6115,7 +6115,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"aproba": {
"version": "1.2.0",
@@ -6136,12 +6137,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -6156,17 +6159,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -6283,7 +6289,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"ini": {
"version": "1.3.5",
@@ -6295,6 +6302,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -6309,6 +6317,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -6316,12 +6325,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -6340,6 +6351,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -6420,7 +6432,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -6432,6 +6445,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -6517,7 +6531,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -6553,6 +6568,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -6572,6 +6588,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -6615,12 +6632,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
}
}
},
@@ -6971,8 +6990,7 @@
"he": {
"version": "1.2.0",
"resolved": "http://registry.npm.taobao.org/he/download/he-1.2.0.tgz",
- "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=",
- "dev": true
+ "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8="
},
"hex-color-regex": {
"version": "1.1.0",
@@ -9001,8 +9019,8 @@
},
"normalize-wheel": {
"version": "1.0.1",
- "resolved": "http://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz",
- "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
+ "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
+ "integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
},
"normalize.css": {
"version": "8.0.1",
@@ -9521,6 +9539,11 @@
"safe-buffer": "^5.0.1",
"sha.js": "^2.4.8"
}
+ },
+ "pdfh5": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmmirror.com/pdfh5/-/pdfh5-1.4.2.tgz",
+ "integrity": "sha512-1BL8HIx/EEZowRPBgas7/WokbGEv1gxKNRmmHSimG113178mKxIBH4pxWBc0tj6d25Sy+EwnlQwv9cUUmQa42w=="
},
"performance-now": {
"version": "2.1.0",
@@ -10872,8 +10895,8 @@
},
"resize-observer-polyfill": {
"version": "1.5.1",
- "resolved": "http://registry.npm.taobao.org/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz",
- "integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ="
+ "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
+ "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
},
"resolve": {
"version": "1.10.0",
@@ -10989,7 +11012,8 @@
"version": "4.0.8",
"resolved": "http://registry.npm.taobao.org/rx-lite/download/rx-lite-4.0.8.tgz",
"integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=",
- "dev": true
+ "dev": true,
+ "optional": true
},
"rx-lite-aggregates": {
"version": "4.0.8",
@@ -11755,6 +11779,11 @@
"requires": {
"is-plain-obj": "^1.0.0"
}
+ },
+ "sortablejs": {
+ "version": "1.10.2",
+ "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.2.tgz",
+ "integrity": "sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A=="
},
"source-list-map": {
"version": "2.0.1",
@@ -12569,8 +12598,8 @@
},
"throttle-debounce": {
"version": "1.1.0",
- "resolved": "http://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-1.1.0.tgz",
- "integrity": "sha1-UYU9o3vmihVctugns1FKPEIuic0="
+ "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
+ "integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
},
"through": {
"version": "2.3.8",
@@ -13294,7 +13323,6 @@
"version": "2.6.10",
"resolved": "http://registry.npm.taobao.org/vue-template-compiler/download/vue-template-compiler-2.6.10.tgz",
"integrity": "sha1-MjtPNJXwT6o1AzN6gvXWUHeZycw=",
- "dev": true,
"requires": {
"de-indent": "^1.0.2",
"he": "^1.1.0"
@@ -13306,6 +13334,14 @@
"integrity": "sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU=",
"dev": true
},
+ "vuedraggable": {
+ "version": "2.24.3",
+ "resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.24.3.tgz",
+ "integrity": "sha512-6/HDXi92GzB+Hcs9fC6PAAozK1RLt1ewPTLjK0anTYguXLAeySDmcnqE8IC0xa7shvSzRjQXq3/+dsZ7ETGF3g==",
+ "requires": {
+ "sortablejs": "1.10.2"
+ }
+ },
"vuex": {
"version": "3.1.0",
"resolved": "http://registry.npm.taobao.org/vuex/download/vuex-3.1.0.tgz?cache=0&other_urls=http%3A%2F%2Fregistry.npm.taobao.org%2Fvuex%2Fdownload%2Fvuex-3.1.0.tgz",
diff --git a/package.json b/package.json
index a2d92dd..f2c58da 100644
--- a/package.json
+++ b/package.json
@@ -22,6 +22,7 @@
"js-cookie": "2.2.0",
"normalize.css": "8.0.1",
"nprogress": "0.2.0",
+ "pdfh5": "^1.4.2",
"vue": "2.6.10",
"vue-i18n": "^8.15.3",
"vue-router": "^3.0.3",
diff --git "a/public/SETPOINT\350\201\214\344\270\232\345\205\264\350\266\243\351\207\217\350\241\250\345\217\215\351\246\210\346\212\245\345\221\2121.0.pdf" "b/public/SETPOINT\350\201\214\344\270\232\345\205\264\350\266\243\351\207\217\350\241\250\345\217\215\351\246\210\346\212\245\345\221\2121.0.pdf"
new file mode 100644
index 0000000..2729399
--- /dev/null
+++ "b/public/SETPOINT\350\201\214\344\270\232\345\205\264\350\266\243\351\207\217\350\241\250\345\217\215\351\246\210\346\212\245\345\221\2121.0.pdf"
Binary files differ
diff --git a/src/lang/en.js b/src/lang/en.js
index fc59515..64ef4c6 100644
--- a/src/lang/en.js
+++ b/src/lang/en.js
@@ -2,6 +2,7 @@
start: 'Continue testing',
submission: 'submit',
down: 'download report',
+ view: 'view report',
lastQuestion: 'Last',
nextQuestion: 'Next',
recommendedTime: 'Recommended Time:',
@@ -53,6 +54,7 @@
finishPersonalityInfo: 'You have completed the personality quetionnaire, and the data has been successfully uploaded to the server and saved. ',
finishCareerInterestsInfo: 'You have completed the Career Interests quetionnaire, and the data has been successfully uploaded to the server and saved. ',
finishPersonalityDownInfo: 'You may click the red button below to download your test report.',
+ finishViewReportInfo: 'You can click on the red button below to view your result report.',
langWelcomeThai: '喔⑧复喔權笖喔掂笗喔笝喔`副喔氞釜喔灌箞喙�喔о箛喔氞箘喔嬥涪喙屶釜喔赤斧喔`副喔氞笚喔赤箒喔氞笟喔椸笖喔腑喔氞競喔竾',
langOptionThai: '喔佮福喔膏笓喔侧箑喔ム阜喔竵喔犩覆喔┼覆 喙佮弗喔班竸喔ム复喔� 鈥溹笖喔赤箑喔權复喔權竵喔侧福喔曕箞喔�.',
values_finishValuesInfo:'Thank you! Your responses have been submitted. You can close this page now.',
diff --git a/src/lang/th.js b/src/lang/th.js
index 4da663c..304231d 100644
--- a/src/lang/th.js
+++ b/src/lang/th.js
@@ -2,6 +2,7 @@
start: 'Continue testing',
submission: 'submit',
down: 'download report',
+ view: 'view report',
lastQuestion: 'Last',
nextQuestion: 'Next',
recommendedTime: 'Recommended Time:',
@@ -53,6 +54,7 @@
finishPersonalityInfo: 'You have completed the personality quetionnaire, and the data has been successfully uploaded to the server and saved. ',
finishCareerInterestsInfo: 'You have completed the Career Interests quetionnaire, and the data has been successfully uploaded to the server and saved. ',
finishPersonalityDownInfo: 'You may click the red button below to download your test report.',
+ finishViewReportInfo: 'You can click on the red button below to view your result report.',
langWelcomeThai: '喔⑧复喔權笖喔掂笗喔笝喔`副喔氞釜喔灌箞喙�喔о箛喔氞箘喔嬥涪喙屶釜喔赤斧喔`副喔氞笚喔赤箒喔氞笟喔椸笖喔腑喔氞競喔竾',
langOptionThai: '喔佮福喔膏笓喔侧箑喔ム阜喔竵喔犩覆喔┼覆 喙佮弗喔班竸喔ム复喔� 鈥溹笖喔赤箑喔權复喔權竵喔侧福喔曕箞喔�.'
}
diff --git a/src/lang/zh.js b/src/lang/zh.js
index db7be38..45597fa 100644
--- a/src/lang/zh.js
+++ b/src/lang/zh.js
@@ -2,6 +2,7 @@
start: '缁х画娴嬭瘯',
submission: ' 鎻愪氦',
down: '涓嬭浇鎶ュ憡',
+ view: '鏌ョ湅鎶ュ憡',
lastQuestion: '鍥炲埌涓婁竴棰�',
nextQuestion: '涓嬩竴棰�',
recommendedTime: '寤鸿鏃堕棿锛�',
@@ -53,6 +54,7 @@
finishPersonalityInfo: '鎮ㄥ凡缁忓畬鎴愪簡浜烘牸娴嬭瘯闂嵎锛屾暟鎹凡缁忔垚鍔熺殑涓婁紶鑷虫湇鍔″櫒锛屽苟宸茬粡淇濆瓨濂姐��',
finishCareerInterestsInfo: '鎮ㄥ凡缁忓畬鎴愪簡鑱屼笟鍏磋叮闂嵎锛屾暟鎹凡缁忔垚鍔熺殑涓婁紶鑷虫湇鍔″櫒锛屽苟宸茬粡淇濆瓨濂姐��',
finishPersonalityDownInfo: '鎮ㄥ彲浠ョ偣鍑讳笅闈㈢孩鑹叉寜閽笅杞芥偍鐨勭粨鏋滄姤鍛娿��',
+ finishViewReportInfo: '鎮ㄥ彲浠ョ偣鍑讳笅闈㈢孩鑹叉寜閽煡鐪嬫偍鐨勭粨鏋滄姤鍛娿��',
langWelcomeThai: '喔⑧复喔權笖喔掂笗喔笝喔`副喔氞釜喔灌箞喙�喔о箛喔氞箘喔嬥涪喙屶釜喔赤斧喔`副喔氞笚喔赤箒喔氞笟喔椸笖喔腑喔氞競喔竾',
langOptionThai: '喔佮福喔膏笓喔侧箑喔ム阜喔竵喔犩覆喔┼覆 喙佮弗喔班竸喔ム复喔� 鈥溹笖喔赤箑喔權复喔權竵喔侧福喔曕箞喔�.',
values_finishValuesInfo: '娴嬭瘯缁撴潫锛佹偍鐨勬墍鏈夐�夐」鏁版嵁宸茬粡涓婁紶鑷虫湇鍔″櫒锛屽苟宸蹭繚瀛樺ソ銆傛偍鍙互鍏抽棴娴忚鍣紝閫�鍑虹瓟棰樼晫闈€��',
diff --git a/src/router.js b/src/router.js
index 7e01cfd..6c7ed8a 100644
--- a/src/router.js
+++ b/src/router.js
@@ -142,6 +142,18 @@
meta: { title: 'career_interests' }
}
]
+ },
+ {
+ path: '/pdf',
+ component: Layout,
+ children: [
+ {
+ path: 'view',
+ component: () => import('@/views/pdf/h5'),
+ name: 'h5',
+ meta: { title: 'pdf棰勮' }
+ }
+ ]
}
]
})
diff --git a/src/views/exam/paper/career_interests.vue b/src/views/exam/paper/career_interests.vue
index 662ae2a..b5a0c00 100644
--- a/src/views/exam/paper/career_interests.vue
+++ b/src/views/exam/paper/career_interests.vue
@@ -265,7 +265,13 @@
if (_this.partOrder !== nowPartOrder) {
_this.isShowGuide(true)
}
- _this.preDisable = true
+
+ // 濡傛灉涓婁竴棰樹笉鏄湰娈碉紝鍒欎笉鑳借繑鍥炰笂涓�娈�
+ if (this.isDiffPartOrder()) {
+ _this.preDisable = false
+ } else {
+ _this.preDisable = true
+ }
_this.nextDisable = false
_this.answer.answerItems[_this.order].startTime = _this.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')
@@ -458,7 +464,7 @@
examPaperAnswerApi.answerSubmit(answerSubmit, _this.memberToken).then(re => {
loading.close()
if (re.code === 1) {
- _this.$router.push({ path: '/exam/finish', query: { name: _this.form.name, content: mess, tokenId: _this.memberToken } })
+ _this.$router.push({ path: '/exam/finish', query: { name: _this.form.name, content: mess, tokenId: _this.memberToken, type: 'CIAQ' } })
} else {
_this.$message.error(re.message + '/exam/finish')
}
diff --git a/src/views/exam/paper/finish.vue b/src/views/exam/paper/finish.vue
index a034b92..9dc85d5 100644
--- a/src/views/exam/paper/finish.vue
+++ b/src/views/exam/paper/finish.vue
@@ -9,6 +9,9 @@
<!-- 鏂板涓嬭浇鎶ュ憡鎻愮ず璇� -->
<H1 v-if ="downDisable">{{$t('finishPersonalityDownInfo')}}</H1>
<el-button type="danger" v-if ="downDisable" @click="downReport" round>{{$t('down')}}</el-button>
+ <!-- 鏂板棰勮鎻愮ず璇� -->
+ <H1 v-if ="viewDisable">{{$t('finishViewReportInfo')}}</H1>
+ <el-button type="danger" v-if ="viewDisable" @click="viewReport" round>{{$t('view')}}</el-button>
</el-main>
</el-container>
</div>
@@ -22,7 +25,9 @@
name: this.$route.query.name,
content: this.$route.query.content,
tokenId: this.$route.query.tokenId,
+ type: this.$route.query.type,
downDisable: false,
+ viewDisable: false,
downUrl: ''
}
},
@@ -50,6 +55,11 @@
downReport: function () {
let _this = this
window.open(_this.downUrl)
+ },
+ // 涓嬭浇鎶ュ憡
+ viewReport: function () {
+ let _this = this
+ _this.$router.push({ path: '/pdf/view', query: { fileUrl: _this.downUrl } })
}
},
computed: {
diff --git a/src/views/pdf/h5.vue b/src/views/pdf/h5.vue
new file mode 100644
index 0000000..a4cc5a9
--- /dev/null
+++ b/src/views/pdf/h5.vue
@@ -0,0 +1,45 @@
+<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 () {
+ this.initPdf()
+ },
+ methods: {
+ initPdf () {
+ // pdfh5瀹炰緥鍖栨椂浼犱袱涓弬鏁帮細selector閫夋嫨鍣紝options閰嶇疆椤瑰弬鏁帮紝浼氳繑鍥炰竴涓猵dfh5瀹炰緥瀵硅薄锛屽彲浠ョ敤鏉ユ搷浣減df锛岀洃鍚浉鍏充簨浠�
+ // pdfh5 = new Pdfh5(selector, options) goto鍒濆鍒扮鍑犻〉锛宭ogo璁剧疆姣忎竴椤祊df涓婄殑姘村嵃
+ this.pdfh5 = new Pdfh5('#pdf-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