/** * 标题列显示额外的内容。 * Display extra content in the title column. * * @param object result * @param object info * @access public * @return object */ window.onRenderCell = function(result, {col, row}) { if(result && col.name == 'name') { const data = row.data; const today = zui.formatDate(new Date(), 'yyyy-MM-dd'); if(data.type == 'stage') { result.shift(); // 移除带链接的阶段名称 let executionName = `${stageLang} `; executionName += data.name; executionName += (!['done', 'closed', 'suspended'].includes(data.status) && today > data.end) ? `${delayed}` : ''; result.push({html: executionName}); } else { let taskPri = `${data.pri} `; result.unshift({html: taskPri}); if(typeof data.delay != 'undefined' && data.delay > 0) { result[result.length] = { html: '' + delayWarning.replace('%s', data.delay) + '', className: 'flex items-end', style: { flexDirection: "column" } }; } } } if(result && col.name == 'PM') { if(row.data.type == 'stage') { result.shift(); // 移除带链接的阶段名称 result.push({html: '' + row.data.PM + ''}); } } return result; }