增加根据id获取菜单详情
This commit is contained in:
parent
ce5081d59d
commit
f2f089c7c6
Binary file not shown.
Binary file not shown.
|
|
@ -21,6 +21,8 @@ namespace iMES.System.IServices
|
|||
|
||||
|
||||
Task<object> GetTreeItem(int menuId);
|
||||
|
||||
Task<object> GetMenuItem(int menuId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -271,6 +271,7 @@ namespace iMES.System.Services
|
|||
CacheContext.Add(_menuCacheKey, DateTime.Now.ToString("yyyyMMddHHMMssfff"));
|
||||
return webResponse.OK("删除成功");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑菜单时,获取菜单信息
|
||||
/// </summary>
|
||||
|
|
@ -299,6 +300,33 @@ namespace iMES.System.Services
|
|||
}).FirstOrDefault();
|
||||
return sysMenu;
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据菜单Url获取菜单信息
|
||||
/// </summary>
|
||||
/// <param name="menuId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> GetMenuItem(int menuId)
|
||||
{
|
||||
var sysMenu = (await base.repository.FindAsync(x => x.Menu_Id == menuId))
|
||||
.Select(
|
||||
p => new
|
||||
{
|
||||
p.Menu_Id,
|
||||
p.ParentId,
|
||||
p.MenuName,
|
||||
p.Url,
|
||||
p.Auth,
|
||||
p.OrderNo,
|
||||
p.Icon,
|
||||
p.Enable,
|
||||
MenuType = p.MenuType ?? 0,
|
||||
p.CreateDate,
|
||||
p.Creator,
|
||||
p.TableName,
|
||||
p.ModifyDate
|
||||
}).FirstOrDefault();
|
||||
return sysMenu;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ using iMES.Core.Enums;
|
|||
using iMES.Core.Filters;
|
||||
using iMES.Entity.DomainModels;
|
||||
using iMES.System.IServices;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace iMES.System.Controllers
|
||||
{
|
||||
|
|
@ -27,7 +29,7 @@ namespace iMES.System.Controllers
|
|||
return Json(await _service.GetMenu());
|
||||
}
|
||||
|
||||
[HttpPost, Route("getTreeItem")]
|
||||
[HttpGet,HttpPost, Route("getTreeItem")]
|
||||
[ApiActionPermission("Sys_Menu", "1", ActionPermissionOptions.Search)]
|
||||
public async Task<IActionResult> GetTreeItem(int menuId)
|
||||
{
|
||||
|
|
@ -53,6 +55,11 @@ namespace iMES.System.Controllers
|
|||
{
|
||||
return Json(await Service.DelMenu(menuId));
|
||||
}
|
||||
|
||||
[HttpGet,HttpPost, Route("getTreeItemById")]
|
||||
[ApiActionPermission("Sys_Menu", "1", ActionPermissionOptions.Search)]
|
||||
public async Task<IActionResult> GetTreeItemByUrl(int menuId)
|
||||
{
|
||||
return JsonNormal(await _service.GetMenuItem(menuId));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,6 +192,7 @@ namespace iMES.System.Controllers
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("ExportPDF")]
|
||||
[Obsolete]
|
||||
public string ExportPDF()
|
||||
{
|
||||
var titleStyle = TextStyle.Default.FontSize(36).SemiBold().FontColor(Colors.Blue.Medium);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@
|
|||
<PropertyGroup>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<_PublishTargetUrl>C:\Users\Administrator\Desktop\iMES_Open</_PublishTargetUrl>
|
||||
<History>True|2023-02-03T12:19:09.1780016Z;True|2023-02-02T13:49:02.6178763+08:00;True|2023-01-30T13:43:14.8507778+08:00;False|2023-01-30T13:42:46.0439639+08:00;True|2023-01-30T12:58:52.5236049+08:00;True|2023-01-29T20:05:28.2274319+08:00;False|2023-01-29T20:04:09.4843700+08:00;False|2023-01-29T20:03:51.4180786+08:00;True|2023-01-29T19:45:23.3948065+08:00;True|2023-01-29T19:04:18.1011819+08:00;True|2022-12-25T17:18:52.6199398+08:00;True|2022-12-22T19:00:18.8312831+08:00;True|2022-12-22T11:11:31.4926115+08:00;True|2022-12-15T20:54:57.5904230+08:00;True|2022-12-07T19:50:08.0924868+08:00;True|2022-11-22T18:59:41.5374454+08:00;True|2022-11-07T16:57:43.5384965+08:00;True|2022-11-07T16:25:30.0717521+08:00;True|2022-11-07T15:30:56.9981296+08:00;True|2022-11-07T15:13:09.8227629+08:00;True|2022-09-18T18:59:02.8281148+08:00;True|2022-09-13T13:37:24.1228846+08:00;True|2022-09-11T15:29:21.6493113+08:00;True|2022-09-07T19:38:37.9801107+08:00;True|2022-08-27T20:27:48.0539939+08:00;True|2022-08-27T19:53:05.9670247+08:00;True|2022-08-23T21:20:57.4722541+08:00;True|2022-06-12T22:17:24.3799130+08:00;True|2022-06-12T22:16:22.2865006+08:00;True|2022-06-12T22:09:17.6722827+08:00;True|2022-06-12T22:08:35.0069852+08:00;True|2022-06-12T22:08:09.1208323+08:00;</History>
|
||||
<History>True|2023-02-13T08:23:15.0319468Z;False|2023-02-13T16:22:18.0555584+08:00;True|2023-02-03T20:19:09.1780016+08:00;True|2023-02-02T13:49:02.6178763+08:00;True|2023-01-30T13:43:14.8507778+08:00;False|2023-01-30T13:42:46.0439639+08:00;True|2023-01-30T12:58:52.5236049+08:00;True|2023-01-29T20:05:28.2274319+08:00;False|2023-01-29T20:04:09.4843700+08:00;False|2023-01-29T20:03:51.4180786+08:00;True|2023-01-29T19:45:23.3948065+08:00;True|2023-01-29T19:04:18.1011819+08:00;True|2022-12-25T17:18:52.6199398+08:00;True|2022-12-22T19:00:18.8312831+08:00;True|2022-12-22T11:11:31.4926115+08:00;True|2022-12-15T20:54:57.5904230+08:00;True|2022-12-07T19:50:08.0924868+08:00;True|2022-11-22T18:59:41.5374454+08:00;True|2022-11-07T16:57:43.5384965+08:00;True|2022-11-07T16:25:30.0717521+08:00;True|2022-11-07T15:30:56.9981296+08:00;True|2022-11-07T15:13:09.8227629+08:00;True|2022-09-18T18:59:02.8281148+08:00;True|2022-09-13T13:37:24.1228846+08:00;True|2022-09-11T15:29:21.6493113+08:00;True|2022-09-07T19:38:37.9801107+08:00;True|2022-08-27T20:27:48.0539939+08:00;True|2022-08-27T19:53:05.9670247+08:00;True|2022-08-23T21:20:57.4722541+08:00;True|2022-06-12T22:17:24.3799130+08:00;True|2022-06-12T22:16:22.2865006+08:00;True|2022-06-12T22:09:17.6722827+08:00;True|2022-06-12T22:08:35.0069852+08:00;True|2022-06-12T22:08:09.1208323+08:00;</History>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
@ -16,10 +16,10 @@
|
|||
"Connection": {
|
||||
"DBType": "MsSql", //MySql/MsSql/PgSql //数据库类型,如果使用的是sqlserver此处应设置为MsSql
|
||||
//sqlserver连接字符串
|
||||
"DbConnectionString": "Data Source=.;Initial Catalog=iMES_Open;Persist Security Info=True;User ID=sa;Password=123456;Connect Timeout=500;",
|
||||
"DbConnectionString": "Data Source=.;Initial Catalog=iMES_Open;Persist Security Info=True;User ID=sa;Password=123456;Connect Timeout=500;",
|
||||
|
||||
//mysql连接字符串(升级EFCore3.1到时已将mysql连接字符串修改,2019-12-20)
|
||||
//"DbConnectionString": " Data Source=127.0.0.1;Database=netcoredev1;AllowLoadLocalInfile=true;User ID=root;Password=jxx!@#123..errrewJXXX;allowPublicKeyRetrieval=true;pooling=true;CharSet=utf8;port=3306;sslmode=none;",
|
||||
//"DbConnectionString": " Data Source=127.0.0.1;Database=imes_open;AllowLoadLocalInfile=true;User ID=root;Password=123456;allowPublicKeyRetrieval=true;pooling=true;CharSet=utf8;port=3306;sslmode=none;",
|
||||
|
||||
//PgSql连接字符串
|
||||
// "DbConnectionString": "Host=132.232.2.109;Port=5432;User id=postgres;password=jxx_abcd;Database=netcoredev;",
|
||||
|
|
|
|||
Loading…
Reference in New Issue