From 300a5973736db65a9a61a2c59712ca4708b37b46 Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Wed, 5 Mar 2025 23:36:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E6=89=80=E6=9C=89=E7=94=A8=E6=88=B7=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deleteSystemUser/deleteSystemUser.html | 31 +++++ .../deleteSystemUser/deleteSystemUser.js | 41 ++++++ .../resetSystemUserPwd.html | 31 +++++ .../resetSystemUserPwd/resetSystemUserPwd.js | 45 +++++++ public/pages/staff/systemUser/systemUser.html | 122 ++++++++++++++++++ public/pages/staff/systemUser/systemUser.js | 84 ++++++++++++ 6 files changed, 354 insertions(+) create mode 100644 public/components/staff/deleteSystemUser/deleteSystemUser.html create mode 100644 public/components/staff/deleteSystemUser/deleteSystemUser.js create mode 100644 public/components/staff/resetSystemUserPwd/resetSystemUserPwd.html create mode 100644 public/components/staff/resetSystemUserPwd/resetSystemUserPwd.js create mode 100644 public/pages/staff/systemUser/systemUser.html create mode 100644 public/pages/staff/systemUser/systemUser.js diff --git a/public/components/staff/deleteSystemUser/deleteSystemUser.html b/public/components/staff/deleteSystemUser/deleteSystemUser.html new file mode 100644 index 000000000..a4d3cd287 --- /dev/null +++ b/public/components/staff/deleteSystemUser/deleteSystemUser.html @@ -0,0 +1,31 @@ +
\ No newline at end of file diff --git a/public/components/staff/deleteSystemUser/deleteSystemUser.js b/public/components/staff/deleteSystemUser/deleteSystemUser.js new file mode 100644 index 000000000..955e1dc13 --- /dev/null +++ b/public/components/staff/deleteSystemUser/deleteSystemUser.js @@ -0,0 +1,41 @@ +(function (vc) { + vc.extends({ + data: { + deleteSystemUserInfo: {} + }, + _initEvent: function () { + vc.on('deleteSystemUser','openDeleteSystemUser', function (_staffInfo) { + $that.deleteSystemUserInfo = _staffInfo; + $('#deleteSystemUserModel').modal('show'); + }); + }, + methods: { + closeDeleteSystemUserModel: function () { + $('#deleteSystemUserModel').modal('hide'); + }, + deleteSystemUser: function () { + vc.http.apiPost( + '/user.deleteSystemUser', + JSON.stringify($that.deleteSystemUserInfo), + { + emulateJSON: true + }, + function (json, res) { + //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); + if (res.status == 200) { + //关闭model + $('#deleteSystemUserModel').modal('hide'); + vc.emit('systemUser', 'listSystemUser',{}); + vc.toast("删除成功"); + return; + } + }, + function (errInfo, error) { + console.log('请求失败处理'); + $that.deleteSystemUserInfo.errorInfo = errInfo; + } + ); + } + } + }); +})(window.vc); \ No newline at end of file diff --git a/public/components/staff/resetSystemUserPwd/resetSystemUserPwd.html b/public/components/staff/resetSystemUserPwd/resetSystemUserPwd.html new file mode 100644 index 000000000..ed0e8f041 --- /dev/null +++ b/public/components/staff/resetSystemUserPwd/resetSystemUserPwd.html @@ -0,0 +1,31 @@ + \ No newline at end of file diff --git a/public/components/staff/resetSystemUserPwd/resetSystemUserPwd.js b/public/components/staff/resetSystemUserPwd/resetSystemUserPwd.js new file mode 100644 index 000000000..d669ad67f --- /dev/null +++ b/public/components/staff/resetSystemUserPwd/resetSystemUserPwd.js @@ -0,0 +1,45 @@ +(function (vc) { + vc.extends({ + data: { + resetSystemUserPwdInfo: {} + }, + _initEvent: function () { + vc.on('resetSystemUserPwd', 'openResetSystemUserPwd', function (_staffInfo) { + $that.resetSystemUserPwdInfo = _staffInfo; + $('#resetSystemUserPwdModel').modal('show'); + }); + }, + methods: { + closeDeleteStaffModel: function () { + $('#resetSystemUserPwdModel').modal('hide'); + }, + resetSystemUserPwd: function () { + let _dataObj = { + staffId: $that.resetSystemUserPwdInfo.userId + }; + vc.http.apiPost( + '/user.resetSystemUserPwd', + JSON.stringify(_dataObj), { + emulateJSON: true + }, + function (json, res) { + //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); + let _json = JSON.parse(json); + if (_json.code == 0) { + //关闭model + $('#resetSystemUserPwdModel').modal('hide'); + vc.toast("修改密码成功,密码为" + _json.pwd + "请及时修改密码", 10 * 1000); + return; + } else { + vc.toast(_json.msg); + } + }, + function (errInfo, error) { + console.log('请求失败处理'); + $that.resetSystemUserPwdInfo.errorInfo = errInfo; + } + ); + } + } + }); +})(window.vc); \ No newline at end of file diff --git a/public/pages/staff/systemUser/systemUser.html b/public/pages/staff/systemUser/systemUser.html new file mode 100644 index 000000000..83b7d7c94 --- /dev/null +++ b/public/pages/staff/systemUser/systemUser.html @@ -0,0 +1,122 @@ +|
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+
|---|---|---|---|---|---|---|---|---|
| {{user.userId}} | +{{user.userName}} | +{{user.email || '-'}} | +{{user.address}} | +{{user.tel}} | +{{user.createTime}} | ++ 管理员 + 员工 + 用户 + | +{{user.ownerCount}} | +
+
+
+
+
+
+
+ |
+