feature【GFRS-3645】页面调整pdf展示文件类型为image

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2023-08-21 17:20:35 +08:00
parent b57a6e3bda
commit 71ba3df54b

View File

@@ -3,7 +3,9 @@
<van-notice-bar :scrollable='false' v-if='!Time' class='notice'>
{{ `提示:阅读时长需在${this.Time ? this.time : this.number}秒以上` }}
</van-notice-bar>
<iframe :src="pdfUrl" class="iframe" id="iframepage"></iframe>
<div id="pdf" style="height: 70vh;overflow: scroll;">
<div id="pdfH5ID"></div>
</div>
<van-radio-group v-model='radio' class='pb10 pt20 pl30 fs14'>
<van-radio name='1' @click='click'>
本人确认已阅读<span>国富人寿保险股份有限公司委托代理合同</span>
@@ -35,11 +37,12 @@
import { RadioGroup, Radio, Dialog, NoticeBar } from 'vant'
import config from '@/config'
import { generateAgreementYB, putContractInfo } from '@/api/ebiz/YB_agentSign/YB_agentSign'
import Pdfh5 from "pdfh5";
export default {
data() {
let isWeixin = this.$utils.device().isWeixin //判断环境
return {
time:'2',
time:'10',
radio: '',
number: '',
src: location.origin + '/pdfjs/web/viewer.html?file=',
@@ -55,7 +58,8 @@
signSuccessShow:false,
signImgUrl:'data:image/gif;base64,',
signH5Val: '',
signH5Img: ''
signH5Img: '',
pdfh5: null
}
},
components: {
@@ -84,7 +88,16 @@
this.$toast.clear()
if(res.result == 0){
window.sessionStorage.setItem('signName',this.$store.getters.getYBname)
this.pdfUrl = config.assetsUpUrl + res.content.rgssUrl
// this.pdfUrl = config.assetsUpUrl + res.content.rgssUrl
//实例化
this.pdfh5 = new Pdfh5("#pdfH5ID", {
pdfurl: config.assetsUpUrl + res.content.rgssUrl,
// pdfurl: 'https://iagentsales-test2.e-guofu.com/opt/ebiz/webapps/ebiz-epolicy/pdf/2023/08/09/1000001078372351/1000001078372351.pdf',
lazy:false,
scale:1
}).on("complete", function (status, msg, time) { //监听完成事件
console.log("状态:" + status + ",信息:" + msg + ",耗时:" + time + "毫秒,总页数:" + this.totalNum)
})
this.signH5Img = sessionStorage.getItem('signH5Img')
if(this.signH5Img){
this.$set(this.signInfo, 'status', '2')
@@ -197,4 +210,19 @@
width: 100vw;
height: 70vh;
}
#pdfH5ID{
width: 100vw;
}
/deep/.viewerContainer{
width: 100vw;
overflow: inherit;
}
/deep/ .pageNum{
display: none!important;
}
/deep/ .pageContainer{
img{
width: 100vw;
}
}
</style>