<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<html>
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
[@new_ui_static_file /]
|
<link rel="stylesheet" type="text/css" href="${common_static}/static/style/ci/dialog.css"/>
|
<title>table_universal</title>
|
<script type="text/javascript">
|
$(document).ready(function() {
|
|
$.formValidator.initConfig({formID:"myform",onError:function(msg){alert(msg)},onSuccess:function(){
|
|
if (!confirm('确定提交表单?')){
|
return false;
|
}
|
document.getElementById("myform").target = window.top.openDialog(101,30,30,'操作提示:');
|
return true;
|
}});
|
|
});
|
|
function onAdd(){
|
window.top.openDialog(1, 20, 80, '新增配置', $.http.getAbsoluteUrl('ciAdd_selectCategory.html?flow_id=${RequestParameters.flow_id}'), {
|
buttons: [
|
{text: "提交", iconCls: 'icon-add', _handler: "_onFormSubmit()"},
|
{text: "关闭", _handler: "closeWin(1)"}
|
]
|
});
|
return false;
|
}
|
function showDetail(ciid,categoryid){
|
var param = new $.HashMap();
|
param.put("id",ciid);
|
param.put("thirdlevelid",categoryid);
|
window.top.openDialog(101, 95, 95, '配置详细信息', '${base}/business/pages/cirepair/orderdeal/ciDeviceDetail.html?'+$.http.parseHashMap2ParamStr(param), {
|
buttons: [
|
{text: "关闭", _handler: "closeWin(101)"}
|
]
|
});
|
return false;
|
}
|
|
function onUpdate(ciid,categoryid,tablename){
|
var param = new $.HashMap();
|
param.put("ciid",ciid);
|
param.put("categoryid",categoryid);
|
param.put("flow_id","${RequestParameters.flow_id}");
|
param.put("tablename",tablename);
|
|
window.top.openDialog(2,90,90,'新增配置','${base}/business/pages/cmdb/category/properties/previewForm.html?'+$.http.parseHashMap2ParamStr(param) , {
|
buttons: [
|
{text: "提交", iconCls: 'icon-add', _handler: "_onFormSubmit()"},
|
{text: "关闭", _handler: "closeWin(2)"}
|
]
|
});
|
}
|
|
function onDelCi(ciid,categoryid){
|
|
if(!confirm("确定要删除该CI吗?")) return false;
|
|
var param = new $.HashMap();
|
if(!$.util.isNull(ciid)){
|
param.put("ciid",ciid);
|
}
|
param.put("categoryid",categoryid);
|
window.top.openDialog(3, 30, 30, '删除', '${base}/business/pages/cmdb/category/properties/delBaseCi.html?'+$.http.parseHashMap2ParamStr(param));
|
}
|
|
function onSinglePrint(searchcode){
|
|
var param = new $.HashMap();
|
param.put("searchCode",searchcode);
|
window.top.openDialog(4, 30, 30, '打印', '${base}/business/pages/cmdb/ci/singlePrint.html?'+$.http.parseHashMap2ParamStr(param), {
|
buttons: [
|
{text: "关闭", _handler: "closeWin(4)"},
|
{text: "打印", iconCls: 'icon-print',_handler: "prn1_preview()"}
|
]
|
});
|
}
|
|
function _onFormSubmit(){
|
var isAdmin = '${IS_ADMIN}';
|
var cilist = document.getElementsByName("cilist");
|
if(cilist.length<=0){
|
alert("未录入采集配置,请录入!");
|
return false;
|
}
|
if (isAdmin == 0) {
|
document.getElementById("btnOK").click();
|
} else {
|
window.top.openDialog(5, 60, 50, '审批提交', $.http.getAbsoluteUrl('ciAddSpotApprove.html?order_id=${RequestParameters.order_id}&node_id=${RequestParameters.node_id}&flow_id=${RequestParameters.flow_id}'), {
|
buttons: [
|
{text: "提交", iconCls: 'icon-add', _handler: "_onFormSubmit()"},
|
{text: "关闭", _handler: "closeWin(5)"}
|
]
|
});
|
return false;
|
}
|
}
|
|
function closeWin() {
|
window.top.closeDialog(0);
|
}
|
</script>
|
</head>
|
|
<body style="padding-bottom:70px;">
|
<table width="98%" border="0" class="marginc">
|
<tr class="table_title">
|
<td colspan="6">
|
<div class="floatl">
|
<h3 class="table_identifying">采集配置列表</h3>
|
</div>
|
<div class="floatr">
|
<a class="button icon_add" onclick="return onAdd();">新增</a>
|
</div>
|
</td>
|
</tr>
|
<tr class="table_head">
|
<td width="5%" align="center">序号</td>
|
<td width="10%" align="center">类别</td>
|
<td width="20%" align="center">配置名称</td>
|
<td width="20%" align="center">搜索码</td>
|
<td align="center">位置</td>
|
<td width="20%" align="center">操作</td>
|
</tr>
|
[#list CILIST as d]
|
<tr>
|
<td align="center" >${d_index+1}</td>
|
<td align="center">${d.CATEGORY_NAME}</td>
|
<td align="center"><a href="####" name="cilist" onclick="return showDetail('${d.ID}','${d.THIRDLEVELID}')">${d.CINAME}</a></td>
|
<td align="center">${d.SEACHCODE}</td>
|
<td align="left">${d.POSITION}</td>
|
<td align="center"><a class="button icon_del" onclick="return onDelCi('${d.ID}','${d.THIRDLEVELID}')">删除</a>
|
<a class="button icon_modify" onclick="return onUpdate('${d.ID}','${d.THIRDLEVELID}','${d.TABLE_NAME}')">修改</a>
|
<a class="button icon_modify" onclick="return onSinglePrint('${d.SEACHCODE}')">打印</a>
|
</td>
|
</tr>
|
[/#list]
|
</table>
|
<form action="" method="post" id="myform" name="myform">
|
<input type="submit" id="btnOK" value="提交" style="display:none;" />
|
</form>
|
</body>
|
</html>
|