You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

215 lines
7.1 KiB
Plaintext

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>表单模版目录</title>
<script type="text/javascript" src="/WF/Scripts/bootstrap/js/jquery.min.js"></script>
<script type="text/javascript" src="/WF/Scripts/bootstrap/js/bootstrap.min.js"></script>
<script src="/WF/Scripts/QueryString.js" type="text/javascript"></script>
<script src="/WF/Scripts/config.js" type="text/javascript"></script>
<script src="/WF/Comm/Gener.js" type="text/javascript"></script>
<!--<base target="_self" />-->
<link rel="stylesheet" href="/App/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="/App/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" href="/App/FlowDesigner/css/icons.css" s media="all">
<link href="/WF/Scripts/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="/WF/Scripts/bootstrap/css/font-awesome.css" rel="stylesheet">
<link href="/DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
<style>
.add {
padding: 30px;
background: #F0F8FF;
width: 10%;
float: left;
}
.content {
width: 100%;
margin: 1cm 0cm;
float: left;
}
#icon {
font-size: 25px;
}
</style>
<script language="javascript" type="text/javascript">
function nofind() {
var img = event.srcElement;
img.src = "/App/FlowDesigner/AppTemplate/DefaultIcon.png";
}
function GroupBarClick(sort) {
var alt = document.getElementById('Img' + sort).alert;
var sta = 'block';
if (alt == 'Max') {
sta = 'block';
alt = 'Min';
classname = 'fa fa-minus-square';
} else {
sta = 'none';
alt = 'Max';
classname = 'fa fa-plus-square';
}
document.getElementById('Img' + sort).className = classname;
document.getElementById('Img' + sort).alert = alt;
var i = 0;
for (i = 0; i <= 600; i++) {
var row = document.getElementById(sort + i);
if (row == null || row == undefined || row.style == null)
continue;
if (sta == 'block') {
row.style.display = '';
} else {
row.style.display = sta;
}
}
}
var cols = 3; //列数.
var colIdx = -1;
//页面启动函数.
$(function () {
$("#Msg").html("正在加载,请稍后......");
var handler = new HttpHandler("BP.Cloud.HttpHandler.App_FlowDesigner");
var data = handler.DoMethodReturnJSON("Template_Init");
var sorts = data["Sorts"];
var flows = data["Frms"];
var showRealCount = 0;
var num = 0;
var is1 = false;
var html = '';
$('#Table1').html("");
//增加处理.
for (var isort = 0; isort < sorts.length; isort++) {
var sort = sorts[isort];
html += "<tr onclick=\"GroupBarClick('" + sort.Name + "')\" ><th style='background:#ffffff;border:0px;' colspan=8 class='table-title'><i class='fa fa-minus-square' alert='Min' id='Img" + sort.Name + "'></i><span style='font-size:15px;font-weight:normal;'>" + sort.Name + "</span></th></tr>";
num++;
showRealCount++;
if (is1 == true) {
html += "<tr style='margin:10px;' id='" + sort.Name + num + "' >";
is1 = false;
} else {
html += "<tr style='margin:10px;' id='" + sort.Name + num + "' >";
is1 = true;
}
var strHtml = GetHtml(flows, sort);
html += strHtml;
html += "</td>";
html += "</tr>";
}
html += "</table>";
$('#Table1').append(html);
});
function GetHtml(flows, sort) {
var showRealCount = 0;
showRealCount++;
var html = '';
for (var idx = 0; idx < flows.length; idx++) {
var en = flows[idx];
//colIdx++;
//if (colIdx == 0)
// html += "<tr>";
if (en.SortNo != sort.No)
continue;
html += "<td style='width:10%;height:130px;text-align:center;vertical-align:middle;background:#f8fafc;'>";
var imgUrl = "/App/FlowDesigner/AppTemplate/" + sort.Name + "/" + en.Name;
// alert(imgUrl);
imgUrl = imgUrl.replace('.png', 'Icon.png');
var strName = en.Name.replace(/.png/gi, '').replace(/icon/gi, '');
html += "<a href=\"javascript:NewFlow('" + en.No + "','" + sort.Name + "');\" ><img src='" + imgUrl + "' onerror=\"nofind();\" style='width:30px;' />" + strName + "</a>";
html += "</td>";
//if (colIdx == cols - 1) {
// html += "</tr>";
// colIdx = -1;
//}
}
//if (colIdx != -1) {
// while (true) {
// html += "<td></td>";
// colIdx++;
// if (colIdx == cols - 1)
// html += "</tr>";
// break;
// }
//}
cols = 3; //列数.
colIdx = -1;
return html;
}
//已知URL,在右侧打开页面
function OpenWindowRight(url, title) {
if (top.layui.index) {
top.layui.index.openTabsPage(url, title)
} else {
window.open(url)
}
}
function NewFlow(fileName, sortName) {
var url = '/App/FlowDesigner/NewFlowByTemplate.htm?FileName=' + fileName + "&SortName=" + sortName;
var str = fileName.replace('.png','');
OpenWindowRight(url, "模板:" + str);
}
</script>
</head>
<body>
<!--<h3>
<img src="/App/Img/Share.png" style="width:30px;" />共享模版
</h3>-->
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox-content">
<div class="row search-padding">
<div class="col-md-4 col-sm-4 pull-left">
</div>
</div>
<!--<div id="docs" />-->
<table class="table table-striped" style="border-collapse:separate; border-spacing:90px 5px;border:1px solid #ffffff;">
<tbody id="Table1"></tbody>
</table>
<!-- 显示分页信息 -->
<div class="row" style="text-align: left;">
<ul class="pagination" id="page_nav"></ul>
<ul class="pagination controls" id="page_info"></ul>
<div style="clear: both;"></div>
</div>
</div>
</div>
<!--<div id="docs" />-->
</body>
</html>