From 3c50254a2dfc13839aa00b74aba8ec30daf5840e Mon Sep 17 00:00:00 2001
From: wangxiaoshuang <825034831@qq.com>
Date: Fri, 27 Dec 2024 16:40:07 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E8=A7=92=E8=89=B2=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/toggleRole/index.vue | 13 +++++++++++--
src/views/trials/trials-myinfo/account.vue | 8 +++++++-
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/components/toggleRole/index.vue b/src/components/toggleRole/index.vue
index d1e9222b..7d508b3a 100644
--- a/src/components/toggleRole/index.vue
+++ b/src/components/toggleRole/index.vue
@@ -40,6 +40,7 @@
type="primary"
size="small"
@click="save"
+ :disabled="saveDisabled"
:loading="loading"
v-if="hasRole"
>
@@ -78,6 +79,9 @@ export default {
hasRole() {
return this.roles && this.roles.length > 0
},
+ saveDisabled() {
+ return this.form.userRoleId === zzSessionStorage.getItem('userId')
+ },
},
methods: {
cancel() {
@@ -98,11 +102,13 @@ export default {
\ No newline at end of file
diff --git a/src/views/trials/trials-myinfo/account.vue b/src/views/trials/trials-myinfo/account.vue
index 4d543460..401dcaa3 100644
--- a/src/views/trials/trials-myinfo/account.vue
+++ b/src/views/trials/trials-myinfo/account.vue
@@ -127,7 +127,7 @@
1
},
+ saveDisabled() {
+ return this.userRoleId === zzSessionStorage.getItem('userId')
+ },
},
methods: {
// 切换角色
@@ -341,4 +344,7 @@ export default {
.el-radio-group {
margin-top: 12px;
}
+.el-radio {
+ width: 60px;
+}
\ No newline at end of file