From 23eb8fc0883486e3a3196899ec1b79580c28582d Mon Sep 17 00:00:00 2001 From: "yang,yong" <530521314@qq.com> Date: Sat, 23 Jan 2021 20:01:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0dropdown=E7=9A=84demo?= =?UTF-8?q?=E5=88=B0=E6=95=B0=E6=8D=AE=E8=A1=A8=E6=A0=BC=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/data/table.json | 16 +- view/document/table.html | 545 +++++++++++++++++++++------------------ 2 files changed, 296 insertions(+), 265 deletions(-) diff --git a/admin/data/table.json b/admin/data/table.json index 178f12a..b7abbb0 100644 --- a/admin/data/table.json +++ b/admin/data/table.json @@ -17,7 +17,7 @@ "login": "1", "roleIds": null }, { - "userId": "442488661347536896", + "userId": "2", "username": "854085467", "password": null, "salt": null, @@ -31,7 +31,7 @@ "login": "1", "roleIds": null }, { - "userId": "442492965651353600", + "userId": "3", "username": "970796069", "password": null, "salt": null, @@ -45,7 +45,7 @@ "login": "1", "roleIds": null },{ - "userId": "1", + "userId": "4", "username": "admin", "password": "$2a$10$1K7E1.IYCrsoZVCb6utOo.5jENtfOzhdKWhc49t2lk.UQd7Oam4FG", "salt": null, @@ -59,7 +59,7 @@ "login": "1", "roleIds": null }, { - "userId": "442488661347536896", + "userId": "5", "username": "854085467", "password": null, "salt": null, @@ -73,7 +73,7 @@ "login": "1", "roleIds": null }, { - "userId": "442492965651353600", + "userId": "6", "username": "970796069", "password": null, "salt": null, @@ -87,7 +87,7 @@ "login": "1", "roleIds": null },{ - "userId": "1", + "userId": "7", "username": "admin", "password": "$2a$10$1K7E1.IYCrsoZVCb6utOo.5jENtfOzhdKWhc49t2lk.UQd7Oam4FG", "salt": null, @@ -101,7 +101,7 @@ "login": "1", "roleIds": null }, { - "userId": "442488661347536896", + "userId": "8", "username": "854085467", "password": null, "salt": null, @@ -115,7 +115,7 @@ "login": "1", "roleIds": null }, { - "userId": "442492965651353600", + "userId": "9", "username": "970796069", "password": null, "salt": null, diff --git a/view/document/table.html b/view/document/table.html index 0e6a16d..e246e7d 100644 --- a/view/document/table.html +++ b/view/document/table.html @@ -1,286 +1,317 @@ - - - - - - - -
-
-
-
- -
- -
- -
- -
- - -
-
+ + + + + + +
+
+
+
+ +
+ +
+ +
+ +
+ +
-
-
-
-
-
-
- + +
+
+
+
+
+
+
- + - + - + - + - + - - -
-
-

上侧弹层内容...

-
+ + + - - - + + - + ids = ids.substr(0, ids.length - 1); + layer.confirm('确定要删除这些用户', { + icon: 3, + title: '提示' + }, function(index) { + layer.close(index); + let loading = layer.load(); + $.ajax({ + url: MODULE_PATH + "batchRemove/" + ids, + dataType: 'json', + type: 'delete', + success: function(result) { + layer.close(loading); + if (result.success) { + layer.msg(result.msg, { + icon: 1, + time: 1000 + }, function() { + table.reload('user-table'); + }); + } else { + layer.msg(result.msg, { + icon: 2, + time: 1000 + }); + } + } + }) + }); + } + + window.refresh = function(param) { + table.reload('user-table'); + } + }) + + -- Gitee