zentaomax.ui.js 1015 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. * 合并单元格。
  3. * cell span in the column.
  4. *
  5. * @param object cell
  6. * @access public
  7. * @return object
  8. */
  9. window.getCellSpan = function(cell)
  10. {
  11. if(!['buildName', 'productName', 'executionName'].includes(cell.col.name) && cell.row.data.trowspan)
  12. {
  13. return {rowSpan: cell.row.data.trowspan};
  14. }
  15. if(['productName'].includes(cell.col.name) && cell.row.data.prowspan)
  16. {
  17. return {rowSpan: cell.row.data.prowspan};
  18. }
  19. }
  20. window.onRenderCell = function(result, {row, col})
  21. {
  22. if(result && col.name == 'name' && row.data.joint == 1)
  23. {
  24. result.push({html: "<i class='icon icon-code-fork'></i>"});
  25. }
  26. if(result && col.name == 'buildName' && multipleSprints[row.data.execution] == undefined)
  27. {
  28. if(result[0].props) result[0].props['data-app'] = 'project';
  29. }
  30. else if(col.name == 'status' && result)
  31. {
  32. result[0] = {html: `<span class='status-${row.data.rawStatus}'>` + row.data.status + "</span>"};
  33. }
  34. return result;
  35. }