This commit is contained in:
2026-07-03 12:04:06 +08:00
283 changed files with 299 additions and 290 deletions
+12 -3
View File
@@ -126,7 +126,7 @@
v-model="formData.id_card"
placeholder="请输入身份证号"
maxlength="18"
:disabled="!canEditPatientBasicFields"
:disabled="!canEditIdCard"
@focus="handleIdCardFocus"
@blur="handleIdCardBlur"
/>
@@ -841,12 +841,20 @@ const showPhoneMaskedEdit = computed(() => {
return !hasPhonePlainPermission.value
})
const phoneRevealUnlocked = ref(false)
/** 编辑且无明文权限或基本信息锁定只读脱敏,点击切换查看完整身份证号 */
/** 编辑且已有身份证号:无明文权限或基本信息锁定只读脱敏;空身份证号仍可编辑 */
const showIdCardMaskedEdit = computed(() => {
if (mode.value !== 'edit') return false
if (!originalIdCard.value) return false
if (!canEditPatientBasicFields.value) return true
return !hasPhonePlainPermission.value
})
/** 身份证号是否可编辑:空号允许补录;已有号需明文权限 */
const canEditIdCard = computed(() => {
if (!canEditPatientBasicFields.value) return false
if (mode.value === 'add') return true
if (!originalIdCard.value) return true
return hasPhonePlainPermission.value
})
const idCardRevealUnlocked = ref(false)
const activeTab = ref('basic')
const drawerTitle = computed(() => {
@@ -1113,7 +1121,8 @@ const handleIdCardBlur = async () => {
return
}
if (mode.value !== 'add') {
// 编辑模式下已有身份证号且无明文权限时不处理
if (mode.value === 'edit' && originalIdCard.value) {
return
}