fix: 归档删除改为软删除
This commit is contained in:
@@ -122,10 +122,10 @@ const AttendanceDevicesPage: React.FC = () => {
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
await api.delete(`/attendance-devices/${id}`);
|
||||
message.success('已删除绑定');
|
||||
message.success('已停用绑定');
|
||||
await loadData();
|
||||
} catch (error: any) {
|
||||
message.error(error?.message || '删除失败');
|
||||
message.error(error?.message || '停用失败');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -144,9 +144,9 @@ const AttendanceDevicesPage: React.FC = () => {
|
||||
<PermissionButton permission="classroom:edit" size="small" type="link" onClick={() => openEdit(record)}>
|
||||
编辑
|
||||
</PermissionButton>
|
||||
<Popconfirm title="确定删除此考勤机绑定?" onConfirm={() => handleDelete(record.id)}>
|
||||
<Popconfirm title="确定停用此考勤机绑定?" onConfirm={() => handleDelete(record.id)}>
|
||||
<PermissionButton permission="classroom:edit" size="small" danger>
|
||||
删除
|
||||
停用
|
||||
</PermissionButton>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
|
||||
Reference in New Issue
Block a user