用户操作权限增加角色权限过滤,优化角色/部门关系树生成,修复验证码空参数不验证问题

This commit is contained in:
孟帅
2023-08-02 17:38:40 +08:00
parent e941e52d3e
commit 3df5236623
28 changed files with 1097 additions and 887 deletions

View File

@@ -180,19 +180,19 @@ export const options = ref<any>({
export async function loadOptions() {
const dept = await getDeptOption();
if (dept.list !== undefined) {
if (dept.list) {
options.value.dept = dept.list;
}
const role = await getRoleOption();
if (role.list !== undefined) {
if (role.list) {
options.value.role = role.list;
options.value.roleTabs = [{ id: -1, name: '全部' }];
treeDataToCompressed(role.list);
}
const post = await getPostOption();
if (post.list !== undefined && post.list.length > 0) {
if (post.list && post.list.length > 0) {
for (let i = 0; i < post.list.length; i++) {
post.list[i].label = post.list[i].name;
post.list[i].value = post.list[i].id;