Index.cshtml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Web.Controls;
  3. @{
  4. ViewBag.Title = "Index";
  5. }
  6. @section scripts{
  7. <script type="text/javascript">
  8. $(function () {
  9. // var iframe = document.getElementById("reportContent");
  10. // if (iframe) {
  11. // var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
  12. // if (iframeWin.document.body) {
  13. // iframe.height = (iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight)-200;
  14. // }
  15. // }
  16. $("#reportContent").width(document.getElementById("search_list").offsetWidth);
  17. $("#divHead").width($("#reportContent").width());
  18. $("#reportContent").height(document.getElementById("search_list").offsetHeight - document.getElementById("table").offsetHeight );
  19. })
  20. Report();
  21. function Report() {
  22. var InSchoolStatusID = document.getElementById("selReport").value;
  23. if (CMS_SystemConfig.ReportType == 1) {
  24. if (InSchoolStatusID == 1) {
  25. $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fStudentManage%2fStudentCountView&InSchoolStatusID_RAP=1"); //&rc:toolbar=false
  26. }
  27. else if (InSchoolStatusID == 2) {
  28. $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fStudentManage%2fStudentCountView&InSchoolStatusID_RAP=2"); //&rc:toolbar=false
  29. }
  30. else {
  31. $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fStudentManage%2fStudentCountView&InSchoolStatusID_RAP=0"); //&rc:toolbar=false
  32. }
  33. }
  34. if (CMS_SystemConfig.ReportType == 2) {
  35. var fileUrl = CMS_SystemConfig.VirtualDirectoryPath + "/StudentStatistics/StudentCountPDF?InSchoolStatusID=" + InSchoolStatusID;
  36. $("#reportContent").attr("src", CMS_SystemConfig.VirtualDirectoryPath + "/Scripts/pdf.js/web/viewer.html?file=" + encodeURIComponent(fileUrl));
  37. }
  38. }
  39. </script>
  40. }
  41. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;"
  42. id="divPanel">
  43. <div class="search_list" id="search_list" style="height: 99%">
  44. <table id="table"><tr><td>在校情况:</td><td><select id="selReport" onchange="Report()">
  45. <option value="0">全部</option>
  46. <option value="1" selected="selected">在校</option>
  47. <option value="2">非在校</option>
  48. </select></td></tr></table>
  49. @*<div style="width: 99%; text-align: center; background-color:#C6E4FD" id="divHead">
  50. <h2>
  51. @ViewBag.SchoolYearID</h2>
  52. </div>*@
  53. <iframe id="reportContent" frameborder="0" scrolling="no" style="width: 99%; height: 100%; position: absolute;
  54. "></iframe>
  55. </div>
  56. </div>