feat(web): 健康模块 13 页面按钮级权限控制 — AuthButton 包装
使用 AuthButton 声明式组件包装健康模块全部操作按钮: - health.patient.manage: PatientList/PatientDetail/PatientTagManage - health.appointment.manage: AppointmentList - health.doctor.manage: DoctorList/DoctorSchedule - health.follow-up.manage: FollowUpTaskList - health.consultation.manage: ConsultationList/ConsultationDetail - health.points.manage: OfflineEventList/PointsProductList/PointsOrderList/PointsRuleList
This commit is contained in:
@@ -19,6 +19,7 @@ import { StatusTag } from './components/StatusTag';
|
||||
import { PatientSelect } from './components/PatientSelect';
|
||||
import { DoctorSelect } from './components/DoctorSelect';
|
||||
import { useThemeMode } from '../../hooks/useThemeMode';
|
||||
import { AuthButton } from '../../components/AuthButton';
|
||||
|
||||
const STATUS_OPTIONS = [
|
||||
{ value: 'pending', label: '待处理' },
|
||||
@@ -289,34 +290,36 @@ export default function FollowUpTaskList() {
|
||||
key: 'actions',
|
||||
width: 220,
|
||||
render: (_: unknown, record: FollowUpTask) => (
|
||||
<Space size={4}>
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
icon={<EditOutlined />}
|
||||
onClick={() => openRecordModal(record)}
|
||||
>
|
||||
填写记录
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
icon={<SwapOutlined />}
|
||||
onClick={() => openAssignModal(record)}
|
||||
>
|
||||
分配
|
||||
</Button>
|
||||
<Popconfirm
|
||||
title="确认删除该随访任务?"
|
||||
onConfirm={() => handleDelete(record)}
|
||||
okText="确认"
|
||||
cancelText="取消"
|
||||
>
|
||||
<Button type="link" size="small" danger icon={<DeleteOutlined />}>
|
||||
删除
|
||||
<AuthButton code="health.follow-up.manage">
|
||||
<Space size={4}>
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
icon={<EditOutlined />}
|
||||
onClick={() => openRecordModal(record)}
|
||||
>
|
||||
填写记录
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
icon={<SwapOutlined />}
|
||||
onClick={() => openAssignModal(record)}
|
||||
>
|
||||
分配
|
||||
</Button>
|
||||
<Popconfirm
|
||||
title="确认删除该随访任务?"
|
||||
onConfirm={() => handleDelete(record)}
|
||||
okText="确认"
|
||||
cancelText="取消"
|
||||
>
|
||||
<Button type="link" size="small" danger icon={<DeleteOutlined />}>
|
||||
删除
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
</AuthButton>
|
||||
),
|
||||
},
|
||||
];
|
||||
@@ -344,16 +347,18 @@ export default function FollowUpTaskList() {
|
||||
value={query.status}
|
||||
onChange={(value) => handleFilterChange('status', value)}
|
||||
/>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={<PlusOutlined />}
|
||||
onClick={() => {
|
||||
createForm.resetFields();
|
||||
setCreateOpen(true);
|
||||
}}
|
||||
>
|
||||
新建任务
|
||||
</Button>
|
||||
<AuthButton code="health.follow-up.manage">
|
||||
<Button
|
||||
type="primary"
|
||||
icon={<PlusOutlined />}
|
||||
onClick={() => {
|
||||
createForm.resetFields();
|
||||
setCreateOpen(true);
|
||||
}}
|
||||
>
|
||||
新建任务
|
||||
</Button>
|
||||
</AuthButton>
|
||||
<span
|
||||
style={{
|
||||
fontSize: 13,
|
||||
|
||||
Reference in New Issue
Block a user