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