zentaomax.ui.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /**
  2. * 产品列合并单元格。
  3. * Merge cell in the product 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.resetFooterPadding = function()
  21. {
  22. return;
  23. }
  24. /**
  25. * 产品列显示展开收起的图标。
  26. * Display show icon in the product column.
  27. *
  28. * @param object result
  29. * @param object info
  30. * @access public
  31. * @return object
  32. */
  33. window.onRenderCell = function(result, {row, col})
  34. {
  35. if(result && col.name == 'name' && row.data.joint == 1)
  36. {
  37. result.push({html: "<i class='icon icon-code-fork'></i>"});
  38. }
  39. if(result && col.name == 'taskID' && row.data.hidden)
  40. {
  41. result.push({outer: false, style: {alignItems: 'center', justifyContent: 'start'}})
  42. }
  43. if(col.name == 'status' && result)
  44. {
  45. result[0] = {html: `<span class='status-${row.data.rawStatus}'>` + row.data.status + "</span>"};
  46. }
  47. return result;
  48. }