Merge branch 'master-500-dev-xwx' into 'master-500-dev'
资源视图-【无】weblogic查询 See merge request !936
Showing
1 changed file
with
22 additions
and
12 deletions
@@ -34,7 +34,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -34,7 +34,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
34 | var busIdSelect; | 34 | var busIdSelect; |
35 | var busTypeList = []; | 35 | var busTypeList = []; |
36 | var collProtocols = ''; | 36 | var collProtocols = ''; |
37 | - | 37 | + var parentId = 'null'; |
38 | var editFlag = false; | 38 | var editFlag = false; |
39 | if (data.choose == '1') { | 39 | if (data.choose == '1') { |
40 | editFlag = true; | 40 | editFlag = true; |
@@ -207,7 +207,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -207,7 +207,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
207 | } | 207 | } |
208 | //start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05 | 208 | //start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05 |
209 | admin.req({ | 209 | admin.req({ |
210 | - url: common.domainName + "/api-web/resource/expand/list?resType=" + resType + "&parentId="+$("#res_cluster").val() | 210 | + url: common.domainName + "/api-web/resource/expand/list?resType=" + resType + "&parentId="+parentId |
211 | , done: function (res) { | 211 | , done: function (res) { |
212 | if (res && res.data ) { | 212 | if (res && res.data ) { |
213 | let arr=res.data; | 213 | let arr=res.data; |
@@ -746,6 +746,12 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -746,6 +746,12 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
746 | // renderList(currentResType); new | 746 | // renderList(currentResType); new |
747 | reloadTable(); | 747 | reloadTable(); |
748 | }); | 748 | }); |
749 | + //集群选择事件 | ||
750 | + form.on('select(res_cluster)', function (data) { | ||
751 | + parentId = $('#res_cluster').val(); | ||
752 | + renderParentList(currentResType); | ||
753 | + reloadTable(); | ||
754 | + }); | ||
749 | 755 | ||
750 | //资源状态 | 756 | //资源状态 |
751 | form.on('select(resStatus)', function (data) { | 757 | form.on('select(resStatus)', function (data) { |
@@ -842,7 +848,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -842,7 +848,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
842 | var cols = commonCols.resTypeCls[resType]; | 848 | var cols = commonCols.resTypeCls[resType]; |
843 | //start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05 | 849 | //start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05 |
844 | admin.req({ | 850 | admin.req({ |
845 | - url: common.domainName + "/api-web/resource/expand/list?resType=" + resType + "&parentId="+$("#res_cluster").val() | 851 | + url: common.domainName + "/api-web/resource/expand/list?resType=" + resType + "&parentId="+parentId |
846 | , done: function (res) { | 852 | , done: function (res) { |
847 | if (res && res.data ) { | 853 | if (res && res.data ) { |
848 | let arr=res.data; | 854 | let arr=res.data; |
@@ -1082,11 +1088,16 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -1082,11 +1088,16 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
1082 | $('#host_state_div').hide(); | 1088 | $('#host_state_div').hide(); |
1083 | $('#power_state_div').show(); | 1089 | $('#power_state_div').show(); |
1084 | } | 1090 | } |
1091 | + let colResType = resType; | ||
1092 | + if (colResType == 'MIDDLEWARE_WEBLOGIC' && parentId == 'null') { | ||
1093 | + // 展示控制台的表头 | ||
1094 | + colResType = 'MIDDLEWARE_WEBLOGICCONSOLE' | ||
1095 | + } | ||
1085 | //渲染表格 | 1096 | //渲染表格 |
1086 | - var cols = commonCols.resTypeCls[resType]; | 1097 | + var cols = commonCols.resTypeCls[colResType]; |
1087 | //start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05 | 1098 | //start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05 |
1088 | admin.req({ | 1099 | admin.req({ |
1089 | - url: common.domainName + "/api-web/resource/expand/list?resType=" + resType + "&parentId="+$("#res_cluster").val() | 1100 | + url: common.domainName + "/api-web/resource/expand/list?resType=" + resType + "&parentId="+parentId |
1090 | , done: function (res) { | 1101 | , done: function (res) { |
1091 | if (res && res.data ) { | 1102 | if (res && res.data ) { |
1092 | let arr=res.data; | 1103 | let arr=res.data; |
@@ -1149,7 +1160,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -1149,7 +1160,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
1149 | busId: bizId, | 1160 | busId: bizId, |
1150 | resHealth: $("#resStatus").val(), | 1161 | resHealth: $("#resStatus").val(), |
1151 | colonlyId: $("#res_colony").val(), | 1162 | colonlyId: $("#res_colony").val(), |
1152 | - parentId: $("#res_cluster").val(), | 1163 | + parentId: parentId, |
1153 | sortKey: sortKey, | 1164 | sortKey: sortKey, |
1154 | state: $("#state").val(), | 1165 | state: $("#state").val(), |
1155 | linkState: $("#link_state").val(), | 1166 | linkState: $("#link_state").val(), |
@@ -1257,7 +1268,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -1257,7 +1268,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
1257 | var cols = commonCols.resTypeCls[resType]; | 1268 | var cols = commonCols.resTypeCls[resType]; |
1258 | //start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05 | 1269 | //start lsq 根据资源类型resType获取动态添加的列表字段 2022-08-05 |
1259 | admin.req({ | 1270 | admin.req({ |
1260 | - url: common.domainName + "/api-web/resource/expand/list?resType=" + resType + "&parentId="+$("#res_cluster").val() | 1271 | + url: common.domainName + "/api-web/resource/expand/list?resType=" + resType + "&parentId="+parentId |
1261 | , done: function (res) { | 1272 | , done: function (res) { |
1262 | if (res && res.data ) { | 1273 | if (res && res.data ) { |
1263 | let arr=res.data; | 1274 | let arr=res.data; |
@@ -1329,7 +1340,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -1329,7 +1340,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
1329 | busId: bizId, | 1340 | busId: bizId, |
1330 | resHealth: $("#resStatus").val(), | 1341 | resHealth: $("#resStatus").val(), |
1331 | colonlyId: $("#res_colony").val(), | 1342 | colonlyId: $("#res_colony").val(), |
1332 | - parentId: $("#res_cluster").val(), | 1343 | + parentId: parentId, |
1333 | sortKey: sortKey, | 1344 | sortKey: sortKey, |
1334 | state: $("#state").val(), | 1345 | state: $("#state").val(), |
1335 | linkState: $("#link_state").val(), | 1346 | linkState: $("#link_state").val(), |
@@ -1445,9 +1456,6 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -1445,9 +1456,6 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
1445 | busIdSelect.setValue([]); | 1456 | busIdSelect.setValue([]); |
1446 | bizId = ''; | 1457 | bizId = ''; |
1447 | } | 1458 | } |
1448 | - form.render('select'); | ||
1449 | - form.render(); | ||
1450 | - //清空查询条件 joke add 20200409 结束 | ||
1451 | 1459 | ||
1452 | var targetId = ''; | 1460 | var targetId = ''; |
1453 | var searchType = ""; | 1461 | var searchType = ""; |
@@ -1466,7 +1474,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -1466,7 +1474,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
1466 | targetId = "res_cluster"; | 1474 | targetId = "res_cluster"; |
1467 | $("#res_cluster_id").show(); | 1475 | $("#res_cluster_id").show(); |
1468 | } else if ("MIDDLEWARE_WEBLOGIC" == resType) { | 1476 | } else if ("MIDDLEWARE_WEBLOGIC" == resType) { |
1469 | - optons = "<option value=''>=所属控制台=</option>" | 1477 | + optons = "<option value=''>=服务列表=</option>" |
1478 | + optons += "<option value='null'>=控制台列表=</option>" | ||
1470 | searchType = "MIDDLEWARE_WEBLOGIC"; | 1479 | searchType = "MIDDLEWARE_WEBLOGIC"; |
1471 | targetId = 'res_cluster' | 1480 | targetId = 'res_cluster' |
1472 | $("#res_cluster_id").show(); | 1481 | $("#res_cluster_id").show(); |
@@ -1609,6 +1618,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -1609,6 +1618,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
1609 | }); | 1618 | }); |
1610 | } | 1619 | } |
1611 | $('#' + targetId).html(optons); | 1620 | $('#' + targetId).html(optons); |
1621 | + $('#res_cluster').val(parentId); | ||
1612 | form.render("select"); | 1622 | form.render("select"); |
1613 | }) | 1623 | }) |
1614 | } | 1624 | } |
-
Please register or login to post a comment