/**
 * @file 盯盘基础展示数据
 * @author zhuxinbo(zhuxinbo@c-top.com.cn)
 */
import moment from 'moment'
class keepPersonServer {
    constructor() { }

    // 固定不可删除的列
    setNoDeleteColumns() {
        return [
            {
                title: '项目名称',
                dataIndex: 'projectName',
                scopedSlots: { customRender: 'projectName' },
                align: 'center',
                key: 'date',
                width: 200,
                fixed: 'left',
            },
            {
                title: '账户数量',
                dataIndex: 'accountNum',
                align: 'center',
                width: 100,
                fixed: 'left',
            },
            {
                title: '运营人员',
                dataIndex: 'userNum',
                scopedSlots: { customRender: 'userNum' },
                align: 'center',
                width: 100,
                fixed: 'left',
            },
            {
                title: '消耗(元)',
                dataIndex: 'totalCost',
                align: 'center',
                width: 100,
                fixed: 'left',
                sorter: (a, b) => a.totalCost - b.totalCost,
            },
            {
                title: '花费环比',
                dataIndex: 'yearOnYear',
                width: 150,
                tip: '',
                align: 'center',
                scopedSlots: { customRender: 'yearOnYear' },

            }, {
                title: '花费同比',
                dataIndex: 'equallyRate',
                width: 150,
                tip: '',
                align: 'center',
                scopedSlots: { customRender: 'equallyRate' },
            }, {
                title: '爆款素材数',
                dataIndex: 'newHotNum',
                width: 150,
                tip: '',
                align: 'center',

            },
            {
                title: '上传素材数',
                dataIndex: 'adspNum',
                width: 150,
                tip: '',
                align: 'center',

            },
            {
                title: '上新素材数',
                dataIndex: 'mediaNum',
                width: 150,
                tip: '',
                align: 'center',

            },
            {
                title: '基建数量',
                dataIndex: 'newUnitNum',
                width: 150,
                tip: '',
                align: 'center',

            },
            {
                title: '托管基建数',
                dataIndex: 'trustUnitNum',
                width: 150,
                tip: '',
                align: 'center',

            },
            {
                title: '激励视频广告',
                dataIndex: 'jl',
                width: 150,
                tip: '',
                align: 'center',

                scopedSlots: { customRender: 'jl' },

            },
            {
                title: '开屏广告',
                dataIndex: 'kp',
                width: 150,
                tip: '',
                align: 'center',

                scopedSlots: { customRender: 'kp' },

            },
            {
                title: '搜索广告',
                dataIndex: 'ss',
                width: 150,
                tip: '',
                align: 'center',

                scopedSlots: { customRender: 'ss' },

            },
            {
                title: '上下滑大屏广告',
                dataIndex: 'sxh',
                width: 150,
                tip: '',
                align: 'center',

                scopedSlots: { customRender: 'sxh' },

            },
            {
                title: '联盟',
                dataIndex: 'lm',
                width: 150,
                tip: '',
                align: 'center',

                scopedSlots: { customRender: 'lm' },

            },
            {
                title: '信息流',
                dataIndex: 'xxl',
                width: 150,
                tip: '',
                align: 'center',

                scopedSlots: { customRender: 'xxl' },

            },
        ]
    }

    // 固定不可删除的列
    setNoTtDeleteColumns() {
        return [
            {
                title: '项目名称',
                dataIndex: 'projectName',
                scopedSlots: { customRender: 'projectName' },
                align: 'center',
                key: 'date',

            },
            {
                title: '账户数量',
                dataIndex: 'accountNum',
                align: 'center',
            },
            {
                title: '运营人员',
                dataIndex: 'userNum',
                scopedSlots: { customRender: 'userNum' },
                align: 'center',
            },
            {
                title: '消耗(元)',
                dataIndex: 'totalCost',
                align: 'center',
                sorter: (a, b) => a.totalCost - b.totalCost,
            },
            {
                title: '花费环比',
                dataIndex: 'yearOnYear',
                tip: '',
                align: 'center',
                scopedSlots: { customRender: 'yearOnYear' },

            }, {
                title: '花费同比',
                dataIndex: 'equallyRate',
                tip: '',
                align: 'center',
                scopedSlots: { customRender: 'equallyRate' },
            }, {
                title: '爆款素材数',
                dataIndex: 'newHotNum',
                tip: '',
                align: 'center',

            },

            {
                title: '基建数量',
                dataIndex: 'newUnitNum',
                tip: '',
                align: 'center',

            },

            {
                title: '版位数据',
                dataIndex: 'inventory',
                tip: '',
                align: 'center',
                scopedSlots: { customRender: 'inventory' },

            },
        ]
    }

    setNoDeleteProjectColumns() {
        return [
            {
                title: '账户名称',
                dataIndex: 'accountName',
                scopedSlots: { customRender: 'accountName' },
                align: 'center',
                key: 'date',
            }, {
                title: '账户ID',
                dataIndex: 'accountId',
                scopedSlots: { customRender: 'accountId' },
                align: 'center',
            },
            {
                title: '运营人员',
                dataIndex: 'userName',
                align: 'center',
            },
            {
                title: '消耗(元)',
                dataIndex: 'totalCost',
                scopedSlots: { customRender: 'totalCost' },
                align: 'center',
            },
            {
                title: '花费环比',
                dataIndex: 'yearOnYear',
                align: 'center',
            }, {
                title: '花费同比',
                dataIndex: 'equallyRate',
                align: 'center',
            },

        ]
    }
    setNoActionProjectColumns() {
        return [
            {
                title: '账户名称',
                dataIndex: 'accountName',
                scopedSlots: { customRender: 'accountName' },
                align: 'center',
                key: 'date',
                width: 200,
                fixed: 'left',
            }, {
                title: '账户ID',
                dataIndex: 'accountId',
                scopedSlots: { customRender: 'accountId' },
                align: 'center',
                width: 100,
                fixed: 'left',
            }, {
                title: '预算',
                dataIndex: 'warningAmount',
                scopedSlots: { customRender: 'warningAmount' },
                align: 'center',
                width: 100,
                fixed: 'left',
            }, {
                title: '余额',
                dataIndex: 'balance',
                scopedSlots: { customRender: 'balance' },
                align: 'center',
                width: 100,
                fixed: 'left',
            },
            {
                title: '运营人员',
                dataIndex: 'userName',
                align: 'center',
                width: 100,
                fixed: 'left',
            },
            {
                title: '消耗(元)',
                dataIndex: 'totalCost',
                scopedSlots: { customRender: 'totalCost' },
                align: 'center',
                width: 100,
                fixed: 'left',
                sorter: (a, b) => a.totalCost - b.totalCost,
            },
            {
                title: '花费环比',
                dataIndex: 'yearOnYear',
                align: 'center',
                width: 100,
                fixed: 'left',
            }, {
                title: '花费同比',
                dataIndex: 'equallyRate',
                align: 'center',
                width: 100,
                fixed: 'left',
            },

        ]
    }
    groupDeliveryIndexShow() {
        return [
            {
                title: '消耗(元)',
                dataIndex: 'cost',
                align: 'center',
                scopedSlots: { customRender: 'cost' },

            }
        ]
    }

    groupDelivery() {
        return [
            {
                title: '状态操作',
                dataIndex: 'putStatus',
                align: 'center',
                scopedSlots: { customRender: 'putStatus' },
            },
            {
                title: '组名称',
                dataIndex: 'unitName',
                align: 'center',
                width: 350,
            }, {
                title: '消耗(元)',
                dataIndex: 'charge',
                align: 'center',
                sorter: (a, b) => a.charge - b.charge,
            }, {
                title: '出价',
                dataIndex: 'bid',
                align: 'center',
                scopedSlots: { customRender: 'bid' },
                sorter: (a, b) => a.bid - b.bid,
            }, {
                title: '激活数',
                dataIndex: 'activation',
                align: 'center',
                sorter: (a, b) => a.activation - b.activation,
            }, {
                title: '激活成本',
                dataIndex: 'actionCost',
                align: 'center',
                sorter: (a, b) => a.actionCost - b.actionCost,
            }, {
                title: '操作建议',
                dataIndex: 'operationAgree',
                key: 'operationAgree',
                align: 'center',
                scopedSlots: { customRender: 'operationAgree' },
            }, {
                title: '操作',
                dataIndex: 'operator',
                key: 'operator',
                align: 'center',
                scopedSlots: { customRender: 'operator' },
            },
        ]
    }
    // 默认初始展示列
    setDefaultColumns() {
        return [

        ]
    }

    //时间段筛选
    setTimeRange() {
        return {
            昨天: [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
            // 今天: [moment(), moment()],

            近三天: [moment().subtract(3, 'days'), moment().subtract(1, 'days')],
            近一周: [moment().subtract(7, 'days'), moment().subtract(1, 'days')],
            近14天: [moment().subtract(14, 'days'), moment().subtract(1, 'days')],
            近一月: [moment().subtract(1, 'months'), moment().subtract(1, 'days')],
            近半年: [moment().subtract(6, 'months'), moment().subtract(1, 'days')],
            近一年: [moment().subtract(12, 'months'), moment().subtract(1, 'days')],
        }
    }


}

export default new keepPersonServer();
