tableMonitorConfig1.tsx 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067
  1. import useCopy from '@/Hook/useCopy'
  2. import { RiseOutlined } from '@ant-design/icons'
  3. import { Progress, Space, Statistic } from 'antd'
  4. import { ColumnsType } from 'antd/lib/table'
  5. import React from 'react'
  6. import { ReactComponent as RocketSvg } from '@/assets/rocket.svg'
  7. import './index.less'
  8. import { CHUJIAFANGSHI, TUIGUANGMUBIAO, YOUHUAMUBIAO } from './enum'
  9. import Box from './components/box'
  10. import { GGStateData } from './data'
  11. import { copy } from '@/utils/utils'
  12. function columnsMonitor(planDetail: (id: number) => void, details: (id: number) => void, onChange: (value: any) => void, log: (value: any) => void) {
  13. const { copy } = useCopy()
  14. return function columns() {
  15. let newArr: ColumnsType<any> = [
  16. {
  17. title: '时间',
  18. dataIndex: 'day',
  19. key: 'day',
  20. align: 'center',
  21. width: 120,
  22. ellipsis: true
  23. },
  24. {
  25. title: '广告名称',
  26. dataIndex: 'adgroup_name',
  27. key: 'adgroup_name',
  28. align: 'center',
  29. width: 170,
  30. ellipsis: true,
  31. render: (str, b) => {
  32. return <a style={{ color: '#1890ff', fontSize: 12 }} onClick={() => { onChange(b.adgroup_id) }}>{str}</a>
  33. }
  34. },
  35. {
  36. title: '广告ID',
  37. dataIndex: 'adgroup_id',
  38. key: 'adgroup_id',
  39. align: 'center',
  40. width: 100,
  41. ellipsis: true,
  42. render: (a: any) => {
  43. return <a onClick={() => { copy(a) }} style={{ color: '#3946c3' }}>{a}</a>
  44. }
  45. },
  46. {
  47. title: '计划ID',
  48. dataIndex: 'campaign_id',
  49. key: 'campaign_id',
  50. align: 'center',
  51. width: 100,
  52. ellipsis: true,
  53. render: (a: any) => {
  54. return <a onClick={() => { copy(a) }} style={{ color: '#3946c3' }}>{a}</a>
  55. }
  56. },
  57. {
  58. title: '广告账户',
  59. dataIndex: 'account_id',
  60. key: 'account_id',
  61. width: 70,
  62. ellipsis: true,
  63. align: 'center'
  64. },
  65. {
  66. title: '投手',
  67. dataIndex: 'put_user_name',
  68. key: 'put_user_name',
  69. align: 'center',
  70. ellipsis: true,
  71. width: 65
  72. },
  73. {
  74. title: '创意预览',
  75. dataIndex: 'creative_preivew',
  76. key: 'creative_preivew',
  77. width: 110,
  78. align: 'center',
  79. render: (a: any, b: any) => {
  80. return <Box b={a} />
  81. }
  82. },
  83. {
  84. title: '投放时间',
  85. dataIndex: 'begin_date',
  86. key: 'begin_date',
  87. width: 110,
  88. align: 'center',
  89. ellipsis: true,
  90. render(value, record) {
  91. return value + '~' + (record?.end_date === '1970-01-01' ? '长期投放' : record?.end_date)
  92. },
  93. },
  94. {
  95. title: '广告状态',
  96. dataIndex: 'status',
  97. key: 'status',
  98. align: 'center',
  99. width: 105,
  100. ellipsis: true,
  101. render: (a: any) => {
  102. return GGStateData[a] || '--'
  103. }
  104. },
  105. {
  106. title: '推广目标',
  107. dataIndex: 'promoted_object_type',
  108. key: 'promoted_object_type',
  109. align: 'center',
  110. width: 80,
  111. ellipsis: true,
  112. render: (a: any) => {
  113. return TUIGUANGMUBIAO[a]
  114. }
  115. },
  116. {
  117. title: '广告预算',
  118. dataIndex: 'daily_budget',
  119. key: 'daily_budget',
  120. width: 110,
  121. align: 'center',
  122. ellipsis: true,
  123. render: (a: any) => {
  124. return <Statistic value={a || 0} />
  125. }
  126. },
  127. {
  128. title: '出价方式',
  129. dataIndex: 'bid_mode',
  130. key: 'bid_mode',
  131. align: 'center',
  132. width: 80,
  133. render: (a: any) => {
  134. return CHUJIAFANGSHI[a] || '--'
  135. }
  136. },
  137. {
  138. title: '当前出价',
  139. dataIndex: 'bid_amount',
  140. key: 'bid_amount',
  141. width: 110,
  142. align: 'center',
  143. ellipsis: true,
  144. render: (a: any) => {
  145. return <div style={a >= 500 ? { backgroundColor: 'rgba(255, 80, 82, .72)', height: 26, color: '#fff', display: 'flex', justifyContent: 'center', alignItems: 'center', fontWeight: 600 } : {}}><Statistic value={a || 0} valueStyle={a >= 500 ? { fontSize: 14 } : {}} /></div>
  146. }
  147. },
  148. {
  149. title: '广告总消耗',
  150. dataIndex: 'cost_total',
  151. key: 'cost_total',
  152. align: 'center',
  153. width: 100,
  154. ellipsis: true,
  155. sorter: true,
  156. render: (a: any) => {
  157. return <div style={{ height: 26, position: 'relative' }}>
  158. <Progress
  159. strokeColor={{
  160. from: '#10c1e9',
  161. to: '#6892d0',
  162. }}
  163. status="active"
  164. showInfo={false}
  165. percent={a ? a / 30000 * 100 : 0}
  166. />
  167. <span style={{ position: 'absolute', left: 0, top: 2, bottom: 0, right: 0 }}><Statistic value={a || 0} valueStyle={a >= 30000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }} /></span>
  168. </div>
  169. }
  170. },
  171. {
  172. title: '今日消耗',
  173. dataIndex: 'cost_day',
  174. key: 'cost_day',
  175. align: 'center',
  176. width: 105,
  177. sorter: true,
  178. render: (a: any) => {
  179. return <div style={{ height: 26, position: 'relative' }}>
  180. <Progress
  181. strokeColor={{
  182. from: '#ff5900',
  183. to: '#ffd380',
  184. }}
  185. status="active"
  186. showInfo={false}
  187. percent={a ? a / 2000 * 100 : 0}
  188. />
  189. <span style={{ position: 'absolute', left: 0, top: 2, bottom: 0, right: 0 }}><Statistic value={a || 0} valueStyle={a >= 2000 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }} /></span>
  190. </div>
  191. }
  192. },
  193. {
  194. title: '当前小时消耗',
  195. dataIndex: 'cost_hour',
  196. key: 'cost_hour',
  197. align: 'center',
  198. width: 110,
  199. sorter: true,
  200. render: (a: any) => {
  201. return <div style={{ height: 26, position: 'relative' }}>
  202. <Progress
  203. strokeColor={{
  204. from: '#e7a0f5',
  205. to: '#d161f7',
  206. }}
  207. status="active"
  208. showInfo={false}
  209. percent={a ? a / 300 * 100 : 0}
  210. />
  211. <span style={{ position: 'absolute', left: 0, top: 2, bottom: 0, right: 0 }}><Statistic value={a || 0} valueStyle={a >= 300 ? { color: '#000', fontWeight: 500, fontSize: 15 } : { fontWeight: 500, fontSize: 15 }} /></span>
  212. </div>
  213. }
  214. },
  215. {
  216. title: '前第1小时消耗',
  217. dataIndex: 'cost_last_hour',
  218. key: 'cost_last_hour',
  219. align: 'center',
  220. width: 110,
  221. sorter: true,
  222. render: (a: any) => {
  223. return <Statistic value={a || 0} />
  224. }
  225. },
  226. {
  227. title: '前第2小时消耗',
  228. dataIndex: 'cost_last_two_hour',
  229. key: 'cost_last_two_hour',
  230. align: 'center',
  231. width: 80,
  232. sorter: true,
  233. render: (a: any) => {
  234. return <Statistic value={a || 0} />
  235. }
  236. },
  237. {
  238. title: '前第3小时消耗',
  239. dataIndex: 'cost_last_three_hour',
  240. key: 'cost_last_three_hour',
  241. align: 'center',
  242. width: 110,
  243. sorter: true,
  244. render: (a: number) => {
  245. return <Statistic value={a || 0} />
  246. },
  247. },
  248. {
  249. title: '当前小时消耗差额',
  250. dataIndex: 'cost_diff_before_hour',
  251. key: 'cost_diff_before_hour',
  252. align: 'center',
  253. width: 125,
  254. sorter: true,
  255. render: (a: any) => {
  256. return <Statistic value={a || 0} valueStyle={a > 0 ? { color: 'red' } : { color: 'green' }} />
  257. }
  258. },
  259. {
  260. title: '前第1小时消耗差额',
  261. dataIndex: 'cost_diff_before_two_hour',
  262. key: 'cost_diff_before_two_hour',
  263. align: 'center',
  264. width: 125,
  265. sorter: true,
  266. render: (a: any) => {
  267. return <Statistic value={a || 0} valueStyle={a > 0 ? { color: 'red' } : { color: 'green' }} />
  268. }
  269. },
  270. {
  271. title: "前第2小时消耗差额",
  272. dataIndex: 'cost_diff_before_three_hour',
  273. key: 'cost_diff_before_three_hour',
  274. align: 'center',
  275. width: 125,
  276. sorter: true,
  277. render: (a: number) => {
  278. return <Statistic value={a || 0} valueStyle={a > 0 ? { color: 'red' } : { color: 'green' }} />
  279. },
  280. },
  281. {
  282. title: "前三小时消耗趋势",
  283. dataIndex: 'cost_trend_last_three_hour',
  284. key: 'cost_trend_last_three_hour',
  285. align: 'center',
  286. width: 75,
  287. render: (a: number) => {
  288. return a > 0 ? <RiseOutlined style={{ color: 'red', fontWeight: 900, fontSize: 22 }} /> : '--'
  289. },
  290. },
  291. {
  292. title: '当前5min消耗流速',
  293. dataIndex: 'cost_speed',
  294. key: 'cost_speed',
  295. align: 'center',
  296. width: 115,
  297. render: (a: any) => {
  298. a = a ? parseFloat(a.toFixed(2)) : 0
  299. return <div style={{ height: 26, position: 'relative' }}>
  300. <Progress
  301. strokeColor={{
  302. from: '#00DDFF',
  303. to: '#37A2FF',
  304. }}
  305. status="active"
  306. showInfo={false}
  307. percent={a ? a / 100 * 100 : 0}
  308. />
  309. <span style={{ position: 'absolute', left: 0, top: 2, bottom: 0, right: 0 }}><Statistic value={a || 0} valueStyle={a >= 100 ? { color: '#000', fontWeight: 500 } : { fontWeight: 500 }} /></span>
  310. </div>
  311. }
  312. },
  313. {
  314. title: '曝光量',
  315. dataIndex: 'view_day',
  316. key: 'view_day',
  317. align: 'center',
  318. width: 70,
  319. sorter: true,
  320. render: (a: number) => {
  321. return <Statistic value={a || 0} />
  322. },
  323. },
  324. {
  325. title: '千次曝光成本',
  326. dataIndex: 'thousand_display_price_day',
  327. key: 'thousand_display_price_day',
  328. align: 'center',
  329. width: 115,
  330. sorter: true,
  331. render: (a: any) => {
  332. return <Statistic value={a || 0} />
  333. }
  334. },
  335. {
  336. title: '点击量',
  337. dataIndex: 'click_day',
  338. key: 'click_day',
  339. align: 'center',
  340. width: 70,
  341. sorter: true,
  342. render: (a: number) => {
  343. return <Statistic value={a || 0} />
  344. },
  345. },
  346. {
  347. title: '点击均价',
  348. dataIndex: 'cpc_day',
  349. key: 'cpc_day',
  350. align: 'center',
  351. width: 115,
  352. sorter: true,
  353. render: (a: any) => {
  354. return <Statistic value={a || 0} />
  355. }
  356. },
  357. {
  358. title: '点击率',
  359. dataIndex: 'ctr_day',
  360. key: 'ctr_day',
  361. align: 'center',
  362. width: 115,
  363. sorter: true,
  364. render: (a: any) => {
  365. a = a ? parseFloat((a * 100).toFixed(2)) : 0
  366. return a + '%'
  367. }
  368. },
  369. {
  370. title: '优化目标',
  371. dataIndex: 'optimization_goal',
  372. key: 'optimization_goal',
  373. align: 'center',
  374. width: 115,
  375. render: (a: any) => {
  376. return YOUHUAMUBIAO[a] || '--'
  377. }
  378. },
  379. {
  380. title: '转化目标量',
  381. dataIndex: 'conversions_count_day',
  382. key: 'conversions_count_day',
  383. align: 'center',
  384. width: 115,
  385. sorter: true,
  386. render: (a: any) => {
  387. return <Statistic value={a || 0} />
  388. }
  389. },
  390. {
  391. title: '转化目标成本',
  392. dataIndex: 'conversions_cost_day',
  393. key: 'conversions_cost_day',
  394. align: 'center',
  395. width: 115,
  396. sorter: true,
  397. render: (a: any) => {
  398. return <div style={a > 500 ? { backgroundColor: '#efea5b', height: 26, color: '#fff', display: 'flex', alignItems: 'center', justifyContent: 'center', fontWeight: 600 } : {}}><Statistic value={a || 0} /></div>
  399. }
  400. },
  401. {
  402. title: '目标转化率',
  403. dataIndex: 'conversions_rate_day',
  404. key: 'conversions_rate_day',
  405. align: 'center',
  406. width: 115,
  407. sorter: true,
  408. render: (a: any) => {
  409. a = a ? parseFloat((a * 100).toFixed(2)) : 0
  410. return a + '%'
  411. }
  412. },
  413. {
  414. title: '下单量',
  415. dataIndex: 'order_count_day',
  416. key: 'order_count_day',
  417. align: 'center',
  418. width: 115,
  419. sorter: true,
  420. render: (a: any) => {
  421. return <Statistic value={a || 0} />
  422. }
  423. },
  424. // {
  425. // title: '首日新增下单量',
  426. // dataIndex: 'first_dayOrder_count_day',
  427. // key: 'first_dayOrder_count_day',
  428. // align: 'center',
  429. // width: 115,
  430. // sorter: true,
  431. // render: (a: any) => {
  432. // return <Statistic value={a || 0} />
  433. // }
  434. // },
  435. {
  436. title: '下单成本',
  437. dataIndex: 'order_cost_day',
  438. key: 'order_cost_day',
  439. align: 'center',
  440. width: 115,
  441. sorter: true,
  442. render: (a: any) => {
  443. return <Statistic value={a || 0} />
  444. }
  445. },
  446. {
  447. title: '下单率',
  448. dataIndex: 'order_rate_day',
  449. key: 'order_rate_day',
  450. align: 'center',
  451. width: 115,
  452. sorter: true,
  453. render: (a: any) => {
  454. a = a ? parseFloat((a * 100).toFixed(2)) : 0
  455. return a + '%'
  456. }
  457. },
  458. {
  459. title: '下单金额',
  460. dataIndex: 'order_amount_day',
  461. key: 'order_amount_day',
  462. align: 'center',
  463. width: 115,
  464. sorter: true,
  465. render: (a: any) => {
  466. return <Statistic value={a || 0} />
  467. }
  468. },
  469. // {
  470. // title: '首日新增下单金额',
  471. // dataIndex: 'first_day_order_amount_day',
  472. // key: 'first_day_order_amount_day',
  473. // align: 'center',
  474. // width: 115,
  475. // sorter: true,
  476. // render: (a: any) => {
  477. // return <Statistic value={a || 0} />
  478. // }
  479. // },
  480. {
  481. title: '下单客单价',
  482. dataIndex: 'atv_day',
  483. key: 'atv_day',
  484. align: 'center',
  485. width: 115,
  486. sorter: true,
  487. render: (a: any) => {
  488. return <Statistic value={a || 0} />
  489. }
  490. },
  491. {
  492. title: '下单ROI',
  493. dataIndex: 'order_roi_day',
  494. key: 'order_roi_day',
  495. align: 'center',
  496. width: 115,
  497. sorter: true,
  498. render: (a: any) => {
  499. a = a ? parseFloat((a * 100).toFixed(2)) : 0
  500. return a + '%'
  501. }
  502. },
  503. // {
  504. // title: '首日新增下单ROI',
  505. // dataIndex: 'first_day_order_roi_day',
  506. // key: 'first_day_order_roi_day',
  507. // align: 'center',
  508. // width: 115,
  509. // sorter: true,
  510. // render: (a: any) => {
  511. // a = a ? parseFloat((a * 100).toFixed(2)) : 0
  512. // return a + '%'
  513. // }
  514. // },
  515. {
  516. title: '公众号关注人数',
  517. dataIndex: 'mp_follow_uv_day',
  518. key: 'mp_follow_uv_day',
  519. align: 'center',
  520. width: 115,
  521. sorter: true,
  522. render: (a: any) => {
  523. return a
  524. }
  525. },
  526. {
  527. title: '公众号关注率',
  528. dataIndex: 'mp_follow_rate_day',
  529. key: 'mp_follow_rate_day',
  530. align: 'center',
  531. width: 115,
  532. sorter: true,
  533. render: (a: any) => {
  534. a = a ? parseFloat((a * 100).toFixed(2)) : 0
  535. return a + '%'
  536. }
  537. },
  538. {
  539. title: '公众号关注成本',
  540. dataIndex: 'mp_follow_cost_day',
  541. key: 'mp_follow_cost_day',
  542. align: 'center',
  543. width: 115,
  544. sorter: true,
  545. render: (a: any) => {
  546. return <Statistic value={a || 0} />
  547. }
  548. },
  549. {
  550. title: '加粉成本',
  551. dataIndex: 'add_fans_cost_day',
  552. key: 'add_fans_cost_day',
  553. align: 'center',
  554. width: 75,
  555. // sorter: true,
  556. render: (a: any) => {
  557. return <Statistic value={a || 0} />
  558. }
  559. },
  560. {
  561. title: '公众号关注次数成本',
  562. dataIndex: 'mp_follow_pv_cost_day',
  563. key: 'mp_follow_pv_cost_day',
  564. align: 'center',
  565. width: 80,
  566. // sorter: true,
  567. render: (a: any) => {
  568. return <Statistic value={a || 0} />
  569. }
  570. },
  571. {
  572. title: '加粉数',
  573. dataIndex: 'add_fans_count_day',
  574. key: 'add_fans_count_day',
  575. align: 'center',
  576. width: 75,
  577. // sorter: true,
  578. render: (a: any) => {
  579. return <Statistic value={a || 0} />
  580. }
  581. },
  582. {
  583. title: '公众号关注次数',
  584. dataIndex: 'mp_follow_pv_day',
  585. key: 'mp_follow_pv_day',
  586. align: 'center',
  587. width: 75,
  588. // sorter: true,
  589. render: (a: any) => {
  590. return <Statistic value={a || 0} />
  591. }
  592. },
  593. {
  594. title: '加企业微信客服人数',
  595. dataIndex: 'scan_follow_uv_day',
  596. key: 'scan_follow_uv_day',
  597. align: 'center',
  598. width: 80,
  599. // sorter: true,
  600. render: (a: any) => {
  601. return <Statistic value={a || 0} />
  602. }
  603. },
  604. {
  605. title: '加企业微信客服成本',
  606. dataIndex: 'scan_follow_cost_day',
  607. key: 'scan_follow_cost_day',
  608. align: 'center',
  609. width: 80,
  610. // sorter: true,
  611. render: (a: any) => {
  612. return <Statistic value={a || 0} />
  613. }
  614. },
  615. {
  616. title: '加企业微信客服率',
  617. dataIndex: 'scan_follow_rate_day',
  618. key: 'scan_follow_rate_day',
  619. align: 'center',
  620. width: 80,
  621. // sorter: true,
  622. render: (a: any) => {
  623. a = a ? parseFloat((a * 100).toFixed(2)) : 0
  624. return a + '%'
  625. }
  626. },
  627. {
  628. title: '操作',
  629. dataIndex: 'event',
  630. key: 'event',
  631. align: 'center',
  632. width: 180,
  633. render: (a: string, b: any) => (<Space>
  634. <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', fontSize: 14 }} onClick={() => details(b)}>
  635. <span role="img" aria-label="fund-view" className="anticon anticon-fund-view"><RocketSvg /></span><a style={{ marginLeft: 4, color: '#1890ff', fontSize: 12 }}>详情</a>
  636. </div>
  637. <a onClick={() => log(b)}>告警日志</a>
  638. <a style={{ color: '#1890ff', fontSize: 12 }} onClick={() => window.open(`https://ad.qq.com/atlas/${b?.account_id}/admanage/adgroup?tab=adgroup&query={%22operation_status%22:[%22CALCULATE_STATUS_EXCLUDE_DEL%22],%22system_status%22:[],%22search_name%22:%22${b.adgroup_id}%22}`)} target="_blank">腾讯广告</a>
  639. </Space>
  640. )
  641. }
  642. ]
  643. return newArr
  644. }
  645. }
  646. let columnsList = () => {
  647. return function columns() {
  648. let newArr: ColumnsType<any> = [
  649. {
  650. title: '时间',
  651. dataIndex: 'time',
  652. key: 'time',
  653. align: 'center',
  654. width: 120,
  655. sorter: true,
  656. ellipsis: true
  657. },
  658. {
  659. title: '数据更新时间',
  660. dataIndex: 'create_time',
  661. key: 'create_time',
  662. align: 'center',
  663. width: 120,
  664. ellipsis: true
  665. },
  666. {
  667. title: '广告ID',
  668. dataIndex: 'adgroup_id',
  669. key: 'adgroup_id',
  670. align: 'center',
  671. width: 100,
  672. ellipsis: true,
  673. render: (a: any) => {
  674. return <a onClick={() => { copy(a) }} style={{ color: '#3946c3' }}>{a}</a>
  675. }
  676. },
  677. {
  678. title: '广告账户',
  679. dataIndex: 'account_id',
  680. key: 'account_id',
  681. width: 70,
  682. ellipsis: true,
  683. align: 'center'
  684. },
  685. {
  686. title: '消耗',
  687. dataIndex: 'cost',
  688. key: 'cost',
  689. align: 'center',
  690. width: 90,
  691. render: (a: any, b: any) => {
  692. return <Statistic value={a || 0} />
  693. }
  694. },
  695. {
  696. title: '曝光量',
  697. dataIndex: 'view',
  698. key: 'view',
  699. align: 'center',
  700. width: 80
  701. },
  702. {
  703. title: '千次曝光成本',
  704. dataIndex: 'thousand_display_price',
  705. key: 'thousand_display_price',
  706. align: 'center',
  707. width: 90,
  708. render: (a: any, b: any) => {
  709. return <Statistic value={a || 0} />
  710. }
  711. },
  712. {
  713. title: '点击量',
  714. dataIndex: 'click',
  715. key: 'click',
  716. align: 'center',
  717. width: 90,
  718. render: (a: any, b: any) => {
  719. return <Statistic value={a || 0} />
  720. }
  721. },
  722. {
  723. title: '点击率',
  724. dataIndex: 'ctr',
  725. key: 'ctr',
  726. align: 'center',
  727. width: 90,
  728. render: (a: any, b: any) => {
  729. return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
  730. }
  731. },
  732. {
  733. title: '点击均价',
  734. dataIndex: 'cpc',
  735. key: 'cpc',
  736. align: 'center',
  737. width: 90,
  738. render: (a: any, b: any) => {
  739. return <Statistic value={a || 0} />
  740. }
  741. },
  742. {
  743. title: '不感兴趣点击次数',
  744. dataIndex: 'no_interest_count',
  745. key: 'no_interest_count',
  746. align: 'center',
  747. width: 90,
  748. render: (a: any, b: any) => {
  749. return <Statistic value={a || 0} />
  750. }
  751. },
  752. {
  753. title: '朋友圈视频播放次数',
  754. dataIndex: 'video_play_count',
  755. key: 'video_play_count',
  756. align: 'center',
  757. width: 90,
  758. render: (a: any, b: any) => {
  759. return <Statistic value={a || 0} />
  760. }
  761. },
  762. {
  763. title: '下载次数',
  764. dataIndex: 'download_count',
  765. key: 'download_count',
  766. align: 'center',
  767. width: 90,
  768. render: (a: any, b: any) => {
  769. return <Statistic value={a || 0} />
  770. }
  771. },
  772. {
  773. title: '安装次数',
  774. dataIndex: 'install_count',
  775. key: 'install_count',
  776. align: 'center',
  777. width: 90,
  778. render: (a: any, b: any) => {
  779. return <Statistic value={a || 0} />
  780. }
  781. },
  782. {
  783. title: '激活次数',
  784. dataIndex: 'activated_count',
  785. key: 'activated_count',
  786. align: 'center',
  787. width: 90,
  788. render: (a: any, b: any) => {
  789. return <Statistic value={a || 0} />
  790. }
  791. },
  792. {
  793. title: '公众号关注人数',
  794. dataIndex: 'mp_follow_uv',
  795. key: 'mp_follow_uv',
  796. align: 'center',
  797. width: 90,
  798. render: (a: any, b: any) => {
  799. return <Statistic value={a || 0} />
  800. }
  801. },
  802. {
  803. title: '公众号关注成本',
  804. dataIndex: 'mp_follow_cost',
  805. key: 'mp_follow_cost',
  806. align: 'center',
  807. width: 90,
  808. render: (a: any, b: any) => {
  809. return <Statistic value={a || 0} />
  810. }
  811. },
  812. {
  813. title: '公众号关注率',
  814. dataIndex: 'mp_follow_rate',
  815. key: 'mp_follow_rate',
  816. align: 'center',
  817. width: 90,
  818. render: (a: any, b: any) => {
  819. return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
  820. }
  821. },
  822. {
  823. title: '公众号关注次数',
  824. dataIndex: 'mp_follow_pv',
  825. key: 'mp_follow_pv',
  826. align: 'center',
  827. width: 90,
  828. render: (a: any, b: any) => {
  829. return <Statistic value={a || 0} />
  830. }
  831. },
  832. {
  833. title: '公众号关注次数成本',
  834. dataIndex: 'mp_follow_pv_cost',
  835. key: 'mp_follow_pv_cost',
  836. align: 'center',
  837. width: 100,
  838. render: (a: any, b: any) => {
  839. return <Statistic value={a || 0} />
  840. }
  841. },
  842. {
  843. title: '快应用添加次数',
  844. dataIndex: 'add_quick_app_pv',
  845. key: 'add_quick_app_pv',
  846. align: 'center',
  847. width: 90,
  848. render: (a: any, b: any) => {
  849. return <Statistic value={a || 0} />
  850. }
  851. },
  852. {
  853. title: '快应用添加成本',
  854. dataIndex: 'add_quick_app_cost',
  855. key: 'add_quick_app_cost',
  856. align: 'center',
  857. width: 90,
  858. render: (a: any, b: any) => {
  859. return <Statistic value={a || 0} />
  860. }
  861. },
  862. {
  863. title: '快应用添加率',
  864. dataIndex: 'add_quick_app_rate',
  865. key: 'add_quick_app_rate',
  866. align: 'center',
  867. width: 90,
  868. render: (a: any, b: any) => {
  869. return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
  870. }
  871. },
  872. {
  873. title: '加企业微信客服人数',
  874. dataIndex: 'scan_follow_uv',
  875. key: 'scan_follow_uv',
  876. align: 'center',
  877. width: 100,
  878. render: (a: any, b: any) => {
  879. return <Statistic value={a || 0} />
  880. }
  881. },
  882. {
  883. title: '加企业微信客服成本',
  884. dataIndex: 'scan_follow_cost',
  885. key: 'scan_follow_cost',
  886. align: 'center',
  887. width: 100,
  888. render: (a: any, b: any) => {
  889. return <Statistic value={a || 0} />
  890. }
  891. },
  892. {
  893. title: '加企业微信客服率',
  894. dataIndex: 'scan_follow_rate',
  895. key: 'scan_follow_rate',
  896. align: 'center',
  897. width: 100,
  898. render: (a: any, b: any) => {
  899. return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
  900. }
  901. },
  902. {
  903. title: '首日新增下单量',
  904. dataIndex: 'first_day_order_count',
  905. key: 'first_day_order_count',
  906. align: 'center',
  907. width: 90,
  908. render: (a: any, b: any) => {
  909. return <Statistic value={a || 0} />
  910. }
  911. },
  912. {
  913. title: '首日新增下单金额',
  914. dataIndex: 'first_day_order_amount',
  915. key: 'first_day_order_amount',
  916. align: 'center',
  917. width: 90,
  918. render: (a: any, b: any) => {
  919. return <Statistic value={a || 0} />
  920. }
  921. },
  922. {
  923. title: '首日新增下单ROI',
  924. dataIndex: 'first_day_order_roi',
  925. key: 'first_day_order_roi',
  926. align: 'center',
  927. width: 90,
  928. render: (a: any, b: any) => {
  929. return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
  930. }
  931. },
  932. {
  933. title: '订单量',
  934. dataIndex: 'order_count',
  935. key: 'order_count',
  936. align: 'center',
  937. width: 90,
  938. render: (a: any, b: any) => {
  939. return <Statistic value={a || 0} />
  940. }
  941. },
  942. {
  943. title: '订单金额',
  944. dataIndex: 'order_amount',
  945. key: 'order_amount',
  946. align: 'center',
  947. width: 90,
  948. render: (a: any, b: any) => {
  949. return <Statistic value={a || 0} />
  950. }
  951. },
  952. {
  953. title: '下单成本',
  954. dataIndex: 'order_cost',
  955. key: 'order_cost',
  956. align: 'center',
  957. width: 90,
  958. render: (a: any, b: any) => {
  959. return <Statistic value={a || 0} />
  960. }
  961. },
  962. {
  963. title: '下单率',
  964. dataIndex: 'order_rate',
  965. key: 'order_rate',
  966. align: 'center',
  967. width: 90,
  968. render: (a: any, b: any) => {
  969. return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
  970. }
  971. },
  972. {
  973. title: '下单ROI',
  974. dataIndex: 'order_roi',
  975. key: 'order_roi',
  976. align: 'center',
  977. width: 90,
  978. render: (a: any, b: any) => {
  979. return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
  980. }
  981. },
  982. {
  983. title: '客单价',
  984. dataIndex: 'atv',
  985. key: 'atv',
  986. align: 'center',
  987. width: 90,
  988. render: (a: any, b: any) => {
  989. return <Statistic value={a || 0} />
  990. }
  991. },
  992. {
  993. title: '转化量',
  994. dataIndex: 'conversions_count',
  995. key: 'conversions_count',
  996. align: 'center',
  997. width: 90,
  998. render: (a: any, b: any) => {
  999. return <Statistic value={a || 0} />
  1000. }
  1001. },
  1002. {
  1003. title: '转化成本',
  1004. dataIndex: 'conversions_cost',
  1005. key: 'conversions_cost',
  1006. align: 'center',
  1007. width: 90,
  1008. render: (a: any, b: any) => {
  1009. return <Statistic value={a || 0} />
  1010. }
  1011. },
  1012. {
  1013. title: '深度转化',
  1014. dataIndex: 'deep_conversions_count',
  1015. key: 'deep_conversions_count',
  1016. align: 'center',
  1017. width: 90,
  1018. render: (a: any, b: any) => {
  1019. return <Statistic value={a || 0} />
  1020. }
  1021. },
  1022. {
  1023. title: '转化率',
  1024. dataIndex: 'conversions_rate',
  1025. key: 'conversions_rate',
  1026. align: 'center',
  1027. width: 90,
  1028. render: (a: any, b: any) => {
  1029. return <Statistic value={a ? (a * 100).toFixed(2) : 0} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" />
  1030. }
  1031. },
  1032. {
  1033. title: '加粉数',
  1034. dataIndex: 'add_fans_count',
  1035. key: 'add_fans_count',
  1036. align: 'center',
  1037. width: 90,
  1038. render: (a: any, b: any) => {
  1039. return <Statistic value={a || 0} />
  1040. }
  1041. },
  1042. {
  1043. title: '加粉成本',
  1044. dataIndex: 'add_fans_cost',
  1045. key: 'add_fans_cost',
  1046. align: 'center',
  1047. width: 90,
  1048. render: (a: any, b: any) => {
  1049. return <Statistic value={a || 0} />
  1050. }
  1051. },
  1052. ]
  1053. return newArr
  1054. }
  1055. }
  1056. export {
  1057. columnsMonitor,
  1058. columnsList
  1059. }