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.

MyClass.js 7.3 KiB

4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. var refreshGirdData;
  2. var bootstrap = function ($, learun) {
  3. "use strict";
  4. var page = {
  5. init: function () {
  6. page.initGird();
  7. page.bind();
  8. },
  9. bind: function () {
  10. // 初始化左侧树形数据
  11. $('#dataTree').lrtree({
  12. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetTree',
  13. nodeClick: function (item) {
  14. page.search({ ClassNo: item.value });
  15. }
  16. });
  17. // 刷新
  18. $('#lr_refresh').on('click', function () {
  19. location.reload();
  20. });
  21. },
  22. // 初始化列表
  23. initGird: function () {
  24. $('#gridtable').lrAuthorizeJfGrid({
  25. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList',
  26. headData: [
  27. { label: "学号", name: "StuNo", width: 100, align: "left" },
  28. { label: "学籍号", name: "StuCode", width: 100, align: "left" },
  29. { label: "姓名", name: "StuName", width: 100, align: "left" },
  30. {
  31. label: "性别", name: "GenderNo", width: 80, align: "left",
  32. formatter: function (cellvalue) {
  33. return cellvalue == true ? "男" : "女";
  34. }
  35. },
  36. { label: "出生日期", name: "Birthday", width: 100, align: "left" },
  37. { label: "身份证号", name: "IdentityCardNo", width: 100, align: "left" },
  38. {
  39. label: "民族", name: "NationalityNo", width: 100, align: "left",
  40. formatterAsync: function (callback, value, row, op, $cell) {
  41. learun.clientdata.getAsync('dataItem', {
  42. key: value,
  43. code: 'National',
  44. callback: function (_data) {
  45. callback(_data.text);
  46. }
  47. });
  48. }
  49. },
  50. {
  51. label: "系所", name: "DeptNo", width: 100, align: "left",
  52. formatterAsync: function (callback, value, row, op, $cell) {
  53. learun.clientdata.getAsync('custmerData', {
  54. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  55. key: value,
  56. keyId: 'deptno',
  57. callback: function (_data) {
  58. callback(_data['deptname']);
  59. }
  60. });
  61. }
  62. },
  63. {
  64. label: "专业", name: "MajorNo", width: 100, align: "left",
  65. formatterAsync: function (callback, value, row, op, $cell) {
  66. learun.clientdata.getAsync('custmerData', {
  67. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  68. key: value,
  69. keyId: 'majorno',
  70. callback: function (_data) {
  71. callback(_data['majorname']);
  72. }
  73. });
  74. }
  75. },
  76. {
  77. label: "班级", name: "ClassNo", width: 100, align: "left",
  78. formatterAsync: function (callback, value, row, op, $cell) {
  79. learun.clientdata.getAsync('custmerData', {
  80. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  81. key: value,
  82. keyId: 'classno',
  83. callback: function (_data) {
  84. callback(_data['classname']);
  85. }
  86. });
  87. }
  88. },
  89. { label: "年级", name: "Grade", width: 100, align: "left" },
  90. {
  91. label: "学制", name: "EduSystem", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  92. learun.clientdata.getAsync('dataItem', {
  93. key: value,
  94. code: 'EduSystem',
  95. callback: function (_data) {
  96. callback(_data.text);
  97. }
  98. });
  99. }
  100. },
  101. {
  102. label: "学习形式", name: "StudyModality", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  103. learun.clientdata.getAsync('dataItem', {
  104. key: value,
  105. code: 'StudyModality',
  106. callback: function (_data) {
  107. callback(_data.text);
  108. }
  109. });
  110. }
  111. },
  112. { label: "报到日期", name: "RegisterDate", width: 100, align: "left" },
  113. { label: "入学年月", name: "EntranceDate", width: 100, align: "left" },
  114. {
  115. label: "异动状态", name: "AbmormityMoveMark", width: 80, align: "center",
  116. formatter: function (cellvalue) {
  117. return cellvalue == "1" ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
  118. }
  119. },
  120. {
  121. label: "审核状态", name: "CheckMark", width: 80, align: "center",
  122. formatter: function (cellvalue) {
  123. return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>";
  124. }
  125. }
  126. ],
  127. mainId: 'StuId',
  128. isPage: true,
  129. isMultiselect: true,
  130. //onSelectRow: function (rowdata) {
  131. // if (rowdata.CheckMark == "1") {
  132. // $("#check").hide();
  133. // $("#uncheck").show();
  134. // $("#lr_edit").hide();
  135. // $("#lr_delete").hide();
  136. // } else {
  137. // $("#uncheck").hide();
  138. // $("#check").show();
  139. // $("#lr_edit").show();
  140. // $("#lr_delete").show();
  141. // }
  142. //}
  143. });
  144. //page.search();
  145. },
  146. search: function (param) {
  147. param = param || {};
  148. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  149. }
  150. };
  151. refreshGirdData = function () {
  152. page.search();
  153. };
  154. page.init();
  155. }