123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- var url = CMS_SystemConfig.VirtualDirectoryPath + "/User/Edit";
- 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/ModifyRole?UserID=' + d + '&MNU=' + mnu;
- $.popupTopWindow('修改角色', redirectTo, 650, 350, null, null);
- }
- //数据范围设置
- function User_DataRange() {
- var d = validChoose();
- if (d.length == 0) {
- $.messager.alert("系统提示", "请选择您要设置的用户信息。");
- return;
- }
- if (d.length > 1) {
- $.messager.alert("系统提示", "只能选择单个记录进行设置。");
- return;
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/User/DataRange?UserID=' + d + '&MNU=' + mnu;
- $.popupTopWindow('数据范围设置', redirectTo, 650, 500, null, null);
- }
- //修改密码
- function User_BatchInitPassword() {
- var d = validChoose().join(',');
- if (d == "") {
- $.messager.alert("系统提示", "请选择您要修改密码的用户。");
- return;
- }
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/User/BatchInitPassword?userID=+' + d + '&type=0&MNU=' + mnu + '&isView=1';
- $.popupTopWindow('修改密码', redirectTo, 450, 200, null, null);
- }
- //密码规则
- function User_BatchSetPassword() {
- var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/User/BatchInitPassword?userID=staff&type=0&MNU=' + mnu + '&isView=2';
- $.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 QueryCampusDropdownList(data) {
- //$("#CollegeDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/College/CollegeDropdownListBanid?campusID=" + data.Value + "");
- var campusID = $("#CampusDropdown").combogridX("getValue");
- if (campusID != nonSelect) {
- var jsonString = "({'QueryParamsDatas':'CampusDropdown|*|" + campusID + "|@|'})";
- $("#CollegeDropdown").combogridX("reload", eval(jsonString));
- }
- reload();
- }
- function QueryCollegeDropdownList(data) {
- //$("#DepartmentDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/Department/DepartmentDropdownListBanid?collegeID=" + data.Value + "");
- var collegeID = $("#CollegeDropdown").combogridX("getValue");
- if (collegeID != nonSelect) {
- var jsonString = "({'QueryParamsDatas':'CollegeDropdown|*|" + collegeID + "|@|'})";
- $("#DepartmentDropdown").combogridX("reload", eval(jsonString));
- }
- reload();
- }
- function QueryCollegeDropdownListLoad(data) {
- if (data.length > 0 && $("#DepartmentDropdown").length > 0 && $.data($("#DepartmentDropdown")[0], "combobox")) {
- $("#DepartmentDropdown").combobox("reload", CMS_SystemConfig.VirtualDirectoryPath + "/Department/DepartmentDropdownListBanid?collegeID=" + data[0].Value + "");
- }
- }
- function QueryDepartmentDropdownList(data) {
- reload();
- }
- function QueryDepartmentDropdownListLoad(data) {
- if (data.length > 0 && $("#dgUserList").length > 0 && $.data($("#dgUserList")[0], "cmsXDataTable")) {
- reload();
- }
- }
|