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
61
62
63
<!doctype html>
<html>
<head>
[#include "/business/wechat/include/title.html" /]
[#include "/business/wechat/include/wheader.html" /]
</head>
 
<body>
<header class="kltit"><div class="present"><a href="javascript:savedevice();">确定</a></div><a [#if RequestParameters.fwt??&& RequestParameters.fwt== 1]href="${base}/ewyw/ewIncident/ewAddIncidentfwt.html"[#elseif RequestParameters.fwt??&& RequestParameters.fwt== 2]href="${base}/ewyw/ewzc/ewMyzc.html"[#elseif RequestParameters.wt??&& RequestParameters.wt== 1]href="${base}/ewyw/ewQuestion/ewAddQuestion.html"[#else]href="${base}/ewyw/ewIncident/ewAddIncident.html"[/#if] ><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>
</body>
<script type="text/javascript">
var customerId = '${RequestParameters.customerId}';
var fwt = '${RequestParameters.fwt}';
var wt = '${RequestParameters.wt}';
function query() {
    var cmdbName = $.trim($("#cmdbName").val());
    var ciids = '${ciIds}';
     var param = {"customerId":customerId,"cmdbName":cmdbName,"ciids":ciids};
     $.post("${base}/ewyw/ewIncident/ewDeviceData.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/savedevice.html",{"devices":devicelist,"wt":wt,"fwt":fwt},function(data,textStatus) {
            if(fwt == 1){
                  window.location.href = "${base}/ewyw/ewIncident/ewAddIncidentfwt.html";
            }else if(fwt==2){
                window.location.href = "${base}/ewyw/ewzc/ewzcAdd.html";
            }else{
               if(wt == 1){
                  window.location.href = "${base}/ewyw/ewQuestion/ewAddQuestion.html";
               }else{
                  window.location.href = "${base}/ewyw/ewIncident/ewAddIncident.html";
               }
            }
        });
    }
</script>
</html>