215 lines
7.3 KiB
HTML
215 lines
7.3 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
<title>Relation Search Home</title>
|
||
<!-- js -->
|
||
<script type="text/javascript" src="../commons/js/jquery/scripts/jquery.js"></script>
|
||
<script type="text/javascript" src="../commons/js/awsui.js"></script>
|
||
<!-- css -->
|
||
<link rel="stylesheet" href="../commons/css/awsui.css">
|
||
<script type="text/javascript" src="../apps/com.actionsoft.apps.coe.pal/js/coe.excel.export.js"></script>
|
||
|
||
<script type="text/javascript" src="../apps/com.actionsoft.apps.coe.pal.relationsearch/js/search.home.js"></script>
|
||
|
||
<style>
|
||
background-color: rgb(240, 240, 240);
|
||
.text-overflow{
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
-o-text-overflow: ellipsis;/*Opera下实现ellipsis效果*/
|
||
}
|
||
.icon_middle{
|
||
margin-right: 5px;
|
||
}
|
||
.link_text{
|
||
cursor: pointer;
|
||
color: #1CA17A;
|
||
}
|
||
.link_text:hover span{
|
||
border-bottom: solid 1px;
|
||
}
|
||
.tab a{
|
||
display: inline-block;
|
||
font-size: 14px;
|
||
margin: 0px 2px -1px 2px;
|
||
padding: 8px 12px;
|
||
cursor: pointer;
|
||
}
|
||
.tab a.active{
|
||
cursor: default;
|
||
border-bottom: solid rgb(28, 161, 122);
|
||
color: rgb(28, 161, 122);
|
||
}
|
||
.title_div{
|
||
display: inline-block;
|
||
margin-right: 10px;
|
||
line-height: 29px;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body style="padding:20px;">
|
||
<div style="padding:0px 10px;" class="tab">
|
||
<a tit="relationContent" class="active">关联查询</a>
|
||
<a tit="noRelationContent">无关联查询</a>
|
||
</div>
|
||
<div id="content">
|
||
<div class="tab_content" id="relationContent" style="padding:20px;">
|
||
<legend style="padding-bottom: 10px; padding-left: 20px; font-size: 13px; line-height: 40px;">
|
||
<div class="title_div">
|
||
<label class="awsui-checkbox-label">名称</label>
|
||
<input id="keyword" class="awsui-textbox" type="text" placeholder="模型名称/对象名称" style="height: 32px;line-height:18px; width: 191px;">
|
||
|
||
<input class="awsui-checkbox" checked id="model" name="keyType" value="model" type="checkbox" title="模型名称包含关键字" />
|
||
<label class="awsui-checkbox-label" for="model" style="line-height:32px;">模型</label>
|
||
<input class="awsui-checkbox" checked id="object" name="keyType" value="object" type="checkbox" title="对象名称包含关键字" />
|
||
<label class="awsui-checkbox-label" for="object">对象</label>
|
||
</div>
|
||
<div class="title_div">
|
||
<label class="awsui-checkbox-label">模型类型</label>
|
||
<input id="modelMethod" class="awsui-combobox" placeholder="请选择">
|
||
</div>
|
||
<div class="title_div">
|
||
<label class="awsui-checkbox-label">过滤</label>
|
||
<input id="relationMethod" class="awsui-combobox" placeholder="请选择">
|
||
</div>
|
||
<div class="title_div">
|
||
<input class="awsui-radio" checked="checked" name="versionType" id="isuse" value="isuse" type="radio" />
|
||
<label class="awsui-radio-label" for="used">建模版本</label>
|
||
<input class="awsui-radio" name="versionType" id="published" value="ispublish" type="radio" />
|
||
<label class="awsui-radio-label" for="published">发布版本</label>
|
||
</div>
|
||
<button id="searchBtn" type="button" class="button blue" style="margin-left: 10px;">查询</button>
|
||
</legend>
|
||
|
||
<div style="margin-top: 20px; padding-left: 20px;">共 <span id="relationTotalNum">0</span> 条数据</div>
|
||
<table id="content" class="awsui-ux">
|
||
<tr>
|
||
<td>
|
||
<table id="searchContent" class="table table-thin table-hover">
|
||
<thead>
|
||
<tr>
|
||
<th class="width_5">序号</th>
|
||
<th class="width_25">模型</th>
|
||
<th class="width_20">对象</th>
|
||
<th class="width_25">关联模型</th>
|
||
<th class="width_20">关联对象</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
</tbody>
|
||
</table></td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<div class="tab_content" id="noRelationContent" style="padding:20px; display:none;">
|
||
<legend style="padding-bottom: 10px; padding-left: 20px; font-size: 13px; line-height: 29px;">
|
||
<input id="fileType" class="awsui-combobox" placeholder="模型类型">
|
||
<input id="shapeType" class="awsui-combobox" placeholder="对象类型">
|
||
<input id="fileName" class="awsui-textbox" type="text" placeholder="模型名称" style="height: 32px;line-height:22px;">
|
||
<button id="noRelationSearchBtn" type="button" class="button blue" style="margin-left: 10px;">无关联查询</button>
|
||
<button id="exportBtn" type="button" class="button green" style="margin-left: 10px;">导出</button>
|
||
</legend>
|
||
<table id="noRelationContent" class="awsui-ux" style="margin-top: 20px;">
|
||
<tr>
|
||
<td>
|
||
<table id="noRelationSearchContent" class="table table-thin table-hover">
|
||
<thead>
|
||
<tr>
|
||
<th class="width_5"></th>
|
||
<th class="width_30">对象名称</th>
|
||
<th class="width_15">对象类型</th>
|
||
<th class="width_30">模型名称</th>
|
||
<th class="width_20">模型类型</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
</tbody>
|
||
</table></td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<input type="hidden" name="sid" id="sid" value="<#sid>" />
|
||
<input type="hidden" name="wsId" id="wsId" value="<#wsId>" />
|
||
</body>
|
||
|
||
<script type="text/javascript">
|
||
var methods = <#methods>;
|
||
var modelIds = "<#modelIds>";
|
||
|
||
$(function($){
|
||
$("div.tab a").off("click").on("click", function(){
|
||
var tit = $(this).attr("tit");
|
||
$("div.tab a.active").removeClass("active");
|
||
$(this).addClass("active");
|
||
$("#content .tab_content").hide();
|
||
$("#" + tit).show();
|
||
if(tit == "noRelationContent" && $("#fileType").val() == "") {
|
||
var fileTypeOptions = {
|
||
arrow:true,
|
||
width:200,
|
||
height:30,
|
||
autoHeight:false,
|
||
menuMaxHeight:230,
|
||
multiple:false,
|
||
placeholder:"所有类型模型",
|
||
sep:",",
|
||
select: changefileType
|
||
};
|
||
fileTypeOptions.data = categorys;
|
||
fileTypeOptions.selectVal = categorys[0].value;
|
||
fileTypeCombobox = $("#fileType").combobox(fileTypeOptions);
|
||
changefileType();
|
||
}
|
||
})
|
||
|
||
//如果名称字段没有值,则后面的checkbox设置为disable
|
||
$("input[name=keyType]").check("disable");
|
||
$("#keyword").off("keyup").on("keyup", function(){
|
||
var keyword = $("#keyword").val();
|
||
if (keyword.trim() == "") {
|
||
$("input[name=keyType]").check("disable");
|
||
} else {
|
||
$("input[name=keyType]").check("enable");
|
||
}
|
||
})
|
||
|
||
$("#searchBtn").off("click").on("click", function(){
|
||
search();
|
||
});
|
||
|
||
$("#noRelationSearchBtn").off("click").on("click", function(){
|
||
noRelationSearch();
|
||
});
|
||
|
||
$("#exportBtn").off("click").on("click", function(){
|
||
ExcelModel.executeExport({
|
||
appId: "com.actionsoft.apps.coe.pal.relationsearch",
|
||
tableId: "noRelationSearchContent"
|
||
});
|
||
});
|
||
|
||
$(window).trigger('resize');
|
||
|
||
<#schema>
|
||
|
||
//初始化文件类型combobox
|
||
initFileTypeCombobox();
|
||
noRelationInitFileTypeCombobox();
|
||
|
||
changefileType();
|
||
});
|
||
|
||
$(window).resize(function(){
|
||
var totalWidth = $('#content').width() - 40;
|
||
$("[class*=width_]").each(function(){
|
||
var className = $(this).attr("class");
|
||
var percent = parseInt(className.substr(6, 2));
|
||
$(this).css({"width" : totalWidth*percent/100});
|
||
});
|
||
})
|
||
|
||
</script>
|
||
</html> |