- 超级管理员可以编辑操作员字段,普通用户不可编辑 - 修改权限判断逻辑,只有用户名等于 'admin' 的用户才是超级管理员 - 非超级管理员用户只能查询自己的发票数据 - 添加根据员工ID更新操作员名称功能 - 新增行时根据用户权限填充信息 - 严格检查权限,超级管理员可以删除所有记录,普通用户只能删除自己维护的记录 - 在 bargain 组件中验证患者选择 - 添加检验申请单相关API接口 - 在医生工作站中添加检验申请tab页 - 实现检验申请单的增删改查功能 - 添加公告通知已读记录相关功能 - 实现用户未读公告数量统计和标记已读功能
111 lines
2.1 KiB
JavaScript
111 lines
2.1 KiB
JavaScript
import request from '@/utils/request'
|
|
|
|
// 查询公告列表
|
|
export function listNotice(query) {
|
|
return request({
|
|
url: '/system/notice/list',
|
|
method: 'get',
|
|
params: query
|
|
})
|
|
}
|
|
|
|
// 获取公开的公告列表(给普通用户使用)
|
|
export function getPublicNoticeList(query) {
|
|
return request({
|
|
url: '/system/notice/public/list',
|
|
method: 'get',
|
|
params: query
|
|
})
|
|
}
|
|
|
|
// 获取当前用户的通知列表
|
|
export function getUserNotices() {
|
|
return request({
|
|
url: '/system/notice/public/notice',
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
// 查询公告详细
|
|
export function getNotice(noticeId) {
|
|
return request({
|
|
url: '/system/notice/' + noticeId,
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
// 新增公告
|
|
export function addNotice(data) {
|
|
return request({
|
|
url: '/system/notice',
|
|
method: 'post',
|
|
data: data
|
|
})
|
|
}
|
|
|
|
// 修改公告
|
|
export function updateNotice(data) {
|
|
return request({
|
|
url: '/system/notice',
|
|
method: 'put',
|
|
data: data
|
|
})
|
|
}
|
|
|
|
// 删除公告
|
|
export function delNotice(noticeId) {
|
|
return request({
|
|
url: '/system/notice/' + noticeId,
|
|
method: 'delete'
|
|
})
|
|
}
|
|
|
|
// 发布公告
|
|
export function publishNotice(noticeId) {
|
|
return request({
|
|
url: '/system/notice/publish/' + noticeId,
|
|
method: 'put'
|
|
})
|
|
}
|
|
|
|
// 取消发布公告
|
|
export function unpublishNotice(noticeId) {
|
|
return request({
|
|
url: '/system/notice/unpublish/' + noticeId,
|
|
method: 'put'
|
|
})
|
|
}
|
|
|
|
// 获取未读公告/通知数量
|
|
export function getUnreadCount() {
|
|
return request({
|
|
url: '/system/notice/public/unread/count',
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
// 标记公告/通知为已读
|
|
export function markAsRead(noticeId) {
|
|
return request({
|
|
url: '/system/notice/public/read/' + noticeId,
|
|
method: 'post'
|
|
})
|
|
}
|
|
|
|
// 批量标记公告/通知为已读
|
|
export function markAllAsRead(noticeIds) {
|
|
return request({
|
|
url: '/system/notice/public/read/all',
|
|
method: 'post',
|
|
data: noticeIds
|
|
})
|
|
}
|
|
|
|
// 获取用户已读公告/通知ID列表
|
|
export function getReadNoticeIds() {
|
|
return request({
|
|
url: '/system/notice/public/read/ids',
|
|
method: 'get'
|
|
})
|
|
}
|