feat:完成数据权限功能
This commit is contained in:
@@ -9,6 +9,5 @@ namespace Yi.Furion.Application.Rbac.Services
|
|||||||
public interface IDeptService : ICrudAppService<DeptGetOutputDto, DeptGetListOutputDto, long, DeptGetListInputVo, DeptCreateInputVo, DeptUpdateInputVo>
|
public interface IDeptService : ICrudAppService<DeptGetOutputDto, DeptGetListOutputDto, long, DeptGetListInputVo, DeptCreateInputVo, DeptUpdateInputVo>
|
||||||
{
|
{
|
||||||
Task<List<long>> GetChildListAsync(long deptId);
|
Task<List<long>> GetChildListAsync(long deptId);
|
||||||
Task<List<DeptGetListOutputDto>> GetListRoleIdAsync([FromRoute] long roleId);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace Yi.Furion.Application.Rbac.Services.Impl
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
//[Route("{roleId}")]
|
//[Route("{roleId}")]
|
||||||
public async Task<List<DeptGetListOutputDto>> GetListRoleIdAsync([FromRoute] long roleId)
|
public async Task<List<DeptGetListOutputDto>> GetRoleIdAsync([FromRoute] long roleId)
|
||||||
{
|
{
|
||||||
var entities = await _deptRepository.GetListRoleIdAsync(roleId);
|
var entities = await _deptRepository.GetListRoleIdAsync(roleId);
|
||||||
return await MapToGetListOutputDtosAsync(entities);
|
return await MapToGetListOutputDtosAsync(entities);
|
||||||
|
|||||||
@@ -379,7 +379,7 @@
|
|||||||
Dept服务实现
|
Dept服务实现
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Yi.Furion.Application.Rbac.Services.Impl.DeptService.GetListRoleIdAsync(System.Int64)">
|
<member name="M:Yi.Furion.Application.Rbac.Services.Impl.DeptService.GetRoleIdAsync(System.Int64)">
|
||||||
<summary>
|
<summary>
|
||||||
通过角色id查询该角色全部部门
|
通过角色id查询该角色全部部门
|
||||||
</summary>
|
</summary>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export function delDept(deptId) {
|
|||||||
// 根据角色ID查询菜单下拉树结构
|
// 根据角色ID查询菜单下拉树结构
|
||||||
export function roleDeptTreeselect(roleId) {
|
export function roleDeptTreeselect(roleId) {
|
||||||
return request({
|
return request({
|
||||||
url: '/role/dept-ids/' + roleId,
|
url: '/dept/role-id/' + roleId,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -439,7 +439,7 @@ function getDeptTree(roleId) {
|
|||||||
|
|
||||||
let deptIds = [];
|
let deptIds = [];
|
||||||
roleDeptTreeselect(roleId).then((response) => {
|
roleDeptTreeselect(roleId).then((response) => {
|
||||||
deptIds = response.data;
|
deptIds = response.data.map(x=>x.id);
|
||||||
// nextTick(() => {
|
// nextTick(() => {
|
||||||
if (deptRef.value) {
|
if (deptRef.value) {
|
||||||
deptRef.value.setCheckedKeys(deptIds);
|
deptRef.value.setCheckedKeys(deptIds);
|
||||||
|
|||||||
Reference in New Issue
Block a user