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.
 
 
 
 
 
 

123 lines
4.9 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 数字化智慧校园
  2. * Copyright (c) 2013-2020 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2022-08-24 14:38
  5. * 描 述:评教评学
  6. */
  7. var refreshGirdData;
  8. var bootstrap = function ($, learun) {
  9. "use strict";
  10. var page = {
  11. init: function () {
  12. page.initGird();
  13. page.bind();
  14. },
  15. bind: function () {
  16. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  17. page.search(queryJson);
  18. }, 220, 400);
  19. $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' });
  20. //学年
  21. $('#AcademicYearNo').lrselect({
  22. placeholder: "请选择学年",
  23. allowSearch: true,
  24. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
  25. value: 'value',
  26. text: 'text'
  27. });
  28. //学期
  29. $('#Semester').lrselect({
  30. placeholder: "请选择学期",
  31. allowSearch: true,
  32. url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
  33. value: 'value',
  34. text: 'text'
  35. });
  36. // 刷新
  37. $('#lr_refresh').on('click', function () {
  38. location.reload();
  39. });
  40. // 新增
  41. $('#lr_add').on('click', function () {
  42. learun.layerForm({
  43. id: 'form',
  44. title: '新增',
  45. url: top.$.rootUrl + '/PersonnelManagement/EvaluateTeachLearn/Form',
  46. width: 600,
  47. height: 400,
  48. callBack: function (id) {
  49. return top[id].acceptClick(refreshGirdData);
  50. }
  51. });
  52. });
  53. // 编辑
  54. $('#lr_edit').on('click', function () {
  55. var keyValue = $('#gridtable').jfGridValue('Id');
  56. if (learun.checkrow(keyValue)) {
  57. learun.layerForm({
  58. id: 'form',
  59. title: '编辑',
  60. url: top.$.rootUrl + '/PersonnelManagement/EvaluateTeachLearn/Form?keyValue=' + keyValue,
  61. width: 600,
  62. height: 400,
  63. callBack: function (id) {
  64. return top[id].acceptClick(refreshGirdData);
  65. }
  66. });
  67. }
  68. });
  69. // 打印
  70. $('#lr_print').on('click', function () {
  71. $('#gridtable').jqprintTable();
  72. });
  73. // 删除
  74. $('#lr_delete').on('click', function () {
  75. var keyValue = $('#gridtable').jfGridValue('Id');
  76. if (learun.checkrow(keyValue)) {
  77. learun.layerConfirm('是否确认删除该项!', function (res) {
  78. if (res) {
  79. learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/EvaluateTeachLearn/DeleteForm', { keyValue: keyValue}, function () {
  80. refreshGirdData();
  81. });
  82. }
  83. });
  84. }
  85. });
  86. },
  87. // 初始化列表
  88. initGird: function () {
  89. $('#gridtable').lrAuthorizeJfGrid({
  90. url: top.$.rootUrl + '/PersonnelManagement/EvaluateTeachLearn/GetPageList',
  91. headData: [
  92. { label: "教师", name: "EmpNo", width: 100, align: "left",
  93. formatterAsync: function (callback, value, row, op,$cell) {
  94. learun.clientdata.getAsync('custmerData', {
  95. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
  96. key: value,
  97. keyId: 'empno',
  98. callback: function (_data) {
  99. callback(_data['empname']);
  100. }
  101. });
  102. }},
  103. { label: "学年", name: "AcademicYearNo", width: 100, align: "left"},
  104. { label: "学期", name: "Semester", width: 100, align: "left"},
  105. { label: "满意率", name: "SatisfacteRate", width: 100, align: "left"},
  106. { label: "备注", name: "Remark", width: 100, align: "left"},
  107. ],
  108. mainId:'Id',
  109. isPage: true
  110. });
  111. page.search();
  112. },
  113. search: function (param) {
  114. param = param || {};
  115. $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
  116. }
  117. };
  118. refreshGirdData = function () {
  119. $('#gridtable').jfGridSet('reload');
  120. };
  121. page.init();
  122. }