feat(organization): 支持科室分类多选功能
- 修改前端界面组件支持科室分类多选下拉框 - 更新后端接口参数类型从Integer改为String以支持多选值 - 实现FIND_IN_SET查询方式处理多选分类条件 - 添加parseClassEnumValues函数处理字符串或数组格式转换 - 在医院住院对话框中扩展筛选条件支持多选分类 - 优化错误信息显示逻辑提供更详细的错误提示 - 在患者列表组件中添加入院日期和主治医生信息展示 - 修复多个服务调用中科室分类参数传递的数据类型问题
This commit is contained in:
@@ -426,7 +426,7 @@ function getInitOptions() {
|
||||
getOrgList().then((res) => {
|
||||
// organization.value = res.data.records
|
||||
organization.value = res.data.records[0].children.filter(
|
||||
(record) => record.typeEnum === 2 && record.classEnum === 2
|
||||
(record) => record.typeEnum === 2 && checkClassEnumValue(record.classEnum, 2)
|
||||
);
|
||||
});
|
||||
// if (!props.noFile) {
|
||||
@@ -537,6 +537,21 @@ const init = () => {
|
||||
submitForm.wardLocationId = '';
|
||||
}
|
||||
};
|
||||
|
||||
// 检查classEnum值是否包含指定值(支持多选)
|
||||
function checkClassEnumValue(classEnum, targetValue) {
|
||||
if (!classEnum) return false;
|
||||
|
||||
// 如果是字符串且包含逗号,说明是多选值
|
||||
if (typeof classEnum === 'string' && classEnum.includes(',')) {
|
||||
const values = classEnum.split(',').map(v => v.trim());
|
||||
return values.some(v => v == targetValue);
|
||||
}
|
||||
|
||||
// 单个值的情况
|
||||
return classEnum == targetValue;
|
||||
}
|
||||
|
||||
defineExpose({ validateData, submitForm, init, medicalInsuranceTitle });
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user