123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- var isFirstLoadDepartment = true;
- var isPageLoad = true;
- var requestDepartmentID;
- //加载
- $(function () {
- requestDepartmentID = $.SystemGeneral.getUrlParam("departmentID");
- })
- function QueryCollegeDropdownList(data) {
- if (((data.length && data.length > 0) || data)
- && $("#DepartmentDropdown").length > 0 && $.data($("#DepartmentDropdown")[0], "combobox")) {
- var collegeID = $("#CollegeDropdown").combobox("getValue");
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/Department/DepartmentDropdownListBanid?bindType=2&collegeID=" + collegeID;
- $("#DepartmentDropdown").combobox("reload", url);
- }
- }
- function QueryDepartmentDropdownList(data) {
- if (((data.length && data.length > 0) || data)) {
- if (isFirstLoadDepartment) {
- isFirstLoadDepartment = false;
- } else if (isPageLoad) {
- $("#DepartmentDropdown").combobox("setValue", requestDepartmentID);
- }
- reload();
- }
- }
- function reload() {
- var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
- var departmentID = $("#DepartmentDropdown").combobox("getValue");
- var handleModes = $.map($("[name='chkHandleMode']:checked"), function (x) { return $(x).val() }).join(',');
- var grid = $("#dgEducationSchedulingClassList");
- currentItem = null;
- currentCell = null;
- if (grid.length == 0) return;
- var allSetting = $.data(grid[0], "cmsXDataTable");
- if (!allSetting) return;
- if (departmentID == "") return;
- //加载左边列表
- allSetting.options.url = CMS_SystemConfig.VirtualDirectoryPath + "/EducationSchedule/GetDepartmentEducationSchedulingClass?departmentID=" + departmentID + "&schoolyearID=" + schoolYearID + "&handleModes=" + handleModes;
- $.data(grid, "cmsXDataTable", allSetting);
- grid.cmsXDataTable("load", null);
- isPageLoad = false;
- }
- function loadScheduleData() {
- var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
- var departmentID = $("#DepartmentDropdown").combobox("getValue");
- var handleModes = $.map($("[name='chkHandleMode']:checked"), function(x) { return $(x).val() }).join(',');
- $("#loading").show();
- $.post(CMS_SystemConfig.VirtualDirectoryPath + '/EducationSchedule/GetDepartmentSchedule', { schoolyearID: schoolYearID, departmentID: departmentID, handleModes: handleModes },
- function (schedulingData) {
- getCoursesTimeList(schedulingData);
- $("#loading").hide();
- });
- }
|