Fix Bug #446: 【手术管理-门诊手术安排】临时医嘱生成后界面非法关闭且按钮名称/功能显示不一致
移除签名成功后自动关闭弹窗的 setTimeout,改为保留弹窗让用户查看已签发的医嘱状态。 新增 isSignedProp 传递给子组件,使重新打开弹窗时按钮名称保持为"提交医嘱"而非重置为"一键签名并生成医嘱"。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -848,6 +848,7 @@
|
|||||||
:patient-info="temporaryPatientInfo"
|
:patient-info="temporaryPatientInfo"
|
||||||
:billing-medicines="temporaryBillingMedicines"
|
:billing-medicines="temporaryBillingMedicines"
|
||||||
v-model:temporary-advices="temporaryAdvices"
|
v-model:temporary-advices="temporaryAdvices"
|
||||||
|
:is-signed-prop="temporarySigned"
|
||||||
@submit="handleTemporaryMedicalSubmit"
|
@submit="handleTemporaryMedicalSubmit"
|
||||||
@cancel="handleTemporaryMedicalCancel"
|
@cancel="handleTemporaryMedicalCancel"
|
||||||
@refresh="handleTemporaryMedicalRefresh"
|
@refresh="handleTemporaryMedicalRefresh"
|
||||||
@@ -1032,6 +1033,7 @@ watch(temporaryAdvices, (newVal, oldVal) => {
|
|||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
|
|
||||||
const temporaryMedicalLoading = ref(false) // 🔧 新增:临时医嘱加载状态
|
const temporaryMedicalLoading = ref(false) // 🔧 新增:临时医嘱加载状态
|
||||||
|
const temporarySigned = ref(false) // 🔧 新增:签名状态,用于保持按钮名称一致性
|
||||||
|
|
||||||
// 下拉列表数据
|
// 下拉列表数据
|
||||||
const orgList = ref([])
|
const orgList = ref([])
|
||||||
@@ -1464,6 +1466,7 @@ function handleMedicalAdvice(row) {
|
|||||||
// 先清空旧数据
|
// 先清空旧数据
|
||||||
temporaryBillingMedicines.value = []
|
temporaryBillingMedicines.value = []
|
||||||
temporaryAdvices.value = []
|
temporaryAdvices.value = []
|
||||||
|
temporarySigned.value = false // 🔧 重置签名状态
|
||||||
temporaryMedicalLoading.value = true // 🔧 新增:开始加载
|
temporaryMedicalLoading.value = true // 🔧 新增:开始加载
|
||||||
|
|
||||||
// 调用计费接口获取数据
|
// 调用计费接口获取数据
|
||||||
@@ -1688,21 +1691,19 @@ function handleTemporaryMedicalSubmit(data) {
|
|||||||
temporaryBillingMedicines.value = []
|
temporaryBillingMedicines.value = []
|
||||||
}
|
}
|
||||||
|
|
||||||
// 显示成功提示
|
// 🔧 设置签名状态,保持按钮名称一致
|
||||||
ElMessage.success('临时医嘱已生成,弹窗即将关闭')
|
temporarySigned.value = true
|
||||||
|
|
||||||
// 延迟关闭弹窗,让用户看到成功提示
|
// 显示成功提示,不关闭弹窗,让用户可以查看已签发的医嘱状态
|
||||||
setTimeout(() => {
|
ElMessage.success('临时医嘱已生成(已签发),可继续查看或修改')
|
||||||
showTemporaryMedical.value = false
|
|
||||||
}, 1000)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// 处理临时医嘱取消
|
|
||||||
function handleTemporaryMedicalCancel() {
|
function handleTemporaryMedicalCancel() {
|
||||||
// 🔧 修复:用户点击取消时才清空数据,因为用户可能要放弃修改
|
// 🔧 修复:用户点击取消时才清空数据,因为用户可能要放弃修改
|
||||||
temporaryPatientInfo.value = {}
|
temporaryPatientInfo.value = {}
|
||||||
temporaryBillingMedicines.value = []
|
temporaryBillingMedicines.value = []
|
||||||
temporaryAdvices.value = []
|
temporaryAdvices.value = []
|
||||||
|
temporarySigned.value = false // 🔧 重置签名状态
|
||||||
closeTemporaryMedical()
|
closeTemporaryMedical()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -244,10 +244,14 @@ const props = defineProps({
|
|||||||
default: () => []
|
default: () => []
|
||||||
},
|
},
|
||||||
// 二区域:临时医嘱预览(已生成医嘱)- v-model:temporary-advices 对应 prop 名
|
// 二区域:临时医嘱预览(已生成医嘱)- v-model:temporary-advices 对应 prop 名
|
||||||
// 🔧 修复:使用驼峰命名,因为 v-model:temporary-advices 会映射到 temporaryAdvices prop
|
|
||||||
temporaryAdvices: {
|
temporaryAdvices: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => []
|
||||||
|
},
|
||||||
|
// 签名状态:用于保持按钮名称一致性
|
||||||
|
isSignedProp: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -306,8 +310,8 @@ const getMethodCodeDict = computed(() => {
|
|||||||
return dict
|
return dict
|
||||||
})
|
})
|
||||||
|
|
||||||
// 响应式数据
|
// 响应式数据 - isSigned 从父组件传入的 prop 初始化
|
||||||
const isSigned = ref(false)
|
const isSigned = ref(props.isSignedProp)
|
||||||
const signatureTime = ref('')
|
const signatureTime = ref('')
|
||||||
const showSignDialog = ref(false)
|
const showSignDialog = ref(false)
|
||||||
const signPassword = ref('')
|
const signPassword = ref('')
|
||||||
|
|||||||
Reference in New Issue
Block a user