From 023aa8fee06ef5711c5b43d3023609d77048e52e Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期三, 07 十二月 2022 08:59:47 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/user/user.js | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/src/main/webapp/static/js/user/user.js b/src/main/webapp/static/js/user/user.js
index 3de1c43..0e06c7e 100644
--- a/src/main/webapp/static/js/user/user.js
+++ b/src/main/webapp/static/js/user/user.js
@@ -23,9 +23,9 @@
height: 'full-100',
cols: [[
{type: 'checkbox'}
- ,{field: 'hostName', align: 'center',title: '鎺堟潈鍟嗘埛', templet: '#hostTpl', width: 140}
+ // ,{field: 'hostName', align: 'center',title: '鎺堟潈鍟嗘埛', templet: '#hostTpl', width: 140}
// ,{field: 'nickname', align: 'center',title: '鐢ㄦ埛鍚�'}
- ,{field: 'username', align: 'center',title: '鐢ㄦ埛鍚�'}
+ ,{field: 'username', align: 'center',title: '鐧诲綍璐︽埛'}
,{field: 'mobile', align: 'center',title: '鎵嬫満鍙�'}
// ,{field: 'deptName', align: 'center',title: '鎵�灞為儴闂�'}
,{field: 'roleName', align: 'center',title: '瑙掕壊'}
@@ -68,18 +68,17 @@
/* 琛ㄦ牸2澶村伐鍏锋爮鐐瑰嚮浜嬩欢 */
table.on('toolbar(userTable)', function (obj) {
+ var checkStatus = table.checkStatus(obj.config.id).data;
if (obj.event === 'add') { // 娣诲姞
showEditModel()
} else if (obj.event === 'del') { // 鍒犻櫎
- var checkRows = table.checkStatus('userTable');
- if (checkRows.data.length === 0) {
+ if (checkStatus.length === 0) {
layer.msg('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁', {icon: 2});
return;
}
- var ids = checkRows.data.map(function (d) {
+ del(checkStatus.map(function (d) {
return d.id;
- });
- doDelUser({ids: ids});
+ }));
}
});
@@ -103,8 +102,7 @@
break;
// 鍒犻櫎
case 'del':
- var ids = [obj.id];
- doDelUser({ids: ids});
+ del([data.id]);
break;
// 閲嶇疆瀵嗙爜
case 'resetPwd':
@@ -171,7 +169,7 @@
/* 鍒犻櫎璁㈠崟 */
- function doDelUser(obj) {
+ function del(ids) {
layer.confirm('纭畾瑕佸垹闄ら�変腑鏁版嵁鍚楋紵', {
skin: 'layui-layer-admin',
shade: .1
@@ -181,7 +179,7 @@
$.ajax({
url: baseUrl+"/user/delete/auth",
headers: {'token': localStorage.getItem('token')},
- data: {ids: obj.ids},
+ data: {ids: ids},
method: 'POST',
success: function (res) {
layer.close(loadIndex);
--
Gitblit v1.9.1