|
@@ -121,8 +121,15 @@ layui.define(['common', 'swiper', 'admin','commonDetail','mxClient','sessions',' |
|
@@ -121,8 +121,15 @@ layui.define(['common', 'swiper', 'admin','commonDetail','mxClient','sessions',' |
121
|
|
121
|
|
122
|
//加载业务信息
|
122
|
//加载业务信息
|
123
|
function loadBizInfo() {
|
123
|
function loadBizInfo() {
|
|
|
124
|
+ var filter = $("#select-content-ul-bus li.listActive").attr('data-val');
|
|
|
125
|
+ if(!filter){
|
|
|
126
|
+ // 过滤无资源的业务
|
|
|
127
|
+ filter = '2';
|
|
|
128
|
+ }
|
|
|
129
|
+ var url = `${common.domainName}/api-web/home/business/getBusHealthResultByAlarm?filter=${filter}&layout=${sessionStorage.getItem("userLayout")}`
|
|
|
130
|
+
|
124
|
admin.req({
|
131
|
admin.req({
|
125
|
- url: common.domainName + '/api-web/home/business/getBusHealthResultByAlarm?layout=' + sessionStorage.getItem("userLayout")
|
132
|
+ url: url
|
126
|
, type: "get"
|
133
|
, type: "get"
|
127
|
, async: false
|
134
|
, async: false
|
128
|
, done: function (data) {
|
135
|
, done: function (data) {
|
|
@@ -299,6 +306,93 @@ layui.define(['common', 'swiper', 'admin','commonDetail','mxClient','sessions',' |
|
@@ -299,6 +306,93 @@ layui.define(['common', 'swiper', 'admin','commonDetail','mxClient','sessions',' |
299
|
});
|
306
|
});
|
300
|
}
|
307
|
}
|
301
|
|
308
|
|
|
|
309
|
+ /**
|
|
|
310
|
+ * 首页右下角两个功能的时间
|
|
|
311
|
+ */
|
|
|
312
|
+ function bottomEvent(){
|
|
|
313
|
+ // Start 告警级别默认为严重告警,点击左下角选择告警级别,页面的小红点切换不同告警的数量,item根据告警数量进行排序 LSQ 2021/12/29 19:37
|
|
|
314
|
+ $(".select-total").hide();
|
|
|
315
|
+ $(".select-important").hide();
|
|
|
316
|
+ $(".select-normal").hide();
|
|
|
317
|
+ var itemArr=$(".index-banner-item");
|
|
|
318
|
+ itemArr.map((index,item)=>{
|
|
|
319
|
+ if($(item).data('serious')=='0'){
|
|
|
320
|
+ $(item).find('.select-serious').hide();
|
|
|
321
|
+ }
|
|
|
322
|
+ $(item).css('order',$(item).data('serious'))
|
|
|
323
|
+ })
|
|
|
324
|
+
|
|
|
325
|
+ $("#select-content-ul li").unbind("click").on("click",function (){
|
|
|
326
|
+ var dataVal=$(this).data('val');
|
|
|
327
|
+ var dataValLabel=$(this).text();
|
|
|
328
|
+ $('.alarm-text-view span').text(dataValLabel);
|
|
|
329
|
+ $(this).addClass('listActive').siblings().removeClass("listActive");
|
|
|
330
|
+ if(dataVal=='4'){
|
|
|
331
|
+ $(".select-total").show();
|
|
|
332
|
+ $(".select-important").hide();
|
|
|
333
|
+ $(".select-normal").hide();
|
|
|
334
|
+ $(".select-serious").hide();
|
|
|
335
|
+ itemArr.map((index,item)=>{
|
|
|
336
|
+ if($(item).data('total')=='0'){
|
|
|
337
|
+ $(item).find('.select-total').hide();
|
|
|
338
|
+ }
|
|
|
339
|
+ $(item).css('order',$(item).data('total'))
|
|
|
340
|
+ })
|
|
|
341
|
+ }else if(dataVal==3){
|
|
|
342
|
+ $(".select-total").hide();
|
|
|
343
|
+ $(".select-important").hide();
|
|
|
344
|
+ $(".select-normal").hide();
|
|
|
345
|
+ $(".select-serious").show();
|
|
|
346
|
+ itemArr.map((index,item)=>{
|
|
|
347
|
+ if($(item).data('serious')=='0'){
|
|
|
348
|
+ $(item).find('.select-serious').hide();
|
|
|
349
|
+ }
|
|
|
350
|
+ $(item).css('order',$(item).data('serious'))
|
|
|
351
|
+ })
|
|
|
352
|
+ }else if(dataVal==2){
|
|
|
353
|
+ $(".select-total").hide();
|
|
|
354
|
+ $(".select-important").show();
|
|
|
355
|
+ $(".select-normal").hide();
|
|
|
356
|
+ $(".select-serious").hide();
|
|
|
357
|
+ itemArr.map((index,item)=>{
|
|
|
358
|
+ if($(item).data('important')=='0'){
|
|
|
359
|
+ $(item).find('.select-important').hide();
|
|
|
360
|
+ }
|
|
|
361
|
+ $(item).css('order',$(item).data('important'))
|
|
|
362
|
+ })
|
|
|
363
|
+ }else if(dataVal==1){
|
|
|
364
|
+ $(".select-total").hide();
|
|
|
365
|
+ $(".select-important").hide();
|
|
|
366
|
+ $(".select-normal").show();
|
|
|
367
|
+ $(".select-serious").hide();
|
|
|
368
|
+ itemArr.map((index,item)=>{
|
|
|
369
|
+ if($(item).data('normal')=='0'){
|
|
|
370
|
+ $(item).find('.select-normal').hide();
|
|
|
371
|
+ }
|
|
|
372
|
+ $(item).css('order',$(item).data('normal'))
|
|
|
373
|
+ })
|
|
|
374
|
+ }
|
|
|
375
|
+
|
|
|
376
|
+ })
|
|
|
377
|
+ //End LSQ 2021/12/29 19:38
|
|
|
378
|
+ // Start Wang 2022/3/7 16:33 业务资源过滤
|
|
|
379
|
+ $("#select-content-ul-bus li").unbind("click").on("click",function (){
|
|
|
380
|
+ debugger
|
|
|
381
|
+ var that = $(this);
|
|
|
382
|
+ // 设置标题
|
|
|
383
|
+ that.parent().parent().find('#bus-text-view').text(that.text());
|
|
|
384
|
+
|
|
|
385
|
+ // 删除所有li标签的样式:listActive
|
|
|
386
|
+ $("#select-content-ul-bus li.listActive").removeClass('listActive')
|
|
|
387
|
+
|
|
|
388
|
+ that.addClass('listActive');
|
|
|
389
|
+
|
|
|
390
|
+ // 调用接口获取数据
|
|
|
391
|
+ loadBizInfo()
|
|
|
392
|
+ })
|
|
|
393
|
+ // End Wang 2022/3/7 16:33
|
|
|
394
|
+ }
|
|
|
395
|
+
|
302
|
//加载资源类型信息
|
396
|
//加载资源类型信息
|
303
|
function loadResTypeInfo() {
|
397
|
function loadResTypeInfo() {
|
304
|
admin.req({
|
398
|
admin.req({
|
|
@@ -334,70 +428,9 @@ layui.define(['common', 'swiper', 'admin','commonDetail','mxClient','sessions',' |
|
@@ -334,70 +428,9 @@ layui.define(['common', 'swiper', 'admin','commonDetail','mxClient','sessions',' |
334
|
$(this).attr("lay-href", "/alarm/activewarning/restype=" + _resType + "/level=" + level);
|
428
|
$(this).attr("lay-href", "/alarm/activewarning/restype=" + _resType + "/level=" + level);
|
335
|
// $(this).trigger();
|
429
|
// $(this).trigger();
|
336
|
});
|
430
|
});
|
337
|
- // Start 告警级别默认为严重告警,点击左下角选择告警级别,页面的小红点切换不同告警的数量,item根据告警数量进行排序 LSQ 2021/12/29 19:37
|
|
|
338
|
- $(".select-total").hide();
|
|
|
339
|
- $(".select-important").hide();
|
|
|
340
|
- $(".select-normal").hide();
|
|
|
341
|
- var itemArr=$(".index-banner-item");
|
|
|
342
|
- itemArr.map((index,item)=>{
|
|
|
343
|
- if($(item).data('serious')=='0'){
|
|
|
344
|
- $(item).find('.select-serious').hide();
|
|
|
345
|
- }
|
|
|
346
|
- $(item).css('order',$(item).data('serious'))
|
|
|
347
|
- })
|
|
|
348
|
- $("#select-content-ul li").unbind("click").on("click",function (){
|
|
|
349
|
- var dataVal=$(this).data('val');
|
|
|
350
|
- var dataValLabel=$(this).text();
|
|
|
351
|
- $('.select-val span').text(dataValLabel);
|
|
|
352
|
- $(this).addClass('listActive').siblings().removeClass("listActive");
|
|
|
353
|
- if(dataVal=='4'){
|
|
|
354
|
- $(".select-total").show();
|
|
|
355
|
- $(".select-important").hide();
|
|
|
356
|
- $(".select-normal").hide();
|
|
|
357
|
- $(".select-serious").hide();
|
|
|
358
|
- itemArr.map((index,item)=>{
|
|
|
359
|
- if($(item).data('total')=='0'){
|
|
|
360
|
- $(item).find('.select-total').hide();
|
|
|
361
|
- }
|
|
|
362
|
- $(item).css('order',$(item).data('total'))
|
|
|
363
|
- })
|
|
|
364
|
- }else if(dataVal==3){
|
|
|
365
|
- $(".select-total").hide();
|
|
|
366
|
- $(".select-important").hide();
|
|
|
367
|
- $(".select-normal").hide();
|
|
|
368
|
- $(".select-serious").show();
|
|
|
369
|
- itemArr.map((index,item)=>{
|
|
|
370
|
- if($(item).data('serious')=='0'){
|
|
|
371
|
- $(item).find('.select-serious').hide();
|
|
|
372
|
- }
|
|
|
373
|
- $(item).css('order',$(item).data('serious'))
|
|
|
374
|
- })
|
|
|
375
|
- }else if(dataVal==2){
|
|
|
376
|
- $(".select-total").hide();
|
|
|
377
|
- $(".select-important").show();
|
|
|
378
|
- $(".select-normal").hide();
|
|
|
379
|
- $(".select-serious").hide();
|
|
|
380
|
- itemArr.map((index,item)=>{
|
|
|
381
|
- if($(item).data('important')=='0'){
|
|
|
382
|
- $(item).find('.select-important').hide();
|
|
|
383
|
- }
|
|
|
384
|
- $(item).css('order',$(item).data('important'))
|
|
|
385
|
- })
|
|
|
386
|
- }else if(dataVal==1){
|
|
|
387
|
- $(".select-total").hide();
|
|
|
388
|
- $(".select-important").hide();
|
|
|
389
|
- $(".select-normal").show();
|
|
|
390
|
- $(".select-serious").hide();
|
|
|
391
|
- itemArr.map((index,item)=>{
|
|
|
392
|
- if($(item).data('normal')=='0'){
|
|
|
393
|
- $(item).find('.select-normal').hide();
|
|
|
394
|
- }
|
|
|
395
|
- $(item).css('order',$(item).data('normal'))
|
|
|
396
|
- })
|
|
|
397
|
- }
|
|
|
398
|
|
431
|
|
399
|
- })
|
|
|
400
|
- //End LSQ 2021/12/29 19:38
|
432
|
+
|
|
|
433
|
+ bottomEvent();
|
401
|
|
434
|
|
402
|
// 点击资源数量
|
435
|
// 点击资源数量
|
403
|
$("#indexbizhealth [data-index-banner-item='resType'] .gj-detail-info li:not([data-level])").unbind('click').on("click", function () {
|
436
|
$("#indexbizhealth [data-index-banner-item='resType'] .gj-detail-info li:not([data-level])").unbind('click').on("click", function () {
|
|
@@ -458,6 +491,8 @@ layui.define(['common', 'swiper', 'admin','commonDetail','mxClient','sessions',' |
|
@@ -458,6 +491,8 @@ layui.define(['common', 'swiper', 'admin','commonDetail','mxClient','sessions',' |
458
|
//绑定卡片上的事件
|
491
|
//绑定卡片上的事件
|
459
|
function bindCardEvent() {
|
492
|
function bindCardEvent() {
|
460
|
|
493
|
|
|
|
494
|
+ bottomEvent();
|
|
|
495
|
+
|
461
|
//点击空白处隐藏子菜单
|
496
|
//点击空白处隐藏子菜单
|
462
|
$(document).click(function (event) {
|
497
|
$(document).click(function (event) {
|
463
|
// var _con = $('[data-index-banner-item]');// 设置目标区域
|
498
|
// var _con = $('[data-index-banner-item]');// 设置目标区域
|
|
@@ -1006,8 +1041,14 @@ layui.define(['common', 'swiper', 'admin','commonDetail','mxClient','sessions',' |
|
@@ -1006,8 +1041,14 @@ layui.define(['common', 'swiper', 'admin','commonDetail','mxClient','sessions',' |
1006
|
|
1041
|
|
1007
|
//刷新业务健康状态
|
1042
|
//刷新业务健康状态
|
1008
|
function refreshBizHealth() {
|
1043
|
function refreshBizHealth() {
|
|
|
1044
|
+ var filter = $("#select-content-ul-bus li.listActive").attr('data-val');
|
|
|
1045
|
+ if(!filter){
|
|
|
1046
|
+ // 过滤无资源的业务
|
|
|
1047
|
+ filter = '2';
|
|
|
1048
|
+ }
|
|
|
1049
|
+ var url = `${common.domainName}/api-web/home/business/getBusHealthResultByAlarm?filter=${filter}&layout=${sessionStorage.getItem("userLayout")}`
|
1009
|
admin.req({
|
1050
|
admin.req({
|
1010
|
- url: common.domainName + '/api-web/home/business/getBusHealthResultByAlarm?layout=' + sessionStorage.getItem("userLayout")
|
1051
|
+ url: url
|
1011
|
, type: "get"
|
1052
|
, type: "get"
|
1012
|
, done: function (data) {
|
1053
|
, done: function (data) {
|
1013
|
if (data.code === 0) {
|
1054
|
if (data.code === 0) {
|