var url = CMS_SystemConfig.VirtualDirectoryPath + "/User/StudentEdit"; var bathval = ""; var mnu; $(function () { mnu = $.SystemGeneral.getUrlParam("MNU"); }); function User_Export() { $(document.forms[0]).submit(); } function reload() { $("#dgUserList").cmsXDataTable("load", $.getDataGridParams("dgUserList")); } //获取选中的数据 function validChoose() { var d = []; $.each($("#dgUserList").cmsXDataTable("getSelections"), function (index) { d.push(this.UserID); }); return d; } //修改角色 function User_ModifyRole() { var d = validChoose(); if (d.length == 0) { $.messager.alert("系统提示", "请选择您要修改角色的用户信息。"); return; } if (d.length > 1) { $.messager.alert("系统提示", "只能选择单个用户进行修改角色。"); return; } var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + "/User/StudentModifyRole?UserID=" + d + "&MNU=" + mnu; $.popupTopWindow('修改角色', redirectTo, 650, 350, null, null); } //修改密码 function User_BatchInitPassword() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要修改密码的用户。"); return; } var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/User/BatchInitPassword?userID=+' + d + '&type=1&MNU=' + mnu + '&isView=3'; $.popupTopWindow('修改密码', redirectTo, 450, 200, null, null); } //密码规则 function User_BatchSetPassword() { var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/User/BatchInitPassword?userID=student&type=1&MNU=' + mnu + '&isView=4'; $.popupTopWindow('密码规则', redirectTo, 450, 200, null, null); } //启用 function User_USABLE() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要启用的用户。"); return; } $.messager.confirm("系统提示", "您确定对选择的用户启用?", function (r) { if (r) { $.post(CMS_SystemConfig.VirtualDirectoryPath + '/User/Usable', { userIDList: d }, function (data) { $.messager.alert("系统提示", data.Message, 'info', function () { if (data.IsSuccess) { $("#dgUserList").cmsXDataTable('load'); } }); }); } }); } //禁用 function User_UNUSABLE() { var d = validChoose().join(','); if (d == "") { $.messager.alert("系统提示", "请选择您要禁用的用户。"); return; } $.messager.confirm("系统提示", "您确定对选择的用户禁用?", function (r) { if (r) { $.post(CMS_SystemConfig.VirtualDirectoryPath + '/User/UnUsable', { userIDList: d }, function (data) { $.messager.alert("系统提示", data.Message, 'info', function () { if (data.IsSuccess) { $("#dgUserList").cmsXDataTable('load'); } }); }); } }); } function queryCollege(data) { $("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + ""); } function queryStandard() { var jsonString = ""; var parameterString = ""; var collegeID = $("#CollegeDropdown").combobox("getValue"); var year = $("#SchoolYear").combobox("getValue"); if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|"; if (year != nonSelect) parameterString += "DictionaryGrade|*|" + year + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#Standard").combogridX("reload", eval(jsonString)); } else { $("#Standard").combogridX("reload"); } reload(); } function queryClass() { var jsonString = ""; var parameterString = ""; var campusID = $("#CampusDropdown").combobox("getValue"); var collegeID = $("#CollegeDropdown").combobox("getValue"); var educationID = $("#Education").combobox("getValue"); var schoolYearID = $("#SchoolYear").combobox("getValue"); var standardID = $("#Standard").combogridX("getValue"); var learningFormID = $("#Learningform").combobox("getValue"); var LearnSystem = $("#DictionaryLearnSystem").combogridX("getValue"); if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|"; if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|"; if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|"; if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|"; if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|"; if (learningFormID != nonSelect) parameterString += "DictionaryLearningform|*|" + learningFormID + "|@|"; if (LearnSystem != nonSelect) parameterString += "DictionaryLearnSystem|*|" + LearnSystem + "|@|"; if (parameterString != "") { jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; $("#ClassmajorDropdown").combogridX("reload", eval(jsonString)); } else { $("#ClassmajorDropdown").combogridX("reload"); } reload(); } //function queryCollege(data) { // $("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + ""); //} ////function queryCollege(data) { //// queryClass(); ////} //function queryStandard(data) { // queryClass(); //} //function queryClass() { // var jsonString = ""; // var parameterString = ""; // //var campusID = $("#CampusDropdown").combogridX("getValue"); // var collegeID = $("#CollegeDropdown").combogridX("getValue"); // //var educationID = $("#Education").combobox("getValue"); // var schoolYearID = $("#SchoolYear").combobox("getValue"); // var standardID = $("#Standard").combogridX("getValue"); // //if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|"; // if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|"; // //if (educationID != nonSelect) parameterString += "DictionaryEducation|*|" + educationID + "|@|"; // if (schoolYearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolYearID + "|@|"; // if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|"; // if (parameterString != "") { // jsonString = "({'QueryParamsDatas':'" + parameterString + "'})"; // $("#ClassmajorDropdown").combogridX("reload", eval(jsonString)); // $("#Standard").combogridX("reload", eval(jsonString)); // } else { // $("#ClassmajorDropdown").combogridX("reload"); // $("#DictionaryStandard").combogridX("reload"); // } // reload(); //}