vue+element 表格渲染数据,对数据进行处理
<el-table
:data="tableData"
:cell-style="cellStyle"
stripe
border
style="width: 100%;margin-left:8px;margin-right:18px">
cellStyle(row,column,rowIndex,columnIndex){//根据报警级别显示颜色
// console.log(row);
// console.log(row.column);
if(row.column.label==="生产状态"&& row.row.PCKS==="进行中"){
return 'color:aquamarine'
}else if(row.column.label==="生产状态"&& row.row.PCKS==="待进行" ){
return 'color:#ffcb0f'
}
}