From 3eced65b14a858329fd2b7f4c8bc6c5d66710c78 Mon Sep 17 00:00:00 2001 From: wu <731351411@qq.com> Date: 星期三, 06 九月 2023 16:57:01 +0800 Subject: [PATCH] Merge branch 'master' of ssh://10.153.19.150:29418/CanadaMes --- CanadaMes-ui/src/views/role/index.vue | 28 +++++++++++++++++++--------- 1 files changed, 19 insertions(+), 9 deletions(-) diff --git a/CanadaMes-ui/src/views/role/index.vue b/CanadaMes-ui/src/views/role/index.vue index ebcc35a..c663906 100644 --- a/CanadaMes-ui/src/views/role/index.vue +++ b/CanadaMes-ui/src/views/role/index.vue @@ -137,12 +137,13 @@ addRoleForm: { state: 1 }, + // 淇敼鐨勮鑹插璞� editRoleForm: {}, // 娣诲姞瑙掕壊鐨勯獙璇佽鍒� addRoleRules: { name: [ - {required: true, message: '璇疯緭鍏ュ悕绉�', trigger: 'blur'}, + {required: true, message: '璇疯緭鍏ュ悕绉�', trigger: 'blur'}, {min: 2, max: 15, message: '闀垮害鍦� 2 鍒� 15 涓瓧绗�', trigger: 'blur'} ], state: [ @@ -177,7 +178,8 @@ }, stateChange(info) { saveOrUpdate(info).then(() => { - this.$message.success("鏇存柊鐘舵�佹垚鍔�") + const 鏇存柊鐘舵�佹垚鍔� = this.$t('鏇存柊鐘舵�佹垚鍔�'); + this.$message.success(鏇存柊鐘舵�佹垚鍔�) }); }, @@ -195,7 +197,8 @@ this.getRoleList(); // 闅愯棌娣诲姞瑙掕壊瀵硅瘽妗� this.addDialogVisible = false; - this.$message.success("娣诲姞瑙掕壊鎴愬姛"); + const 娣诲姞瑙掕壊鎴愬姛 = this.$t('娣诲姞瑙掕壊鎴愬姛'); + this.$message.success(娣诲姞瑙掕壊鎴愬姛); }); }) }, @@ -220,26 +223,33 @@ this.getRoleList(); // 闅愯棌娣诲姞瑙掕壊瀵硅瘽妗� this.editDialogVisible = false; - this.$message.success("淇敼瑙掕壊鎴愬姛"); + const 淇敼瑙掕壊鎴愬姛 = this.$t('淇敼瑙掕壊鎴愬姛'); + this.$message.success(淇敼瑙掕壊鎴愬姛); }); }) }, // 鏍规嵁id鍒犻櫎瑙掕壊淇℃伅 removeById(role) { // 寮规璇㈤棶鐢ㄦ埛鏄惁鍒犻櫎瑙掕壊 - this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ヨ鑹�, 鏄惁缁х画?', '鎻愮ず', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', + const 姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ヨ鑹叉槸鍚︾户缁� = this.$t('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ヨ鑹�, 鏄惁缁х画?'); + const 鎻愮ず = this.$t('鎻愮ず'); + const 纭畾 = this.$t('纭畾'); + const 鍙栨秷 = this.$t('鍙栨秷'); + this.$confirm(姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ヨ鑹叉槸鍚︾户缁�, 鎻愮ず, { + confirmButtonText: 纭畾, + cancelButtonText: 鍙栨秷, type: 'warning' }).then(() => { // 鍒犻櫎瑙掕壊 removeById({id: role.id}).then(() => { // 閲嶆柊鑾峰彇瑙掕壊鍒楄〃 this.getRoleList(); - this.$message.success("鍒犻櫎瑙掕壊鎴愬姛"); + const 鍒犻櫎瑙掕壊鎴愬姛 = this.$t('鍒犻櫎瑙掕壊鎴愬姛'); + this.$message.success(鍒犻櫎瑙掕壊鎴愬姛); }); }).catch(() => { - this.$message('宸插彇娑堝垹闄�'); + const 宸插彇娑堝垹闄� = this.$t('宸插彇娑堝垹闄�'); + this.$message(宸插彇娑堝垹闄�); }); } } -- Gitblit v1.8.0