EvaluationStudent.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. var url = CMS_SystemConfig.VirtualDirectoryPath + "/EvaluationStudent/Edit";
  2. var mnu = "";
  3. //加载
  4. $(function () {
  5. mnu = $.SystemGeneral.getUrlParam("MNU");
  6. })
  7. //刷新
  8. function reload() {
  9. $("#dgEvaluationStudentList").cmsXDataTable("load", $.getDataGridParams("dgEvaluationStudentList"));
  10. }
  11. //获取选中的数据
  12. function validChoose() {
  13. var d = [];
  14. $.each($("#dgEvaluationStudentList").cmsXDataTable("getSelections"), function (index) {
  15. d.push(this.EvaluationStudentID);
  16. });
  17. return d;
  18. }
  19. //删除
  20. function EvaluationStudent_Delete() {
  21. var d = validChoose().join(',');
  22. if (d == "") {
  23. $.messager.alert("系统提示", "请选择您要删除的信息。");
  24. return;
  25. }
  26. $.messager.confirm("系统提示", "您确定要删除选择的信息?", function (r) {
  27. if (r) {
  28. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/EvaluationStudent/Delete', { evaluationStudentIDs: d }, function (data) {
  29. if (data.IsSuccess) {
  30. $.messager.alert("系统提示", data.Message);
  31. $("#dgEvaluationStudentList").cmsXDataTable('load');
  32. } else {
  33. $.messager.alert("系统提示", data.Message);
  34. }
  35. });
  36. }
  37. });
  38. }
  39. //设置列颜色为红色
  40. function SetRedColumn(index, row, value) {
  41. return " <span style=\"color: red;\">" + value + "</span>";
  42. }
  43. //导出Excel
  44. function EvaluationStudent_Export() {
  45. $("#formQuery").submit();
  46. }
  47. //联动查询
  48. function queryCampus(data) {
  49. var campusID = $("#CampusDropdown").combogridX("getValue");
  50. var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
  51. $("#CollegeDropdown").combogridX("reload", eval(jsonString));
  52. reload();
  53. }
  54. function queryCollege(data) {
  55. reload();
  56. }
  57. function queryDepartment(data) {
  58. var departmentID = $("#DepartmentDropdown").combogridX("getValue"); //combobox
  59. var jsonString = "({'QueryParamsDatas':'DepartmentDropdown|*|" + departmentID + "|@|'})";
  60. $("#StaffComboGrid").combogridX("reload", eval(jsonString));
  61. reload();
  62. }