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