CourseProcessClassroomList.js 972 B

1234567891011121314151617181920212223242526272829303132333435
  1. 
  2. function reload() {
  3. $("#dgClassroomList").cmsXDataTable("load", $.getDataGridParams("dgClassroomList"));
  4. }
  5. //获取选中的数据
  6. function validChoose() {
  7. var d = [];
  8. $.each($("#dgClassroomList").cmsXDataTable("getSelections"), function (index) {
  9. d.push(this);
  10. });
  11. return d;
  12. }
  13. function QueryBuildingsDropdownList(data) {
  14. reload();
  15. }
  16. function Classroom_Confirm() {
  17. var d = validChoose();
  18. var windowID = $.SystemGeneral.getUrlParam("WindowID");
  19. var maxSelect = $.SystemGeneral.getUrlParam("MaxSelect");
  20. if (!maxSelect || isNaN(maxSelect)) maxSelect = 0;
  21. if (d.length == 0) {
  22. $.messager.alert("系统提示", "请选择教室。");
  23. return;
  24. }
  25. if (maxSelect > 0 && d.length > maxSelect) {
  26. $.messager.alert("系统提示", "只能选择" + maxSelect + "项记录。");
  27. return;
  28. }
  29. top.$("#" + windowID).data("resultData", d);
  30. top.$("#" + windowID).dialog("close");
  31. }