feat(invoice): 完善发票管理权限控制和检验申请功能

- 超级管理员可以编辑操作员字段,普通用户不可编辑
- 修改权限判断逻辑,只有用户名等于 'admin' 的用户才是超级管理员
- 非超级管理员用户只能查询自己的发票数据
- 添加根据员工ID更新操作员名称功能
- 新增行时根据用户权限填充信息
- 严格检查权限,超级管理员可以删除所有记录,普通用户只能删除自己维护的记录
- 在 bargain 组件中验证患者选择
- 添加检验申请单相关API接口
- 在医生工作站中添加检验申请tab页
- 实现检验申请单的增删改查功能
- 添加公告通知已读记录相关功能
- 实现用户未读公告数量统计和标记已读功能
This commit is contained in:
2025-12-30 13:52:15 +08:00
parent 49b8a975a8
commit 1c16d6ba0f
10 changed files with 443 additions and 41 deletions

View File

@@ -70,11 +70,12 @@
<el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="noticeId" width="100" />
<el-table-column label="序号" align="center" prop="noticeId" width="80" />
<el-table-column
label="公告标题"
align="center"
prop="noticeTitle"
min-width="200"
:show-overflow-tooltip="true"
/>
<el-table-column label="公告类型" align="center" prop="noticeType" width="100">
@@ -82,20 +83,40 @@
<dict-tag :options="sys_notice_type" :value="scope.row.noticeType" />
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" width="100">
<el-table-column label="状态" align="center" prop="status" width="90">
<template #default="scope">
<dict-tag :options="sys_notice_status" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="创建者" align="center" prop="createBy" width="100" />
<el-table-column label="创建时间" align="center" prop="createTime" width="100">
<el-table-column label="发布状态" align="center" prop="publishStatus" width="90">
<template #default="scope">
<el-tag v-if="scope.row.publishStatus === '1'" type="success">已发布</el-tag>
<el-tag v-else type="info">未发布</el-tag>
</template>
</el-table-column>
<el-table-column label="创建者" align="center" prop="createBy" width="90" />
<el-table-column label="创建时间" align="center" prop="createTime" width="110">
<template #default="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="280">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:notice:edit']">修改</el-button>
<el-button
v-if="scope.row.publishStatus !== '1'"
link type="success"
icon="Promotion"
@click="handlePublish(scope.row)"
v-hasPermi="['system:notice:edit']"
>发布</el-button>
<el-button
v-else
link type="warning"
icon="RemoveFilled"
@click="handleUnpublish(scope.row)"
v-hasPermi="['system:notice:edit']"
>取消发布</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:notice:remove']" >删除</el-button>
</template>
</el-table-column>
@@ -159,7 +180,7 @@
</template>
<script setup name="Notice">
import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api/system/notice";
import { listNotice, getNotice, delNotice, addNotice, updateNotice, publishNotice, unpublishNotice } from "@/api/system/notice";
const { proxy } = getCurrentInstance();
const { sys_notice_status, sys_notice_type } = proxy.useDict("sys_notice_status", "sys_notice_type");
@@ -212,7 +233,8 @@ function reset() {
noticeTitle: undefined,
noticeType: undefined,
noticeContent: undefined,
status: "0"
status: "0",
publishStatus: "0"
};
proxy.resetForm("noticeRef");
}
@@ -259,6 +281,8 @@ function submitForm() {
getList();
});
} else {
// 新增时默认为未发布状态
form.value.publishStatus = "0";
addNotice(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
@@ -278,6 +302,24 @@ function handleDelete(row) {
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
/** 发布按钮操作 */
function handlePublish(row) {
proxy.$modal.confirm('确认发布该公告吗?发布后将对所有用户可见。').then(function() {
return publishNotice(row.noticeId);
}).then(() => {
getList();
proxy.$modal.msgSuccess("发布成功");
}).catch(() => {});
}
/** 取消发布按钮操作 */
function handleUnpublish(row) {
proxy.$modal.confirm('确认取消发布该公告吗?取消后将不再对用户可见。').then(function() {
return unpublishNotice(row.noticeId);
}).then(() => {
getList();
proxy.$modal.msgSuccess("已取消发布");
}).catch(() => {});
}
getList();
</script>