diff --git a/src/api/user-boot/function.ts b/src/api/user-boot/function.ts index c47e35d..ec508b8 100644 --- a/src/api/user-boot/function.ts +++ b/src/api/user-boot/function.ts @@ -31,3 +31,12 @@ export function deleteMenu(id: string) { method: 'delete', }) } + +// 更新角色菜单 +export function updateRoleMenu(data:any) { + return createAxios({ + url: '/user-boot/function/assignFunctionByRoleIndexes', + method: 'post', + data: data + }) +} \ No newline at end of file diff --git a/src/api/user-boot/role.ts b/src/api/user-boot/role.ts new file mode 100644 index 0000000..9a1f867 --- /dev/null +++ b/src/api/user-boot/role.ts @@ -0,0 +1,25 @@ +import createAxios from '@/utils/request' + +export function add(data: any) { + return createAxios({ + url: '/user-boot/role/add', + method: 'post', + data: data + }) +} + +export function update(data: any) { + return createAxios({ + url: '/user-boot/role/update', + method: 'post', + data: data + }) +} + +export function del(data: any) { + return createAxios({ + url: '/user-boot/role/delete', + method: 'post', + data: data + }) +} diff --git a/src/api/user-boot/roleFuction.ts b/src/api/user-boot/roleFuction.ts new file mode 100644 index 0000000..ccfcb8c --- /dev/null +++ b/src/api/user-boot/roleFuction.ts @@ -0,0 +1,21 @@ +import createAxios from '@/utils/request' + +export function getFunctionsByRoleIndex(data) { + return createAxios({ + url: '/user-boot/roleFunction/getFunctionsByRoleIndex', + method: 'post', + params: data + }) +} + +export function updateRoleMenu(data:any) { + return createAxios({ + url: '/user-boot/function/assignFunctionByRoleIndexes', + method: 'post', + data: data + // params: roleIndex,functionIndexList + // data:{ + // roleIndex,functionIndexList + // } + }) +} \ No newline at end of file diff --git a/src/components/tree/index.vue b/src/components/tree/index.vue index 460e675..6115652 100644 --- a/src/components/tree/index.vue +++ b/src/components/tree/index.vue @@ -26,13 +26,13 @@ diff --git a/src/views/auth/role/popupForm.vue b/src/views/auth/role/popupForm.vue index 60e45b4..3e8d2fc 100644 --- a/src/views/auth/role/popupForm.vue +++ b/src/views/auth/role/popupForm.vue @@ -1,31 +1,14 @@