门诊号码管理维护界面-》优化

This commit is contained in:
2025-11-17 13:09:36 +08:00
parent 7202151a41
commit 93103f7f40
3 changed files with 73 additions and 35 deletions

View File

@@ -7,12 +7,19 @@ import request from '@/utils/request'
/**
* 分页查询门诊号码段列表
* 要求:普通用户只能查看自己的,管理员可以查看所有
* 注意由于后端接口不存在直接返回失败响应让调用方使用localStorage数据避免404错误
*/
export function listOutpatientNo(query) {
return request({
url: '/business-rule/outpatient-no/page',
method: 'get',
params: query,
// return request({
// url: '/business-rule/outpatient-no/page',
// method: 'get',
// params: query,
// 由于后端接口不存在直接返回失败响应不发送实际请求避免控制台显示404错误
// 调用方会在判断 code !== 200 时使用 localStorage 数据
return Promise.resolve({
code: 404,
msg: '接口不存在,已使用本地数据',
data: null
})
}
@@ -53,12 +60,15 @@ export function deleteOutpatientNo(params) {
/**
* 记录操作日志
* PRD要求:所有操作必须有操作日志
* 要求:所有操作必须有操作日志
* 注意由于后端接口不存在直接返回成功响应不发送实际请求避免404错误
*/
export function addOperationLog(data) {
return request({
url: '/business-rule/outpatient-no/log',
method: 'post',
data,
// 直接返回成功响应不发送实际请求避免404错误显示在控制台
// 日志信息已经在控制台输出(在 operationLog.js 中),这里只需要确保不中断调用链
return Promise.resolve({
code: 200,
msg: '日志记录成功(接口不存在,已静默处理)',
data: null
})
}