天天看點

前端映射表

對象形式

//統計參數映射中文表
    keyParms:any ={
        memberCard: '會員卡',
        prescription_status: '會員卡類型',
        member_card_status: '會員卡類狀态',
        onceList: '次卡',
        loss_time: '流失時間',
        birthday: '按生日',
        petSpecies: '按品種',
        petAge: '年齡',
        sex: '客戶性别',
        balance: '儲值',
        lastConsumption: '消費記錄',
    };
      

取值:

let tempName = this.keyParms[type];
this._commonService.sendStatistics('篩選會員',tempName); //統計函數
      

數組形式:

//統計參數映射中文表
   
    keyStr: any =[
        {
            key: 'memberCard',
            name: '會員卡',
        },
        {
            key: 'prescription_status',
            name: '會員卡類型',
        },
        {
            key: 'member_card_status',
            name: '會員卡類狀态',
        },
        {
            key: 'onceList',
            name: '次卡',
        },
        {
            key: 'loss_time',
            name: '流失時間',
        },
        {
            key: 'birthday',
            name: '按生日',
        },
        {
            key: 'petSpecies',
            name: '按品種',
        },
        {
            key: 'petAge',
            name: '年齡',
        },
        {
            key: 'sex',
            name: '客戶性别',
        },
        {
            key: 'balance',
            name: '儲值',
        },
        {
            key: 'lastConsumption',
            name: '消費記錄',
        },
    ]