| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226 |
- import { Statistic } from "antd";
- import { AnyObject } from "antd/es/_util/type"
- import { ColumnsType } from "antd/es/table"
- export const CorpExternalUserColumns = (): ColumnsType<AnyObject> => {
- return [
- {
- title: '企业名称',
- dataIndex: 'corpName',
- key: 'corpName',
- ellipsis: true,
- width: 150,
- },
- {
- title: '粉丝总数',
- dataIndex: 'userCount',
- key: 'userCount',
- align: 'center',
- render: (text: any) => <Statistic value={text || 0} valueStyle={{ fontSize: 12 }} />
- },
- {
- title: '未识别人数',
- dataIndex: 'wsbrsCount',
- key: 'wsbrsCount',
- align: 'center',
- render: (text: any) => <Statistic value={text || 0} valueStyle={{ fontSize: 12 }} />
- },
- {
- title: '重复总人数',
- dataIndex: 'cfCount',
- key: 'cfCount',
- align: 'center',
- render: (text: any) => <Statistic value={text || 0} valueStyle={{ fontSize: 12 }} />
- },
- {
- title: '非重人数',
- dataIndex: 'oneRepeatCount',
- key: 'oneRepeatCount',
- align: 'center',
- render: (text: any) => <Statistic value={text || 0} valueStyle={{ fontSize: 12 }} />
- },
- {
- title: '非重人数比例',
- dataIndex: 'oneRepeatCountRate',
- key: 'oneRepeatCountRate',
- align: 'center',
- render: (text: any) => <Statistic
- value={text ? text * 100 : 0}
- valueStyle={text > 0.5 ? { color: '#cf1322', fontSize: 12 } : { color: '#3f8600', fontSize: 12 }}
- suffix="%"
- precision={4}
- />
- },
- {
- title: '添加2名客服人数',
- dataIndex: 'twoRepeatCount',
- key: 'twoRepeatCount',
- align: 'center',
- render: (text: any) => <Statistic value={text || 0} valueStyle={{ fontSize: 12 }} />
- },
- {
- title: '添加2名客服人数比例',
- dataIndex: 'twoRepeatCountRate',
- key: 'twoRepeatCountRate',
- align: 'center',
- render: (text: any) => <Statistic
- value={text ? text * 100 : 0}
- valueStyle={text > 0.1 ? { color: '#cf1322', fontSize: 12 } : { color: '#3f8600', fontSize: 12 }}
- suffix="%"
- precision={4}
- />
- },
- {
- title: '添加3名客服人数',
- dataIndex: 'threeRepeatCount',
- key: 'threeRepeatCount',
- align: 'center',
- render: (text: any) => <Statistic value={text || 0} valueStyle={{ fontSize: 12 }} />
- },
- {
- title: '添加3名客服人数比例',
- dataIndex: 'threeRepeatCountRate',
- key: 'threeRepeatCountRate',
- align: 'center',
- render: (text: any) => <Statistic
- value={text ? text * 100 : 0}
- valueStyle={text > 0.09 ? { color: '#cf1322', fontSize: 12 } : { color: '#3f8600', fontSize: 12 }}
- suffix="%"
- precision={4}
- />
- },
- {
- title: '添加4名客服人数',
- dataIndex: 'fourRepeatCount',
- key: 'fourRepeatCount',
- align: 'center',
- render: (text: any) => <Statistic value={text || 0} valueStyle={{ fontSize: 12 }} />
- },
- {
- title: '添加4名客服人数比例',
- dataIndex: 'fourRepeatCountRate',
- key: 'fourRepeatCountRate',
- align: 'center',
- render: (text: any) => <Statistic
- value={text ? text * 100 : 0}
- valueStyle={text > 0.08 ? { color: '#cf1322', fontSize: 12 } : { color: '#3f8600', fontSize: 12 }}
- suffix="%"
- precision={4}
- />
- },
- {
- title: '添加5名客服人数',
- dataIndex: 'fiveRepeatCount',
- key: 'fiveRepeatCount',
- align: 'center',
- render: (text: any) => <Statistic value={text || 0} valueStyle={{ fontSize: 12 }} />
- },
- {
- title: '添加5名客服人数比例',
- dataIndex: 'fiveRepeatCountRate',
- key: 'fiveRepeatCountRate',
- align: 'center',
- render: (text: any) => <Statistic
- value={text ? text * 100 : 0}
- valueStyle={text > 0.07 ? { color: '#cf1322', fontSize: 12 } : { color: '#3f8600', fontSize: 12 }}
- suffix="%"
- precision={4}
- />
- },
- {
- title: '添加5名客服以上人数',
- dataIndex: 'gtFiveRepeatCount',
- key: 'gtFiveRepeatCount',
- align: 'center',
- render: (text: any) => <Statistic value={text || 0} valueStyle={{ fontSize: 12 }} />
- },
- {
- title: '添加5名客服以上人数比例',
- dataIndex: 'gtFiveRepeatCountRate',
- key: 'gtFiveRepeatCountRate',
- align: 'center',
- render: (text: any) => <Statistic
- value={text ? text * 100 : 0}
- valueStyle={text > 0.06 ? { color: '#cf1322', fontSize: 12 } : { color: '#3f8600', fontSize: 12 }}
- suffix="%"
- precision={4}
- />
- },
- ]
- }
- export const ExternalUserColumns = (): ColumnsType<AnyObject> => {
- return [
- {
- title: '企业名称',
- dataIndex: 'corpName',
- key: 'corpName',
- ellipsis: true,
- width: 150,
- },
- {
- title: '主体用户总数',
- dataIndex: 'corpExternalUserCount',
- key: 'corpExternalUserCount',
- align: 'center',
- render: (text: any) => <Statistic value={text || 0} valueStyle={{ fontSize: 12 }} />
- },
- {
- title: '已识别用户数',
- dataIndex: 'ysbCount',
- key: 'ysbCount',
- align: 'center',
- render: (text: any) => <Statistic value={text || 0} valueStyle={{ fontSize: 12 }} />
- },
- {
- title: '未识别用户数',
- dataIndex: 'nsbCount',
- key: 'nsbCount',
- align: 'center',
- render: (text: any) => <Statistic value={text || 0} valueStyle={{ fontSize: 12 }} />
- },
- {
- title: '主体用户在集团占比',
- dataIndex: 'corpExternalUserRate',
- key: 'corpExternalUserRate',
- align: 'center',
- render: (text: any) => <Statistic
- value={text ? text * 100 : 0}
- valueStyle={text > 0.2 ? { color: '#cf1322', fontSize: 12 } : { color: '#3f8600', fontSize: 12 }}
- suffix="%"
- precision={4}
- />
- },
- {
- title: '主体客服号数量',
- dataIndex: 'corpUserCount',
- key: 'corpUserCount',
- align: 'center',
- render: (text: any) => <Statistic value={text || 0} valueStyle={{ fontSize: 12 }} />
- },
- {
- title: '主体内重粉数',
- dataIndex: 'corpExternalUserRepeatCount',
- key: 'corpExternalUserRepeatCount',
- align: 'center',
- render: (text: any) => <Statistic value={text || 0} valueStyle={{ fontSize: 12 }} />
- },
- {
- title: '主体内重粉率',
- dataIndex: 'corpExternalUserRepeatRate',
- key: 'corpExternalUserRepeatRate',
- align: 'center',
- render: (text: any) => <Statistic
- value={text ? text * 100 : 0}
- valueStyle={text > 0.2 ? { color: '#cf1322', fontSize: 12 } : { color: '#3f8600', fontSize: 12 }}
- suffix="%"
- precision={4}
- />
- },
- ]
- }
|