perf: user

This commit is contained in:
xingyu4j 2022-11-21 11:21:15 +08:00
parent 4fc342c0a7
commit dcd1b5fbba
3 changed files with 31 additions and 33 deletions

View File

@ -1,9 +1,20 @@
import request from '@/config/axios' import request from '@/config/axios'
import type {
PermissionAssignRoleDataScopeReqVO, export interface PermissionAssignUserRoleReqVO {
PermissionAssignRoleMenuReqVO, userId: number
PermissionAssignUserRoleReqVO roleIds: number[]
} from './types' }
export interface PermissionAssignRoleMenuReqVO {
roleId: number
menuIds: number[]
}
export interface PermissionAssignRoleDataScopeReqVO {
roleId: number
dataScope: number
dataScopeDeptIds: number[]
}
// 查询角色拥有的菜单权限 // 查询角色拥有的菜单权限
export const listRoleMenusApi = async (roleId: number) => { export const listRoleMenusApi = async (roleId: number) => {

View File

@ -1,15 +0,0 @@
export type PermissionAssignUserRoleReqVO = {
userId: number
roleIds: number[]
}
export type PermissionAssignRoleMenuReqVO = {
roleId: number
menuIds: number[]
}
export type PermissionAssignRoleDataScopeReqVO = {
roleId: number
dataScope: number
dataScopeDeptIds: number[]
}

View File

@ -254,24 +254,26 @@ import {
UploadInstance, UploadInstance,
UploadRawFile UploadRawFile
} from 'element-plus' } from 'element-plus'
import { handleTree } from '@/utils/tree'
import { useI18n } from '@/hooks/web/useI18n'
import { FormExpose } from '@/components/Form'
import type { PostVO } from '@/api/system/post'
import type { PermissionAssignUserRoleReqVO } from '@/api/system/permission/types'
import { listSimpleDeptApi } from '@/api/system/dept'
import { listSimplePostsApi } from '@/api/system/post'
import { listSimpleRolesApi } from '@/api/system/role'
import { aassignUserRoleApi, listUserRolesApi } from '@/api/system/permission'
import { rules, allSchemas } from './user.data'
import * as UserApi from '@/api/system/user'
import download from '@/utils/download'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { VxeGridInstance } from 'vxe-table'
import { handleTree } from '@/utils/tree'
import download from '@/utils/download'
import { CommonStatusEnum } from '@/utils/constants' import { CommonStatusEnum } from '@/utils/constants'
import { getAccessToken, getTenantId } from '@/utils/auth' import { getAccessToken, getTenantId } from '@/utils/auth'
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage' import { useMessage } from '@/hooks/web/useMessage'
import { VxeGridInstance } from 'vxe-table'
import { useVxeGrid } from '@/hooks/web/useVxeGrid' import { useVxeGrid } from '@/hooks/web/useVxeGrid'
import { FormExpose } from '@/components/Form'
import { rules, allSchemas } from './user.data'
import * as UserApi from '@/api/system/user'
import { listSimpleDeptApi } from '@/api/system/dept'
import { listSimplePostsApi, PostVO } from '@/api/system/post'
import { listSimpleRolesApi } from '@/api/system/role'
import {
aassignUserRoleApi,
listUserRolesApi,
PermissionAssignUserRoleReqVO
} from '@/api/system/permission'
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //