Merge branch 'master' of http://113.200.75.45:82/monitor_v3/hg-monitor-web
Showing
13 changed files
with
185 additions
and
123 deletions
@@ -663,8 +663,12 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions'], function | @@ -663,8 +663,12 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions'], function | ||
663 | var trs = ''; | 663 | var trs = ''; |
664 | if(res.data && res.data.length > 0){ | 664 | if(res.data && res.data.length > 0){ |
665 | $.each(res.data,function (i,v){ | 665 | $.each(res.data,function (i,v){ |
666 | + var collProtocol = ''; | ||
667 | + if (v.collProtocol){ | ||
668 | + collProtocol = v.collProtocol; | ||
669 | + } | ||
666 | trs += `<tr><td>${i+1}</td><td>${v.resName}</td><td>${v.ip}</td><td>${v.adminName}</td> | 670 | trs += `<tr><td>${i+1}</td><td>${v.resName}</td><td>${v.ip}</td><td>${v.adminName}</td> |
667 | - <td>${v.resTypeName}</td><td>${v.collProtocol}</td><td><span id="${v.relId}" class="link resource_sublist_del">删除</span></td></tr>`; | 671 | + <td>${v.resTypeName}</td><td>`+collProtocol+`</td><td><span id="${v.relId}" class="link resource_sublist_del">删除</span></td></tr>`; |
668 | }); | 672 | }); |
669 | } | 673 | } |
670 | 674 | ||
@@ -679,8 +683,12 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions'], function | @@ -679,8 +683,12 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions'], function | ||
679 | function reloadData(res) { | 683 | function reloadData(res) { |
680 | var trs = ''; | 684 | var trs = ''; |
681 | $.each(res.data,function (i,v){ | 685 | $.each(res.data,function (i,v){ |
686 | + var collProtocol = ''; | ||
687 | + if (v.collProtocol){ | ||
688 | + collProtocol = v.collProtocol; | ||
689 | + } | ||
682 | trs += `<tr><td>${i+1}</td><td>${v.resName}</td><td>${v.ip}</td><td>${v.adminName}</td> | 690 | trs += `<tr><td>${i+1}</td><td>${v.resName}</td><td>${v.ip}</td><td>${v.adminName}</td> |
683 | - <td>${v.resTypeName}</td><td>${v.collProtocol}</td><td><span id="${v.relId}" class="link resource_sublist_del">删除</span></td></tr>`; | 691 | + <td>${v.resTypeName}</td><td>`+collProtocol+`</td><td><span id="${v.relId}" class="link resource_sublist_del">删除</span></td></tr>`; |
684 | }); | 692 | }); |
685 | var tb = ` | 693 | var tb = ` |
686 | <form class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="dyglTools-form"> | 694 | <form class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="dyglTools-form"> |
@@ -157,8 +157,8 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'reslist', 'sessions' | @@ -157,8 +157,8 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'reslist', 'sessions' | ||
157 | view('commonViewModel').render("template/res/reslist").then(function (res) { | 157 | view('commonViewModel').render("template/res/reslist").then(function (res) { |
158 | layer.open({ | 158 | layer.open({ |
159 | type: 1, | 159 | type: 1, |
160 | - id:(new Date()).getTime(), | ||
161 | - area: ['80%', '90%'], | 160 | + id:'alarmtemplateRes', |
161 | + area: ['80%', '81%'], | ||
162 | resize: false, | 162 | resize: false, |
163 | shadeClose: true, | 163 | shadeClose: true, |
164 | content: laytpl(res.body).render(JSON.stringify({oldData: oldResIdList})), | 164 | content: laytpl(res.body).render(JSON.stringify({oldData: oldResIdList})), |
@@ -28,7 +28,7 @@ layui.define(['commonDetail','common'], function (exports) { | @@ -28,7 +28,7 @@ layui.define(['commonDetail','common'], function (exports) { | ||
28 | function reload() { | 28 | function reload() { |
29 | //基本信息 | 29 | //基本信息 |
30 | // 根据高磊最新调整,屏蔽 KPI1D79730C(是否IO优化)/KPI93CB4C19(专有网络名称) | 30 | // 根据高磊最新调整,屏蔽 KPI1D79730C(是否IO优化)/KPI93CB4C19(专有网络名称) |
31 | - commonDetail.renderTextCols("ali_cloud_ecs_baseinfo",resId,jbxxKpi,3); | 31 | + commonDetail.renderTextCols("ali_cloud_ecs_baseinfo",resId,jbxxKpi,2); |
32 | //维保信息 joke add 20200611 | 32 | //维保信息 joke add 20200611 |
33 | commonDetail.renderMaintenanceInfo('ali_cloud_ecs_wbinfo',resId,resType); | 33 | commonDetail.renderMaintenanceInfo('ali_cloud_ecs_wbinfo',resId,resType); |
34 | // CPU使用率 | 34 | // CPU使用率 |
@@ -36,6 +36,8 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | @@ -36,6 +36,8 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | ||
36 | var bizParentList; | 36 | var bizParentList; |
37 | // 资源视图表格 | 37 | // 资源视图表格 |
38 | var bizListTable; | 38 | var bizListTable; |
39 | + var busHealthKeyWord = ''; | ||
40 | + var busIndexKeyWord = ''; | ||
39 | //点击卡片 | 41 | //点击卡片 |
40 | $('#bizindexTable').unbind('click').on('click', '[data-biz-card]', function () { | 42 | $('#bizindexTable').unbind('click').on('click', '[data-biz-card]', function () { |
41 | var resType = $(this).data("biz-card"); | 43 | var resType = $(this).data("biz-card"); |
@@ -58,9 +60,17 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | @@ -58,9 +60,17 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | ||
58 | common.viewBizTopo($(this).data('busid')); | 60 | common.viewBizTopo($(this).data('busid')); |
59 | return false; | 61 | return false; |
60 | }); | 62 | }); |
63 | + //搜索按钮 | ||
64 | + $('#bizSearch').unbind('click').on('click',function (){ | ||
65 | + layer.load(2); | ||
66 | + busIndexKeyWord = $('#bizInputSearch').val(); | ||
67 | + loadBizTree(busIndexKeyWord) | ||
68 | + }) | ||
61 | //回车搜索 | 69 | //回车搜索 |
62 | $('#bizindex_keyword').keydown(function (e) { | 70 | $('#bizindex_keyword').keydown(function (e) { |
63 | if (e.keyCode === 13) { | 71 | if (e.keyCode === 13) { |
72 | + busIndexKeyWord = $(this).val(); | ||
73 | + layer.load(2); | ||
64 | // renderList(busId, curBizResType); | 74 | // renderList(busId, curBizResType); |
65 | reloadTable(); | 75 | reloadTable(); |
66 | return false; | 76 | return false; |
@@ -117,9 +127,10 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | @@ -117,9 +127,10 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | ||
117 | autoHeight(bizindexTable); | 127 | autoHeight(bizindexTable); |
118 | window.setResizeEvents('autoHeight', autoHeight); | 128 | window.setResizeEvents('autoHeight', autoHeight); |
119 | admin.req({ | 129 | admin.req({ |
120 | - url: common.domainName + '/api-web/home/resource/countResourceGroupByBusType', | ||
121 | - }).done(function (res) { | ||
122 | - layer.close(loading); | 130 | + url: common.domainName + '/api-web/home/resource/countResourceGroupByBusType?keyword='+busHealthKeyWord, |
131 | + sync: true | ||
132 | + }).always(function (res) { | ||
133 | + layer.closeAll('loading'); | ||
123 | laytpl($('#bizindexTpl').html()).render({list: res.data, isBiz: true}, function (html) { | 134 | laytpl($('#bizindexTpl').html()).render({list: res.data, isBiz: true}, function (html) { |
124 | bizindexTable.html(html); | 135 | bizindexTable.html(html); |
125 | }); | 136 | }); |
@@ -136,7 +147,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | @@ -136,7 +147,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | ||
136 | autoHeight(bizindexTable); | 147 | autoHeight(bizindexTable); |
137 | window.setResizeEvents('autoHeight', autoHeight); | 148 | window.setResizeEvents('autoHeight', autoHeight); |
138 | admin.req({ | 149 | admin.req({ |
139 | - url: common.domainName + '/api-web/home/resource/countSecondNum?parentId='+parentId, | 150 | + url: common.domainName + '/api-web/home/resource/countSecondNum?parentId='+parentId+'&keyword='+busIndexKeyWord, |
140 | }).done(function (res) { | 151 | }).done(function (res) { |
141 | layer.close(loading); | 152 | layer.close(loading); |
142 | laytpl($('#bizindexTpl').html()).render({list: res.data, isBiz: true}, function (html) { | 153 | laytpl($('#bizindexTpl').html()).render({list: res.data, isBiz: true}, function (html) { |
@@ -171,6 +182,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | @@ -171,6 +182,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | ||
171 | if (val == '' || val == null || val == undefined) { | 182 | if (val == '' || val == null || val == undefined) { |
172 | val = ''; | 183 | val = ''; |
173 | } | 184 | } |
185 | + busHealthKeyWord = val; | ||
174 | admin.req({ | 186 | admin.req({ |
175 | url: common.domainName + '/api-web/home/business/getBusTree?keyword=' + val + '¬Exist=machineroom', | 187 | url: common.domainName + '/api-web/home/business/getBusTree?keyword=' + val + '¬Exist=machineroom', |
176 | sync: true, | 188 | sync: true, |
@@ -262,6 +274,8 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | @@ -262,6 +274,8 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | ||
262 | $(".layui-input-search").keyup(function (e) { | 274 | $(".layui-input-search").keyup(function (e) { |
263 | if (e.keyCode === 13) { | 275 | if (e.keyCode === 13) { |
264 | loadBizTree($(this).val()) | 276 | loadBizTree($(this).val()) |
277 | + busIndexKeyWord = $(this).val(); | ||
278 | + busHealthKeyWord = $(this).val(); | ||
265 | } | 279 | } |
266 | }); | 280 | }); |
267 | 281 | ||
@@ -371,7 +385,6 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | @@ -371,7 +385,6 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | ||
371 | $('#biztreeTableContent').hide(); | 385 | $('#biztreeTableContent').hide(); |
372 | 386 | ||
373 | //清除查询条件 | 387 | //清除查询条件 |
374 | - $("#bizindex_keyword").val(""); | ||
375 | $("#biz_resStatus").val(""); | 388 | $("#biz_resStatus").val(""); |
376 | $("#biz_res_colony").val(""); | 389 | $("#biz_res_colony").val(""); |
377 | $("#biz_res_cluster").val(""); | 390 | $("#biz_res_cluster").val(""); |
@@ -407,7 +420,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | @@ -407,7 +420,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | ||
407 | , url: common.domainName + '/api-web/home/res-list/' + resTypeList.toString() | 420 | , url: common.domainName + '/api-web/home/res-list/' + resTypeList.toString() |
408 | , where: { | 421 | , where: { |
409 | access_token: accessToken, | 422 | access_token: accessToken, |
410 | - resName: $("#bizindex_keyword").val(), | 423 | + resName: busIndexKeyWord, |
411 | resHealth: $("#biz_resStatus").val(), | 424 | resHealth: $("#biz_resStatus").val(), |
412 | busId: busId, | 425 | busId: busId, |
413 | colonlyId: $("#biz_res_colony").val(), | 426 | colonlyId: $("#biz_res_colony").val(), |
@@ -468,7 +481,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | @@ -468,7 +481,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | ||
468 | autoHeight(bizindexTable); | 481 | autoHeight(bizindexTable); |
469 | window.setResizeEvents('autoHeight', autoHeight); | 482 | window.setResizeEvents('autoHeight', autoHeight); |
470 | admin.req({ | 483 | admin.req({ |
471 | - url: common.domainName + "/api-web/datavis/getResTotal/?busId=" + bizId | 484 | + url: common.domainName + "/api-web/datavis/getResTotal/?busId=" + bizId +"&keyWord="+busHealthKeyWord |
472 | , done: function (res) { | 485 | , done: function (res) { |
473 | laytpl($('#bizindexTpl').html()).render({list: res.data}, function (html) { | 486 | laytpl($('#bizindexTpl').html()).render({list: res.data}, function (html) { |
474 | bizindexTable.html(html); | 487 | bizindexTable.html(html); |
@@ -504,7 +517,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | @@ -504,7 +517,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | ||
504 | , drag: {toolbar: false} | 517 | , drag: {toolbar: false} |
505 | , where: { | 518 | , where: { |
506 | access_token: accessToken, | 519 | access_token: accessToken, |
507 | - resName: $("#bizindex_keyword").val(), | 520 | + resName: busIndexKeyWord, |
508 | resHealth: $("#biz_resStatus").val(), | 521 | resHealth: $("#biz_resStatus").val(), |
509 | busId: busId, | 522 | busId: busId, |
510 | colonlyId: $("#biz_res_colony").val(), | 523 | colonlyId: $("#biz_res_colony").val(), |
@@ -586,7 +599,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | @@ -586,7 +599,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | ||
586 | , url: common.domainName + '/api-web/home/res-list/' + resType | 599 | , url: common.domainName + '/api-web/home/res-list/' + resType |
587 | , where: { | 600 | , where: { |
588 | access_token: accessToken, | 601 | access_token: accessToken, |
589 | - resName: $("#bizindex_keyword").val(), | 602 | + resName: busIndexKeyWord, |
590 | resHealth: $("#biz_resStatus").val(), | 603 | resHealth: $("#biz_resStatus").val(), |
591 | busId: busId, | 604 | busId: busId, |
592 | colonlyId: $("#biz_res_colony").val(), | 605 | colonlyId: $("#biz_res_colony").val(), |
@@ -837,7 +850,6 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | @@ -837,7 +850,6 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | ||
837 | //加载资源池、集群等查询条件 | 850 | //加载资源池、集群等查询条件 |
838 | function renderBizSerach(resType, busId, subflag) { | 851 | function renderBizSerach(resType, busId, subflag) { |
839 | //清空查询条件 joke add 20200409 开始 | 852 | //清空查询条件 joke add 20200409 开始 |
840 | - $('#bizindex_keyword').val(''); | ||
841 | $('#biz_resStatus').val(''); | 853 | $('#biz_resStatus').val(''); |
842 | $('#biz_res_colony').val(''); | 854 | $('#biz_res_colony').val(''); |
843 | $('#biz_res_cluster').val(''); | 855 | $('#biz_res_cluster').val(''); |
@@ -996,7 +1008,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | @@ -996,7 +1008,7 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | ||
996 | } | 1008 | } |
997 | ,where: { //请求参数(注意:这里面的参数可任意定义,并非下面固定的格式) | 1009 | ,where: { //请求参数(注意:这里面的参数可任意定义,并非下面固定的格式) |
998 | access_token: accessToken, | 1010 | access_token: accessToken, |
999 | - resName: $("#bizindex_keyword").val(), | 1011 | + resName: busIndexKeyWord, |
1000 | resHealth: $("#biz_resStatus").val(), | 1012 | resHealth: $("#biz_resStatus").val(), |
1001 | busId: busId, | 1013 | busId: busId, |
1002 | colonlyId: $("#biz_res_colony").val(), | 1014 | colonlyId: $("#biz_res_colony").val(), |
@@ -1285,16 +1285,27 @@ layui.define(['xmSelect', 'md5'], function (exports) { | @@ -1285,16 +1285,27 @@ layui.define(['xmSelect', 'md5'], function (exports) { | ||
1285 | if (layHref.indexOf('=') !== -1) { | 1285 | if (layHref.indexOf('=') !== -1) { |
1286 | param = "=" + encodeURIComponent(layHref.split('=')[1]); | 1286 | param = "=" + encodeURIComponent(layHref.split('=')[1]); |
1287 | } | 1287 | } |
1288 | - alink.setAttribute("lay-href",layHref.split('=')[0] + param); | 1288 | + alink.setAttribute("lay-href", layHref.split('=')[0] + param); |
1289 | + document.body.appendChild(alink); | ||
1290 | + alink.click(); | ||
1291 | + document.body.removeChild(alink); | ||
1292 | + }, | ||
1293 | + openMxgraph: function (layHref) { | ||
1294 | + var alink = document.createElement('a'); | ||
1295 | + var param = ''; | ||
1296 | + if (layHref.indexOf('=') !== -1) { | ||
1297 | + param = "=" + encodeURIComponent(layHref.split('=')[1]); | ||
1298 | + } | ||
1299 | + alink.setAttribute("lay-href", layHref.split('=')[0] + param); | ||
1289 | admin.req({ | 1300 | admin.req({ |
1290 | - url: obj.domainName + '/api-web/mxgraph/getJtopoInfoById/'+layHref.split('=')[2], | 1301 | + url: obj.domainName + '/api-web/mxgraph/getJtopoInfoById/' + layHref.split('=')[2], |
1291 | success(response) { | 1302 | success(response) { |
1292 | //LH 修改 弹框展示子拓扑 | 1303 | //LH 修改 弹框展示子拓扑 |
1293 | layer.open({ | 1304 | layer.open({ |
1294 | - title:response.object.topoName, | 1305 | + title: response.object.topoName, |
1295 | type: 2, | 1306 | type: 2, |
1296 | - area:['90%','90%'], | ||
1297 | - content: obj.graphEditorOrigin + "/jgraph/grapheditor/viewer.html?access_token=" + localStorage.getItem('access_token') + '&id='+layHref.split('=')[2] ,//+ "&layout=organic", | 1307 | + area: ['90%', '90%'], |
1308 | + content: obj.graphEditorOrigin + "/jgraph/grapheditor/viewer.html?access_token=" + localStorage.getItem('access_token') + '&id=' + layHref.split('=')[2],//+ "&layout=organic", | ||
1298 | }) | 1309 | }) |
1299 | }, | 1310 | }, |
1300 | error() { | 1311 | error() { |
@@ -12,7 +12,8 @@ layui.define(['commonDetail','common'], function (exports) { | @@ -12,7 +12,8 @@ layui.define(['commonDetail','common'], function (exports) { | ||
12 | } | 12 | } |
13 | commonDetail.bindTips(); | 13 | commonDetail.bindTips(); |
14 | //基本信息 | 14 | //基本信息 |
15 | - var jbxxKpi = "KPIE13DD9A3,KPIF74D9D2B,KPI1635BB9B,KPIF3CCE8C7,KPI30D23EF4,KPI31ECC0E6,KPIF7800C96,KPI0420A9BC,KPI34772285"; | 15 | + // 高磊:华为云虚拟机指标采集不到连接状态 |
16 | + var jbxxKpi = "KPIF74D9D2B,KPI1635BB9B,KPIF3CCE8C7,KPI30D23EF4,KPI31ECC0E6,KPIF7800C96,KPI0420A9BC,KPI34772285"; | ||
16 | //端口存活侦测(二维表格) | 17 | //端口存活侦测(二维表格) |
17 | var portDetTableKpiId='KPI39C76443,KPIC6A062EC,KPI5212EE93,KPIDCBEA93D'; | 18 | var portDetTableKpiId='KPI39C76443,KPIC6A062EC,KPI5212EE93,KPIDCBEA93D'; |
18 | 19 |
@@ -19,7 +19,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -19,7 +19,8 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
19 | var admin = layui.admin; | 19 | var admin = layui.admin; |
20 | var commonDetail = layui.commonDetail; | 20 | var commonDetail = layui.commonDetail; |
21 | var domainName = common.domainName; | 21 | var domainName = common.domainName; |
22 | - | 22 | + var resHealthKeyWord = ''; |
23 | + var resindexKeyword = ''; | ||
23 | var resTypeSelectExclude = ['HOST_MINICOMPUTER', 'HOST_MINICOMPUTER_SERVER', 'HOST_BMC', 'HOST_X86SERVER'] | 24 | var resTypeSelectExclude = ['HOST_MINICOMPUTER', 'HOST_MINICOMPUTER_SERVER', 'HOST_BMC', 'HOST_X86SERVER'] |
24 | 25 | ||
25 | var curTreeNode = ''; | 26 | var curTreeNode = ''; |
@@ -141,48 +142,16 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -141,48 +142,16 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
141 | 142 | ||
142 | window.setResizeEvents('autoHeight', autoHeight); | 143 | window.setResizeEvents('autoHeight', autoHeight); |
143 | admin.req({ | 144 | admin.req({ |
144 | - url: common.domainName + '/api-web/home/resource/healthByResType?pResType=' + resType, | 145 | + url: common.domainName + '/api-web/home/resource/healthByResType?pResType=' + resType +'&keyword=' + resHealthKeyWord, |
145 | }).done(function (res) { | 146 | }).done(function (res) { |
146 | laytpl($('#resindexTpl').html()).render({list: res.data}, function (html) { | 147 | laytpl($('#resindexTpl').html()).render({list: res.data}, function (html) { |
147 | resindexTable.html(html); | 148 | resindexTable.html(html); |
149 | + layer.closeAll('loading'); | ||
148 | }); | 150 | }); |
149 | }); | 151 | }); |
150 | } | 152 | } |
151 | 153 | ||
152 | - admin.req({ | ||
153 | - url: common.domainName + '/api-web/home/resType/getTree?notExist=machineroom&table=resources&exist=HOST_MINICOMPUTER_SERVER', | ||
154 | - type: 'get', | ||
155 | - sync: true, | ||
156 | - done: function (res) { | ||
157 | - layer.close(loading); | ||
158 | - loadResTree(res.data); | ||
159 | - //joke add 20200407,如果没有资源树,则默认资源页给提示无数据 开始 | ||
160 | - if (res.data.length === 0) { | ||
161 | - var resindexTable = $('#resindexTable'); | ||
162 | - autoHeight(resindexTable); | ||
163 | - laytpl($('#resindexTpl').html()).render({list: res.data}, function (html) { | ||
164 | - resindexTable.html(html); | ||
165 | - }); | ||
166 | - } | ||
167 | - loadParamSelect(); | ||
168 | - //joke add 20200407,如果没有资源树,则默认资源页给提示无数据 开始 | ||
169 | - } | ||
170 | - }).error(function () { | ||
171 | - layer.close(loading); | ||
172 | - //joke add 20200407 | ||
173 | - //树无数据提示 | ||
174 | - tree.render({ | ||
175 | - elem: '#resindextree', | ||
176 | - showLine: false, | ||
177 | - data: new Array() | ||
178 | - }); | ||
179 | - //右侧无数据提示 | ||
180 | - var resindexTable = $('#resindexTable'); | ||
181 | - autoHeight(resindexTable); | ||
182 | - laytpl($('#resindexTpl').html()).render({list: new Array()}, function (html) { | ||
183 | - resindexTable.html(html); | ||
184 | - }); | ||
185 | - }); | 154 | + |
186 | 155 | ||
187 | //不带分页的列表 | 156 | //不带分页的列表 |
188 | function renderTableList(resType) { | 157 | function renderTableList(resType) { |
@@ -243,7 +212,44 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -243,7 +212,44 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
243 | }); | 212 | }); |
244 | } | 213 | } |
245 | //左侧树 | 214 | //左侧树 |
246 | - function loadResTree(data) { | 215 | + function loadResTree(val) { |
216 | + admin.req({ | ||
217 | + url: common.domainName + '/api-web/home/resType/getTree?notExist=machineroom&table=resources&exist=HOST_MINICOMPUTER_SERVER&keyword='+val, | ||
218 | + type: 'get', | ||
219 | + sync: true, | ||
220 | + done: function (res) { | ||
221 | + layer.close(loading); | ||
222 | + treeList(res.data); | ||
223 | + //joke add 20200407,如果没有资源树,则默认资源页给提示无数据 开始 | ||
224 | + if (res.data.length === 0) { | ||
225 | + var resindexTable = $('#resindexTable'); | ||
226 | + autoHeight(resindexTable); | ||
227 | + laytpl($('#resindexTpl').html()).render({list: res.data}, function (html) { | ||
228 | + resindexTable.html(html); | ||
229 | + }); | ||
230 | + renderIndex('') | ||
231 | + } | ||
232 | + loadParamSelect(); | ||
233 | + //joke add 20200407,如果没有资源树,则默认资源页给提示无数据 开始 | ||
234 | + } | ||
235 | + }).error(function () { | ||
236 | + layer.close(loading); | ||
237 | + //joke add 20200407 | ||
238 | + //树无数据提示 | ||
239 | + tree.render({ | ||
240 | + elem: '#resindextree', | ||
241 | + showLine: false, | ||
242 | + data: new Array() | ||
243 | + }); | ||
244 | + //右侧无数据提示 | ||
245 | + var resindexTable = $('#resindexTable'); | ||
246 | + autoHeight(resindexTable); | ||
247 | + laytpl($('#resindexTpl').html()).render({list: new Array()}, function (html) { | ||
248 | + resindexTable.html(html); | ||
249 | + }); | ||
250 | + }); | ||
251 | + } | ||
252 | + function treeList(data){ | ||
247 | //默认展开全部一级节点 | 253 | //默认展开全部一级节点 |
248 | $.each(data,function (i,v) { | 254 | $.each(data,function (i,v) { |
249 | v.spread = true; | 255 | v.spread = true; |
@@ -681,11 +687,28 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -681,11 +687,28 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
681 | //回车搜索 | 687 | //回车搜索 |
682 | $('#resindex_keyword').keydown(function (e) { | 688 | $('#resindex_keyword').keydown(function (e) { |
683 | if (e.keyCode === 13) { | 689 | if (e.keyCode === 13) { |
690 | + resindexKeyword = $(this).val(); | ||
684 | // renderList(currentResType); | 691 | // renderList(currentResType); |
685 | reloadTable(); | 692 | reloadTable(); |
686 | return false; | 693 | return false; |
687 | } | 694 | } |
688 | }); | 695 | }); |
696 | + $(".layui-input-search").keydown(function (e) { | ||
697 | + if (e.keyCode === 13) { | ||
698 | + layer.load(2) | ||
699 | + loadResTree($(this).val()); | ||
700 | + resHealthKeyWord = $(this).val(); | ||
701 | + resindexKeyword = $(this).val(); | ||
702 | + } | ||
703 | + }); | ||
704 | + //搜索按钮 | ||
705 | + $('#resSearch').unbind('click').on('click',function (){ | ||
706 | + resindexKeyword = $('#inputSearch').val(); | ||
707 | + resHealthKeyWord = $('#inputSearch').val(); | ||
708 | + layer.load(2) | ||
709 | + loadResTree(resindexKeyword) | ||
710 | + }) | ||
711 | + loadResTree(''); | ||
689 | 712 | ||
690 | //资源详细信息 | 713 | //资源详细信息 |
691 | function renderDetail(resId, resType) { | 714 | function renderDetail(resId, resType) { |
@@ -991,7 +1014,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -991,7 +1014,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
991 | , url: common.domainName + '/api-web/home/res-list/' + resType | 1014 | , url: common.domainName + '/api-web/home/res-list/' + resType |
992 | , where: { | 1015 | , where: { |
993 | access_token: accessToken, | 1016 | access_token: accessToken, |
994 | - resName: $("#resindex_keyword").val(), | 1017 | + resName: resindexKeyword, |
995 | busId: bizId, | 1018 | busId: bizId, |
996 | resHealth: $("#resStatus").val(), | 1019 | resHealth: $("#resStatus").val(), |
997 | colonlyId: $("#res_colony").val(), | 1020 | colonlyId: $("#res_colony").val(), |
@@ -1127,7 +1150,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -1127,7 +1150,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
1127 | , url: common.domainName + '/api-web/home/res-list/' + resType | 1150 | , url: common.domainName + '/api-web/home/res-list/' + resType |
1128 | , where: { | 1151 | , where: { |
1129 | access_token: accessToken, | 1152 | access_token: accessToken, |
1130 | - resName: $("#resindex_keyword").val() !== '' ? $("#resindex_keyword").val() : id, | 1153 | + resName: resindexKeyword !== '' ? resindexKeyword : id, |
1131 | busId: bizId, | 1154 | busId: bizId, |
1132 | resHealth: $("#resStatus").val(), | 1155 | resHealth: $("#resStatus").val(), |
1133 | colonlyId: $("#res_colony").val(), | 1156 | colonlyId: $("#res_colony").val(), |
@@ -1158,6 +1181,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -1158,6 +1181,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
1158 | resTopo(); | 1181 | resTopo(); |
1159 | 1182 | ||
1160 | commonCols.colsClickEvent(editFlag); | 1183 | commonCols.colsClickEvent(editFlag); |
1184 | + loadRightResTypeSelectEvent(curTreeNode.id ? curTreeNode.id : curTreeNode.data.id, "normal", res.obj); | ||
1161 | 1185 | ||
1162 | //表格排序监听 joke add 20200408 | 1186 | //表格排序监听 joke add 20200408 |
1163 | table.on('sort(resListTable)', function (obj) { | 1187 | table.on('sort(resListTable)', function (obj) { |
@@ -1212,7 +1236,6 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -1212,7 +1236,6 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
1212 | //加载资源池、集群等查询条件 | 1236 | //加载资源池、集群等查询条件 |
1213 | function renderSerach(resType,subflag) { | 1237 | function renderSerach(resType,subflag) { |
1214 | //清空查询条件 joke add 20200409 开始 | 1238 | //清空查询条件 joke add 20200409 开始 |
1215 | - $('#resindex_keyword').val(''); | ||
1216 | $('#resStatus').val(''); | 1239 | $('#resStatus').val(''); |
1217 | // $('#resListBizTypes').val(''); | 1240 | // $('#resListBizTypes').val(''); |
1218 | if(xmSelect.get("#resListBizTypes") && xmSelect.get("#resListBizTypes")[0]){ | 1241 | if(xmSelect.get("#resListBizTypes") && xmSelect.get("#resListBizTypes")[0]){ |
@@ -1522,7 +1545,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -1522,7 +1545,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
1522 | } | 1545 | } |
1523 | , where: { //请求参数(注意:这里面的参数可任意定义,并非下面固定的格式) | 1546 | , where: { //请求参数(注意:这里面的参数可任意定义,并非下面固定的格式) |
1524 | access_token: accessToken, | 1547 | access_token: accessToken, |
1525 | - resName: $("#resindex_keyword").val(), | 1548 | + resName: resindexKeyword, |
1526 | busId: bizId, | 1549 | busId: bizId, |
1527 | resHealth: $("#resStatus").val(), | 1550 | resHealth: $("#resStatus").val(), |
1528 | colonlyId: $("#res_colony").val(), | 1551 | colonlyId: $("#res_colony").val(), |
@@ -190,7 +190,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'laydate' | @@ -190,7 +190,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'laydate' | ||
190 | templet: | 190 | templet: |
191 | '<div>' + | 191 | '<div>' + |
192 | ' <button data-id="{{d.noticeTempId}}" lay-tips="删除" type="button" class="layui-btn layui-btn-xs layui-btn-normal link-notice-temp-delete"><i class="layui-icon layui-icon-delete"></i></button>' + | 192 | ' <button data-id="{{d.noticeTempId}}" lay-tips="删除" type="button" class="layui-btn layui-btn-xs layui-btn-normal link-notice-temp-delete"><i class="layui-icon layui-icon-delete"></i></button>' + |
193 | - ' <button data-id="{{d.noticeTempId}}" data-subId="{{d.subId}}" lay-tips="发送" type="button" class="layui-btn layui-btn-xs layui-btn-normal link-notice-temp-send"><i class="layui-icon layui-icon-release"></i></button>' + | 193 | + ' <button data-id="{{d.noticeTempId}}" data-layindex="{{d.LAY_TABLE_INDEX}}" data-subId="{{d.subId}}" lay-tips="发送" type="button" class="layui-btn layui-btn-xs layui-btn-normal link-notice-temp-send"><i class="layui-icon layui-icon-release"></i></button>' + |
194 | '</div>' | 194 | '</div>' |
195 | }]], | 195 | }]], |
196 | done: function (res) { | 196 | done: function (res) { |
@@ -229,7 +229,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'laydate' | @@ -229,7 +229,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'laydate' | ||
229 | 229 | ||
230 | // 手动发送 | 230 | // 手动发送 |
231 | $('.link-notice-temp-send').click(function () { | 231 | $('.link-notice-temp-send').click(function () { |
232 | - openUserWindow($(this).data('subid'),res.data[$(this).data('index')]); | 232 | + openUserWindow($(this).data('subid'),res.data[$(this).data('layindex')]); |
233 | }); | 233 | }); |
234 | 234 | ||
235 | // 绑定订阅事件 | 235 | // 绑定订阅事件 |
@@ -7,14 +7,14 @@ | @@ -7,14 +7,14 @@ | ||
7 | <div class="lay-row"> | 7 | <div class="lay-row"> |
8 | <div class="lay-row-item lay-row-item--auto-width"> | 8 | <div class="lay-row-item lay-row-item--auto-width"> |
9 | <h5 class="lay-row-title">基本信息<i data-id="ali_cloud_ecs_baseinfo" class="iconfont detail_base_info"></i></h5> | 9 | <h5 class="lay-row-title">基本信息<i data-id="ali_cloud_ecs_baseinfo" class="iconfont detail_base_info"></i></h5> |
10 | - <ul class="info-table info-ali-cloud-ecs" id="ali_cloud_ecs_baseinfo"></ul> | 10 | + <ul class="info-table" id="ali_cloud_ecs_baseinfo"></ul> |
11 | </div> | 11 | </div> |
12 | - </div> | ||
13 | - <div class="lay-row"> | ||
14 | - <div class="lay-row-item lay-row-item--auto-width"> | 12 | + <div class="lay-row-item lay-row-item--small"> |
15 | <h5 class="lay-row-title">维保信息</h5> | 13 | <h5 class="lay-row-title">维保信息</h5> |
16 | <ul class="info-table" id="ali_cloud_ecs_wbinfo"></ul> | 14 | <ul class="info-table" id="ali_cloud_ecs_wbinfo"></ul> |
17 | </div> | 15 | </div> |
16 | + </div> | ||
17 | + <div class="lay-row"> | ||
18 | <div class="lay-row-item"> | 18 | <div class="lay-row-item"> |
19 | <h5 class="lay-row-title">CPU使用率 | 19 | <h5 class="lay-row-title">CPU使用率 |
20 | <a class="detail_row_menu hide"> | 20 | <a class="detail_row_menu hide"> |
@@ -30,8 +30,6 @@ | @@ -30,8 +30,6 @@ | ||
30 | </li> | 30 | </li> |
31 | </ul> | 31 | </ul> |
32 | </div> | 32 | </div> |
33 | - </div> | ||
34 | - <div class="lay-row"> | ||
35 | <div class="lay-row-item"> | 33 | <div class="lay-row-item"> |
36 | <h5 class="lay-row-title">内存使用率 | 34 | <h5 class="lay-row-title">内存使用率 |
37 | <a class="detail_row_menu hide"> | 35 | <a class="detail_row_menu hide"> |
1 | -<div> | ||
2 | - <el-row> | ||
3 | - <el-col :span="24"> | ||
4 | - <div class="set-add-div"> | ||
5 | - <el-row style="margin-bottom: 5px;margin-top: 5px"> | ||
6 | - <el-col :span="24"> | ||
7 | - <div class="flex-div-start margin-top-bottom-10"> | ||
8 | - <el-tooltip> | ||
9 | - <template #content>关键字检索包含<br/>资源名称<br/>IP地址</template> | ||
10 | - <el-input style="width:160px;margin-left: 10px;float: left;" class="margin-right-10" | ||
11 | - v-model="keyWords" | ||
12 | - placeholder="输入关键字" | ||
13 | - clearable/> | ||
14 | - </el-input> | 1 | +<div class="container" :style="{'height':height+'px','max-height':height+'px','padding':'10px 0 10px 10px','background':'#fff','box-sizing':'border-box'}"> |
2 | + <div class="cm-card" :style="{'min-height':height+'px','max-height':height+'px','height':'100%','padding-top':'3px'}"> | ||
3 | + <div class="search"> | ||
4 | + <div class="condition esData-conditon" style="justify-content: space-between;width: 100%;"> | ||
5 | + <el-form :inline="true"> | ||
6 | + <el-form-item> | ||
7 | + <el-tooltip placement="bottom-start"> | ||
8 | + <template #content> 资源名称 <br /> 资源ip <br /> 业务名称</template> | ||
9 | + <el-input clearable :size="$global.elementConfig.size.input" v-model="keyWords" placeholder="关键字检索" /> | ||
15 | </el-tooltip> | 10 | </el-tooltip> |
16 | - <el-dropdown style="margin-top: -15px;margin-left: 10px;float: left;"> | ||
17 | - <el-icon class="el-icon--right"> | ||
18 | - <arrow-down/> | ||
19 | - </el-icon> | ||
20 | - <cm-biz-type-tree-input multiple clearable collapseTags @callback="getBizType"/> | 11 | + </el-form-item> |
12 | + <el-form-item style="margin-top: 9px;"> | ||
13 | + <el-dropdown> | ||
14 | + <cm-res-type-tree-input :size="$global.elementConfig.size.input" @callback="getResType" clearable collapseTags multiple/> | ||
21 | </el-dropdown> | 15 | </el-dropdown> |
22 | - | ||
23 | - <el-dropdown style="margin-top: -15px;margin-left: 10px;float: left;"> | ||
24 | - <el-icon class="el-icon--right"> | ||
25 | - <arrow-down/> | ||
26 | - </el-icon> | ||
27 | - <cm-res-type-tree-input multiple clearable collapseTags @callback="getResType"/> | 16 | + </el-form-item> |
17 | + <el-form-item style="margin-top: 9px;"> | ||
18 | + <el-dropdown> | ||
19 | + <cm-biz-type-tree-input :size="$global.elementConfig.size.input" @callback="getBizType" clearable collapseTags multiple/> | ||
28 | </el-dropdown> | 20 | </el-dropdown> |
29 | - | ||
30 | - <div class="flex-div-start" style="float: left;"> | ||
31 | -<!-- <el-button type="primary" @click="onReset()">重置</el-button>--> | ||
32 | - <el-button type="primary" @click="onBtnSearch()" style="margin-left: 10px">查询</el-button> | ||
33 | - </div> | ||
34 | - | 21 | + </el-form-item> |
22 | + <el-form-item style="margin-left: -30px;margin-top: -6px;"> | ||
23 | + <el-button @click="onBtnSearch()" :size="$global.elementConfig.size.button" type="primary" style="margin-left: 6px">查询</el-button> | ||
24 | + <el-button type="primary" @click="save()" style="margin-left: 6px">新增</el-button> | ||
25 | + <el-button type="primary" @click="deleteOther()" style="margin-left: 6px">删除</el-button> | ||
26 | + </el-form-item> | ||
27 | + </el-form> | ||
35 | </div> | 28 | </div> |
36 | - </el-col> | ||
37 | - </el-row> | ||
38 | - <el-row> | ||
39 | - <div class="flex-div-start" style="margin: 4px;"> | ||
40 | - <el-button type="primary" @click="save()" style="margin-left: 10px">新增</el-button> | ||
41 | - <el-button type="primary" @click="deleteOther()" style="margin-left: 10px">删除</el-button> | ||
42 | </div> | 29 | </div> |
43 | - </el-row> | ||
44 | - <el-row class="margin-bottom-50"> | ||
45 | - <el-col :span="24" class="table-height"> | 30 | + <div class="search-table"> |
46 | <cm-table-page :columns="columns" | 31 | <cm-table-page :columns="columns" |
47 | :dataList="portSenseData" | 32 | :dataList="portSenseData" |
48 | :total="count" | 33 | :total="count" |
@@ -73,16 +58,13 @@ | @@ -73,16 +58,13 @@ | ||
73 | </el-button> | 58 | </el-button> |
74 | </template> | 59 | </template> |
75 | </cm-table-page> | 60 | </cm-table-page> |
76 | - </el-col> | ||
77 | - </el-row> | ||
78 | </div> | 61 | </div> |
79 | - </el-col> | ||
80 | - </el-row> | 62 | + </div> |
63 | +</div> | ||
81 | 64 | ||
82 | - <!--弹框--> | ||
83 | - <cm-dialog :title="title" width="80%" :showDialogVisible="showPortSense" :showFooter="false" @hidedialog="showPortSenseDialog" :showOkBtn="false" cancelText="关闭"> | 65 | +<!--弹框--> |
66 | +<cm-dialog :title="title" width="80%" :showDialogVisible="showPortSense" :showFooter="false" @hidedialog="showPortSenseDialog" :showOkBtn="false" cancelText="关闭"> | ||
84 | <template v-slot> | 67 | <template v-slot> |
85 | <port-sense-config :parameter="portSenseConfigData"></port-sense-config> | 68 | <port-sense-config :parameter="portSenseConfigData"></port-sense-config> |
86 | </template> | 69 | </template> |
87 | - </cm-dialog> | ||
88 | -</div> | ||
70 | +</cm-dialog> |
@@ -175,21 +175,22 @@ export default { | @@ -175,21 +175,22 @@ export default { | ||
175 | } | 175 | } |
176 | //删除单个数据 | 176 | //删除单个数据 |
177 | let deleteItem = (row, index) => { | 177 | let deleteItem = (row, index) => { |
178 | - proxy.$global.confirm("确认删除吗?", function () { | ||
179 | deleteItems([row.resId]); | 178 | deleteItems([row.resId]); |
180 | - }) | ||
181 | } | 179 | } |
182 | //删除多个或单个 | 180 | //删除多个或单个 |
183 | let deleteItems = (list) => { | 181 | let deleteItems = (list) => { |
184 | let params = { | 182 | let params = { |
185 | redIds: list.toString() | 183 | redIds: list.toString() |
186 | } | 184 | } |
185 | + proxy.$global.confirm("确认删除吗?", function () { | ||
187 | proxy.$http.get('/api-web/bResourceExtendParam/delete', params, function (res) { | 186 | proxy.$http.get('/api-web/bResourceExtendParam/delete', params, function (res) { |
188 | if (res && res.success) { | 187 | if (res && res.success) { |
189 | proxy.$global.showMsg('删除成功'); | 188 | proxy.$global.showMsg('删除成功'); |
190 | loadTableDataList({page: 1, limit: pageSize.value}); | 189 | loadTableDataList({page: 1, limit: pageSize.value}); |
191 | } | 190 | } |
192 | }) | 191 | }) |
192 | + }) | ||
193 | + | ||
193 | } | 194 | } |
194 | //添加 | 195 | //添加 |
195 | let save = () => { | 196 | let save = () => { |
@@ -230,7 +231,12 @@ export default { | @@ -230,7 +231,12 @@ export default { | ||
230 | let list = pitch.value.map(item => { | 231 | let list = pitch.value.map(item => { |
231 | return item.resId; | 232 | return item.resId; |
232 | }) | 233 | }) |
234 | + if (list != null && list != ''){ | ||
233 | deleteItems(list); | 235 | deleteItems(list); |
236 | + }else { | ||
237 | + proxy.$global.showMsg("请选择需要删除的端口侦测数据","warning"); | ||
238 | + } | ||
239 | + | ||
234 | }; | 240 | }; |
235 | //重新加载表格数据 | 241 | //重新加载表格数据 |
236 | let loadTableDataList = ({page, limit}) => { | 242 | let loadTableDataList = ({page, limit}) => { |
@@ -162,8 +162,29 @@ export default { | @@ -162,8 +162,29 @@ export default { | ||
162 | resId: "", | 162 | resId: "", |
163 | resIdList: resIdArr.value, | 163 | resIdList: resIdArr.value, |
164 | } | 164 | } |
165 | + | ||
166 | + var length = portSenseConfigData.value.length | ||
167 | + if (length == 0){ | ||
165 | portSenseConfigData.value.push(data); | 168 | portSenseConfigData.value.push(data); |
166 | } | 169 | } |
170 | + if (portSenseConfigData.value[length-1].protocolType == '' || portSenseConfigData.value[length-1].protocolType == null){ | ||
171 | + proxy.$global.showMsg('请填写协议类型','warning'); | ||
172 | + return false; | ||
173 | + }else if (portSenseConfigData.value[length-1].port == '' || portSenseConfigData.value[length-1].port == null){ | ||
174 | + proxy.$global.showMsg('请填写端口号','warning'); | ||
175 | + return false; | ||
176 | + }else if (portSenseConfigData.value[length-1].intervalTime == '' || portSenseConfigData.value[length-1].intervalTime == null){ | ||
177 | + proxy.$global.showMsg('请填写间隔时长','warning'); | ||
178 | + return false; | ||
179 | + }else if (portSenseConfigData.value[length-1].portDesc == '' || portSenseConfigData.value[length-1].portDesc == null){ | ||
180 | + proxy.$global.showMsg('请填写端口备注','warning'); | ||
181 | + return false; | ||
182 | + }else{ | ||
183 | + portSenseConfigData.value.push(data); | ||
184 | + } | ||
185 | + | ||
186 | + | ||
187 | + } | ||
167 | //下拉框值改变事件 | 188 | //下拉框值改变事件 |
168 | let changePortSense = () => { | 189 | let changePortSense = () => { |
169 | 190 |
@@ -28,7 +28,7 @@ export default { | @@ -28,7 +28,7 @@ export default { | ||
28 | let initState = Vue.ref(true); | 28 | let initState = Vue.ref(true); |
29 | //初始化 | 29 | //初始化 |
30 | let init = () => { | 30 | let init = () => { |
31 | - rowMaxHeight.value = "max-height: 75px;"; | 31 | + rowMaxHeight.value = "max-height: 58px;"; |
32 | initState.value = true; | 32 | initState.value = true; |
33 | showIcon.value = "el-icon-arrow-down"; | 33 | showIcon.value = "el-icon-arrow-down"; |
34 | } | 34 | } |
@@ -77,7 +77,7 @@ export default { | @@ -77,7 +77,7 @@ export default { | ||
77 | } | 77 | } |
78 | //是否展开点击 | 78 | //是否展开点击 |
79 | let changeItem = () => { | 79 | let changeItem = () => { |
80 | - rowMaxHeight.value = initState.value ? "" : "max-height: 75px;"; | 80 | + rowMaxHeight.value = initState.value ? "" : "max-height: 58px;"; |
81 | showIcon.value = initState.value ? "el-icon-arrow-up" : "el-icon-arrow-down"; | 81 | showIcon.value = initState.value ? "el-icon-arrow-up" : "el-icon-arrow-down"; |
82 | initState.value = !initState.value; | 82 | initState.value = !initState.value; |
83 | } | 83 | } |
-
Please register or login to post a comment