-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into release/gh-page
- Loading branch information
Showing
21 changed files
with
743 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
<template> | ||
<RouterView /> | ||
<el-config-provider :locale="locale"> | ||
<RouterView /> | ||
</el-config-provider> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { computed } from 'vue' | ||
import { useAppStore } from '@/stores/app' | ||
const AppStore = useAppStore() | ||
const locale = computed(() => AppStore.elementPlusLocale) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
export interface IRoleInfo { | ||
description: string | ||
id: number | ||
name: string | ||
order: number | ||
permissions: number[] | ||
resources: number[] | ||
type: 0 | 1 | ||
} | ||
|
||
export interface IGetRolesParams { | ||
page: number | ||
page_size: number | ||
name: string | ||
type: 0 | 1 | '' | ||
} | ||
|
||
export interface IDataAuthInfo { | ||
group_name: string | ||
id: number | ||
name: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import request from '@/utils/request' | ||
import type { IRoleInfo, IGetRolesParams, IDataAuthInfo } from './index.interface' | ||
|
||
// 获取所有角色 | ||
export const getRoles = (params: IGetRolesParams) => { | ||
return request<{ data: IRoleInfo[]; total: number }>({ | ||
url: '/roles', | ||
method: 'get', | ||
params | ||
}) | ||
} | ||
|
||
// 删除角色 | ||
export const deleteRole = (id: number) => { | ||
return request({ | ||
url: `/roles/${id}`, | ||
method: 'delete' | ||
}) | ||
} | ||
|
||
// 获取单个角色详情 | ||
export const getRoleById = (id: number) => { | ||
return request<IRoleInfo>({ | ||
url: `/roles/${id}`, | ||
method: 'get' | ||
}) | ||
} | ||
|
||
// 修改角色 | ||
export const updateRole = (id: number, data: Omit<IRoleInfo, 'id'>) => { | ||
return request({ | ||
url: `/roles/${id}`, | ||
method: 'put', | ||
data | ||
}) | ||
} | ||
|
||
// 新增角色 | ||
export const addRole = (data: Omit<IRoleInfo, 'id'>) => { | ||
return request({ | ||
url: '/roles', | ||
method: 'post', | ||
data | ||
}) | ||
} | ||
|
||
// 获取所有数据权限 | ||
export const getPermissions = () => { | ||
return request<IDataAuthInfo[]>({ | ||
url: '/permission', | ||
method: 'get' | ||
}) | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.