Fix Bug #530: [住院护士站-医嘱校对] 患者查询触发 SQL 类型匹配错误,导致勾选患者列表后后端报错 - 前端过滤无效的encounterId防止后端SQL解析异常
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -182,8 +182,16 @@ function handleRadioChange() {
|
|||||||
|
|
||||||
function handleGetPrescription() {
|
function handleGetPrescription() {
|
||||||
if (patientInfoList.value.length > 0) {
|
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;
|
loading.value = true;
|
||||||
let encounterIds = patientInfoList.value.map((i) => i.encounterId).join(',');
|
let encounterIds = validEncounterIds.join(',');
|
||||||
getPrescriptionList({
|
getPrescriptionList({
|
||||||
encounterIds: encounterIds,
|
encounterIds: encounterIds,
|
||||||
requestStatus: props.requestStatus,
|
requestStatus: props.requestStatus,
|
||||||
|
|||||||
Reference in New Issue
Block a user