Compare commits

..

No commits in common. "ac657a162f40bf87c8580192ce04e56dea19a203" and "e0f42e815ebf71eee91366c02da36d3556ffe09b" have entirely different histories.

3 changed files with 4 additions and 24 deletions

View File

@ -510,18 +510,6 @@ export default {
this.loginByRole(this.$store.state.user.roles[0].Id) this.loginByRole(this.$store.state.user.roles[0].Id)
return return
} }
if (
Array.isArray(this.$store.state.user.roles) &&
this.$store.state.user.roles.filter((item) => item.IsUserRoleDisabled)
.length ===
this.$store.state.user.roles.length - 1
) {
let role = this.$store.state.user.roles.find(
(item) => !item.IsUserRoleDisabled
)
this.loginByRole(role.Id)
return
}
return (this.toggleRoleVisible = true) return (this.toggleRoleVisible = true)
}, },
cancel() { cancel() {

View File

@ -73,8 +73,7 @@
</el-form-item> </el-form-item>
<el-form-item <el-form-item
:label="$t('system:userlist:table:UserType')" :label="$t('system:userlist:table:UserType')"
prop="Roles" prop="UserTypeId"
v-if="type === 0"
> >
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<el-select <el-select
@ -86,6 +85,7 @@
style="width: 100%" style="width: 100%"
:disabled="user.CanEditUserType === false || type === 1" :disabled="user.CanEditUserType === false || type === 1"
@change="handleChange" @change="handleChange"
v-if="type === 0"
> >
<template v-for="userType of userTypeOptions"> <template v-for="userType of userTypeOptions">
<el-option <el-option
@ -96,14 +96,6 @@
/> />
</template> </template>
</el-select> </el-select>
</div>
</el-form-item>
<el-form-item
:label="$t('system:userlist:table:UserType')"
prop="userTypeId"
v-else
>
<div style="display: flex; align-items: center">
<el-select <el-select
ref="userType" ref="userType"
v-model="Roles" v-model="Roles"
@ -113,6 +105,7 @@
style="width: 100%" style="width: 100%"
:disabled="user.CanEditUserType === false || type === 1" :disabled="user.CanEditUserType === false || type === 1"
@change="handleChange" @change="handleChange"
v-else
> >
<template v-for="userType of userTypeOptions"> <template v-for="userType of userTypeOptions">
<el-option <el-option

View File

@ -119,7 +119,7 @@
v-for="item in roles" v-for="item in roles"
:key="item.Id" :key="item.Id"
:label="item.Id" :label="item.Id"
:disabled="item.IsUserRoleDisabled" :disabled="item.isUserRoleDisabled"
style="margin-bottom: 10px" style="margin-bottom: 10px"
> >
{{ item.UserTypeShortName }} {{ item.UserTypeShortName }}
@ -210,7 +210,6 @@ export default {
}, },
computed: { computed: {
roles() { roles() {
console.log(this.$store.state.user.roles, 'this.$store.state.user.roles')
return this.$store.state.user.roles return this.$store.state.user.roles
}, },
hasRole() { hasRole() {