OOLog.js 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. MWF.xDesktop.requireApp("process.Xform", "Log", null, false);
  2. MWF.xApplication.process.Xform.OOLog = MWF.APPOOLog = new Class({
  3. Extends: MWF.APPLog,
  4. textStyles:{
  5. "default": `<div class="logItem">
  6. <div style="flex: 0 0 4em">
  7. <div class="logItemIcon" style="background-image: url('/x_organization_assemble_control/jaxrs/person/{person}/icon');"></div>
  8. </div>
  9. <div style="flex: 1; display: flex; justify-content: space-between; align-items: center;">
  10. <div>
  11. <div><font style='color:#ff5400;'>{person}</font>({department})选择<font style='color: var(--oo-color-main)'>【{route}】</font></div>
  12. <div>处理意见:<font>{opinion}</font></div>
  13. </div>
  14. <div><b>{activity}</b></div>
  15. </div>
  16. <div style="flex: 0 0 11.85em; display: block">{img}</div>
  17. <div>{time}</div>
  18. </div>`
  19. },
  20. getRecordTaskLineTextStyle: function(){
  21. return this.textStyles.default;
  22. },
  23. loadRecordTaskLine_default_currentTask: function (task, textNode, iconNode) {
  24. var person = (task.person) ? task.person.substring(0, task.person.indexOf("@")) : "";
  25. if (task.properties.empowerFromIdentity) {
  26. var ep = o2.name.cn(task.properties.empowerFromIdentity);
  27. person = person + " " + MWF.xApplication.process.Xform.LP.replace + " " + ep;
  28. }
  29. var html = this.getRecordTaskLineTextStyle();
  30. html = html.replace(/{person}/g, person)
  31. .replace(/{department}/g, o2.name.cn(task.unit))
  32. .replace(/{activity}/g, task.fromActivityName)
  33. .replace(/{route}/g, MWF.xApplication.process.Xform.LP.processing+' ...')
  34. .replace(/{img}/g, '')
  35. .replace(/{time}/g, task.properties.startTime)
  36. textNode.set("html", html);
  37. if (iconNode) iconNode.setStyle("background-image", "url(" + "../x_component_process_Xform/$Form/" + this.form.options.style + "/icon/rightRed.png)");
  38. }
  39. });