tableConfig.tsx 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. import { PageStatusEnum, PageTypeEnum, SourceTypeEnum } from '@/services/launchAdq/enum'
  2. import React from 'react'
  3. import { Badge } from 'antd'
  4. function tableConfig(): any {
  5. return [
  6. {
  7. title: '所属账号',
  8. dataIndex: 'accountId',
  9. key: 'accountId',
  10. align: 'center',
  11. width:100,
  12. render:(a:string)=>{
  13. return <a>{a}</a>
  14. }
  15. },
  16. {
  17. title: '落地页ID',
  18. dataIndex: 'pageId',
  19. key: 'pageId',
  20. align: 'center',
  21. width:100,
  22. render:(a:string)=>{
  23. return <a>{a}</a>
  24. }
  25. },
  26. {
  27. title: '落地页名称',
  28. dataIndex: 'pageName',
  29. key: 'pageName',
  30. align: 'center',
  31. },
  32. // {
  33. // title: '原生页类型',
  34. // dataIndex: 'canvasType',
  35. // key: 'canvasType',
  36. // align: 'center',
  37. // width:110,
  38. // render: (a: string | number) => {
  39. // return CanvasTypeEnum[a]
  40. // }
  41. // },
  42. {
  43. title: '落地页类型',
  44. dataIndex: 'pageType',
  45. key: 'pageType',
  46. align: 'center',
  47. width:110,
  48. render: (a: string) => {
  49. return PageTypeEnum[a]
  50. }
  51. },
  52. {
  53. title: '落地页状态',
  54. dataIndex: 'pageStatus',
  55. key: 'pageStatus',
  56. align: 'center',
  57. width:90,
  58. render:(a: string | number)=>{
  59. return <Badge status={a === 'NORMAL' ? "processing" :"error" } text={PageStatusEnum[a]} />
  60. }
  61. },
  62. {
  63. title: '配置来源',
  64. dataIndex: 'sourceType',
  65. key: 'sourceType',
  66. align: 'center',
  67. width:110,
  68. render: (a: any, b: any) => {
  69. return SourceTypeEnum[a]
  70. }
  71. },
  72. // {
  73. // title: '微信原生页视频资源状态',
  74. // dataIndex: 'videoResourceStatus',
  75. // key: 'videoResourceStatus',
  76. // align: 'center',
  77. // width:160,
  78. // render: (a: any, b: any) => {
  79. // return <Badge status={a === 'VIDEO_RESOURCE_STATUS_VALID' ? "processing" :a === 'VIDEO_RESOURCE_STATUS_PENDING'? "warning" :"error" } text={VideoResourceStatusEnum[a]} />
  80. // }
  81. // },
  82. {
  83. title: '创建时间',
  84. dataIndex: 'createdTime',
  85. key: 'createdTime',
  86. align: 'center',
  87. width:160,
  88. },
  89. ]
  90. }
  91. export default tableConfig