0

我希望每个请求类型都必须根据 CSS 类名以不同的颜色显示。

代码:

mcmShowTaskMessageBox: function(task, menu) {       
    var message = '<table class="eventTipBig">';
    var requestType = task.get('RequestType');      
    var alert = task.get('Alerts');         
    if(requestType === 'OA VIP') {          
        menu.tdCls = 'OAVIP';       
    } else if(requestType === 'JL VIP') {           
        menu.tdCls = 'JLVIP';
    } else if(requestType === 'BA VIP') {           
        menu.tdCls = 'BAVIP';
    } else if(requestType === 'IB VIP') {           
        menu.tdCls = 'IBVIP';       
    } else if(requestType === 'QF VIP') {           
        menu.tdCls = 'QFVIP';       
    }       
    message += 
    '<tr>' + 
        '<td class="icon-task">Name</td>' + 
        '<td class="value">' + task.get('Name') + '</td>' + 
    '</tr>' + 
    '<tr>' + 
        '<td class="icon-task">Ranking</td>' + 
        '<td class="value" style="color:red;">' + PriorityGreet + '</td>' + 
    '</tr>' +
    '<tr>' + 
        '<td class="icon-task">Request Type</td>' + 
        '<td class="value">' + requestType + '</td>' +
    '</tr>' + 
    '<tr>' + 
        '<td class="icon-task">Agent</td>' + 
        '<td class="value">' + task.get('AgentName') + '</td>' +
    '</tr>' + 
    '<tr>' + 
        '<td class="icon-task">Service Type</td>' + 
        '<td class="value">' + task.get('TaskType') + '</td>' +
    '</tr>' + 
    '<tr>' + 
        '<td class="icon-task">Task Status</td>' + 
        '<td class="value">' + task.get('TaskStatus') + '</td>' +
    '</tr>' + 
    '<tr>' + 
        '<td class="icon-task">Task Category</td>' + 
        '<td class="value">' + task.get('TaskCategory') + '</td>' +
    '</tr>'+
    '<tr>' + 
        '<td class="icon-task">Notes</td>' + 
        '<td class="value">' + task.get('Notes') + '</tr>' +
    '</tr>' + 
    '</table>';         

   App.mcmShowMessageBox({          
       id: 'TaskGrid' + task.get('Id'),             
       title: 'Task Information',           
       message: message,            
       editOption: { task: task, menu: menu }       
    });         
//modification ended    
}
4

0 回答 0