window.renderCell = function(result, {col, row}) { if(col.name == 'system' && row.data.releases) { result[0] = {className: 'overflow-hidden', html: result[0]}; result[result.length] = {html:'' + integratedLabel + '', className:'flex items-end', style:{flexDirection:"column"}}; } if(col.name == 'name') { if(row.data.marker == 1) { result[result.length] = {html: ""}; return result; } } if(col.name == 'build') { result = []; if(!row.data.build.name) return result; let branchLabel = showBranch && typeof row.data.build.branchName != 'undefined' ? "" + row.data.build.branchName + ' ' : ''; if(isFromDoc || isFromAI) { result.push({html: branchLabel + row.data.build.name}); } else { result.push({html: branchLabel + "" + row.data.build.name + ''}); } return result; } if(col.name == 'project') { result = []; if(!row.data.projectName) return result; result.push({html: `${row.data.projectName}`}); return result; } return result; } /** * 合并单元格。 * cell span in the column. * * @param object cell * @access public * @return object */ window.getCellSpan = function(cell) { if(['id', 'branchName', 'name', 'branch', 'status', 'date', 'desc', 'releasedDate', 'actions', 'system'].includes(cell.col.name) && cell.row.data.rowspan) { return {rowSpan: cell.row.data.rowspan}; } } window.firstRendered = false; window.toggleCheckRows = function(idList) { if(!idList?.length || firstRendered) return; firstRendered = true; const dtable = zui.DTable.query($('#releases')); dtable.$.toggleCheckRows(idList.split(','), true); }