Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing Details

uat_us
caiyiling 2025-01-21 16:49:29 +08:00
commit f1c72c66e8
3 changed files with 23 additions and 4 deletions

View File

@ -510,6 +510,18 @@ 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,7 +73,8 @@
</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="UserTypeId" prop="Roles"
v-if="type === 0"
> >
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<el-select <el-select
@ -85,7 +86,6 @@
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,6 +96,14 @@
/> />
</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"
@ -105,7 +113,6 @@
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 }}