preview.html 3.6 KB

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