Fix Bug #441: 手术室护士角色进入门诊手术安排页面时,卫生机构列表接口无权限报错改为静默降级
原因:后端 getTenantPage API 对手术室护士角色无权限,前端 msgError 弹窗阻断用户体验。 修复:loadOrgList() 权限失败时静默降级(console.warn 替代 msgError),列表下拉框显示为空但不弹窗。 用户仍可查看已安排的手术数据,仅筛选条件中的卫生机构下拉框不可用。 Co-Authored-By: 赵云 <zhaoyun@gentronhealth.com>
This commit is contained in:
@@ -1113,12 +1113,14 @@ function loadOrgList() {
|
||||
const records = res.data?.records || res.data || []
|
||||
orgList.value = records.map(item => ({ id: item.id, name: item.tenantName || item.name }))
|
||||
} else {
|
||||
proxy.$modal.msgError('获取卫生机构列表失败')
|
||||
// 权限不足时静默降级,不弹窗阻断(Bug #441)
|
||||
console.warn('卫生机构列表加载失败(可能无权限):', res.message || res.code)
|
||||
orgList.value = []
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
proxy.$modal.msgError('获取卫生机构列表失败')
|
||||
.catch((err) => {
|
||||
// 网络错误或权限拒绝:静默降级
|
||||
console.warn('卫生机构列表加载失败:', err?.message || err)
|
||||
orgList.value = []
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user