cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!doctype html>
<html>
<head>
[#include "/business/wechat/include/title.html" /]
[#include "/business/wechat/include/wheader.html" /]
</head>
 
<body>
<header class="kltit"><a href="javascript:history.go(-1);"><span></span></a>添加关联配置</header>
<div class="search-bg">
    <div class="search-box">
        <input type="text" placeholder="请输入配置名称或配置搜索码" id="cmdbName" >
        <a href="javascript:query();"><span></span></a>
    </div>    
</div>
 
<div id="main"></div>
<button class="bluebtn bluebtnsmal2" onclick="savedevice()">确定</button> 
</body>
<script type="text/javascript">
var flowId = '${flowId}';
var cmdbName = $.util.encode($.trim($("#cmdbName").val()));
function query() {
     var param = {"customerId":"${customerId}","ciids":"${ciIds}","cmdbName":cmdbName,"orderId":"${orderId}"};
     $.post("${base}/ewyw/ewIncident/ewAddLinkDeviceData.html",param,function(data,textStatus) {
            $("#main").html(data);
    });
}
 
$(function() {
    query();
})
 
function savedevice(){
        var checkedBox = $(".item-foucs");
        if(checkedBox.length==0) {
            popupTips("请选择关联的配置");
            return;
        }
        
        var devices = new Array();
        checkedBox.each(function() {
            devices.push($.trim($(this).find(".deivceId").val()));
        });
        var devicelist = devices.join(",");
        $.post("${base}/ewyw/ewIncident/saveLinkDevices.html",{"flowId":"${flowId}","deviceIds":devicelist},function(data,textStatus) {
            if(data=="1") {
                popupTips("关联成功");    
                if('${showType}' == '${Constants.WECHAT_DETAIL_DEAL_SCORE_SJ}'){    
                       window.location.href = "${base}/ewyw/ewIncident/ewIncidentInfoCl.html?orderId=${orderId}";
                   }else if('${showType}' == '${Constants.WECHAT_DETAIL_DEAL_SCORE_WT}'){
                       window.location.href = "${base}/ewyw/ewQuestion/ewQuestionDeal.html?orderId=${orderId}&flowId=${flowId}";
                   }
              } else {
                window.top.popupTips("关联失败");
            }
        });
    }
</script>
</html>