<!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>
|