You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

IndexTeach.js 5.0 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2021-12-08 12:19
  5. * 描 述:排考2021新
  6. */
  7. var selectedRow;
  8. var refreshGirdData;
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var datebegin = '';
  12. var dateend = '';
  13. var page = {
  14. init: function () {
  15. page.initGird();
  16. page.bind();
  17. },
  18. bind: function () {
  19. $('.datetime').each(function () {
  20. $(this).lrdate({
  21. dfdata: [
  22. { name: '清空', begin: function () { return '' }, end: function () { return '' } },
  23. { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  24. { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  25. { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  26. { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  27. ],
  28. // 月
  29. mShow: false,
  30. premShow: false,
  31. // 季度
  32. jShow: false,
  33. prejShow: false,
  34. // 年
  35. ysShow: false,
  36. yxShow: false,
  37. preyShow: false,
  38. yShow: false,
  39. // 默认
  40. dfvalue: '0',
  41. selectfn: function (begin, end) {
  42. datebegin = begin;
  43. dateend = end;
  44. }
  45. });
  46. });
  47. // 查询
  48. $('#btn_Search').on('click', function () {
  49. page.search({ AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet()});
  50. });
  51. // 刷新
  52. $('#lr_refresh').on('click', function () {
  53. location.reload();
  54. });
  55. $('#AcademicYearNo').lrselect({
  56. placeholder: "学年",
  57. allowSearch: false,
  58. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
  59. value: 'value',
  60. text: 'text'
  61. });
  62. //学期
  63. $('#Semester').lrselect({
  64. placeholder: "学期",
  65. allowSearch: false,
  66. url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData',
  67. value: 'value',
  68. text: 'text'
  69. });
  70. //课程
  71. $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder:'请选择课程' });
  72. },
  73. initGird: function () {
  74. $('#gridtable').lrAuthorizeJfGrid({
  75. url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/GetPageList',
  76. headData: [
  77. {
  78. label: '考试日期', name: 'ExamDate', width: 200, align: "left", formatter: function (v) {
  79. return learun.formatDate(v, "yyyy-MM-dd");
  80. }
  81. },
  82. { label: '考试时间', name: 'ExamTime', width: 200, align: "left" },
  83. { label: '课程编号', name: 'LessonNo', width: 200, align: "left" },
  84. { label: '课程名称', name: 'LessonName', width: 200, align: "left" },
  85. { label: '教师编号', name: 'EmpNo', width: 200, align: "left" },
  86. { label: '教师姓名', name: 'EmpName', width: 200, align: "left" },
  87. { label: '教室编号', name: 'ClassRoomNo', width: 200, align: "left" },
  88. { label: '教室名称', name: 'ClassRoomName', width: 200, align: "left" }
  89. ],
  90. mainId: 'AETId',
  91. sidx: 'ExamDate asc,ExamTime asc,LessonNo asc,ClassRoomNo asc',
  92. isPage: true
  93. });
  94. page.search();
  95. },
  96. search: function (param) {
  97. param = param || {};
  98. param.StartTime = datebegin;
  99. param.EndTime = dateend;
  100. var loginInfo = learun.clientdata.get(['userinfo']);
  101. param.EmpNo = loginInfo.account;
  102. console.log(param.EmpNo,111);
  103. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  104. }
  105. };
  106. refreshGirdData = function () {
  107. $('#gridtable').jfGridSet('reload');
  108. };
  109. page.init();
  110. }