FormPreview.cshtml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. @{
  2. ViewBag.Title = "表单预览";
  3. Layout = "~/Views/Shared/_FlowIndex.cshtml";
  4. }
  5. <script>
  6. var keyValue = request('keyValue');
  7. $(function () {
  8. $('#formAreas').css("min-height", $(window).height() - 82);
  9. $('#formAreas').css("width", $(window).width() * 0.9);
  10. $('#previewpage').css("height", $(window).height()-20);
  11. $.SetForm({
  12. url: "../../FlowManage/FormDesign/GetFormJson",
  13. param: { keyValue: keyValue },
  14. success: function (data) {
  15. $('#frmpreview').frmPreview({
  16. tablecotent: data.FrmContent
  17. });
  18. $('#frmname').html(data.FrmName);
  19. }
  20. });
  21. //resize重设(表格、树形)宽高
  22. $(window).resize(function (e) {
  23. window.setTimeout(function () {
  24. $('#previewpage').css("height", e.currentTarget.innerHeight-20);
  25. $('#formAreas').css("min-height", e.currentTarget.innerHeight - 82).css("width", e.currentTarget.innerWidth * 0.9);
  26. }, 200);
  27. e.stopPropagation();
  28. });
  29. });
  30. </script>
  31. <div id="previewpage" style="overflow-y:auto;background-color:#fff;margin:10px;border:1px solid #ccc;">
  32. <div id="formAreas" style="margin: 30px auto;max-width: 1000px;">
  33. <div style="border-bottom:1px solid #ccc;text-align:center;"><span id="frmname"></span></div>
  34. <div class="app_layout app_preview" id="frmpreview"></div>
  35. </div>
  36. </div>