新增门禁:支持 ADMIN_ONE_TIME_DISPLAY 临时凭证一次性安全展示与序列化

This commit is contained in:
wangzhibiao committed 2026-09-16 23:22:02 +08:00
1 parent 652c0c01e0
commit 85b3e7fcd4
2 files changed
+48 -1

No files matched your search

@@ -111,6 +111,7 @@ public class ReconciliationResult implements Serializable {
*/
private transient String oneTimePlaintextCredential;
@com.fasterxml.jackson.annotation.JsonProperty("oneTimePlaintextCredential")
public String getOneTimePlaintextCredential() {
return oneTimePlaintextCredential;
}
+47 -1
View File
@@ -184,6 +184,39 @@
<el-button @click="operationOpen = false">关 闭</el-button>
</div>
</el-dialog>
<!-- 一次性临时凭据展示对话框 (ADMIN_ONE_TIME_DISPLAY) -->
<el-dialog
title="一次性临时凭据展示 (ADMIN_ONE_TIME_DISPLAY)"
:visible.sync="oneTimeDialogOpen"
width="550px"
append-to-body
:close-on-click-modal="false"
:close-on-press-escape="false"
:before-close="handleCloseOneTimeDialog"
>
<el-alert
title="安全合规提示:该临时凭据仅在本次操作创建成功后由内存短暂展示一次!关闭弹窗或刷新页面后将永久清除,系统不持久化亦无法再次查询。"
type="warning"
:closable="false"
show-icon
style="margin-bottom: 20px;"
/>
<div style="text-align: center; padding: 20px 0;">
<div style="font-size: 14px; color: #606266; margin-bottom: 10px;">门锁一次性访问密码 (One-Time Credential)</div>
<div style="font-size: 28px; font-weight: bold; letter-spacing: 4px; color: #409EFF; background: #F2F6FC; padding: 15px; border-radius: 4px; font-family: monospace;" id="oneTimeCredentialDisplay">
{{ maskedMode ? '••••••••' : oneTimeCredential }}
</div>
<div style="margin-top: 15px;">
<el-button size="mini" type="text" icon="el-icon-view" id="btnToggleMask" @click="maskedMode = !maskedMode">
{{ maskedMode ? '查看明文' : '掩码隐藏' }}
</el-button>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" id="btnCloseOneTimeDialog" @click="handleCloseOneTimeDialog">我已记录,安全关闭</el-button>
</div>
</el-dialog>
</div>
</template>
@@ -208,7 +241,10 @@ export default {
},
operationOpen: false,
operationLoading: false,
operationList: []
operationList: [],
oneTimeDialogOpen: false,
oneTimeCredential: null,
maskedMode: true
}
},
created() {
@@ -243,6 +279,11 @@ export default {
this.operationLoading = false
})
},
handleCloseOneTimeDialog() {
this.oneTimeDialogOpen = false
this.oneTimeCredential = null
this.maskedMode = true
},
handleManualReconcile(row) {
if (!row.enrollmentId) {
this.$modal.msgError('当前授权记录未关联报名信息,无法执行对账')
@@ -255,6 +296,11 @@ export default {
}).then(res => {
this.$modal.msgSuccess(res.msg || '对账执行成功')
this.getList()
if (res.data && res.data.oneTimePlaintextCredential) {
this.oneTimeCredential = res.data.oneTimePlaintextCredential
this.maskedMode = true
this.oneTimeDialogOpen = true
}
}).catch(() => {})
}
}