expandedColumns.tsx 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import { DelAdSysWarningRuleProps } from "@/services/adMonitor/earlyWarning"
  2. import { Popconfirm } from "antd"
  3. import React from "react"
  4. function columns(del: (data: DelAdSysWarningRuleProps) => void) {
  5. const data: any = [
  6. { title: '广告账号', dataIndex: 'accountId', key: 'accountId', width: 120 },
  7. { title: '广告名称', dataIndex: 'adgroupName', key: 'adgroupName', ellipsis: true },
  8. { title: '广告ID', dataIndex: 'adgroupId', key: 'adgroupId', width: 120 },
  9. {
  10. title: '操作',
  11. dataIndex: 'cz',
  12. key: 'cz',
  13. width: 120,
  14. render: (a: string[], b: any) => {
  15. return <Popconfirm
  16. title="确定删除?"
  17. onConfirm={() => del(b)}
  18. >
  19. <a style={{ color: 'red' }}>删除</a>
  20. </Popconfirm>
  21. }
  22. },
  23. ]
  24. return data
  25. }
  26. export function columnsAccount(del: (value: any) => void) {
  27. const data: any = [
  28. { title: '广告账号', dataIndex: 'accountId', key: 'accountId', width: 120 },
  29. { title: '腾讯备注', dataIndex: 'memo', key: 'memo', ellipsis: true },
  30. {
  31. title: '操作',
  32. dataIndex: 'cz',
  33. key: 'cz',
  34. width: 120,
  35. render: (a: string[], b: any) => {
  36. return <Popconfirm
  37. title="确定删除?"
  38. onConfirm={() => del(b)}
  39. >
  40. <a style={{ color: 'red' }}>删除</a>
  41. </Popconfirm>
  42. }
  43. },
  44. ]
  45. return data
  46. }
  47. export function columnsBlack(del: (value: any) => void) {
  48. const data: any = [
  49. { title: '广告账号', dataIndex: 'accountId', key: 'accountId' },
  50. { title: '广告ID', dataIndex: 'adgroupId', key: 'adgroupId' },
  51. {
  52. title: '操作',
  53. dataIndex: 'cz',
  54. key: 'cz',
  55. width: 120,
  56. render: (a: string[], b: any) => {
  57. return <Popconfirm
  58. title="确定删除?"
  59. onConfirm={() => del(b)}
  60. >
  61. <a style={{ color: 'red' }}>删除</a>
  62. </Popconfirm>
  63. }
  64. },
  65. ]
  66. return data
  67. }
  68. export default columns