/**
 * @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',
                 sorter: () => {},
             },
             {
                 title: '花费',
                 dataIndex: 'totalCost',
                 align: 'center',
                 width: 100,
                 fixed: 'left',
                 sorter: () => {},
             },
             {
                 title: '花费环比',
                 dataIndex: 'yearOnYear',
                 width: 150,
                 tip: '',
                 align: 'center',
                 
             },{
                title: '花费同比',
                dataIndex: 'equallyRate',
                width: 150,
                tip: '',
                align: 'center',
                
            },
         ]
     }

     setNoDeleteProjectColumns() {
        return [
            {
                title: '账户名称',
                dataIndex: 'authName',
                scopedSlots: { customRender: 'authName' },
                align: 'center',
                key: 'date',
                width: 200,
                fixed: 'left',
            },
            {
                title: '运营人员',
                dataIndex: 'realname',
                align: 'center',
                width: 100,
                fixed: 'left',
            },
            {
                title: '花费',
                dataIndex: 'totalCost',
                scopedSlots: { customRender: 'totalCost' },
                align: 'center',
                width: 100,
                fixed: 'left',
                sorter: () => {},
            },
            {
                title: '花费环比',
                dataIndex: 'yearOnYear',
                align: 'center',
                width: 100,
                fixed: 'left',
                sorter: () => {},
            },{
                title: '花费同比',
                dataIndex: 'equallyRate',
                align: 'center',
                width: 100,
                fixed: 'left',
                sorter: () => {},
            },
            
        ]
    }
 
     // 默认初始展示列
     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();
 