12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- var isFirstLoadCollege = true;
- var isFirstLoadDepartment = true;
- function Report_Search() {
- var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
- var collegeID = $("#CollegeDropdown").combobox("getValue");
- var departmentID = $("#DepartmentDropdown").combobox("getValue");
- var handleModeID = $("#HandleModeDropdown").combobox("getValue");
- if (handleModeID == -1 || handleModeID == "") {
- handleModeID = "";
- }
- if (departmentID == -1 || departmentID == "")
- $.messager.alert("系统信息", "请选择教研室");
- else {
- if (CMS_SystemConfig.ReportType == 1) {
- $("#reportContent").attr("src", CMS_SystemConfig.ReportPagePath + "?ReportFolder=%2fEducationScheduling%2fDepartmentSchedulingView&DepartmentID_RAP=" + departmentID + "&CollegeID_RAP=" + collegeID + "&SchoolyearID_RAP=" + schoolYearID + "&HandleModeID_RAP=" + handleModeID);
- }
- if (CMS_SystemConfig.ReportType == 2) {
- var fileUrl = CMS_SystemConfig.VirtualDirectoryPath + "/EducationSchedulingReport/DepartmentSchedulingPDF?DepartmentID=" + departmentID + "&CollegeID=" + collegeID + "&SchoolyearID=" + schoolYearID + "&HandleModeID=" + handleModeID;
- $("#reportContent").attr("src", CMS_SystemConfig.VirtualDirectoryPath + "/Scripts/pdf.js/web/viewer.html?file=" + encodeURIComponent(fileUrl));
- }
- }
- }
- function QueryCollegeDropdownList(data) {
- if (((data.length && data.length > 0) || data)
- && $("#DepartmentDropdown").length > 0 && $.data($("#DepartmentDropdown")[0], "combobox")) {
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/Department/DepartmentDropdownListBanid?bindType=PleaseSelect";
- if (isFirstLoadCollege) {
- isFirstLoadCollege = false;
- } else {
- if (data.length > 0) {
- $("#DepartmentDropdown").combobox("setValue", data[0].Value);
- } else {
- $("#DepartmentDropdown").combobox("clear");
- }
- }
- var collegeID = $("#CollegeDropdown").combobox("getValue");
- if (collegeID != nonSelect) url += "&collegeID=" + collegeID;
- $("#DepartmentDropdown").combobox("reload", url);
- }
- }
- function SelectCollegeDropdownList() {
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/Department/DepartmentDropdownListBanid?bindType=PleaseSelect";
- var collegeID = $("#CollegeDropdown").combobox("getValue");
- if (collegeID != nonSelect) url += "&collegeID=" + collegeID;
- $("#DepartmentDropdown").combobox("reload", url);
- }
- function QueryDepartmentDropdownList(data) {
- if (((data.length && data.length > 0) || data)) {
- if (isFirstLoadDepartment) {
- isFirstLoadDepartment = false;
- } else {
- if (data.length > 0) {
- $("#DepartmentDropdown").combobox("setValue", data[0].Value);
- } else {
- $("#DepartmentDropdown").combobox("clear");
- }
- }
- reload();
- }
- }
- function reload() {
- var schoolYearID = $("#SchoolYearDropdown").combobox("getValue");
- var collegeID = $("#CollegeDropdown").combobox("getValue");
- var departmentID = $("#DepartmentDropdown").combobox("getValue");
- }
|