|
|
|
@ -1,5 +1,5 @@ |
|
|
|
|
<template> |
|
|
|
|
<div> |
|
|
|
|
<div> |
|
|
|
|
<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect"> |
|
|
|
|
<el-menu-item index="1">账号登录</el-menu-item> |
|
|
|
|
<el-menu-item index="2">身份认证</el-menu-item> |
|
|
|
@ -33,7 +33,10 @@ |
|
|
|
|
<el-option v-for="item in dzsjList" :key="item.id" :label="item.yhm" :value="item"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</div> |
|
|
|
|
<div class="button"><el-button :loading="getQrCodeBtnloading" @click="getQrCodeBtn()" type="primary">获取认证二维码</el-button></div> |
|
|
|
|
<div class="button"><el-button :disabled="isCountingDown" @click="getQrCodeBtn()" type="primary"> |
|
|
|
|
<span v-if="isCountingDown">获取认证二维码</span> |
|
|
|
|
<span v-else>{{ countdown }}<span>s</span></span> |
|
|
|
|
</el-button></div> |
|
|
|
|
</div> |
|
|
|
|
<div class="qrcode" ref="qrCodeUrl"></div> |
|
|
|
|
<div class="qrcodetext" v-show="qrcodeShow">可将二维码图片发给认证人员进行身份认证,手机端完成认证后自动同步认证结果,开展后续数电业务操作。</div> |
|
|
|
@ -86,7 +89,7 @@ |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import QRCode from 'qrcodejs2' |
|
|
|
@ -116,6 +119,7 @@ export default { |
|
|
|
|
yzm:'' |
|
|
|
|
}, |
|
|
|
|
zrrList:[], |
|
|
|
|
countdown:0, |
|
|
|
|
zzrdialogVisible:false, |
|
|
|
|
dxyzm:'', |
|
|
|
|
zzrlx:'', |
|
|
|
@ -124,7 +128,7 @@ export default { |
|
|
|
|
rzid:'', |
|
|
|
|
anewLoginBtnLoading:false, |
|
|
|
|
getyzmBtnloading:false, |
|
|
|
|
getQrCodeBtnloading:false |
|
|
|
|
isCountingDown:false |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
@ -166,7 +170,9 @@ export default { |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if(data.hxff === "1"){ |
|
|
|
|
this.postLogin() |
|
|
|
|
this.dxyzm = data.dxyzm |
|
|
|
|
this.smsFrom.zh = this.form.name.yhm; |
|
|
|
|
this.dialogVisible = true; |
|
|
|
|
} |
|
|
|
|
if(data.hxff === "2"){ |
|
|
|
|
let list = []; |
|
|
|
@ -180,9 +186,10 @@ export default { |
|
|
|
|
this.zzrdialogVisible = true; |
|
|
|
|
} |
|
|
|
|
if(data.hxff === "3"){ |
|
|
|
|
this.dxyzm = data.dxyzm |
|
|
|
|
this.smsFrom.zh = this.form.name.yhm; |
|
|
|
|
this.dialogVisible = true; |
|
|
|
|
this.$message({ |
|
|
|
|
message: '验证码发送成功', |
|
|
|
|
type: 'success' |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}).finally(()=>{ |
|
|
|
|
this.anewLoginBtnLoading = false; |
|
|
|
@ -222,7 +229,20 @@ export default { |
|
|
|
|
}, |
|
|
|
|
//获取二维码 |
|
|
|
|
getQrCodeBtn(){ |
|
|
|
|
this.getQrCodeBtnloading = true; |
|
|
|
|
if (this.isCountingDown) { |
|
|
|
|
return; // 如果正在倒计时,则不执行获取验证码操作 |
|
|
|
|
} |
|
|
|
|
// 在这里执行获取验证码的操作,比如向服务器发送请求 |
|
|
|
|
// 开始倒计时 |
|
|
|
|
this.isCountingDown = true; |
|
|
|
|
this.timer = setInterval(() => { |
|
|
|
|
if (this.countdown > 0) { |
|
|
|
|
this.countdown--; |
|
|
|
|
} else { |
|
|
|
|
// 倒计时结束,重置状态 |
|
|
|
|
this.isCountingDown = false; |
|
|
|
|
this.countdown = 120; |
|
|
|
|
clearInterval(this.timer); // 清除定时器 |
|
|
|
|
getRpaQrCodeApi({yhm: this.formQr.name.yhm}).then(({data})=>{ |
|
|
|
|
this.$refs.qrCodeUrl.innerHTML = ''; |
|
|
|
|
let qrcode = new QRCode(this.$refs.qrCodeUrl, { |
|
|
|
@ -239,28 +259,30 @@ export default { |
|
|
|
|
}).finally(()=>{ |
|
|
|
|
this.getQrCodeBtnloading = false; |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, 1000); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
polling(){ |
|
|
|
|
postRpaAuthStatusApi({rzid:this.rzid,yhm:this.formQr.name.yhm}).then(({data})=>{ |
|
|
|
|
window.clearInterval(this.timer); |
|
|
|
|
this.timer = null |
|
|
|
|
if(data.slzt === '1' ){ |
|
|
|
|
|
|
|
|
|
this.timer = window.setInterval( ()=>{ this.polling() },3000) |
|
|
|
|
} |
|
|
|
|
if(data.slzt === '2' ){ |
|
|
|
|
if(data.slzt === '2' ) { |
|
|
|
|
window.clearInterval(this.timer); |
|
|
|
|
this.timer = null |
|
|
|
|
this.$message({ |
|
|
|
|
message: '当前账号已认证通过', |
|
|
|
|
type: 'success' |
|
|
|
|
}); |
|
|
|
|
this.$nextTick(()=>{ |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.$refs.qrCodeUrl.innerHTML = ''; |
|
|
|
|
this.qrcodeShow = false; |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
if(data.slzt === '3' ){ |
|
|
|
|
if (data.slzt === '3') { |
|
|
|
|
this.$message({ |
|
|
|
|
message: '扫码失败', |
|
|
|
|
type: 'success' |
|
|
|
@ -275,14 +297,14 @@ export default { |
|
|
|
|
let searchParams = new URLSearchParams(window.location.search); |
|
|
|
|
this.loginKey.id = searchParams.get('id') |
|
|
|
|
this.loginKey.key = searchParams.get('key') |
|
|
|
|
this.$store.commit('SET_AUTH_STATUS',this.loginKey) |
|
|
|
|
this.$store.commit('SET_AUTH_STATUS', this.loginKey) |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
if(this.loginKey.id !== '' && this.loginKey.key !== ''){ |
|
|
|
|
if (this.loginKey.id !== '' && this.loginKey.key !== '') { |
|
|
|
|
this.getRpaAuthStatus() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
beforeDestroy(){ |
|
|
|
|
beforeDestroy() { |
|
|
|
|
window.clearInterval(this.timer); |
|
|
|
|
this.timer = null |
|
|
|
|
} |
|
|
|
@ -290,64 +312,76 @@ export default { |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
<style scoped lang="scss"> |
|
|
|
|
.menu_body{ |
|
|
|
|
.menu_body { |
|
|
|
|
::v-deep.el-input--suffix .el-input__inner { |
|
|
|
|
//height: 30px; |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
width: 100%; |
|
|
|
|
height: calc(75vh); |
|
|
|
|
margin-top: 150px; |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
#accountLogin{ |
|
|
|
|
|
|
|
|
|
#accountLogin { |
|
|
|
|
width: 400px; |
|
|
|
|
height: 400px; |
|
|
|
|
//background-color: #6c5656; |
|
|
|
|
.menu_body_text{ |
|
|
|
|
.menu_body_text { |
|
|
|
|
text-align: center; |
|
|
|
|
font-size: 20px; |
|
|
|
|
font-weight: 500; |
|
|
|
|
} |
|
|
|
|
.form{ |
|
|
|
|
|
|
|
|
|
.form { |
|
|
|
|
margin: 12% 0; |
|
|
|
|
} |
|
|
|
|
.button{ |
|
|
|
|
|
|
|
|
|
.button { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
#authentication{ |
|
|
|
|
|
|
|
|
|
#authentication { |
|
|
|
|
margin-top: -100px; |
|
|
|
|
width: 500px; |
|
|
|
|
height: 400px; |
|
|
|
|
.at_title{ |
|
|
|
|
|
|
|
|
|
.at_title { |
|
|
|
|
text-align: center; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
.qrcode{ |
|
|
|
|
|
|
|
|
|
.qrcode { |
|
|
|
|
width: 100px; |
|
|
|
|
height: 100px; |
|
|
|
|
margin: auto; |
|
|
|
|
margin-top: 40px; |
|
|
|
|
} |
|
|
|
|
.qrcodetext{ |
|
|
|
|
|
|
|
|
|
.qrcodetext { |
|
|
|
|
padding-top: 70px; |
|
|
|
|
font-size: 12px; |
|
|
|
|
font-family: PingFangSC-Regular, PingFang SC; |
|
|
|
|
font-weight: 400; |
|
|
|
|
color: #666; |
|
|
|
|
} |
|
|
|
|
.at_input{ |
|
|
|
|
|
|
|
|
|
.at_input { |
|
|
|
|
margin-top: 40px; |
|
|
|
|
.at_labe{ |
|
|
|
|
|
|
|
|
|
.at_labe { |
|
|
|
|
line-height: 30px; |
|
|
|
|
width: 120px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
height: 40px; |
|
|
|
|
justify-items: center; |
|
|
|
|
.select{ |
|
|
|
|
|
|
|
|
|
.select { |
|
|
|
|
margin: 0 10px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -355,55 +389,64 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
.dialog{ |
|
|
|
|
|
|
|
|
|
.dialog_title{ |
|
|
|
|
.dialog { |
|
|
|
|
|
|
|
|
|
.dialog_title { |
|
|
|
|
padding: 10px 10px 0 10px; |
|
|
|
|
width: 460px; |
|
|
|
|
display: flex; |
|
|
|
|
margin: auto; |
|
|
|
|
background: #fff4e3; |
|
|
|
|
border: 1px solid #e6a23c; |
|
|
|
|
.dialog_text{ |
|
|
|
|
|
|
|
|
|
.dialog_text { |
|
|
|
|
|
|
|
|
|
margin-left: 10px; |
|
|
|
|
width: 450px; |
|
|
|
|
height: 70px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.dialog_body{ |
|
|
|
|
|
|
|
|
|
.dialog_body_zh{ |
|
|
|
|
.dialog_body { |
|
|
|
|
|
|
|
|
|
.dialog_body_zh { |
|
|
|
|
height: 40px; |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
margin: 20px 0 0 25px; |
|
|
|
|
height: 40px; |
|
|
|
|
.label{ |
|
|
|
|
|
|
|
|
|
.label { |
|
|
|
|
width: 90px; |
|
|
|
|
} |
|
|
|
|
.zh{ |
|
|
|
|
|
|
|
|
|
.zh { |
|
|
|
|
padding-top: 3px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.dialog_body_yzm{ |
|
|
|
|
|
|
|
|
|
.dialog_body_yzm { |
|
|
|
|
height: 40px; |
|
|
|
|
margin: 20px 0 0 25px; |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
height: 40px; |
|
|
|
|
.label{ |
|
|
|
|
|
|
|
|
|
.label { |
|
|
|
|
width: 90px; |
|
|
|
|
} |
|
|
|
|
.input{ |
|
|
|
|
|
|
|
|
|
.input { |
|
|
|
|
margin-right: 20px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.zzr{ |
|
|
|
|
|
|
|
|
|
.zzr { |
|
|
|
|
margin-left: 40px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|