修复bug375:住院医生站点击“签发”按钮后系统提示语错误,显示为“保存成功”并且签发业务功能未实现。

bug376:【门诊医生站】检查页签申请单列表过滤异常,显示了历史检查就诊记录
bug377:【门诊医生站】检查申请单“执行科室”未获取配置默认值且字段交互逻辑不规范
This commit is contained in:
2026-04-16 10:25:12 +08:00
parent 6922aa1d2a
commit 210c463130
10 changed files with 179 additions and 29 deletions

View File

@@ -116,7 +116,29 @@
</el-col>
<el-col :span="8">
<el-form-item label="执行科室" prop="performDeptCode">
<el-input v-model="form.performDeptCode" />
<el-select
v-model="form.performDeptCode"
style="width: 100%"
filterable
remote
reserve-keyword
clearable
placeholder="请选择执行科室(支持模糊查询)"
:remote-method="handleOrgRemoteSearch"
:loading="orgLoading"
>
<el-option
v-for="opt in orgFilteredOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value"
/>
<template #empty>
<div style="padding: 10px 0; color: #909399; text-align: center;">
{{ orgLoading ? '加载中...' : '暂无匹配科室' }}
</div>
</template>
</el-select>
</el-form-item>
</el-col>
</el-row>
@@ -383,6 +405,11 @@ const activeNames = ref([]); // 当前展开的折叠项
const allMethods = ref([]);
// ====== 科室下拉(来源:科室管理)======
const orgLoading = ref(false);
const orgOptions = ref([]); // { label, value }
const orgFilteredOptions = ref([]); // 展示用截断前200条
// 加载所有检查方法
async function loadAllMethods() {
try {
@@ -408,10 +435,61 @@ async function loadAllMethods() {
}
onMounted(async () => {
await loadOrgOptions();
await loadAllMethods();
await loadCategoryList();
});
async function loadOrgOptions() {
orgLoading.value = true;
try {
const res = await request({
url: '/base-data-manage/organization/organization',
method: 'get',
});
const records = res?.data?.records || res?.data || [];
const flat = [];
const walk = (nodes) => {
if (!Array.isArray(nodes)) return;
for (const n of nodes) {
if (!n) continue;
// 约定typeEnum=2 为科室;若没有 typeEnum 也兜底收集
if (n.name && (n.typeEnum === 2 || n.typeEnum === '2' || n.typeEnum == null)) {
flat.push({ label: n.name, value: n.name });
}
if (Array.isArray(n.children) && n.children.length > 0) walk(n.children);
}
};
walk(records);
// 去重 + 排序
const uniq = Array.from(new Map(flat.map(o => [o.value, o])).values())
.filter(o => o?.value)
.sort((a, b) => (a.label || '').localeCompare(b.label || '', 'zh-CN'));
orgOptions.value = uniq;
orgFilteredOptions.value = uniq.slice(0, 200);
} catch (e) {
console.error('加载科室列表失败', e);
orgOptions.value = [];
orgFilteredOptions.value = [];
} finally {
orgLoading.value = false;
}
}
function handleOrgRemoteSearch(keyword) {
const key = (keyword || '').trim().toLowerCase();
if (!key) {
orgFilteredOptions.value = orgOptions.value.slice(0, 200);
return;
}
orgFilteredOptions.value = orgOptions.value
.filter((o) => (o.label || '').toLowerCase().includes(key))
.slice(0, 200);
}
// 动态可用的检查方法(根据已选部位所属的检查类型进行过滤)
const normalizeTypeValue = value => String(value ?? '').trim().toLowerCase();
@@ -497,6 +575,8 @@ async function loadCategoryList() {
orgType: t.type, // 保存 type 用于后备匹配
typeName: t.name, // 保存 name
categoryName: t.name,
// “检查类型管理”里配置的执行科室(图三)
performDeptName: t.department || '',
items: []
});
}
@@ -591,7 +671,8 @@ function getList() {
request({
url: '/exam/apply/list',
method: 'get',
params: { visitNo: props.patientInfo?.visitNo || '' }
// 默认只展示本次就诊encounterId产生的检查申请单
params: { encounterId: props.patientInfo?.encounterId || '' }
}).then(res => {
applicationList.value = res.rows || res.data || [];
}).catch(err => console.error('获取申请单列表失败', err))
@@ -705,6 +786,12 @@ function handleItemSelect(checked, item, cat) {
nationalCode: item.nationalCode || '',
checked: true
});
// 自动回填执行科室:按检查项目类型 → 检查类型管理里配置的执行科室
// 仅在未手动选择时自动填充,避免覆盖用户输入
if (!form.performDeptCode && cat?.performDeptName) {
form.performDeptCode = cat.performDeptName;
}
} else {
const idx = selectedItems.value.findIndex(s => s.id === item.id);
if (idx > -1) selectedItems.value.splice(idx, 1);