browse.ui.js 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * 对部分列进行重定义。
  3. * Redefine the partial column.
  4. *
  5. * @param array result
  6. * @param array info
  7. * @access public
  8. * @return string|array
  9. */
  10. window.renderCell = function(result, info)
  11. {
  12. const charter = info.row.data;
  13. if(info.col.name == 'reviewStatusAB')
  14. {
  15. result[1].attrs['title'] = reviewStatusList[charter.reviewStatus] !== undefined ? reviewStatusList[charter.reviewStatus] : '';
  16. if(!charter.approval)
  17. {
  18. if(result[0] && result[0].props && result[0].props['href']) delete result[0].props['href'];
  19. if(result[0] && result[0].props && result[0].props['data-toggle']) delete result[0].props['data-toggle'];
  20. result[0].type = 'span';
  21. }
  22. }
  23. if(info.col.name == 'level')
  24. {
  25. result[0].props['text'] = info.row.data.levelList[info.row.data.level];
  26. }
  27. if(info.col.name == 'actions' && info.row.data.prevCanceledStatus == 'wait')
  28. {
  29. result[0].props['items'].forEach((infoName) => {if(infoName.icon == 'magic') infoName.hint = activateHint});
  30. }
  31. return result;
  32. }