tableConfig.tsx 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import { PageStatusEnum, PageTypeEnum, SourceTypeEnum } from "@/services/launchAdq/enum"
  2. import { Badge } from "antd"
  3. import React from "react"
  4. let columns = () => [
  5. {
  6. title: '落地页ID',
  7. dataIndex: 'pageId',
  8. key: 'pageId',
  9. align: 'center',
  10. width: 100,
  11. render: (a: string) => {
  12. return <a>{a}</a>
  13. }
  14. },
  15. {
  16. title: '落地页名称',
  17. dataIndex: 'pageName',
  18. key: 'pageName',
  19. ellipsis: true
  20. },
  21. {
  22. title: '落地页类型',
  23. dataIndex: 'pageType',
  24. key: 'pageType',
  25. align: 'center',
  26. width: 120,
  27. render: (a: string) => {
  28. return PageTypeEnum[a]
  29. }
  30. },
  31. {
  32. title: '落地页状态',
  33. dataIndex: 'pageStatus',
  34. key: 'pageStatus',
  35. align: 'center',
  36. width: 90,
  37. render: (a: string | number) => {
  38. return <Badge status={a === 'NORMAL' ? "processing" : "error"} text={PageStatusEnum[a]} />
  39. }
  40. },
  41. {
  42. title: '配置来源',
  43. dataIndex: 'sourceType',
  44. key: 'sourceType',
  45. align: 'center',
  46. width: 110,
  47. render: (a: any, b: any) => {
  48. return SourceTypeEnum[a]
  49. }
  50. },
  51. {
  52. title: '创建时间',
  53. dataIndex: 'createdTime',
  54. key: 'createdTime',
  55. align: 'center',
  56. width: 160,
  57. },
  58. ]
  59. export default columns