diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/MenuController.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/MenuController.cs index c7fcf91d..136eccd7 100644 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/MenuController.cs +++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/MenuController.cs @@ -34,9 +34,9 @@ namespace Yi.Framework.ApiMicroservice.Controllers /// [HttpGet] //暂未制作逻辑删除与多租户的过滤 - public async Task> GetMenuTree() + public async Task GetMenuTree() { - return await _iMenuService.GetMenuTreeAsync(); + return Result.Success().SetData(await _iMenuService.GetMenuTreeAsync()); } } } diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db index 9314907f..dc8a76bd 100644 Binary files a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db and b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db differ diff --git a/Yi.Framework.Net6/Yi.Framework.Model/ModelsTemplate/MenuEntity.cs b/Yi.Framework.Net6/Yi.Framework.Model/ModelsTemplate/MenuEntity.cs index d65c6f90..062ff186 100644 --- a/Yi.Framework.Net6/Yi.Framework.Model/ModelsTemplate/MenuEntity.cs +++ b/Yi.Framework.Net6/Yi.Framework.Model/ModelsTemplate/MenuEntity.cs @@ -32,7 +32,7 @@ namespace Yi.Framework.Model.Models /// /// /// - [SugarColumn(ColumnName="MenuCode" )] + [SugarColumn(ColumnName= "PermissionCode")] public string PermissionCode { get; set; } /// /// diff --git a/Yi.Framework.Net6/Yi.Framework.Service/MenuService.cs b/Yi.Framework.Net6/Yi.Framework.Service/MenuService.cs index dce836fd..e85ef7f2 100644 --- a/Yi.Framework.Net6/Yi.Framework.Service/MenuService.cs +++ b/Yi.Framework.Net6/Yi.Framework.Service/MenuService.cs @@ -13,7 +13,7 @@ namespace Yi.Framework.Service { //ParentId 0,代表为根目录,只能存在一个 //复杂查询直接使用db代理 - return await _repository._Db.Queryable().ToTreeAsync(it=>it.Children,it=>it.ParentId,0); + return await _repository._Db.Queryable().Where(u=>u.IsDeleted==false).ToTreeAsync(it=>it.Children,it=>it.ParentId,0); } } } diff --git a/Yi.Vue2.x/src/api/menuApi.js b/Yi.Vue2.x/src/api/menuApi.js index 26abc23a..12c00e16 100644 --- a/Yi.Vue2.x/src/api/menuApi.js +++ b/Yi.Vue2.x/src/api/menuApi.js @@ -1,8 +1,8 @@ import myaxios from '@/util/myaxios' export default { - GetMenuInMould() { + getMenuTree() { return myaxios({ - url: '/Menu/GetMenuInMould', + url: '/Menu/getMenuTree', method: 'get' }) }, @@ -34,13 +34,7 @@ export default { data: data }) }, - SetMouldByMenu(menuId, mouldId) { - return myaxios({ - url: '/Menu/SetMouldByMenu', - method: 'post', - data: { id1: menuId, id2: mouldId } - }) - }, + GetTopMenusByHttpUser() { return myaxios({ url: '/Menu/GetTopMenusByHttpUser', diff --git a/Yi.Vue2.x/src/components/ccTreeview.vue b/Yi.Vue2.x/src/components/ccTreeview.vue index e90c02c2..744eaa01 100644 --- a/Yi.Vue2.x/src/components/ccTreeview.vue +++ b/Yi.Vue2.x/src/components/ccTreeview.vue @@ -1,14 +1,11 @@