fix: 归档删除改为软删除

This commit is contained in:
2026-07-17 14:13:17 +08:00
parent 3131d2e141
commit f7328d670d
49 changed files with 520 additions and 354 deletions

View File

@@ -25,7 +25,7 @@ import type { ColumnsType } from 'antd/es/table';
import {
PlusOutlined,
UploadOutlined,
DeleteOutlined,
InboxOutlined,
EyeOutlined,
CloseOutlined,
FileTextOutlined,
@@ -747,11 +747,11 @@ const AttachmentsTab: React.FC<TabProps & { data: AttachmentRecord[] }> = ({ dat
const handleDelete = async (attachmentId: number) => {
try {
await api.delete(`/archive/attachments/${attachmentId}`);
message.success('已删除');
message.success('已归档');
onRefresh();
} catch (e: unknown) {
const err = e as { message?: string };
message.error(err?.message || '删除失败');
message.error(err?.message || '归档失败');
}
};
@@ -786,9 +786,9 @@ const AttachmentsTab: React.FC<TabProps & { data: AttachmentRecord[] }> = ({ dat
>
</Button>
<Popconfirm title="确定删除该附件?" onConfirm={() => handleDelete(record.id)}>
<Button size="small" danger icon={<DeleteOutlined />}>
<Popconfirm title="确定归档该附件?" onConfirm={() => handleDelete(record.id)}>
<Button size="small" danger icon={<InboxOutlined />}>
</Button>
</Popconfirm>
</Space>