合并代码

This commit is contained in:
孙景学
2025-07-02 16:18:03 +08:00
parent 2b3eb5672d
commit 3ae57eb23b
87 changed files with 3852 additions and 19276 deletions

View File

@ -17,7 +17,12 @@ interface Qualification {
updateTime: string;
}
const QualificationTab: React.FC = () => {
interface QualificationTabProps {
viewType?: boolean;
}
const QualificationTab: React.FC<QualificationTabProps> = (props) => {
const { viewType = false } = props;
const intl = useIntl();
const [data, setData] = useState<Qualification[]>([]);
const [loading, setLoading] = useState(false);
@ -69,30 +74,35 @@ const QualificationTab: React.FC = () => {
const columns: ColumnsType<Qualification> = [
{ title: 'page.workbench.certificateType', dataIndex: 'certificateType', ellipsis: true },
{ title: 'page.workbench.certificateName', dataIndex: 'name', ellipsis: true },
{ title: 'page.workbench.certificateCode', dataIndex: 'code', ellipsis: true },
{ title: 'page.workbench.certificateName', dataIndex: 'name', ellipsis: true },
{ title: 'page.workbench.certificateCode', dataIndex: 'code', ellipsis: true },
{ title: 'page.workbench.typeLevel', dataIndex: 'typeLevel' },
{ title: 'page.workbench.authority', dataIndex: 'authority', ellipsis: true },
{ title: 'page.workbench.dateTime', dataIndex: 'dateTime', ellipsis: true },
{ title: 'page.workbench.termOfValidity', dataIndex: 'termOfValidity', ellipsis: true },
{ title: 'page.workbench.updateTime', dataIndex: 'updateTime', ellipsis: true },
{
title: 'page.workbench.attachments.action',
dataIndex: 'option',
width: 120,
render: (_: any, record: Qualification) => (
<>
<a style={{ marginRight: 8 }} onClick={() => handleView(record)}></a>
<a onClick={() => handleEdit(record)}></a>
</>
),
},
{ title: 'page.workbench.authority', dataIndex: 'authority', ellipsis: true },
{ title: 'page.workbench.dateTime', dataIndex: 'dateTime', ellipsis: true },
{ title: 'page.workbench.termOfValidity', dataIndex: 'termOfValidity', ellipsis: true },
{ title: 'page.workbench.updateTime', dataIndex: 'updateTime', ellipsis: true },
...(viewType ? [] : [
{
title: 'page.workbench.attachments.action',
dataIndex: 'option',
width: 120,
render: (_: any, record: Qualification) => (
<>
<a style={{ marginRight: 8 }} onClick={() => handleView(record)}></a>
<a onClick={() => handleEdit(record)}></a>
</>
),
}
]),
];
return (
<div style={{ padding: '0 30px 0 0' }}>
<div style={{ marginBottom: 16 }}>
<Button type="primary" onClick={handleAdd}></Button>
{!viewType && (
<Button type="primary" onClick={handleAdd}></Button>
)}
</div>
<Table
rowKey="id"