From 942683ff5b1554202cbd1bd60b76f4bf9c99221b Mon Sep 17 00:00:00 2001 From: liudianxin Date: Mon, 22 Jun 2020 19:13:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E6=A1=A3=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/imgs/login_eye.png | Bin 0 -> 1250 bytes src/assets/imgs/login_eye_dis.png | Bin 0 -> 1157 bytes src/pages/user/user_info.vue | 122 ++++++++++++++++++++++++------ src/request/api/authority.js | 8 +- 4 files changed, 107 insertions(+), 23 deletions(-) create mode 100644 src/assets/imgs/login_eye.png create mode 100644 src/assets/imgs/login_eye_dis.png diff --git a/src/assets/imgs/login_eye.png b/src/assets/imgs/login_eye.png new file mode 100644 index 0000000000000000000000000000000000000000..9e65d6bacfc0dacb4def35316e5e50c3a64885eb GIT binary patch literal 1250 zcmeAS@N?(olHy`uVBq!ia0vp^!a&T&!3HGHN~m`NDajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49seoArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XQrEMXkw~hZmDNz zW^7_h+i#(Mch>H3D2mX`VkM*2oZxQ#zd*s+85C-k3L4>= zc`5nj#hPF}zP?tTdBr7(dC94sF1AWQQ}i-3Q>;vkoQ)lgos1pL3@i){T^$`wjomEV z3=LddOw64OO&wu+UGkGlb5rw5V0u#!dQEWZ1to{v0-((C0hv)QPeZQt`aUkXlPdlz~-`N#*xwEGlyi(bH!%gn@ zIYr5}pHG#~m0GQTGtKq=qPOzZu8JMh!;UtWA5fEewRqd3+_loDcJDv+YW1~rS)B*hcD@nalfd6Dap@QL>r?KJoxjdq zkvV(D*ICzoWvz6-e5)e(ve{qpgjk!Gw(8nEC|-zwQl;4EMML(yCQ% QmV!zhPgg&ebxsLQ0D9uStN;K2 literal 0 HcmV?d00001 diff --git a/src/assets/imgs/login_eye_dis.png b/src/assets/imgs/login_eye_dis.png new file mode 100644 index 0000000000000000000000000000000000000000..015a03460e2d5b4972d9ff89f808fae91d430224 GIT binary patch literal 1157 zcmeAS@N?(olHy`uVBq!ia0vp^!a&T)!3HER$ch^RDajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49seoArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XQrEMXkw~hZmDNz zW^7_h+i#(Mch>H3D2mX`VkM*2oZxQ#zd*s+85C-k3L4>= zc`5nj#hPF}zP?tTdBr7(dC94sF1AWQQ}i-3Q>=_#-GIo{!qLpY!qCvw(ZbB!&B?{c z+{D1Z+1$X<5~kNBKe;qFHLnDwHwB^B5~p5Ja>y+J+U$~Alv$RV;#QQOs{r=4RVHq? znBg=Jsy79tRWo+}oTJc{ zzB%6JflQrdS)*vtj^c组织机构:

- +

当前用户类型:

- - - - 升级为开发者 + + 升级为开发者
@@ -111,7 +106,7 @@

密钥:

复制 - 重置 + 重置

描述:

@@ -137,11 +132,27 @@

新密码:

- + + +

请再次输入密码:

- + + +
@@ -173,8 +184,11 @@ export default { phone: "", email: "", organization: "", - userType: "" + userType: "", + userTypeName: "" }, + visible1: true, + visible2: true, form: { passwordOld: "", passwordNew: "", @@ -207,13 +221,7 @@ export default { blackAddShow: false, newIpWhite: "", newIpBlack: "", - diaPassWord: false, - userTypeOptions: [ - { value: 1, label: "超级管理员" }, - { value: 2, label: "组织管理员" }, - { value: 3, label: "普通用户" }, - { value: 4, label: "普通用户开发者" } - ] + diaPassWord: false }), mounted() { this.getCurrentUser(); @@ -240,6 +248,14 @@ export default { this.user_data.email = data.email; this.user_data.organization = data.department; this.user_data.userType = data.is_admin; + this.user_data.userTypeName = + this.user_data.userType == 1 + ? "超级管理员" + : this.user_data.userType == 2 + ? "组织管理员" + : this.user_data.userType == 3 + ? "普通用户" + : "普通用户开发者"; this.imgList.push(data.picture_path); this.formBusiness.businessSystemName = data.system_name; this.formBusiness.domainName = data.domain_name; @@ -296,10 +312,23 @@ export default { changePassword() { this.diaPassWord = true; }, + changePass1() { + this.visible1 = !this.visible1; + }, + changePass2() { + this.visible2 = !this.visible2; + }, cancelChangePwd() { this.diaPassWord = false; }, submitChangePwd() { + let query = { + id: this.user_data.accountNo, + form: { + origin_password: this.form.passwordOld, + new_password: this.form.passwordNew + } + } this.$api.user.editUserPassword(query).then(response => { if (response.data.success == 1) { this.$message({ @@ -315,7 +344,38 @@ export default { } }); }, - upLevel() {}, + resetKey() { + this.$api.authority + .resetUserKey({ user_id: this.user_data.accountNo }) + .then(response => { + if (response.data.success == 1) { + this.$message({ + message: "重置密钥成功", + type: "success" + }); + } else { + this.$message({ + message: "重置密钥失败", + type: "error" + }); + } + }); + }, + upLevel() { + this.$api.authority.updateLevel().then(response => { + if (response.data.success == 1) { + this.$message({ + message: "重置密钥成功", + type: "success" + }); + } else { + this.$message({ + message: "重置密钥失败", + type: "error" + }); + } + }); + }, copyKey() { this.$refs.keys.select(); document.execCommand("Copy"); @@ -465,6 +525,24 @@ export default { margin-right: 10px; margin-bottom: 10px; } +.eye { + display: inline-block; + width: 20px; + height: 20px; + position: relative; + top: 4px; + cursor: pointer; + background: url("~@/assets/imgs/login_eye.png") no-repeat center center; +} +.eye_dis { + display: inline-block; + width: 20px; + height: 20px; + position: relative; + top: 6px; + cursor: pointer; + background: url("~@/assets/imgs/login_eye_dis.png") no-repeat center center; +}