【无】首页应用-资源类型展示,右上角的数量展示告警数量的和(严重 + 重要 + 一般)
Showing
1 changed file
with
8 additions
and
3 deletions
@@ -61,15 +61,20 @@ | @@ -61,15 +61,20 @@ | ||
61 | <ul class="layui-nav layui-layout-left" | 61 | <ul class="layui-nav layui-layout-left" |
62 | style="left: 120px;left: 120px;width: 100%;display: inline-flex;"><!--//lsq 左边距70改为120 2022-0312--> | 62 | style="left: 120px;left: 120px;width: 100%;display: inline-flex;"><!--//lsq 左边距70改为120 2022-0312--> |
63 | 63 | ||
64 | - {{# var arr = d.data.sort(function (a, b) { return a.resNum < b.resNum ? 1 : -1; }) }} | 64 | + {{# var arr = d.data.sort(function (a, b) { return (a.serious+a.important+a.normal) < (b.serious+b.important+b.normal) ? 1 : -1; }) }} |
65 | {{# layui.each(arr, function(index, item){ }} | 65 | {{# layui.each(arr, function(index, item){ }} |
66 | {{# if(item.resNum != 0 && index < 9){ }} | 66 | {{# if(item.resNum != 0 && index < 9){ }} |
67 | +<!-- lsq 应用右上角显示告警量之和 2022-08-27--> | ||
68 | + {{# var alarmCount=item.serious+item.important+item.normal}} | ||
67 | <li class="layui-nav-item" data-restype="{{item.resType}}" data-resnum="{{item.resNum}}" | 69 | <li class="layui-nav-item" data-restype="{{item.resType}}" data-resnum="{{item.resNum}}" |
68 | lay-tips="资源总数:{{item.resNum }} <br>严重告警:{{item.serious}}<br>重要告警:{{item.important}}<br>一般告警:{{item.normal}}" | 70 | lay-tips="资源总数:{{item.resNum }} <br>严重告警:{{item.serious}}<br>重要告警:{{item.important}}<br>一般告警:{{item.normal}}" |
69 | data-serious="{{item.serious}}" data-important="{{item.important}}" | 71 | data-serious="{{item.serious}}" data-important="{{item.important}}" |
70 | data-normal="{{item.normal}}" lay-filter="layadmin-app"> | 72 | data-normal="{{item.normal}}" lay-filter="layadmin-app"> |
71 | - <a href="javascript:;" lay-href="{{ '/biz/list/restype=' + item.resType }}">{{item.resTypeName}}<span | ||
72 | - class="layui-badge">{{item.resNum}}</span></a> | 73 | + <a href="javascript:;" lay-href="{{ '/biz/list/restype=' + item.resType }}">{{item.resTypeName}} |
74 | + {{# if(alarmCount!=0){ }}<span | ||
75 | + class="layui-badge">{{alarmCount}}</span> | ||
76 | + {{# } }} | ||
77 | + </a> | ||
73 | </li> | 78 | </li> |
74 | {{# } }} | 79 | {{# } }} |
75 | {{# }); }} | 80 | {{# }); }} |
-
Please register or login to post a comment