Authored by 袁晋鹏

资源管理修正,云平台的下拉修正

@@ -560,6 +560,12 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm @@ -560,6 +560,12 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
560 if (platform == '=所属平台=') { 560 if (platform == '=所属平台=') {
561 platform = ''; 561 platform = '';
562 } 562 }
  563 + if(platform==''){
  564 + platform = $("#aliyun_plantform").val()
  565 + }
  566 +
  567 +
  568 +
563 table.reload('bizResListTable', { 569 table.reload('bizResListTable', {
564 page: { 570 page: {
565 curr: 1 571 curr: 1
@@ -578,8 +584,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm @@ -578,8 +584,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
578 subResType: $("#biz_reslist_sub_restype").val(), 584 subResType: $("#biz_reslist_sub_restype").val(),
579 powerState: $("#biz_reslist_power_state").val(), 585 powerState: $("#biz_reslist_power_state").val(),
580 serverState: $("#biz_reslist_server_state").val(), 586 serverState: $("#biz_reslist_server_state").val(),
581 - collProtocols: collProtocols,  
582 - platform: $("#aliyun_plantform").val() 587 + collProtocols: collProtocols
583 } 588 }
584 }) 589 })
585 } 590 }
@@ -634,6 +639,11 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm @@ -634,6 +639,11 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
634 // 渲染统计数据 639 // 渲染统计数据
635 function loadRightResTypeSelectEvent(resType, type) { 640 function loadRightResTypeSelectEvent(resType, type) {
636 layer.closeAll('tips'); 641 layer.closeAll('tips');
  642 + if (collProtocols) {
  643 + xmSelect.get('#collProtocolSelect', true).setValue([]);
  644 + collProtocols = '';
  645 + }
  646 + form.render('select');
637 var counturl = `${common.domainName}/api-web/bResource/resCountInfomation?resType=${resType}` 647 var counturl = `${common.domainName}/api-web/bResource/resCountInfomation?resType=${resType}`
638 admin.req({ 648 admin.req({
639 url: counturl, 649 url: counturl,
@@ -643,6 +653,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm @@ -643,6 +653,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm
643 subResType: $("#res_sub_restype").val() 653 subResType: $("#res_sub_restype").val()
644 } 654 }
645 }).done(function (res) { 655 }).done(function (res) {
  656 +
646 var str = ''; 657 var str = '';
647 var domStr = 'bizResListTableContent' 658 var domStr = 'bizResListTableContent'
648 var fun = reloadTable; 659 var fun = reloadTable;
@@ -39,57 +39,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', @@ -39,57 +39,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
39 if(bizId!=''){ 39 if(bizId!=''){
40 bizId.substring(0,bizId.length-1); 40 bizId.substring(0,bizId.length-1);
41 } 41 }
42 -  
43 reloadTable(); 42 reloadTable();
44 } 43 }
45 }); 44 });
46 - var collProtocols = '';  
47 - initProtocolSelect()  
48 - //获取全部协议  
49 - function initProtocolSelect() {  
50 - admin.req({  
51 - url: domainName + '/api-web/manage/protocol/page',  
52 - data: {  
53 - access_token: accessToken,  
54 - startTime: '',  
55 - endTime: '',  
56 - keyword: '',  
57 - hasParam: '',  
58 - limit: -1  
59 - }  
60 - }).done(function (res) {  
61 - xmSelect.render({  
62 - el: '#collProtocolSelect'  
63 - , filterable: true  
64 - , tips: '=采集协议='  
65 - , name: 'collProtocols'  
66 - , prop: {  
67 - name: 'protocolName',  
68 - value: 'protocolCode',  
69 - }  
70 - , model: {  
71 - label: {  
72 - type: 'block',  
73 - block: {  
74 - //最大显示数量, 0:不限制  
75 - showCount: 1,  
76 - //是否显示删除图标  
77 - showIcon: true,  
78 - }  
79 - }  
80 - }  
81 - , data: res.data  
82 - ,hide: function () {  
83 - var selectValue = xmSelect.get('#collProtocolSelect', true).getValue('value');  
84 - collProtocols = selectValue.join(',');  
85 - form.render()  
86 - reloadTable();  
87 -  
88 - }  
89 - })  
90 - })  
91 - }  
92 -  
93 function autoHeight(el) { 45 function autoHeight(el) {
94 // var height = el.parents('.layui-card').height(); 46 // var height = el.parents('.layui-card').height();
95 // el.css('min-height', height - 75); 47 // el.css('min-height', height - 75);
@@ -842,7 +794,6 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', @@ -842,7 +794,6 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
842 , id: 'resManageTable' 794 , id: 'resManageTable'
843 , url: common.domainName + '/api-web/home/res-list/' + resType 795 , url: common.domainName + '/api-web/home/res-list/' + resType
844 , where: { 796 , where: {
845 -  
846 access_token: accessToken, 797 access_token: accessToken,
847 editMode: 'true', 798 editMode: 'true',
848 resName: $("#resManageIndexForm").find("input[name='resName']").val() ? $("#resManageIndexForm").find("input[name='resName']").val() : searchId, 799 resName: $("#resManageIndexForm").find("input[name='resName']").val() ? $("#resManageIndexForm").find("input[name='resName']").val() : searchId,
@@ -852,8 +803,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', @@ -852,8 +803,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
852 busId: $("#resManageIndexForm").find("input[name='busId']").val(), 803 busId: $("#resManageIndexForm").find("input[name='busId']").val(),
853 state: $("#resManageIndexForm").find("select[name='state']").val(), 804 state: $("#resManageIndexForm").find("select[name='state']").val(),
854 parentId: $("#resManageIndexForm").find("select[name='parentId']").val(), 805 parentId: $("#resManageIndexForm").find("select[name='parentId']").val(),
855 - collectionState: $("#resManageIndexForm").find("select[name='collectionState']").val(),  
856 - collProtocols: collProtocols 806 + collectionState: $("#resManageIndexForm").find("select[name='collectionState']").val()
857 } 807 }
858 , height: 'full-200' 808 , height: 'full-200'
859 , cellMinWidth: 80 809 , cellMinWidth: 80
@@ -52,12 +52,6 @@ @@ -52,12 +52,6 @@
52 </div> 52 </div>
53 </div> 53 </div>
54 <div class="layui-inline"> 54 <div class="layui-inline">
55 - <div class="layui-input-inline layui-input-inline--long" style="width: 180px;">  
56 - <div id="collProtocolSelect" class="xm-select">  
57 - </div>  
58 - </div>  
59 - </div>  
60 - <div class="layui-inline">  
61 <div class="layui-input-inline"> 55 <div class="layui-input-inline">
62 <select name="parentId" id="slt_res_manage_superior" lay-filter="slt_res_manage_superior"> 56 <select name="parentId" id="slt_res_manage_superior" lay-filter="slt_res_manage_superior">
63 57
@@ -115,8 +115,9 @@ @@ -115,8 +115,9 @@
115 <div class="layui-inline hide"> 115 <div class="layui-inline hide">
116 <div class="layui-input-inline"> 116 <div class="layui-input-inline">
117 <select name="platform" id="aliyun_plantform" lay-filter="aliyun_plantform"> 117 <select name="platform" id="aliyun_plantform" lay-filter="aliyun_plantform">
118 - <option value="">=阿里回迁云平台=</option>  
119 - <option value="阿里云">=阿里云平台=</option> 118 + <option value="">云平台</option>
  119 + <option value="b0e0773031c24317ab00ac9b3cf268be">=阿里回迁云平台=</option>
  120 + <option value="576c11c9755c4e7cabf8a134168d3cf8">=阿里云平台=</option>
120 </select> 121 </select>
121 </div> 122 </div>
122 </div> 123 </div>
@@ -183,8 +183,9 @@ @@ -183,8 +183,9 @@
183 <div class="layui-inline hide"> 183 <div class="layui-inline hide">
184 <div class="layui-input-inline"> 184 <div class="layui-input-inline">
185 <select name="platform" id="aliyun_plantform" lay-filter="aliyun_plantform"> 185 <select name="platform" id="aliyun_plantform" lay-filter="aliyun_plantform">
186 - <option value="">=阿里回迁云平台=</option>  
187 - <option value="阿里云">=阿里云平台=</option> 186 + <option value="">云平台</option>
  187 + <option value="b0e0773031c24317ab00ac9b3cf268be">=阿里回迁云平台=</option>
  188 + <option value="576c11c9755c4e7cabf8a134168d3cf8">=阿里云平台=</option>
188 </select> 189 </select>
189 </div> 190 </div>
190 </div> 191 </div>