客户端添加权限提醒内容

master
ZR20090193-陈敬勇 2 years ago
parent 2de319f448
commit b601db4366

@ -24,12 +24,14 @@ public class RouteItem
public string Component { get; set; } public string Component { get; set; }
public string Redirect { get; set; } public string Redirect { get; set; }
public RouteMeta Meta { get; set; } public RouteMeta Meta { get; set; }
public Tag Tag { get; set; }
public List<RouteItem> Children { get; set; } public List<RouteItem> Children { get; set; }
} }
@ -41,4 +43,15 @@ public class RouteMeta
public string Title { get; set; } public string Title { get; set; }
public string Icon { get; set; } public string Icon { get; set; }
}
public class Tag
{
/// <summary>
///
/// </summary>
public string Content { get; set; }
public bool Dot { get; set; }
public string Type { get; set; }
} }

@ -110,7 +110,7 @@ public class CommonService : ICommonService
var child = new RouteItem var child = new RouteItem
{ {
Path = "/analysis", Path = "/analysis",
Name = "Analysis", Name = "分析页",
Meta = new RouteMeta Meta = new RouteMeta
{ {
Title = "分析页", Title = "分析页",
@ -121,7 +121,7 @@ public class CommonService : ICommonService
var dashboard = new RouteItem var dashboard = new RouteItem
{ {
Path = "/dashboard", Path = "/dashboard",
Name = "Dashboard", Name = "首页",
Component = "layouts/default/index", Component = "layouts/default/index",
Redirect = "/analysis", Redirect = "/analysis",
Meta = new RouteMeta Meta = new RouteMeta
@ -137,7 +137,7 @@ public class CommonService : ICommonService
var per = new RouteItem var per = new RouteItem
{ {
Path = "/wms", Path = "/wms",
Name = "WMS", Name = "预约管理",
Component = "layouts/default/index", Component = "layouts/default/index",
Redirect = "/wms/wmsinplan", Redirect = "/wms/wmsinplan",
Meta = new RouteMeta Meta = new RouteMeta
@ -152,7 +152,7 @@ public class CommonService : ICommonService
var child1 = new RouteItem var child1 = new RouteItem
{ {
Path = "/wmsinplan", Path = "/wmsinplan",
Name = "wmsinplanManagement", Name = "预约入库",
Meta = new RouteMeta Meta = new RouteMeta
{ {
Icon = "ant-design:cloud-upload-outlined", Icon = "ant-design:cloud-upload-outlined",
@ -163,7 +163,7 @@ public class CommonService : ICommonService
var child2 = new RouteItem var child2 = new RouteItem
{ {
Path = "/wmsoutplan", Path = "/wmsoutplan",
Name = "wmsoutplanManagement", Name = "预约出库",
Meta = new RouteMeta Meta = new RouteMeta
{ {
Icon = "ant-design:cloud-download-outlined", Icon = "ant-design:cloud-download-outlined",
@ -174,7 +174,7 @@ public class CommonService : ICommonService
var child31 = new RouteItem var child31 = new RouteItem
{ {
Path = "/wmsclearance", Path = "/wmsclearance",
Name = "wmsclearanceManagement", Name = "预约清关",
Meta = new RouteMeta Meta = new RouteMeta
{ {
Icon = "carbon:shopping-cart-clear", Icon = "carbon:shopping-cart-clear",
@ -194,7 +194,7 @@ public class CommonService : ICommonService
var child4 = new RouteItem var child4 = new RouteItem
{ {
Path = "/user", Path = "/user",
Name = "userManagement", Name = "用户管理",
Meta = new RouteMeta Meta = new RouteMeta
{ {
Icon = "ion:people-sharp", Icon = "ion:people-sharp",
@ -205,7 +205,7 @@ public class CommonService : ICommonService
var child5 = new RouteItem var child5 = new RouteItem
{ {
Path = "/company", Path = "/company",
Name = "companyManagement", Name = "企业信息维护",
Meta = new RouteMeta Meta = new RouteMeta
{ {
Icon = "ion:settings-outline", Icon = "ion:settings-outline",
@ -216,7 +216,7 @@ public class CommonService : ICommonService
var child3 = new RouteItem var child3 = new RouteItem
{ {
Path = "/notice", Path = "/notice",
Name = "noticeManagement", Name = "系统公告",
Meta = new RouteMeta Meta = new RouteMeta
{ {
Icon = "ant-design:bell-outlined", Icon = "ant-design:bell-outlined",
@ -227,7 +227,7 @@ public class CommonService : ICommonService
var child6 = new RouteItem var child6 = new RouteItem
{ {
Path = "/good", Path = "/good",
Name = "goodManagement", Name = "商品信息",
Meta = new RouteMeta Meta = new RouteMeta
{ {
Icon = "icon-park-outline:commodity", Icon = "icon-park-outline:commodity",
@ -238,7 +238,7 @@ public class CommonService : ICommonService
var child7 = new RouteItem var child7 = new RouteItem
{ {
Path = "/goodAudit", Path = "/goodAudit",
Name = "goodAuditManagement", Name = "商品申报",
Meta = new RouteMeta Meta = new RouteMeta
{ {
Icon = "ant-design:cloud-upload-outlined", Icon = "ant-design:cloud-upload-outlined",
@ -255,7 +255,7 @@ public class CommonService : ICommonService
var system = new RouteItem var system = new RouteItem
{ {
Path = "/system", Path = "/system",
Name = "System", Name = "系统管理",
Component = "layouts/default/index", Component = "layouts/default/index",
Redirect = "/company", Redirect = "/company",
Meta = new RouteMeta Meta = new RouteMeta
@ -276,7 +276,7 @@ public class CommonService : ICommonService
var storequery = new RouteItem var storequery = new RouteItem
{ {
Path = "/storequery", Path = "/storequery",
Name = "StoreQuery", Name = "库存明细",
Meta = new RouteMeta Meta = new RouteMeta
{ {
Icon = "ant-design:bar-chart-outlined", Icon = "ant-design:bar-chart-outlined",
@ -287,7 +287,7 @@ public class CommonService : ICommonService
var storeinquery = new RouteItem var storeinquery = new RouteItem
{ {
Path = "/storeinquery", Path = "/storeinquery",
Name = "StoreInQuery", Name = "入库明细",
Meta = new RouteMeta Meta = new RouteMeta
{ {
Icon = "ant-design:bar-chart-outlined", Icon = "ant-design:bar-chart-outlined",
@ -298,7 +298,7 @@ public class CommonService : ICommonService
var storeoutquery = new RouteItem var storeoutquery = new RouteItem
{ {
Path = "/storeoutquery", Path = "/storeoutquery",
Name = "StoreOutQuery", Name = "出库明细",
Meta = new RouteMeta Meta = new RouteMeta
{ {
Icon = "ant-design:bar-chart-outlined", Icon = "ant-design:bar-chart-outlined",
@ -312,7 +312,7 @@ public class CommonService : ICommonService
var query = new RouteItem var query = new RouteItem
{ {
Path = "/query", Path = "/query",
Name = "query", Name = "查询报表",
Component = "layouts/default/index", Component = "layouts/default/index",
Redirect = "/storequery", Redirect = "/storequery",
Meta = new RouteMeta Meta = new RouteMeta
@ -324,6 +324,32 @@ public class CommonService : ICommonService
}; };
list.Add(query); list.Add(query);
#region 处理报警信息
var companyId = user.GetCompanyId();
var noticeCount = db.Queryable<SysNotice>()
.LeftJoin<SysNoticeClient>((a, b) => a.Id == b.NoticeId)
.Where((a, b) => a.SendStatus == SendStatus.Send.ToEnumInt() && b.IsRead == false && b.ClientId == companyId).Count();
foreach (var item in list)
{
if (item.Name =="系统管理")
{
var notice = item.Children.Where(x => x.Name == "系统公告").First();
notice.Tag = new Tag()
{
Type = "error",
Dot = false,
Content = noticeCount.ToString(),
};
}
}
#endregion
return DataResult<List<RouteItem>>.Success("获取数据成功!", list); return DataResult<List<RouteItem>>.Success("获取数据成功!", list);
} }

@ -5329,3 +5329,44 @@
2023-04-23 19:54:23.0763 Info Shutdown() called. Logger closing... 2023-04-23 19:54:23.0763 Info Shutdown() called. Logger closing...
2023-04-23 19:54:23.0779 Info Closing old configuration. 2023-04-23 19:54:23.0779 Info Closing old configuration.
2023-04-23 19:54:23.1657 Info Logger has been closed down. 2023-04-23 19:54:23.1657 Info Logger has been closed down.
2023-04-24 11:23:23.1446 Info Message Template Auto Format enabled
2023-04-24 11:23:23.1742 Info Loading assembly: NLog.Web.AspNetCore
2023-04-24 11:23:23.3924 Info Adding target FileTarget(Name=allfile)
2023-04-24 11:23:23.3924 Info Adding target FileTarget(Name=ownFile-web)
2023-04-24 11:23:23.4463 Info Adding target ColoredConsoleTarget(Name=console)
2023-04-24 11:23:23.5502 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-client\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-04-24 11:23:23.5675 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-04-24 11:28:10.7371 Info Shutdown() called. Logger closing...
2023-04-24 11:28:10.7371 Info Closing old configuration.
2023-04-24 11:28:10.7772 Info Logger has been closed down.
2023-04-24 11:28:34.0942 Info Message Template Auto Format enabled
2023-04-24 11:28:34.1244 Info Loading assembly: NLog.Web.AspNetCore
2023-04-24 11:28:34.2571 Info Adding target FileTarget(Name=allfile)
2023-04-24 11:28:34.2692 Info Adding target FileTarget(Name=ownFile-web)
2023-04-24 11:28:34.2902 Info Adding target ColoredConsoleTarget(Name=console)
2023-04-24 11:28:34.3432 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-client\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-04-24 11:28:34.3647 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-04-24 11:31:16.2680 Info Message Template Auto Format enabled
2023-04-24 11:31:16.3205 Info Loading assembly: NLog.Web.AspNetCore
2023-04-24 11:31:16.6117 Info Adding target FileTarget(Name=allfile)
2023-04-24 11:31:16.6117 Info Adding target FileTarget(Name=ownFile-web)
2023-04-24 11:31:16.6612 Info Adding target ColoredConsoleTarget(Name=console)
2023-04-24 11:31:16.7305 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-client\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-04-24 11:31:16.7412 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-04-24 11:32:17.3232 Info Shutdown() called. Logger closing...
2023-04-24 11:32:17.3232 Info Closing old configuration.
2023-04-24 11:32:17.3777 Info Logger has been closed down.
2023-04-24 11:32:49.6704 Info Message Template Auto Format enabled
2023-04-24 11:32:49.6862 Info Loading assembly: NLog.Web.AspNetCore
2023-04-24 11:32:49.7446 Info Adding target FileTarget(Name=allfile)
2023-04-24 11:32:49.7495 Info Adding target FileTarget(Name=ownFile-web)
2023-04-24 11:32:49.7495 Info Adding target ColoredConsoleTarget(Name=console)
2023-04-24 11:32:49.7883 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-client\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-04-24 11:32:49.7958 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-04-24 11:34:13.4524 Info Message Template Auto Format enabled
2023-04-24 11:34:13.4936 Info Loading assembly: NLog.Web.AspNetCore
2023-04-24 11:34:13.6937 Info Adding target FileTarget(Name=allfile)
2023-04-24 11:34:13.7102 Info Adding target FileTarget(Name=ownFile-web)
2023-04-24 11:34:13.7418 Info Adding target ColoredConsoleTarget(Name=console)
2023-04-24 11:34:13.8487 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-client\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-04-24 11:34:13.8945 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile

Loading…
Cancel
Save