mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-10 19:00:53 +08:00
重构:重构查询角色树 API 为查询角色字典列表
1.新增 LabelValueVO 通用字典数据结构
This commit is contained in:
@@ -23,8 +23,8 @@ export function listMenuTree(params: MenuParam) {
|
||||
});
|
||||
}
|
||||
|
||||
export function listRoleTree(params: RoleParam) {
|
||||
return axios.get<TreeNodeData[]>('/common/tree/role', {
|
||||
export function listRoleDict(params: RoleParam) {
|
||||
return axios.get<TreeNodeData[]>('/common/dict/role', {
|
||||
params,
|
||||
paramsSerializer: (obj) => {
|
||||
return qs.stringify(obj);
|
||||
|
@@ -274,10 +274,6 @@
|
||||
<a-select
|
||||
v-model="form.roleIds"
|
||||
:options="roleOptions"
|
||||
:field-names="{
|
||||
label: 'title',
|
||||
value: 'key',
|
||||
}"
|
||||
placeholder="请选择所属角色"
|
||||
:loading="roleLoading"
|
||||
multiple
|
||||
@@ -425,7 +421,7 @@
|
||||
updateUser,
|
||||
deleteUser,
|
||||
} from '@/api/system/user';
|
||||
import { listRoleTree, listDeptTree } from '@/api/common';
|
||||
import { listRoleDict, listDeptTree } from '@/api/common';
|
||||
import getAvatar from '@/utils/avatar';
|
||||
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
@@ -559,7 +555,7 @@
|
||||
*/
|
||||
const getRoleOptions = () => {
|
||||
roleLoading.value = true;
|
||||
listRoleTree({})
|
||||
listRoleDict({})
|
||||
.then((res) => {
|
||||
roleOptions.value = res.data;
|
||||
})
|
||||
|
Reference in New Issue
Block a user