tableConfig.tsx 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import { FundStatusEnum, } from '@/services/launchAdq/enum'
  2. import React from 'react'
  3. import { Badge, Space } from 'antd'
  4. import { copy } from '@/utils/utils'
  5. import { CopyOutlined } from '@ant-design/icons'
  6. function tableConfig(tableIdClick: any): any {
  7. return [
  8. {
  9. title: 'ID',
  10. dataIndex: 'id',
  11. key: 'id',
  12. align: 'center',
  13. width: 50
  14. },
  15. {
  16. title: '账号ID',
  17. dataIndex: 'accountId',
  18. key: 'accountId',
  19. align: 'center',
  20. width: 90,
  21. render: (a: string) => {
  22. return <Space>
  23. <a onClick={() => copy(a)} >{a}</a>
  24. </Space>
  25. }
  26. },
  27. {
  28. title: '腾讯备注',
  29. dataIndex: 'memo',
  30. key: 'memo',
  31. align: 'center',
  32. width: 100,
  33. fixed: 'left',
  34. ellipsis: true,
  35. },
  36. {
  37. title: '本地备注',
  38. dataIndex: 'remark',
  39. key: 'remark',
  40. align: 'center',
  41. width: 100,
  42. fixed: 'left',
  43. ellipsis: true,
  44. },
  45. {
  46. title: '账户余额(分)',
  47. dataIndex: 'balance',
  48. key: 'balance',
  49. align: 'center',
  50. width: 150,
  51. },
  52. {
  53. title: '资金状态',
  54. dataIndex: 'fundStatus',
  55. key: 'fundStatus',
  56. align: 'center',
  57. width: 130,
  58. render: (a: string | number) => {
  59. return FundStatusEnum[a]
  60. }
  61. },
  62. {
  63. title: '是否有效',
  64. dataIndex: 'enabled',
  65. key: 'enabled',
  66. align: 'center',
  67. width: 130,
  68. render: (a: any, b: any) => {
  69. return <Badge status={a ? "processing" : "error"} text={a ? '是' : '否'} />
  70. }
  71. },
  72. ]
  73. }
  74. export default tableConfig