【GFRS-3645】修改电子签名页面代码默认执行逻辑

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2023-08-09 16:37:45 +08:00
parent 1bd368b684
commit d49fd76db9

View File

@@ -11,8 +11,8 @@
</van-radio-group> </van-radio-group>
<div class='pt30 pl30 flex align-items-c'> <div class='pt30 pl30 flex align-items-c'>
<span class='mr10'>投保人签名 :</span> <span class='mr10'>投保人签名 :</span>
<van-button type='danger' size='small' :disabled="signVal == '1' ? true : isDisable" @click="sign" v-no-more-click='1000'> <van-button type='danger' size='small' :disabled="signBtnDisable" @click="sign" v-no-more-click='1000'>
{{signStatus == '1' ? '签名' : '已签名' }} {{signInfo.status == '0' ? '签名' : '已签名' }}
</van-button> </van-button>
</div> </div>
<div class='bg-white bottom-btn'> <div class='bg-white bottom-btn'>
@@ -35,10 +35,12 @@
pdfUrl: '', pdfUrl: '',
signVal: '2', signVal: '2',
base64: '', base64: '',
signStatus: '1', signBtnDisable: true,
isDisable: true,
isDisabledComplite:true, isDisabledComplite:true,
isOver: false, isOver: false,
signInfo: {
status: '0'
},
} }
}, },
components: { components: {
@@ -51,9 +53,8 @@
this.timeOut() this.timeOut()
let signInfo = JSON.parse(localStorage.getItem('signInfo')) let signInfo = JSON.parse(localStorage.getItem('signInfo'))
if (signInfo && signInfo.status == '0') { if (signInfo && signInfo.status == '0') {
this.isDisabledComplite = false this.base64 = sessionStorage.getItem('twoimgBase64Data')
}else{ this.$set(this.signInfo, 'status', '1')
this.isDisabledComplite = true
} }
}, },
mounted() { mounted() {
@@ -100,24 +101,42 @@
}, },
toAirSign(status, keyword, offset, originStatus) { toAirSign(status, keyword, offset, originStatus) {
localStorage.setItem( let thisSignInfo = {
'signInfo', originStatus: originStatus,
JSON.stringify({ idNo: this.$store.getters.getYBidNo,
originStatus: originStatus, name: this.$store.getters.getYBname,
idNo: this.$store.getters.getYBidNo, type: '1',
name: this.$store.getters.getYBname, keyword: keyword,
type: '1', status: status,
keyword: keyword, offset: offset,
status: status, originUrl: location.href
offset: offset, }
originUrl: location.href localStorage.setItem('signInfo', JSON.stringify(thisSignInfo))
})
)
window.location.href = this.$mainUrl + '/sign/index.html' window.location.href = this.$mainUrl + '/sign/index.html'
}, },
}, },
computed: { computed: {
listenChange() {
const { isOver, radio, signInfo } = this
return { isOver, radio, signInfo }
}
},
watch: {
listenChange(val) {
let that = this
if (that.signVal == '0' || that.signVal == '2') {
if (val.isOver == true && val.radio != '') {
that.signBtnDisable = false
} else {
that.signBtnDisable = true
}
if (that.radio == '1' && val.signInfo.status == '1') {
that.isDisabledComplite = false
} else {
that.isDisabledComplite = true
}
}
}
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = '' document.body.style.backgroundColor = ''