系统管理/部门管理角色管理用户管理

This commit is contained in:
Teo
2025-07-11 19:16:57 +08:00
parent 4a0962b117
commit 748464b44a
13 changed files with 243 additions and 81 deletions

View File

@ -4,7 +4,7 @@
<!-- 部门树 -->
<el-col :lg="4" :xs="24" style="">
<el-card shadow="hover">
<el-input v-model="deptName" placeholder="请输入部门名称1" prefix-icon="Search" clearable />
<el-input v-model="deptName" placeholder="请输入部门名称" prefix-icon="Search" clearable />
<el-tree
ref="deptTreeRef"
class="mt-2"
@ -317,7 +317,7 @@ import { RoleVO } from '@/api/system/role/types';
import { PostVO } from '@/api/system/post/types';
import { globalHeaders } from '@/utils/request';
import { to } from 'await-to-js';
import { optionselect } from '@/api/system/post';
import { getRoleList, optionselect } from '@/api/system/post';
import ShuttleFrame from '../../project/projectRelevancy/component/ShuttleFrame.vue';
const router = useRouter();
@ -469,7 +469,7 @@ const getList = async () => {
/** 查询部门下拉树结构 */
const getDeptTree = async () => {
const res = await api.deptTreeSelect();
const res = await api.deptTreeSelect({ isShow: '1' });
deptOptions.value = res.data;
enabledDeptOptions.value = filterDisabledDept(res.data);
};
@ -623,7 +623,6 @@ const handleAdd = async () => {
dialog.visible = true;
dialog.title = '新增用户';
postOptions.value = data.posts;
roleOptions.value = data.roles;
form.value.password = initPassword.value.toString();
};
@ -638,7 +637,7 @@ const handleUpdate = async (row?: UserForm) => {
postOptions.value = data.posts;
roleOptions.value = data.roles;
form.value.postIds = data.postIds;
form.value.roleIds = data.roleIds;
form.value.roleIds = data.user.roleIds;
form.value.password = '';
};
@ -682,8 +681,11 @@ onMounted(() => {
async function handleDeptChange(value: number | string) {
const response = await optionselect(value);
const roleList = await getRoleList(value);
roleOptions.value = roleList.data;
postOptions.value = response.data;
form.value.postIds = [];
form.value.roleIds = [];
}
const shuttleVisible = ref(false);