fix: 部门角色逻辑调整
This commit is contained in:
@@ -145,7 +145,7 @@
|
|||||||
<ns-button type="primary" @click="CancelUser">取消</ns-button>
|
<ns-button type="primary" @click="CancelUser">取消</ns-button>
|
||||||
<ns-button
|
<ns-button
|
||||||
v-if="roleDisabled"
|
v-if="roleDisabled"
|
||||||
:disabled="!roleTreeData?.length"
|
:disabled="!selectRoleRef || !roleTreeData?.length"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="rolePipe(roleEdit, false, false)">
|
@click="rolePipe(roleEdit, false, false)">
|
||||||
编辑
|
编辑
|
||||||
@@ -501,6 +501,7 @@
|
|||||||
roleFormData.value = {};
|
roleFormData.value = {};
|
||||||
opMap.type = '';
|
opMap.type = '';
|
||||||
opMap.fuc = '';
|
opMap.fuc = '';
|
||||||
|
selectRoleRef.value = '';
|
||||||
roleDisabled.value = true;
|
roleDisabled.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -627,6 +628,7 @@
|
|||||||
roleActiveKey.value = 1;
|
roleActiveKey.value = 1;
|
||||||
// 需要重置数据
|
// 需要重置数据
|
||||||
clearDeptData();
|
clearDeptData();
|
||||||
|
clearRoleData();
|
||||||
const { selected } = info;
|
const { selected } = info;
|
||||||
if (!selectedKeys?.length) return;
|
if (!selectedKeys?.length) return;
|
||||||
|
|
||||||
@@ -686,7 +688,7 @@
|
|||||||
roleFormData.value = cloneDeep(info.node.dataRef);
|
roleFormData.value = cloneDeep(info.node.dataRef);
|
||||||
roleCheckedKeys.value = [];
|
roleCheckedKeys.value = [];
|
||||||
if (selectRoleRef.value?.proleId) {
|
if (selectRoleRef.value?.proleId) {
|
||||||
// 查询子部门
|
// 查询子角色
|
||||||
getRolesonPermissionTree({ roleId: selectRoleRef.value?.proleId });
|
getRolesonPermissionTree({ roleId: selectRoleRef.value?.proleId });
|
||||||
} else {
|
} else {
|
||||||
getRolePermissionTree({ deptId: selectRef.value.deptInfo.deptId });
|
getRolePermissionTree({ deptId: selectRef.value.deptInfo.deptId });
|
||||||
@@ -723,6 +725,13 @@
|
|||||||
deptPermission().then(() => {
|
deptPermission().then(() => {
|
||||||
clearDeptData();
|
clearDeptData();
|
||||||
disabled.value = true;
|
disabled.value = true;
|
||||||
|
// 部门权限修改后更新角色树
|
||||||
|
if (selectRoleRef.value?.proleId) {
|
||||||
|
// 查询子角色
|
||||||
|
getRolesonPermissionTree({ roleId: selectRoleRef.value?.proleId });
|
||||||
|
} else {
|
||||||
|
getRolePermissionTree({ deptId: selectRef.value.deptInfo.deptId });
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@@ -3,12 +3,6 @@ import { http } from '/nerv-lib/util';
|
|||||||
import { origanizemanage } from '/@/api/origanizemanage';
|
import { origanizemanage } from '/@/api/origanizemanage';
|
||||||
export const formConfig = (disabled) => {
|
export const formConfig = (disabled) => {
|
||||||
return ref([
|
return ref([
|
||||||
{
|
|
||||||
field: 'field111',
|
|
||||||
component: 'NsChildForm',
|
|
||||||
componentProps: {
|
|
||||||
title: '用户信息',
|
|
||||||
schemas: [
|
|
||||||
{
|
{
|
||||||
label: '账号',
|
label: '账号',
|
||||||
field: 'accountNo',
|
field: 'accountNo',
|
||||||
@@ -95,9 +89,6 @@ export const formConfig = (disabled) => {
|
|||||||
maxLength: 30,
|
maxLength: 30,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
const options = ref([]);
|
const options = ref([]);
|
||||||
|
@@ -32,12 +32,14 @@
|
|||||||
:footer-style="{ textAlign: 'right' }"
|
:footer-style="{ textAlign: 'right' }"
|
||||||
destroyOnClose
|
destroyOnClose
|
||||||
@close="onClose">
|
@close="onClose">
|
||||||
|
<span class="admin">用户信息</span>
|
||||||
<ns-form
|
<ns-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:schemas="formSchema"
|
:schemas="formSchema"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
class="form"
|
class="form"
|
||||||
:wrapperCol="{ span: 20 }"
|
:wrapperCol="{ span: 20 }"
|
||||||
|
:labelCol="{ span: 4 }"
|
||||||
formLayout="vertical" />
|
formLayout="vertical" />
|
||||||
<span class="admin">用户权限</span>
|
<span class="admin">用户权限</span>
|
||||||
<ns-view-list-table
|
<ns-view-list-table
|
||||||
@@ -596,6 +598,12 @@
|
|||||||
.main {
|
.main {
|
||||||
background-color: @ns-content-bg;
|
background-color: @ns-content-bg;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
|
.top,
|
||||||
|
:deep(.ns-table-search),
|
||||||
|
:deep(.ns-table-main) {
|
||||||
|
box-shadow: @ns-content-box-shadow;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.left {
|
.left {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
@@ -652,10 +660,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.top,
|
|
||||||
:deep(.ns-table-search),
|
|
||||||
:deep(.ns-table-main) {
|
|
||||||
box-shadow: @ns-content-box-shadow;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
Reference in New Issue
Block a user