Merge branch 'master' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-V32-XuHaoJie
Showing
3 changed files
with
23 additions
and
9 deletions
@@ -15,6 +15,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -15,6 +15,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
15 | var writeBackDirctiveList = (data && data.writeBackDirctiveList) ? data.writeBackDirctiveList : []; | 15 | var writeBackDirctiveList = (data && data.writeBackDirctiveList) ? data.writeBackDirctiveList : []; |
16 | var systemType = (data && data.systemType) ? data.systemType : ''; | 16 | var systemType = (data && data.systemType) ? data.systemType : ''; |
17 | var protocol = (data && data.protocol) ? data.protocol : ''; | 17 | var protocol = (data && data.protocol) ? data.protocol : ''; |
18 | + var xjType = (data && data.xjType) ? data.xjType : ''; | ||
18 | var accessToken = sessions.getToken()['access_token']; | 19 | var accessToken = sessions.getToken()['access_token']; |
19 | var loginName = localStorage.getItem("lgn"); | 20 | var loginName = localStorage.getItem("lgn"); |
20 | var restoreVersionTable = {}; | 21 | var restoreVersionTable = {}; |
@@ -417,6 +418,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -417,6 +418,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
417 | }).done(function (res) { | 418 | }).done(function (res) { |
418 | xmSelect.render({ | 419 | xmSelect.render({ |
419 | el: '#dir_dirctiveProtocol' | 420 | el: '#dir_dirctiveProtocol' |
421 | + ,initValue: protocol.split(',') | ||
420 | , filterable: true | 422 | , filterable: true |
421 | , tips: '=采集协议=' | 423 | , tips: '=采集协议=' |
422 | , name: 'dirctiveProtocol' | 424 | , name: 'dirctiveProtocol' |
@@ -545,17 +547,27 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -545,17 +547,27 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
545 | //刷新表格 | 547 | //刷新表格 |
546 | function reloadTable() { | 548 | function reloadTable() { |
547 | var formData = form.val('dirctive-form'); | 549 | var formData = form.val('dirctive-form'); |
548 | - dirctiveTable.reload({ | ||
549 | - page: { | ||
550 | - curr: 1 | ||
551 | - } | ||
552 | - ,where: { | ||
553 | - access_token: accessToken, | 550 | + var wheres={}; |
551 | + if(xjType=='xjType'){ | ||
552 | + wheres={ access_token: accessToken, | ||
554 | dirctiveName: $("#dirctiveSearchForm").find("input[name='dirctiveName']").val(), | 553 | dirctiveName: $("#dirctiveSearchForm").find("input[name='dirctiveName']").val(), |
554 | + collScope: protocol, | ||
555 | + systemType: 2, | ||
556 | + syncFlag: formData.syncFlag} | ||
557 | + }else{ | ||
558 | + wheres= { | ||
559 | + access_token: accessToken, dirctiveName: $("#dirctiveSearchForm").find("input[name='dirctiveName']").val(), | ||
555 | collScope: $("#dirctiveSearchForm").find("input[name='dirctiveProtocol']").val(), | 560 | collScope: $("#dirctiveSearchForm").find("input[name='dirctiveProtocol']").val(), |
556 | systemType: formData.systemType, | 561 | systemType: formData.systemType, |
557 | syncFlag: formData.syncFlag | 562 | syncFlag: formData.syncFlag |
558 | } | 563 | } |
564 | + } | ||
565 | + | ||
566 | + dirctiveTable.reload({ | ||
567 | + page: { | ||
568 | + curr: 1 | ||
569 | + } | ||
570 | + ,where: wheres | ||
559 | }); | 571 | }); |
560 | } | 572 | } |
561 | }); | 573 | }); |
@@ -489,10 +489,12 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'setStep' | @@ -489,10 +489,12 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'setStep' | ||
489 | var $that = $(this); | 489 | var $that = $(this); |
490 | var $parent = $($that.parents(".proto-tags-box")) | 490 | var $parent = $($that.parents(".proto-tags-box")) |
491 | var protocol = $that.data("protocol"); | 491 | var protocol = $that.data("protocol"); |
492 | + var resType = $that.data("restype"); | ||
492 | var params = { | 493 | var params = { |
493 | writeBackDirctiveList: $.map($parent.find('.res-tags'), element => $(element).data('dirctiveid')), | 494 | writeBackDirctiveList: $.map($parent.find('.res-tags'), element => $(element).data('dirctiveid')), |
494 | systemType: '2', | 495 | systemType: '2', |
495 | - protocol: protocol | 496 | + protocol: protocol, |
497 | + xjType :'xjType' | ||
496 | } | 498 | } |
497 | $('[lay-id="/baseconfig/dirctive/index"]').find('.layui-tab-close').trigger('click'); | 499 | $('[lay-id="/baseconfig/dirctive/index"]').find('.layui-tab-close').trigger('click'); |
498 | layer.open({ | 500 | layer.open({ |
@@ -84,7 +84,7 @@ | @@ -84,7 +84,7 @@ | ||
84 | </div> | 84 | </div> |
85 | <div class="layui-row" style="padding: 10px 0"> | 85 | <div class="layui-row" style="padding: 10px 0"> |
86 | <div class="res-tags-box"> | 86 | <div class="res-tags-box"> |
87 | - <a class="inspection-taskaddres-btn" data-restype="{{resType}}" data-protocol="{{protocol}}" ><i class="layui-icon layui-icon-add-1" ></i>新增资源 </a> | 87 | + <a class="inspection-taskaddres-btn" data-restype="{{resType}}" data-protocol="{{protocol}}" ><i class="layui-icon layui-icon-add-1" ></i>新增资源</a> |
88 | <div class="div-res-tags"> | 88 | <div class="div-res-tags"> |
89 | {{# layui.each(e,function(j,k){ }} | 89 | {{# layui.each(e,function(j,k){ }} |
90 | <label class="res-tags" data-resid="{{k.resId}}">{{k.resName}} <a class="close-icon"><i class="layui-icon layui-icon-close"></i></a></label> | 90 | <label class="res-tags" data-resid="{{k.resId}}">{{k.resName}} <a class="close-icon"><i class="layui-icon layui-icon-close"></i></a></label> |
@@ -94,7 +94,7 @@ | @@ -94,7 +94,7 @@ | ||
94 | </div> | 94 | </div> |
95 | <div class="layui-row" style="padding: 10px 0"> | 95 | <div class="layui-row" style="padding: 10px 0"> |
96 | <div class="proto-tags-box"> | 96 | <div class="proto-tags-box"> |
97 | - <a class="inspection-taskaddprotocol-btn" data-protocol="{{protocol}}"><i class="layui-icon layui-icon-add-1"></i>新增指令 </a> | 97 | + <a class="inspection-taskaddprotocol-btn" data-protocol="{{protocol}}"><i class="layui-icon layui-icon-add-1"></i>新增指令</a> |
98 | <div class="div-proto-tags"> | 98 | <div class="div-proto-tags"> |
99 | 99 | ||
100 | </div> | 100 | </div> |
-
Please register or login to post a comment