278 lines
8.0 KiB
HTML
278 lines
8.0 KiB
HTML
|
|
<!DOCTYPE html>
|
|||
|
|
<html>
|
|||
|
|
<head>
|
|||
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|||
|
|
<title></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">
|
|||
|
|
<link rel="stylesheet" href="../apps/com.actionsoft.apps.coe.pal.publisher/css/publish.client.sso1.css">
|
|||
|
|
|
|||
|
|
<style>
|
|||
|
|
.model_div {
|
|||
|
|
display: inline-block;
|
|||
|
|
padding: 20px 2% 0 2%;
|
|||
|
|
width: 45%;
|
|||
|
|
}
|
|||
|
|
.div_title {
|
|||
|
|
font-size: 16px;
|
|||
|
|
}
|
|||
|
|
.show_more {
|
|||
|
|
float: right;
|
|||
|
|
cursor: pointer;
|
|||
|
|
color: rgb(151, 183, 201);
|
|||
|
|
}
|
|||
|
|
.table-thin {
|
|||
|
|
box-shadow: 0 0 15px rgb(221, 221, 221);
|
|||
|
|
}
|
|||
|
|
.table-hover > tbody > tr:hover > td,
|
|||
|
|
.table-hover > tbody > tr:hover > th {
|
|||
|
|
background-color: #F8F9F1;
|
|||
|
|
}
|
|||
|
|
.table thead {
|
|||
|
|
background-color: rgb(245, 245, 245);
|
|||
|
|
}
|
|||
|
|
.first_td {
|
|||
|
|
border-left: solid 3px #FFF;
|
|||
|
|
}
|
|||
|
|
.table-hover > tbody > tr:hover > td.first_td {
|
|||
|
|
border-left: solid 3px #EAC25C;
|
|||
|
|
}
|
|||
|
|
</style>
|
|||
|
|
|
|||
|
|
</head>
|
|||
|
|
<body>
|
|||
|
|
<div id="tile" style="">
|
|||
|
|
<div id="process" class="model_div">
|
|||
|
|
<div style="padding: 10px;"><span class="div_title">流程体系</span><span class="show_more" onclick="showMore('process')">更多</span></div>
|
|||
|
|
<div>
|
|||
|
|
<table id="processTable" class="table table-thin table-hover">
|
|||
|
|
<thead>
|
|||
|
|
<tr>
|
|||
|
|
<th style="width:70%;">文件名称</th>
|
|||
|
|
<th style="width:29%;">发布时间</th>
|
|||
|
|
</tr>
|
|||
|
|
</thead>
|
|||
|
|
<tbody></tbody>
|
|||
|
|
</table>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div id="management" class="model_div">
|
|||
|
|
<div style="padding: 10px;"><span class="div_title">管理标准</span><span class="show_more" onclick="showMore('management')">更多</span></div>
|
|||
|
|
<div>
|
|||
|
|
<table id="managementTable" class="table table-thin table-hover">
|
|||
|
|
<thead>
|
|||
|
|
<tr>
|
|||
|
|
<th style="width:70%;">文件名称</th>
|
|||
|
|
<th style="width:29%;">发布时间</th>
|
|||
|
|
</tr>
|
|||
|
|
</thead>
|
|||
|
|
<tbody></tbody>
|
|||
|
|
</table>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div id="technical" class="model_div">
|
|||
|
|
<div style="padding: 10px;"><span class="div_title">技术标准</span><span class="show_more" onclick="showMore('technical')">更多</span></div>
|
|||
|
|
<div>
|
|||
|
|
<table id="technicalTable" class="table table-thin table-hover">
|
|||
|
|
<thead>
|
|||
|
|
<tr>
|
|||
|
|
<th style="width:70%;">文件名称</th>
|
|||
|
|
<th style="width:29%;">发布时间</th>
|
|||
|
|
</tr>
|
|||
|
|
</thead>
|
|||
|
|
<tbody></tbody>
|
|||
|
|
</table>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div id="work" class="model_div">
|
|||
|
|
<div style="padding: 10px;"><span class="div_title">工作标准</span><span class="show_more" onclick="showMore('work')">更多</span></div>
|
|||
|
|
<div>
|
|||
|
|
<table id="workTable" class="table table-thin table-hover">
|
|||
|
|
<thead>
|
|||
|
|
<tr>
|
|||
|
|
<th style="width:70%;">文件名称</th>
|
|||
|
|
<th style="width:29%;">发布时间</th>
|
|||
|
|
</tr>
|
|||
|
|
</thead>
|
|||
|
|
<tbody></tbody>
|
|||
|
|
</table>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div id="moreDiv" modelType="" style="padding: 10px 30px; display: none;">
|
|||
|
|
<div style="display: inline-block; padding-top: 10px;">
|
|||
|
|
<button type="button" class="button" onclick="showTile();">返回</button>
|
|||
|
|
</div>
|
|||
|
|
<div style="padding: 20px 10px 5px 10px; float: right; display: inline-block;">
|
|||
|
|
<input type="text" style="width:150px;" id="searchInput" class="txt" placeholder="请输入文件名称">
|
|||
|
|
</div>
|
|||
|
|
<table id="moreTable" class="table table-thin table-hover">
|
|||
|
|
<thead>
|
|||
|
|
<tr>
|
|||
|
|
<th style="width:70%;">文件名称</th>
|
|||
|
|
<th style="width:29%;">发布时间</th>
|
|||
|
|
</tr>
|
|||
|
|
</thead>
|
|||
|
|
<tbody></tbody>
|
|||
|
|
</table>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<input type="hidden" name="sid" id="sid" value="<#sid>" />
|
|||
|
|
</body>
|
|||
|
|
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
var processList;
|
|||
|
|
var managementList;
|
|||
|
|
var technicalList;
|
|||
|
|
var workList;
|
|||
|
|
var modelIds = parent.parent.modelIds;
|
|||
|
|
|
|||
|
|
$(function($){
|
|||
|
|
refreshData();
|
|||
|
|
|
|||
|
|
$("#searchInput").buttonedit({
|
|||
|
|
onClick: searchMore
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
$("#searchInput").on("keypress", function(e){
|
|||
|
|
if(e.keyCode == "13") {
|
|||
|
|
searchMore();
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
function refreshData() {
|
|||
|
|
if (parent.orgTree == undefined || parent.orgTree == null) {
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
$.simpleAlert("正在查询", "loading");
|
|||
|
|
var orgModelId = parent.orgTree.getSelectedNode() == undefined ? "" : parent.orgTree.getSelectedNode().id;
|
|||
|
|
awsui.ajax.request({
|
|||
|
|
url : "./jd",
|
|||
|
|
method : "POST",
|
|||
|
|
data : {
|
|||
|
|
sid: $("#sid").val(),
|
|||
|
|
cmd: "com.actionsoft.apps.coe.pal.publisher_client_sso_org_relation_data",
|
|||
|
|
orgModelId: orgModelId,
|
|||
|
|
modelIds: modelIds
|
|||
|
|
},
|
|||
|
|
ok : function(r) {
|
|||
|
|
$.simpleAlert("close");
|
|||
|
|
var data = r.data.data;
|
|||
|
|
processList = data.processList;
|
|||
|
|
$("#processTable tbody").empty().html(writeTable(processList));
|
|||
|
|
managementList = data.managementList;
|
|||
|
|
$("#managementTable tbody").empty().html(writeTable(managementList));
|
|||
|
|
technicalList = data.technicalList;
|
|||
|
|
$("#technicalTable tbody").empty().html(writeTable(technicalList));
|
|||
|
|
workList = data.workList;
|
|||
|
|
$("#workTable tbody").empty().html(writeTable(workList));
|
|||
|
|
$("#searchInput").val("");
|
|||
|
|
searchMore();
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function writeTable(list) {
|
|||
|
|
var html = "";
|
|||
|
|
if (list == undefined) {
|
|||
|
|
list = new Array();
|
|||
|
|
}
|
|||
|
|
var maxLine = list.length > 6 ? 6 : list.length;
|
|||
|
|
for (var i = 0; i < maxLine; i++) {
|
|||
|
|
html += '<tr>'
|
|||
|
|
+ ' <td class="first_td" style="cursor: pointer;" onclick="clickModel(\'' + list[i].id + '\', \'' + list[i].name + '\', \'\')">' + list[i].name + '</td>'
|
|||
|
|
+ ' <td style="text-align: center;">' + list[i].publishDate + '</td>'
|
|||
|
|
+ '</tr>';
|
|||
|
|
}
|
|||
|
|
if (list.length < 6) {
|
|||
|
|
for (var j = list.length; j < 6; j++) {
|
|||
|
|
html += "<tr>"
|
|||
|
|
+ " <td class='first_td' style='height: 18px;'></td>"
|
|||
|
|
+ " <td></td>"
|
|||
|
|
+ "</tr>";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
return html;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//打开tab,显示模型
|
|||
|
|
function clickModel(id, name, processDefId) {
|
|||
|
|
var obj = {
|
|||
|
|
id: id,
|
|||
|
|
title: name,
|
|||
|
|
processDefId: processDefId
|
|||
|
|
}
|
|||
|
|
parent.parent.openTab(obj);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function showMore(type) {
|
|||
|
|
var list = [];
|
|||
|
|
if(type == "process") {
|
|||
|
|
list = processList;
|
|||
|
|
} else if (type == "management") {
|
|||
|
|
list = managementList;
|
|||
|
|
} else if (type == "technical") {
|
|||
|
|
list = technicalList;
|
|||
|
|
} else if (type == "work") {
|
|||
|
|
list = workList;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if (list == undefined) {
|
|||
|
|
list = new Array();
|
|||
|
|
}
|
|||
|
|
var html = writeMoreTable(list);
|
|||
|
|
$("#moreTable tbody").empty().html(html);
|
|||
|
|
|
|||
|
|
$("#tile").hide();
|
|||
|
|
$("#moreDiv").attr("modelType", type).show();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function writeMoreTable(list) {
|
|||
|
|
var html = "";
|
|||
|
|
for (var i = 0; i < list.length; i++) {
|
|||
|
|
html += '<tr>'
|
|||
|
|
+ ' <td class="first_td" style="cursor: pointer;" onclick="clickModel(\'' + list[i].id + '\', \'' + list[i].name + '\', \'\')">' + list[i].name + '</td>'
|
|||
|
|
+ ' <td style="text-align: center;">' + list[i].publishDate + '</td>'
|
|||
|
|
+ '</tr>';
|
|||
|
|
}
|
|||
|
|
return html;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function searchMore() {
|
|||
|
|
var name = $("#searchInput").val();
|
|||
|
|
var list = [];
|
|||
|
|
var type = $("#moreDiv").attr("modelType");
|
|||
|
|
if(type == "process") {
|
|||
|
|
list = processList;
|
|||
|
|
} else if (type == "management") {
|
|||
|
|
list = managementList;
|
|||
|
|
} else if (type == "technical") {
|
|||
|
|
list = technicalList;
|
|||
|
|
} else if (type == "work") {
|
|||
|
|
list = workList;
|
|||
|
|
}
|
|||
|
|
var data = [];
|
|||
|
|
if (name == "") {
|
|||
|
|
data = list;
|
|||
|
|
} else {
|
|||
|
|
for (var i = 0; i < list.length; i++) {
|
|||
|
|
if (list[i].name.indexOf(name) > -1) {
|
|||
|
|
data.push(list[i]);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
var html = writeMoreTable(data);
|
|||
|
|
$("#moreTable tbody").empty().html(html);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function showTile() {
|
|||
|
|
$("#moreDiv").hide();
|
|||
|
|
$("#tile").show();
|
|||
|
|
}
|
|||
|
|
</script>
|
|||
|
|
</html>
|