Authored by wangtao

告警合并提示优化

@@ -33,6 +33,7 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun @@ -33,6 +33,7 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun
33 33
34 // 获取合并通知开关是否开启 34 // 获取合并通知开关是否开启
35 getNoticeMergeFlag(); 35 getNoticeMergeFlag();
  36 + let NoticeMergeFlag = 'off';
36 function getNoticeMergeFlag(){ 37 function getNoticeMergeFlag(){
37 admin.req({ 38 admin.req({
38 url: common.domainName + '/api-web/manage/ddic/findSucDdics/noticeMergeFlag' 39 url: common.domainName + '/api-web/manage/ddic/findSucDdics/noticeMergeFlag'
@@ -41,6 +42,7 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun @@ -41,6 +42,7 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun
41 , success: function (res) { 42 , success: function (res) {
42 $.each(res.data, function (i, v) { 43 $.each(res.data, function (i, v) {
43 if(v.ddicCode == 'on'){ 44 if(v.ddicCode == 'on'){
  45 + NoticeMergeFlag= 'on';
44 $('#noticeMergeTab').show(); 46 $('#noticeMergeTab').show();
45 } 47 }
46 }); 48 });
@@ -231,14 +233,17 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun @@ -231,14 +233,17 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist'], fun
231 return false; 233 return false;
232 } 234 }
233 235
234 - if(!data.alarmContentExpr || data.alarmContentExpr == ''){  
235 - layer.msg("请先填写告警内容描述表达式!", {  
236 - icon: 7  
237 - , time: 3000  
238 - });  
239 - return false; 236 + if(NoticeMergeFlag && NoticeMergeFlag == 'on'){
  237 + if(!data.alarmContentExpr || data.alarmContentExpr == ''){
  238 + layer.msg("请先填写告警内容描述表达式!", {
  239 + icon: 7
  240 + , time: 3000
  241 + });
  242 + return false;
  243 + }
240 } 244 }
241 245
  246 +
242 var importantPolicy = data.seriousPolicy; 247 var importantPolicy = data.seriousPolicy;
243 var importantExpr = data.importantPolicy; 248 var importantExpr = data.importantPolicy;
244 var commonlyPolicy = data.commonlyPolicy; 249 var commonlyPolicy = data.commonlyPolicy;