fix: 修复多模块Bug及功能优化

修复药品汇总、医嘱套餐、转科管理、用药汇总、处方列表、用户管理等多个模块的问题
This commit is contained in:
Ranyunqiao
2026-05-06 10:42:57 +08:00
parent 8a2f7965bd
commit d3c4b612e4
12 changed files with 84 additions and 16 deletions

View File

@@ -23,7 +23,11 @@
highlight-current
default-expand-all
@node-click="handleNodeClick"
/>
>
<template #default="{ node, data }">
<span v-html="highlightText(data.name)"></span>
</template>
</el-tree>
</div>
</el-col>
<!--用户数据-->
@@ -690,7 +694,13 @@ const { queryParams, form, rules } = toRefs(data);
/** 通过条件过滤节点 */
const filterNode = (value, data) => {
if (!value) return true;
return data.label.indexOf(value) !== -1;
return data.name.indexOf(value) !== -1;
};
/** 高亮匹配关键字 */
const highlightText = (text) => {
if (!deptName.value || !text) return text;
const regex = new RegExp(`(${deptName.value})`, 'gi');
return text.replace(regex, '<span class="tree-highlight">$1</span>');
};
/** 根据名称筛选部门树 */
watch(deptName, (val) => {
@@ -1344,4 +1354,8 @@ getWardList();
top: -10px;
right: -10px;
}
:deep(.tree-highlight) {
color: #409eff;
font-weight: bold;
}
</style>