1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- import React from 'react';
- import { Table } from 'antd';
- import { FormattedMessage } from 'react-intl';
- interface PatientData {
- key: string;
- name: string;
- id: string;
- priority: string;
- status: string;
- retryCount: number;
- target: string;
- }
- const columns = [
- {
- title: (
- <FormattedMessage
- id="outputTable.name"
- defaultMessage="outputTable.name"
- />
- ),
- dataIndex: 'name',
- key: 'name',
- },
- {
- title: (
- <FormattedMessage id="outputTable.id" defaultMessage="outputTable.id" />
- ),
- dataIndex: 'id',
- key: 'id',
- },
- {
- title: (
- <FormattedMessage
- id="outputTable.priority"
- defaultMessage="outputTable.priority"
- />
- ),
- dataIndex: 'priority',
- key: 'priority',
- },
- {
- title: (
- <FormattedMessage
- id="outputTable.status"
- defaultMessage="outputTable.status"
- />
- ),
- dataIndex: 'status',
- key: 'status',
- },
- {
- title: (
- <FormattedMessage
- id="outputTable.retryCount"
- defaultMessage="outputTable.retryCount"
- />
- ),
- dataIndex: 'retryCount',
- key: 'retryCount',
- },
- {
- title: (
- <FormattedMessage
- id="outputTable.target"
- defaultMessage="outputTable.target"
- />
- ),
- dataIndex: 'target',
- key: 'target',
- },
- ];
- const data: PatientData[] = [
- // 示例数据,可根据实际情况替换
- // {
- // key: '1',
- // name: '张三',
- // id: 'P001',
- // priority: '高',
- // status: '处理中',
- // retryCount: 2,
- // target: '目标A',
- // },
- ];
- const OutputTable: React.FC = () => (
- <Table columns={columns} dataSource={data} />
- );
- export default OutputTable;
|