Fix Bug #530: [住院护士站-医嘱校对] 患者查询触发 SQL 类型匹配错误,导致勾选患者列表后后端报错 - 前端过滤无效的encounterId防止后端SQL解析异常

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-17 23:13:06 +08:00
parent ce1161caea
commit 31f7950779

View File

@@ -182,8 +182,16 @@ function handleRadioChange() {
function handleGetPrescription() {
if (patientInfoList.value.length > 0) {
// 过滤掉 encounterId 无效的患者节点,防止后端 SQL 解析异常
const validEncounterIds = patientInfoList.value
.map((i) => i.encounterId)
.filter((id) => id !== undefined && id !== null && id !== '');
if (validEncounterIds.length === 0) {
proxy.$message.warning('请选择有效的患者');
return;
}
loading.value = true;
let encounterIds = patientInfoList.value.map((i) => i.encounterId).join(',');
let encounterIds = validEncounterIds.join(',');
getPrescriptionList({
encounterIds: encounterIds,
requestStatus: props.requestStatus,