From 462782f4b2ce653e84260ca586a58c8627c4ac9c Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期五, 18 十一月 2022 13:55:22 +0800
Subject: [PATCH] 1

---
 src/views/maintenance/userManagement.vue |   81 ++++++++++++++++++++++++++--------------
 1 files changed, 52 insertions(+), 29 deletions(-)

diff --git a/src/views/maintenance/userManagement.vue b/src/views/maintenance/userManagement.vue
index 516c75d..dc9bcfb 100644
--- a/src/views/maintenance/userManagement.vue
+++ b/src/views/maintenance/userManagement.vue
@@ -35,15 +35,15 @@
         <el-form-item>
           <el-button
             size="small"
-            type="primary"
             @click="queryInfo()"
             icon="el-icon-search"
-            style="background: #1890ff"
+            style="background: #409eff; border: 1px solid #409eff; color: white"
             >{{ $t('operatManage.ELM.search') }}
           </el-button>
         </el-form-item>
         <el-form-item>
           <el-button
+            type="info"
             size="small"
             @click="resetInfo('queryForm')"
             icon="el-icon-refresh"
@@ -74,10 +74,9 @@
         </el-form-item>
         <el-form-item v-show="setbatchFlag">
           <el-button
-            type="primary"
             size="small"
             @click="editPwd"
-            style="background: #1890ff"
+            type="warning"
             icon="el-icon-unlock"
             >{{ $t('common.changepassWord') }}
           </el-button>
@@ -203,6 +202,7 @@
             <!-- <el-button type="primary" size="small">淇敼</el-button> -->
             <el-button
               type="warning"
+              plain
               @click="editInfo(scope.row)"
               size="mini"
               >{{ $t('common.edit') }}</el-button
@@ -226,7 +226,11 @@
     <el-dialog
       width="910px"
       top="15vh"
-      :title="behavior"
+      :title="
+        behavior == '鏂板鐢ㄦ埛'
+          ? `${$t('common.append')}`
+          : `${$t('common.update')}`
+      "
       :visible.sync="dialogFormVisible"
       :before-close="handleClose"
     >
@@ -260,7 +264,7 @@
               disabled
             ></el-input>
           </el-form-item>
-          <el-form-item
+          <!-- <el-form-item
             v-if="behavior == '淇敼淇℃伅'"
             prop="oldPwd"
             :label="$t('userManage.userInfoObj.origpassword')"
@@ -272,9 +276,10 @@
               autocomplete="off"
               show-password
             ></el-input>
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item
             prop="pwd"
+            v-if="behavior == '鏂板鐢ㄦ埛'"
             :label="$t('userManage.userInfoObj.pwd')"
             :label-width="formLabelWidth"
           >
@@ -287,6 +292,7 @@
           </el-form-item>
           <el-form-item
             prop="checkPass"
+            v-if="behavior == '鏂板鐢ㄦ埛'"
             :label="$t('userManage.userInfoObj.confirmPassword')"
             :label-width="formLabelWidth"
           >
@@ -425,24 +431,24 @@
         </div>
       </el-form>
       <div v-if="behavior == '淇敼淇℃伅'" slot="footer" class="dialog-footer">
-        <el-button size="medium" @click="cancelEdit()">{{
+        <el-button size="medium" type="info" @click="cancelEdit()">{{
           $t('common.reset')
         }}</el-button>
         <el-button
           size="medium"
-          type="primary"
+          style="background: #409eff; border: 1px solid #409eff; color: white"
           @click="sendEdit('editForm')"
           v-loading.fullscreen.lock="fullscreenLoading"
           >{{ $t('common.submit') }}</el-button
         >
       </div>
       <div v-else slot="footer" class="dialog-footer">
-        <el-button size="medium" @click="cancelAdd('editForm')">{{
+        <el-button size="medium" type="info" @click="cancelAdd('editForm')">{{
           $t('common.reset')
         }}</el-button>
         <el-button
           size="medium"
-          type="primary"
+          style="background: #409eff; border: 1px solid #409eff; color: white"
           @click="sendAdd('editForm')"
           v-loading.fullscreen.lock="fullscreenLoading"
           >{{ $t('common.submit') }}</el-button
@@ -452,12 +458,16 @@
     <el-dialog
       width="520px"
       top="30vh"
-      title="鎵归噺閲嶇疆瀵嗙爜"
+      :title="$t('common.changepassWord')"
       :visible.sync="resetPwd"
       :before-close="handleClose"
     >
       <el-form :model="pwdForm" ref="pwdForm" :rules="rules">
-        <el-form-item prop="adminPwd" label="绠$悊鍛樺瘑鐮�" label-width="140px">
+        <el-form-item
+          prop="adminPwd"
+          :label="$t('common.AdminPassword')"
+          label-width="140px"
+        >
           <el-input
             type="password"
             v-model="pwdForm.adminPwd"
@@ -465,7 +475,11 @@
             show-password
           ></el-input>
         </el-form-item>
-        <el-form-item prop="newPwd" label="鏂板瘑鐮�" label-width="140px">
+        <el-form-item
+          prop="newPwd"
+          :label="$t('common.NPassword')"
+          label-width="140px"
+        >
           <el-input
             type="password"
             v-model="pwdForm.newPwd"
@@ -473,7 +487,11 @@
             show-password
           ></el-input>
         </el-form-item>
-        <el-form-item prop="checkPwd" label="纭瀵嗙爜" label-width="140px">
+        <el-form-item
+          prop="checkPwd"
+          :label="$t('common.SPassword')"
+          label-width="140px"
+        >
           <el-input
             type="password"
             v-model="pwdForm.checkPwd"
@@ -483,15 +501,15 @@
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button size="medium" @click="cancelReset - 'pwdForm'"
-          >閲嶇疆</el-button
-        >
+        <el-button size="medium" type="info" @click="cancelReset - 'pwdForm'">{{
+          $t('common.reset')
+        }}</el-button>
         <el-button
           size="medium"
-          type="primary"
+          style="background: #409eff; border: 1px solid #409eff; color: white"
           @click="sendReset('pwdForm')"
           v-loading.fullscreen.lock="fullscreenLoading"
-          >鎻愪氦</el-button
+          >{{ $t('common.submit') }}</el-button
         >
       </div>
     </el-dialog>
@@ -954,10 +972,11 @@
     editInfo(row) {
       delete row.updateTime;
       delete row.updateUser;
-      row.pwd = '';
+      // row.pwd = '';
       this.initialForm = JSON.stringify(row);
       this.behavior = '淇敼淇℃伅';
       this.editForm = JSON.parse(JSON.stringify(row));
+
       this.dialogFormVisible = true;
     },
     //缂栬緫閫夋嫨鍗曚綅
@@ -1002,13 +1021,17 @@
     sendEdit(formName) {
       this.$refs[formName].validate((valid) => {
         if (valid) {
-          encrypt.setPublicKey(this.$store.state.key);
-          this.editForm.uid = encrypt.encrypt(this.editForm.uid);
-          this.editForm.salt = encrypt.encrypt(this.editForm.pwd);
-          this.editForm.pwd = encrypt.encrypt(this.editForm.oldPwd);
-          this.fullscreenLoading = true;
-          delete this.editForm.checkPass;
-          delete this.editForm.oldPwd;
+          // encrypt.setPublicKey(this.$store.state.key);
+          // this.editForm.uid = this.editForm.uid;
+          // this.editForm.salt = null;
+          // this.editForm.pwd = null;
+          // this.editForm.salt = encrypt.encrypt(this.editForm.pwd);
+          // // this.editForm.pwd = encrypt.encrypt(this.editForm.oldPwd);
+          // this.fullscreenLoading = true;
+          // delete this.editForm.checkPass;
+          // delete this.editForm.oldPwd;
+          // this.editForm.salt = this.editForm.pwd;
+          debugger;
           updateUser(this.editForm)
             .then((res) => {
               setTimeout(() => {
@@ -1241,7 +1264,7 @@
       color: white;
     }
     /deep/.el-pager li.active {
-      color: #1890ff;
+      color: #409eff;
     }
     /deep/.el-pager li {
       color: white;

--
Gitblit v1.9.3