diff --git a/admin-console/src/main/resources/static/js/admin/user/index.js b/admin-console/src/main/resources/static/js/admin/user/index.js index 8209caac..f971e809 100644 --- a/admin-console/src/main/resources/static/js/admin/user/index.js +++ b/admin-console/src/main/resources/static/js/admin/user/index.js @@ -150,7 +150,7 @@ layui.define(['form', 'transfer', 'table', 'userApi', 'tree', "laytpl"], functio , { field: 'code', title: '用户名', - width: 150 + width: 120 }, { field: 'name', title: '姓名', @@ -159,32 +159,35 @@ layui.define(['form', 'transfer', 'table', 'userApi', 'tree', "laytpl"], functio }, { field: 'orgName', title: '部门', - sort: true + sort: true, + width: 120, }, {field: 'stateText', title: '状态', width: 120, align: "center", templet: '#switch_goods_Tpl'}, { field: 'jobType0Text', title: '职位', align: "center", - sort: true + sort: true, + width: 120, }, { field: 'jobType1Text', title: '职位明细', align: "center", - sort: true + sort: true, + width: 120, }, { field: 'createTime', title: '创建时间', align: "center", width: 120, + sort: true, templet: function (d) { return Common.getDate(d.createTime); - }, - sort: true + } }, { - title: '操作', width: 280, align: "center", templet: function (d) { + title: '操作', width: 300, align: "center",fixed: 'right', templet: function (d) { var htm = '编辑'; htm += '角色分配'; htm += '初始化密码'; @@ -228,7 +231,7 @@ layui.define(['form', 'transfer', 'table', 'userApi', 'tree', "laytpl"], functio var url = "/admin/user/role/list.do?id=" + data.id; Common.openDlg(url, "用户管理>" + data.name + ">角色管理"); }, - changePassword: function () { + /*changePassword: function () { var data = Common.getOneFromTable(table, "userTable"); if (data == null) { return; @@ -236,7 +239,7 @@ layui.define(['form', 'transfer', 'table', 'userApi', 'tree', "laytpl"], functio var url = "/admin/user/changePassword.do?id=" + data.id; Common.openDlg(url, "用户管理>更改密码"); - }, + },*/ exportUsers: function () { Common.openConfirm("确认要导出这些用户?", function () { userApi.exportUsers($("#searchForm"), function (fileId) { @@ -262,14 +265,22 @@ layui.define(['form', 'transfer', 'table', 'userApi', 'tree', "laytpl"], functio Lib.tableRefresh(); }); }) - } else if (obj.event === "changePassword") { - var url = "/admin/user/changePassword.do?id=" + data.id; - Common.openDlg(url, "用户管理>更改密码"); + } else if (obj.event === "password") { + Common.openConfirm("是否确定初始化 "+data.name+" 密码?",function () { + var url = "/admin/user/initPassword.json"; + var rsp = Common.postAjax(url, {id: data.id}); + if (rsp.code != 0) { + Common.error(rsp.msg); + } else { + //成功 + Common.success('密码初始化'+rsp.msg); + } + }); } else if (obj.event === "userRole") { // var url = "/admin/user/role/list.do?id="+data.id; // Common.openDlg(url,"用户管理>"+data.name+">角色管理"); loadUserRole(data.id, !$.isEmpty(data.roleIds) ? data.roleIds.split(",") : []); - }else if(obj.event === "password"){ + } else if (obj.event === "password") { console.log("修改密码"); layer.confirm('是否确定初始化该学生密码?', function (index) { var ret = Common.postAjax("/jlw/student/xxx.json", { diff --git a/admin-core/src/main/resources/static/plugins/layui/css/modules/layui-icon-extend/demo_index.html b/admin-core/src/main/resources/static/plugins/layui/css/modules/layui-icon-extend/demo_index.html index 55d066eb..c06aa238 100644 --- a/admin-core/src/main/resources/static/plugins/layui/css/modules/layui-icon-extend/demo_index.html +++ b/admin-core/src/main/resources/static/plugins/layui/css/modules/layui-icon-extend/demo_index.html @@ -56,6 +56,144 @@