Merge branch 'master-500-dev' of http://113.200.75.45:82/monitor_v3/hg-monitor-w…
…eb into master-500-dev
Showing
1 changed file
with
21 additions
and
23 deletions
@@ -26,7 +26,6 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -26,7 +26,6 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
26 | var access_token = sessions.getToken().access_token; | 26 | var access_token = sessions.getToken().access_token; |
27 | 27 | ||
28 | var isNewPwd = sessionStorage.getItem("isNewPwd"); | 28 | var isNewPwd = sessionStorage.getItem("isNewPwd"); |
29 | - var oldLgn = localStorage.getItem("lgn"); | ||
30 | 29 | ||
31 | //joke add 20210506 | 30 | //joke add 20210506 |
32 | //判定是否第一次登录 | 31 | //判定是否第一次登录 |
@@ -129,13 +128,13 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -129,13 +128,13 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
129 | // 过滤无资源的业务 | 128 | // 过滤无资源的业务 |
130 | filter = '2'; | 129 | filter = '2'; |
131 | } | 130 | } |
132 | - var url = `${common.domainName}/api-web/home/business/getBusHealthResultByAlarm?filter=${filter}&layout=${sessionStorage.getItem("userLayout")}&userName=${oldLgn}` | 131 | + var url = `${common.domainName}/api-web/home/business/getBusHealthResultByAlarm?filter=${filter}&layout=${sessionStorage.getItem("userLayout")}` |
133 | 132 | ||
134 | - $.ajax({ | 133 | + admin.req({ |
135 | url: url | 134 | url: url |
136 | , type: "get" | 135 | , type: "get" |
137 | , async: false | 136 | , async: false |
138 | - , success: function (data) { | 137 | + , done: function (data) { |
139 | layer.close(loadIdx); | 138 | layer.close(loadIdx); |
140 | if (data.code === 0) { | 139 | if (data.code === 0) { |
141 | var bizMap = null; | 140 | var bizMap = null; |
@@ -311,12 +310,11 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -311,12 +310,11 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
311 | // loadBizInfo(); | 310 | // loadBizInfo(); |
312 | // }, alarmTimerStep); | 311 | // }, alarmTimerStep); |
313 | } | 312 | } |
314 | - , error: function (xhr, type, errorThrown) { | ||
315 | - layer.close(loadIdx); | ||
316 | - $("#indexActiveAlarmList").html('<li style="width:390px;"><p>无告警</p></li>'); | ||
317 | - } | ||
318 | 313 | ||
319 | - }) | 314 | + }).error(function () { |
315 | + layer.close(loadIdx); | ||
316 | + $("#indexActiveAlarmList").html('<li style="width:390px;"><p>无告警</p></li>'); | ||
317 | + }); | ||
320 | } | 318 | } |
321 | 319 | ||
322 | var resourceHealthTips; | 320 | var resourceHealthTips; |
@@ -472,10 +470,10 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -472,10 +470,10 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
472 | 470 | ||
473 | //加载资源类型信息 | 471 | //加载资源类型信息 |
474 | function loadResTypeInfo() { | 472 | function loadResTypeInfo() { |
475 | - $.ajax({ | ||
476 | - url: common.domainName + '/api-web/home/restype/getResTypeHealthResult?userName='+oldLgn | 473 | + admin.req({ |
474 | + url: common.domainName + '/api-web/home/restype/getResTypeHealthResult' | ||
477 | , type: "get" | 475 | , type: "get" |
478 | - , success: function (data) { | 476 | + , done: function (data) { |
479 | layer.close(loadIdx); | 477 | layer.close(loadIdx); |
480 | if (data.code === 0) { | 478 | if (data.code === 0) { |
481 | var resTypelist = data.data | 479 | var resTypelist = data.data |
@@ -558,11 +556,11 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -558,11 +556,11 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
558 | // loadResTypeInfo(); | 556 | // loadResTypeInfo(); |
559 | // }, alarmTimerStep); | 557 | // }, alarmTimerStep); |
560 | } | 558 | } |
561 | - , error: function (xhr, type, errorThrown) { | ||
562 | - layer.close(loadIdx); | ||
563 | - $("#indexActiveAlarmList").html('<li style="width:390px;"><p>无告警</p></li>'); | ||
564 | - } | ||
565 | - }) | 559 | + |
560 | + }).error(function () { | ||
561 | + layer.close(loadIdx); | ||
562 | + $("#indexActiveAlarmList").html('<li style="width:390px;"><p>无告警</p></li>'); | ||
563 | + }); | ||
566 | } | 564 | } |
567 | 565 | ||
568 | //绑定卡片上的事件 | 566 | //绑定卡片上的事件 |
@@ -625,9 +623,9 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -625,9 +623,9 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
625 | }); | 623 | }); |
626 | 624 | ||
627 | //获取顺序 | 625 | //获取顺序 |
628 | - $.ajax({ | ||
629 | - url: common.domainName + "/api-web/home/getMovePlace?userName="+oldLgn, | ||
630 | - success: function (res) { | 626 | + admin.req({ |
627 | + url: common.domainName + "/api-web/home/getMovePlace", | ||
628 | + done: function (res) { | ||
631 | if (res.data && res.data.top && res.data.top === 'res') { //资源在顶部 | 629 | if (res.data && res.data.top && res.data.top === 'res') { //资源在顶部 |
632 | var resTypeBox = $("#indexResTypehealth"); | 630 | var resTypeBox = $("#indexResTypehealth"); |
633 | var bizBox = $("#indexbizhealth"); | 631 | var bizBox = $("#indexbizhealth"); |
@@ -1143,11 +1141,11 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -1143,11 +1141,11 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
1143 | // 过滤无资源的业务 | 1141 | // 过滤无资源的业务 |
1144 | filter = '2'; | 1142 | filter = '2'; |
1145 | } | 1143 | } |
1146 | - var url = `${common.domainName}/api-web/home/business/getBusHealthResultByAlarm?filter=${filter}&layout=${sessionStorage.getItem("userLayout")}&userName=${oldLgn}` | ||
1147 | - $.ajax({ | 1144 | + var url = `${common.domainName}/api-web/home/business/getBusHealthResultByAlarm?filter=${filter}&layout=${sessionStorage.getItem("userLayout")}` |
1145 | + admin.req({ | ||
1148 | url: url | 1146 | url: url |
1149 | , type: "get" | 1147 | , type: "get" |
1150 | - , success: function (data) { | 1148 | + , done: function (data) { |
1151 | if (data.code === 0) { | 1149 | if (data.code === 0) { |
1152 | var bizMap = data.map; | 1150 | var bizMap = data.map; |
1153 | if (bizMap && bizMap.health !== '3') {//不等于优 | 1151 | if (bizMap && bizMap.health !== '3') {//不等于优 |
-
Please register or login to post a comment