From 5bb4954dc2250049be7fbfac6f89b5a0a76ab1e5 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期三, 13 九月 2023 16:43:01 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes

---
 CanadaMes-ui/src/views/user/index.vue |  152 +++++++++++++++++++++++++-------------------------
 1 files changed, 76 insertions(+), 76 deletions(-)

diff --git a/CanadaMes-ui/src/views/user/index.vue b/CanadaMes-ui/src/views/user/index.vue
index ccff3f2..93aea7e 100644
--- a/CanadaMes-ui/src/views/user/index.vue
+++ b/CanadaMes-ui/src/views/user/index.vue
@@ -40,7 +40,7 @@
             </el-switch>
           </template>
         </el-table-column>
-        <el-table-column label="鎿嶄綔">
+        <el-table-column :label="$t('langOperation')">
           <template slot-scope="scope">
             <el-button type="primary" icon="el-icon-refresh" @click="resetPassword(scope.row)">
 
@@ -241,84 +241,84 @@
       });
     },
     resetPassword (info) {
-      this.$confirm('纭閲嶇疆瀵嗙爜涓洪粯璁ゅ�煎悧锛�', '閲嶇疆瀵嗙爜', {
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷',
-        type: 'warning',
-      })
-        .then(() => {
-          resetPass(info).then(() => {
-            this.$message.success('瀵嗙爜宸查噸缃负榛樿鍊�');
-          });
-        })
-        .catch(() => {
-          // 鐢ㄦ埛鍙栨秷閲嶇疆瀵嗙爜鎿嶄綔
-        });
-    },
-    showEditDialog (id) {
-      getById({ id: id }).then(res => {
-        this.editUserForm = res.data;
-        this.editDialogVisible = true;
+  this.$confirm(this.$t('confirmResetPassword'), this.$t('resetPassword'), {
+    confirmButtonText: this.$t('confirm'),
+    cancelButtonText: this.$t('cancel'),
+    type: 'warning',
+  })
+    .then(() => {
+      resetPass(info).then(() => {
+        this.$message.success(this.$t('passwordResetSuccess'));
       });
+    })
+    .catch(() => {
+      // 鐢ㄦ埛鍙栨秷閲嶇疆瀵嗙爜鎿嶄綔
+    });
+},
+showEditDialog (id) {
+  getById({ id: id }).then(res => {
+    this.editUserForm = res.data;
+    this.editDialogVisible = true;
+  });
 
+  select().then(res => {
+    this.roleList = res.data;
+  });
+},
+removeUserById (user) {
+  // 寮规璇㈤棶鐢ㄦ埛鏄惁鍒犻櫎鍒嗙被
+  this.$confirm(this.$t('confirmDeleteCategory'), this.$t('prompt'), {
+    confirmButtonText: this.$t('confirm'),
+    cancelButtonText: this.$t('cancel'),
+    type: 'warning'
+  }).then(() => {
+    removeById({ id: user.id }).then(() => {
+      // 閲嶆柊鑾峰彇鍒嗙被鍒楄〃
+      this.getUserList();
+      this.$message.success(this.$t('userDeleteSuccess'));
+    });
+  }).catch(() => {
+    this.$message.info(this.$t('deleteCanceled'));
+  });
+},
+handleSizeChange (newSize) {
+  this.queryInfo.pageSize = newSize;
+  this.getUserList()
+},
+handleCurrentChange (newPage) {
+  this.queryInfo.pageNum = newPage;
+  this.getUserList()
+},
+addDialogClosed () {
+  this.$refs['addUserRef'].resetFields();
+},
+addUser () {
+  this.$refs.addUserRef.validate(async valid => {
+    if (!valid) return;
+    saveOrUpdate(this.addUserForm).then(() => {
+      const successMessage = this.$t('addUserSuccess');
+      this.$message.success(successMessage);
+      // 闅愯棌娣诲姞鍒嗙被瀵硅瘽妗�
+      this.addDialogVisible = false;
+      // 閲嶆柊鑾峰彇鍒嗙被鍒楄〃
+      this.getUserList();
+    });
+  })
+},
+editUserInfo () {
+  this.$refs.addCategoryRef.validate(async valid => {
+    if (!valid) return;
 
-      select().then(res => {
-        this.roleList = res.data;
-      });
-    },
-    removeUserById (user) {
-      // 寮规璇㈤棶鐢ㄦ埛鏄惁鍒犻櫎鍒嗙被
-      this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ュ垎绫�, 鏄惁缁х画?', '鎻愮ず', {
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷',
-        type: 'warning'
-      }).then(() => {
-        removeById({ id: user.id }).then(() => {
-          // 閲嶆柊鑾峰彇鍒嗙被鍒楄〃
-          this.getUserList();
-          this.$message.success("鍒犻櫎鐢ㄦ埛鎴愬姛");
-        });
-      }).catch(() => {
-        this.$message.info('宸插彇娑堝垹闄�');
-      });
-    },
-    handleSizeChange (newSize) {
-      this.queryInfo.pageSize = newSize;
-      this.getUserList()
-    },
-    handleCurrentChange (newPage) {
-      this.queryInfo.pageNum = newPage;
-      this.getUserList()
-    },
-    addDialogClosed () {
-      this.$refs['addUserRef'].resetFields();
-    },
-    addUser () {
-      this.$refs.addUserRef.validate(async valid => {
-        if (!valid) return;
-        saveOrUpdate(this.addUserForm).then(() => {
-          this.$message.success("娣诲姞鐢ㄦ埛鎴愬姛");
-          // 闅愯棌娣诲姞鍒嗙被瀵硅瘽妗�
-          this.addDialogVisible = false;
-          // 閲嶆柊鑾峰彇鍒嗙被鍒楄〃
-          this.getUserList();
-        });
-      })
-    },
-    editUserInfo () {
-      this.$refs.addCategoryRef.validate(async valid => {
-        if (!valid) return;
-
-        saveOrUpdate(this.editUserForm).then(() => {
-          const 淇敼鐢ㄦ埛鎴愬姛 = this.$t('淇敼鐢ㄦ埛鎴愬姛');
-          this.$message.success(淇敼鐢ㄦ埛鎴愬姛);
-          // 闅愯棌娣诲姞鍒嗙被瀵硅瘽妗�
-          this.editDialogVisible = false;
-          // 閲嶆柊鑾峰彇鍒嗙被鍒楄〃
-          this.getUserList();
-        });
-      })
-    }
+    saveOrUpdate(this.editUserForm).then(() => {
+      const successMessage = this.$t('editUserSuccess');
+      this.$message.success(successMessage);
+      // 闅愯棌娣诲姞鍒嗙被瀵硅瘽妗�
+      this.editDialogVisible = false;
+      // 閲嶆柊鑾峰彇鍒嗙被鍒楄〃
+      this.getUserList();
+    });
+  })
+}
   }
 }
 </script>

--
Gitblit v1.8.0