OutputTable.tsx 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. import React from 'react';
  2. import { Table } from 'antd';
  3. import { FormattedMessage } from 'react-intl';
  4. interface PatientData {
  5. key: string;
  6. name: string;
  7. id: string;
  8. priority: string;
  9. status: string;
  10. retryCount: number;
  11. target: string;
  12. }
  13. const columns = [
  14. {
  15. title: (
  16. <FormattedMessage
  17. id="outputTable.name"
  18. defaultMessage="outputTable.name"
  19. />
  20. ),
  21. dataIndex: 'name',
  22. key: 'name',
  23. },
  24. {
  25. title: (
  26. <FormattedMessage id="outputTable.id" defaultMessage="outputTable.id" />
  27. ),
  28. dataIndex: 'id',
  29. key: 'id',
  30. },
  31. {
  32. title: (
  33. <FormattedMessage
  34. id="outputTable.priority"
  35. defaultMessage="outputTable.priority"
  36. />
  37. ),
  38. dataIndex: 'priority',
  39. key: 'priority',
  40. },
  41. {
  42. title: (
  43. <FormattedMessage
  44. id="outputTable.status"
  45. defaultMessage="outputTable.status"
  46. />
  47. ),
  48. dataIndex: 'status',
  49. key: 'status',
  50. },
  51. {
  52. title: (
  53. <FormattedMessage
  54. id="outputTable.retryCount"
  55. defaultMessage="outputTable.retryCount"
  56. />
  57. ),
  58. dataIndex: 'retryCount',
  59. key: 'retryCount',
  60. },
  61. {
  62. title: (
  63. <FormattedMessage
  64. id="outputTable.target"
  65. defaultMessage="outputTable.target"
  66. />
  67. ),
  68. dataIndex: 'target',
  69. key: 'target',
  70. },
  71. ];
  72. const data: PatientData[] = [
  73. // 示例数据,可根据实际情况替换
  74. // {
  75. // key: '1',
  76. // name: '张三',
  77. // id: 'P001',
  78. // priority: '高',
  79. // status: '处理中',
  80. // retryCount: 2,
  81. // target: '目标A',
  82. // },
  83. ];
  84. const OutputTable: React.FC = () => (
  85. <Table columns={columns} dataSource={data} />
  86. );
  87. export default OutputTable;