preview.html 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  5. <link rel="stylesheet" type="text/css" href="css/style.css" charset="UTF-8" />
  6. <link rel="stylesheet" href="css/mBoxNotice.css" charset="UTF-8" />
  7. <link rel="stylesheet" href="css/mBoxTooltip.css" charset="UTF-8" />
  8. <script src="../o2_core/o2.min.js"></script>
  9. <script src="../o2_lib/Decimal.js"></script>
  10. <script src="js/base.min.js"></script>
  11. <title>FORM PREVIEW</title>
  12. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  13. <script>
  14. layout.addReady(function(){
  15. (function(layout){
  16. MWF.getJSON("res/config/config.json", function(config){
  17. layout.config = config;
  18. if (layout.config.app_protocol=="auto"){
  19. layout.config.app_protocol = window.location.protocol;
  20. }
  21. //MWF.defaultPath = "../x_desktop"+MWF.defaultPath;
  22. MWF.loadLP(MWF.language);
  23. MWF.require("MWF.xDesktop.Layout", function(){
  24. //MWF.require("MWF.xDesktop.Authentication", null, false);
  25. (function(){
  26. layout.load = function(){
  27. // if (this.isAuthentication()){
  28. var preview = window.frameElement.retrieve("preview");
  29. layout.desktop = window.frameElement.ownerDocument.window.layout.desktop;
  30. MWF.xDesktop.requireApp("process.Xform", "Form", function(){
  31. layout.appForm = new MWF.APPForm($("layout"), preview.data);
  32. layout.appForm.app = {"content": document.body, "fireEvent": function(){}};
  33. MWF.getJSON("res/preview/work.json", function(data){
  34. layout.appForm.businessData = {
  35. "data": data.data,
  36. "taskList": data.taskList,
  37. "work": data.work,
  38. "workCompleted": data.workCompleted,
  39. "control": data.control,
  40. "activity": data.activity,
  41. "task": data.taskList[0],
  42. "workLogList": data.workLogList,
  43. "recordList": data.recordList,
  44. "attachmentList": data.attachmentList,
  45. "status": {
  46. //"readonly": (this.options.readonly) ? true : false
  47. "readonly": this.readonly
  48. }
  49. };
  50. layout.appForm.load();
  51. });
  52. });
  53. // }
  54. };
  55. layout.load();
  56. })();
  57. });
  58. }.bind(this));
  59. })(layout);
  60. });
  61. </script>
  62. </head>
  63. <body style="overflow: auto">
  64. <div id="layout" style="overflow: auto">
  65. <div id="layout_top">
  66. </div>
  67. <div id="layout_form">
  68. </div>
  69. </div>
  70. </body>
  71. </html>