StudentScoreReport.cshtml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Web.Controls;
  3. @{
  4. ViewBag.Title = "StudentScoreReport";
  5. string LoginUserID = ViewBag.UserID;
  6. var DataRange = ViewBag.DataRange;
  7. }
  8. @section scripts{
  9. <script type="text/javascript">
  10. var collegeID, years, grademajorID, classmajorID, coursematerialID, courseTypeID,
  11. standardID, educationID, learningformID, learnSystem, starttermBegin, starttermEnd,
  12. schoolYearID, examsCategoryID, LoginID_RAP, userName, className, Attribute, Value, Condition, UserIDs;
  13. collegeID = "";
  14. years = "";
  15. grademajorID = "";
  16. classmajorID = "";
  17. coursematerialID = "";
  18. courseTypeID = "";
  19. schoolYearID = "";
  20. examsCategoryID = "";
  21. LoginID_RAP = "";
  22. userName = "";
  23. className = "";
  24. Attribute = "";
  25. Value = "";
  26. Condition = "";
  27. var str = decodeURI(location.href); //取得整个地址栏
  28. var num = str.indexOf("?");
  29. //alert(num);
  30. if (num != -1) {
  31. str = str.substr(num + 1); //取得所有参数
  32. //各个参数放到数组里
  33. var arr = str.split("&");
  34. for (var i = 0; i < arr.length; i++) {
  35. switch (arr[i].split("=")[0]) {
  36. case "UserIDs":
  37. UserIDs = arr[i].split("=")[1];
  38. break;
  39. case "CollegeID":
  40. collegeID = arr[i].split("=")[1];
  41. break;
  42. case "Years":
  43. years = arr[i].split("=")[1];
  44. break;
  45. case "GrademajorID":
  46. grademajorID = arr[i].split("=")[1];
  47. break;
  48. case "ClassmajorID":
  49. classmajorID = arr[i].split("=")[1];
  50. break;
  51. case "CoursematerialID":
  52. coursematerialID = arr[i].split("=")[1];
  53. break;
  54. case "CourseTypeID":
  55. courseTypeID = arr[i].split("=")[1];
  56. break;
  57. case "SchoolYearID":
  58. schoolYearID = arr[i].split("=")[1];
  59. break;
  60. case "ExamsCategoryID":
  61. examsCategoryID = arr[i].split("=")[1];
  62. break;
  63. case "LoginID":
  64. LoginID_RAP = arr[i].split("=")[1];
  65. break;
  66. case "UserName":
  67. userName = arr[i].split("=")[1];
  68. break;
  69. case "ClassName":
  70. className = arr[i].split("=")[1];
  71. break;
  72. case "Attribute":
  73. Attribute = arr[i].split("Attribute=")[1];
  74. break;
  75. case "Condition":
  76. Condition = arr[i].split("Condition=")[1];
  77. break;
  78. case "Value":
  79. Value = $.trim(arr[i].split("=")[1]);
  80. break;
  81. case "StandardID":
  82. standardID = arr[i].split("=")[1];
  83. break;
  84. case "EducationID":
  85. educationID = arr[i].split("=")[1];
  86. break;
  87. case "LearningformID":
  88. learningformID = arr[i].split("=")[1];
  89. break;
  90. case "LearnSystem":
  91. learnSystem = arr[i].split("=")[1];
  92. break;
  93. case "StarttermBegin":
  94. starttermBegin = arr[i].split("=")[1];
  95. break;
  96. case "StarttermEnd":
  97. starttermEnd = arr[i].split("=")[1];
  98. break;
  99. }
  100. }
  101. }
  102. collegeID = collegeID == "" || collegeID == null ? "" : collegeID;
  103. years = years == "-1" || years == "" ? "" : years;
  104. grademajorID = grademajorID == "" || grademajorID == "-1" ? "" : grademajorID;
  105. classmajorID = classmajorID == "" || classmajorID == "-1" ? "" : classmajorID;
  106. coursematerialID = coursematerialID == "" || coursematerialID=="-1" ? "" : coursematerialID;
  107. courseTypeID = courseTypeID == "-1" || courseTypeID == "" ? "" : courseTypeID;
  108. schoolYearID = schoolYearID == "-1" || schoolYearID == "" ? "" : schoolYearID;
  109. examsCategoryID = examsCategoryID == "-1" || examsCategoryID == "" ? "" : examsCategoryID;
  110. standardID = standardID == "-1" || standardID == "" ? "" : standardID;
  111. educationID = educationID == "-1" || educationID == "" ? "" : educationID;
  112. learningformID = learningformID == "-1" || learningformID == "" ? "" : learningformID;
  113. learnSystem = learnSystem == "-1" || learnSystem == "" ? "" : learnSystem;
  114. starttermBegin = starttermBegin == "-1" || starttermBegin == "" ? "" : starttermBegin;
  115. starttermEnd = starttermEnd == "-1" || starttermEnd == "" ? "" : starttermEnd;
  116. if (Attribute == "LoginID") {
  117. LoginID_RAP = Value == "" || null ? "" : Value;
  118. userName = userName == "" || null ? "" : Value;
  119. className = className == "" || null ? "" : Value;
  120. }
  121. if (Attribute == "UserName") {
  122. LoginID_RAP = LoginID_RAP == "" || null ? "" : Value;
  123. userName = Value == "" || null ? "" : Value;
  124. className = className == "" || null ? "" : Value;
  125. }
  126. if (Attribute == "ClassName") {
  127. LoginID_RAP = LoginID_RAP == "" || null ? "" : Value;
  128. userName = userName == "" || null ? "" : Value;
  129. className = Value == "" || null ? "" : Value;
  130. }
  131. Condition = Condition == "" || null ? "" : Condition;
  132. //alert(aa);
  133. var str = "";
  134. //学籍卡报表如果没有配置高校的特定版本,就用通用的StudentCardView
  135. var ReportName = $(CMS_SystemConfig.GetConfig()).find("configuration>reportServer>customReportName[name='StudentScoreView']").attr("customName");
  136. ReportName = ReportName == "" || ReportName == null ? "StudentScoreView" : ReportName;
  137. if (UserIDs == "") {
  138. top.ReportParameter = {
  139. CollegeID: collegeID,
  140. Years: years,
  141. ClassmajorID: classmajorID,
  142. SchoolyearID: schoolYearID,
  143. StandardID: standardID,
  144. EducationID: educationID,
  145. LearningformID: learningformID,
  146. LearnSystem: learnSystem,
  147. CoursematerialID: coursematerialID,
  148. CourseTypeID: courseTypeID,
  149. ExamsCategoryID: examsCategoryID,
  150. StarttermBegin: starttermBegin,
  151. StarttermEnd: starttermEnd,
  152. Condition: Condition,
  153. LoginID: LoginID_RAP,
  154. UserName: userName,
  155. ClassName: className,
  156. GrademajorID: null,
  157. UserIDs: null,
  158. LoginUserID: '@LoginUserID',
  159. DataRange: @DataRange
  160. };
  161. }
  162. else {
  163. top.ReportParameter = {
  164. CollegeID: null,
  165. Years: null,
  166. ClassmajorID: null,
  167. SchoolyearID: null,
  168. StandardID: null,
  169. EducationID: null,
  170. LearningformID: null,
  171. LearnSystem: null,
  172. CoursematerialID: null,
  173. CourseTypeID: null,
  174. ExamsCategoryID: null,
  175. StarttermBegin: null,
  176. StarttermEnd: null,
  177. Condition: null,
  178. LoginID: null,
  179. UserName: null,
  180. ClassName: null,
  181. GrademajorID: null,
  182. UserIDs: UserIDs,
  183. LoginUserID: '@LoginUserID',
  184. DataRange: @DataRange
  185. };
  186. }
  187. $("#reportContent").attr("src", CMS_SystemConfig.VirtualDirectoryPath + CMS_SystemConfig.ScriptReportPagePath + "?ReportFolder=%2fEducationResult%2f" + ReportName);
  188. // Report();
  189. // function Report() {
  190. //
  191. // }
  192. </script>
  193. }
  194. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  195. <div class="search_list">
  196. <iframe id="reportContent" frameborder="0" scrolling="no" style="width: 99%; height: 95%; position: absolute;
  197. left: 5px;"></iframe>
  198. </div>
  199. </div>