fix: 新增用户允许选择角色

This commit is contained in:
TsMask
2025-03-13 11:43:49 +08:00
parent 720d7d3b99
commit 1db9d09a79

View File

@@ -385,8 +385,8 @@ function fnModalVisibleByEdit(userId?: string | number) {
modalState.options.posts = posts; modalState.options.posts = posts;
const { user, roleIds, postIds } = res.data; const { user, roleIds, postIds } = res.data;
modalState.from = Object.assign(modalState.from, user); modalState.from = Object.assign(modalState.from, user);
modalState.from.roleIds = [2]; //roleIds; modalState.from.roleIds = roleIds;
modalState.from.postIds = [2]; // postIds; modalState.from.postIds = postIds;
modalState.from.deptId = deptTreeData.value[0].id; modalState.from.deptId = deptTreeData.value[0].id;
modalState.title = modalState.title =
t('common.addText') + t('views.system.user.userInfo'); t('common.addText') + t('views.system.user.userInfo');
@@ -1221,8 +1221,8 @@ onMounted(() => {
</a-tree-select> </a-tree-select>
</a-form-item> </a-form-item>
<a-row v-if="false"> <a-row>
<a-col :lg="12" :md="12" :xs="24"> <a-col :lg="12" :md="12" :xs="24" v-if="false">
<a-form-item <a-form-item
:label="t('views.system.user.userWork')" :label="t('views.system.user.userWork')"
name="postIds" name="postIds"
@@ -1449,7 +1449,6 @@ onMounted(() => {
name="roleIds" name="roleIds"
:label-col="{ span: 3 }" :label-col="{ span: 3 }"
v-perms:has="['system:user:editRole']" v-perms:has="['system:user:editRole']"
v-if="false"
> >
<a-select <a-select
v-model:value="modalState.from.roleIds" v-model:value="modalState.from.roleIds"