Authored by xwx

Merge branch 'master-500-dev' of http://113.200.75.45:82/monitor_v3/hg-monitor-w…

…eb into master-500-dev-xwx
@@ -2363,6 +2363,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele @@ -2363,6 +2363,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
2363 * @param resId 2363 * @param resId
2364 */ 2364 */
2365 renderActiveAlarms: function (tableId, resId) { 2365 renderActiveAlarms: function (tableId, resId) {
  2366 + $('#'+tableId).prev().text('实时告警Top5')
2366 var alarmlist = table.render({ 2367 var alarmlist = table.render({
2367 elem: '#' + tableId 2368 elem: '#' + tableId
2368 , url: common.domainName + '/api-web/home/alarm/alarmListPage' 2369 , url: common.domainName + '/api-web/home/alarm/alarmListPage'
@@ -723,7 +723,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', @@ -723,7 +723,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
723 var targetId = 'slt_res_manage_superior'; 723 var targetId = 'slt_res_manage_superior';
724 var optons = "<option value=''>=上级=</option>" 724 var optons = "<option value=''>=上级=</option>"
725 if (targetId && searchType) { 725 if (targetId && searchType) {
726 - var url = "/api-web/home/res-list/" + resType + "?page=1&limit=50"; 726 + var url = "/api-web/home/res-list/" + resType + "?page=1&limit=50&pageName=resmanage";
727 admin.req({ 727 admin.req({
728 url: common.domainName + url 728 url: common.domainName + url
729 }).done(function (res) { 729 }).done(function (res) {
@@ -826,7 +826,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', @@ -826,7 +826,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
826 busId: $("#resManageIndexForm").find("input[name='busId']").val(), 826 busId: $("#resManageIndexForm").find("input[name='busId']").val(),
827 state: $("#resManageIndexForm").find("select[name='state']").val(), 827 state: $("#resManageIndexForm").find("select[name='state']").val(),
828 parentId: $("#resManageIndexForm").find("select[name='parentId']").val(), 828 parentId: $("#resManageIndexForm").find("select[name='parentId']").val(),
829 - collectionState: $("#resManageIndexForm").find("select[name='collectionState']").val() 829 + collectionState: $("#resManageIndexForm").find("select[name='collectionState']").val(),
  830 + pageName:'resmanage'
830 } 831 }
831 , height: 'full-200' 832 , height: 'full-200'
832 , cellMinWidth: 80 833 , cellMinWidth: 80
@@ -1698,7 +1699,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', @@ -1698,7 +1699,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
1698 state: $("#resManageIndexForm").find("select[name='state']").val(), 1699 state: $("#resManageIndexForm").find("select[name='state']").val(),
1699 parentId: $("#resManageIndexForm").find("select[name='parentId']").val(), 1700 parentId: $("#resManageIndexForm").find("select[name='parentId']").val(),
1700 collectionState: $("#resManageIndexForm").find("select[name='collectionState']").val(), 1701 collectionState: $("#resManageIndexForm").find("select[name='collectionState']").val(),
1701 - sortKey: sortKey 1702 + sortKey: sortKey,
  1703 + pageName:'resmanage'
  1704 +
1702 } 1705 }
1703 }) 1706 })
1704 } 1707 }
@@ -93,7 +93,8 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' @@ -93,7 +93,8 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect'
93 protocolFlag:protocolFlag, 93 protocolFlag:protocolFlag,
94 protocol:protocol, 94 protocol:protocol,
95 editMode: 'true', 95 editMode: 'true',
96 - resCategory: 'resources' 96 + resCategory: 'resources',
  97 + pageName:'reslist'
97 } 98 }
98 , height: 'full-350' 99 , height: 'full-350'
99 , cellMinWidth: 80 100 , cellMinWidth: 80
@@ -84,6 +84,9 @@ @@ -84,6 +84,9 @@
84 <i class="layui-icon layui-icon-refresh-3"></i> 84 <i class="layui-icon layui-icon-refresh-3"></i>
85 </a> 85 </a>
86 </li> 86 </li>
  87 + <li class="layui-nav-item layui-hide-xs" lay-tips="全局搜索">
  88 + <a href="javascript:;" layadmin-event="globalSearch"><i><img src="/src/style/img/search.png"/></i></a>
  89 + </li>
87 <li class="layui-nav-item layui-hide-xs" lay-unselect> 90 <li class="layui-nav-item layui-hide-xs" lay-unselect>
88 <a href="javascript:;" layadmin-event="fullscreen"> 91 <a href="javascript:;" layadmin-event="fullscreen">
89 <i class="layui-icon layui-icon-screen-full"></i> 92 <i class="layui-icon layui-icon-screen-full"></i>
@@ -186,6 +186,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', @@ -186,6 +186,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
186 layer.msg(msg, {icon: 7, time: 3000}); 186 layer.msg(msg, {icon: 7, time: 3000});
187 return; 187 return;
188 } 188 }
  189 + $('td[data-field="alarmNo"]').css('color','black');
189 layer.prompt({title: '恢复说明(必填)', formType: 2}, function (text, index) { 190 layer.prompt({title: '恢复说明(必填)', formType: 2}, function (text, index) {
190 admin.req({ 191 admin.req({
191 url: common.domainName + '/api-web/home/alarm/resume' 192 url: common.domainName + '/api-web/home/alarm/resume'
@@ -205,7 +206,23 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', @@ -205,7 +206,23 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
205 reloadTable(); 206 reloadTable();
206 }); 207 });
207 } else { 208 } else {
208 - layer.msg('告警恢复失败,请与管理员联系!', {icon: 7, time: 3000}); 209 + var msg = "告警恢复失败,请与管理员联系!";
  210 + let arr = res.data;
  211 + if(arr && arr.length > 0){
  212 + msg = "自动消除的告警不能进行恢复!";
  213 + var tds = $('td[data-field="alarmNo"]');
  214 + for (const index in arr) {
  215 + for (let i = 0; i < tds.length; i++) {
  216 + var td = tds.eq(i)
  217 + if(td.text() == arr[index]){
  218 + td.css('color','red');
  219 + break;
  220 + }
  221 + }
  222 + }
  223 + }
  224 + layer.close(index);
  225 + layer.msg(msg, {icon: 7, time: 3000});
209 } 226 }
210 } 227 }
211 }); 228 });