123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279 |
- import { ColumnsType } from "antd/lib/table";
- import React from "react";
- import AstraSupportHour from "./astraSupportHour";
- import { Space, Statistic } from "antd";
- import AstraGroupHourEle from "./astraGroupHourEle";
- import AstraGroupIndexEle from "./astraGroupIndexEle";
- import DoubleDelDetails from "./doubleDelDetails";
- /** 客服号加粉 */
- export const CorpUserDayListTableConfig = (): ColumnsType<never> => {
- return [
- {
- title: '日期',
- dataIndex: 'day',
- key: 'day',
- width: 80,
- ellipsis: true,
- align: 'center',
- render(value) {
- return <span style={{ fontSize: 12 }}>{value}</span>
- },
- },
- {
- title: '企业名称',
- dataIndex: 'corpName',
- key: 'corpName',
- width: 100,
- ellipsis: true,
- render(value) {
- return <span style={{ fontSize: 12 }}>{value || '--'}</span>
- },
- },
- {
- title: '企业ID',
- dataIndex: 'corpId',
- key: 'corpId',
- width: 180,
- ellipsis: true,
- render(value) {
- return <span style={{ fontSize: 12 }}>{value}</span>
- },
- },
- {
- title: '企业用户名称',
- dataIndex: 'corpUserName',
- key: 'corpUserName',
- width: 100,
- ellipsis: true,
- render(value) {
- return <span style={{ fontSize: 12 }}>{value || '--'}</span>
- },
- },
- {
- title: '企业用户ID',
- dataIndex: 'corpUserId',
- key: 'corpUserId',
- width: 100,
- ellipsis: true,
- render(value) {
- return <span style={{ fontSize: 12 }}>{value}</span>
- },
- },
- {
- title: '客服号当前所在部门名称',
- dataIndex: 'localCorpUserDepartment',
- key: 'localCorpUserDepartment',
- width: 120,
- ellipsis: true,
- render(value) {
- return <span style={{ fontSize: 12 }}>{value}</span>
- },
- },
- {
- title: '新增用户数',
- dataIndex: 'addUserCount',
- key: 'addUserCount',
- width: 100,
- align: 'right',
- sorter: true,
- render(value) {
- return <span style={{ fontSize: 12, color: (value >= 60 && value < 100) ? 'orange' : value > 100 ? 'red' : '#000000D9' }}>{value}</span>
- },
- },
- {
- title: '退出人数',
- dataIndex: 'outUserCount',
- key: 'outUserCount',
- width: 100,
- align: 'right',
- sorter: true,
- render(value) {
- return <span style={{ fontSize: 12 }}>{value}</span>
- },
- },
- {
- title: '当前粉丝总数',
- dataIndex: 'corpExternalUserCount',
- key: 'corpExternalUserCount',
- width: 100,
- align: 'right',
- sorter: true,
- render(value) {
- return <span style={{ fontSize: 12 }}>{value}</span>
- },
- },
- {
- title: 'dn双删详情',
- dataIndex: 'dnOutUserCount',
- key: 'dnOutUserCount',
- width: 100,
- align: 'center',
- render(value, record: any) {
- return value && Object.keys(value).length > 0 ? <DoubleDelDetails
- dnOutUserCount={value}
- day={record.day}
- corpName={record.corpName}
- corpUserName={record.corpUserName}
- /> : '--'
- },
- },
- {
- title: '数据更新时间',
- dataIndex: 'dataTime',
- key: 'dataTime',
- width: 140,
- ellipsis: true,
- align: 'center',
- render(value) {
- return <span style={{ fontSize: 12 }}>{value}</span>
- },
- },
- {
- title: '操作',
- dataIndex: 'cz',
- key: 'cz',
- width: 210,
- ellipsis: true,
- render(_, record: any) {
- return <AstraSupportHour
- corpName={record.corpName}
- corpUserName={record.corpUserName}
- data={{
- corpId: record.corpId,
- corpUserId: record.corpUserId,
- day: record.day
- }}
- />
- },
- }
- ]
- }
- /** 客服组加粉 */
- export const LocalCsgroupDayListTableConfig = (): ColumnsType<never> => {
- return [
- {
- title: '日期',
- dataIndex: 'day',
- key: 'day',
- width: 80,
- ellipsis: true,
- align: 'center',
- render(value) {
- return <span style={{ fontSize: 12 }}>{value}</span>
- },
- },
- {
- title: '企业名称',
- dataIndex: 'corpName',
- key: 'corpName',
- width: 100,
- ellipsis: true,
- render(value) {
- return <span style={{ fontSize: 12 }}>{value}</span>
- },
- },
- {
- title: '本地客服组名称',
- dataIndex: 'localCsgroupName',
- key: 'localCsgroupName',
- width: 100,
- ellipsis: true,
- render(value) {
- return <span style={{ fontSize: 12 }}>{value}</span>
- },
- },
- {
- title: '本地客服组ID',
- dataIndex: 'localCsgroupId',
- key: 'localCsgroupId',
- width: 75,
- ellipsis: true,
- align: 'center',
- render(value) {
- return <span style={{ fontSize: 12 }}>{value}</span>
- },
- },
- {
- title: '消耗',
- dataIndex: 'cost',
- key: 'cost',
- width: 100,
- align: 'right',
- render(value) {
- return <Statistic value={value || 0} />
- },
- },
- {
- title: '加粉次数(广告)',
- dataIndex: 'scanFollowCount',
- key: 'scanFollowCount',
- width: 100,
- align: 'right',
- render(value) {
- return <span style={{ fontSize: 12 }}>{value}</span>
- },
- },
- {
- title: '加粉人数(广告)',
- dataIndex: 'scanFollowUserCount',
- key: 'scanFollowUserCount',
- width: 100,
- align: 'right',
- render(value) {
- return <span style={{ fontSize: 12 }}>{value}</span>
- },
- },
- {
- title: '加粉人数',
- dataIndex: 'addUserCount',
- key: 'addUserCount',
- width: 100,
- align: 'right',
- render(value) {
- return <span style={{ fontSize: 12 }}>{value}</span>
- },
- },
- {
- title: '数据更新时间',
- dataIndex: 'dataTime',
- key: 'dataTime',
- width: 140,
- ellipsis: true,
- align: 'center',
- render(value) {
- return <span style={{ fontSize: 12 }}>{value}</span>
- },
- },
- {
- title: '操作',
- dataIndex: 'cz',
- key: 'cz',
- width: 250,
- ellipsis: true,
- render(_, record: any) {
- return <Space>
- <AstraGroupHourEle
- localCsgroupName={record.localCsgroupName}
- data={{
- day: record.day,
- localCsgroupId: record.localCsgroupId
- }}
- />
- <AstraGroupIndexEle
- localCsgroupName={record.localCsgroupName}
- data={{
- day: record.day,
- localCsgroupId: record.localCsgroupId
- }}
- />
- </Space>
- }
- }
- ]
- }
|