Authored by 王涛

Merge branch 'master-V32-XuHaoJie' into 'master'

天津-详情页面-监控连接状态添加过滤状态



See merge request !201
@@ -95,25 +95,59 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele @@ -95,25 +95,59 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
95 } else if (v.value != 'null'){ 95 } else if (v.value != 'null'){
96 valueStr = v.value; 96 valueStr = v.value;
97 var old = v.value; 97 var old = v.value;
98 - var oldstr=old.replace(v.unit, '');  
99 - if("从不过期"==oldstr){  
100 - valueStr=oldstr;  
101 - }else{  
102 - if(v.id=='KPIA04D5BD0' && parseInt(oldstr)>7){  
103 - fontColor='color:#D81E06;'; 98 + var oldstr = old.replace(v.unit, '');
  99 + if ("从不过期" == oldstr) {
  100 + valueStr = oldstr;
  101 + } else {
  102 + if (v.id == 'KPIA04D5BD0' && parseInt(oldstr) > 7) {
  103 + fontColor = 'color:#D81E06;';
104 } 104 }
105 } 105 }
106 titleStr = valueStr; 106 titleStr = valueStr;
107 } 107 }
108 - 108 + var tips = '<a class="detail_row_menu hide">\n' +
  109 + '<img style="width: 17px;height: 17px;" src="/src/style/img/icon_row_menu.png">\n' +
  110 + '</a>'
  111 + var menuId = "";
  112 + if (v.id == 'KPIE13DD9A3') {
  113 + v.name = v.name + tips;
  114 + menuId = "id=\"" + targetId + "_detail_row_menu\"";
  115 + }
109 var $html = addIconByValue(valueStr); 116 var $html = addIconByValue(valueStr);
110 - var resStyle = obj.alarmEleMatchStyle(v.flag,v.id);  
111 - li += ' <li><span style="text-align:left;width:40%">' + v.name + '</span>' +  
112 - '<span title="' + titleStr + '" style="'+fontColor+'width:60%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;'+resStyle+'">'  
113 - + $html + valueStr +'</span></li>' 117 + var resStyle = obj.alarmEleMatchStyle(v.flag, v.id);
  118 + li += ' <li><span ' + menuId + ' style="text-align:left;width:40%">' + v.name + '</span>' +
  119 + '<span title="' + titleStr + '" style="' + fontColor + 'width:60%;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' + resStyle + '">'
  120 + + $html + valueStr + '</span></li>'
114 }); 121 });
115 $("#" + targetId).html(li); 122 $("#" + targetId).html(li);
116 - fn && fn() 123 + fn && fn();
  124 +
  125 + //初始化监听告警压制需要的数据
  126 + var rowMenu = $('#' + targetId).find('.detail_row_menu').eq(0);
  127 + rowMenu.attr("data-id", "KPIE13DD9A3");
  128 + rowMenu.attr("data-flag", "");
  129 + rowMenu.attr("data-name", "监控连接状态");
  130 + rowMenu.attr("data-kpiname", "监控连接状态");
  131 + rowMenu.attr("data-iswarning", "1");
  132 + rowMenu.attr("data-ident", "1");
  133 + rowMenu.attr("data-trend", "0");
  134 + rowMenu.attr("data-unit", "");
  135 + rowMenu.attr('data-hidem', 'true');
  136 + rowMenu.attr('data-canca', data.canCA);
  137 + rowMenu.attr('data-incaing', data.inCAing);
  138 + rowMenu.attr('data-restype', data.resType);
  139 +
  140 + //监听告警压制等操作配置
  141 + $('#' + targetId + "_detail_row_menu").hover(function () {
  142 + var $that = $(this);
  143 + var $btn = $that.find(".detail_row_menu");
  144 + if ($btn.length > 0) {
  145 + $(".layui-card-body").find(".detail_row_menu:not(.hide)").addClass("hide")
  146 + $btn.removeClass("hide");
  147 + }
  148 + });
  149 + //监听过滤压制等事件
  150 + filterSuppressMonitor(resId);
117 }); 151 });
118 }, 152 },
119 /** 153 /**
@@ -7883,3 +7883,6 @@ form[lay-filter="activewarning-form"] .layui-inline { @@ -7883,3 +7883,6 @@ form[lay-filter="activewarning-form"] .layui-inline {
7883 .layui-logo{ 7883 .layui-logo{
7884 pointer-events: none; 7884 pointer-events: none;
7885 } 7885 }
  7886 +.detail_menubox li{
  7887 + font-size: 12px !important;
  7888 +}