|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<title>流程应用</title>
|
|
|
|
|
<meta name="renderer" content="webkit">
|
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript" src="../WF/Scripts/bootstrap/js/jquery.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>
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="./App/layuiadmin/layui/css/layui.css" media="all">
|
|
|
|
|
<link rel="stylesheet" href="./App/layuiadmin/style/admin.css" media="all">
|
|
|
|
|
<link href="FlowDesigner/css/icons.css" rel="stylesheet" />
|
|
|
|
|
<script src="./App/layuiadmin/layui/layui.js"></script>
|
|
|
|
|
<script>
|
|
|
|
|
layui.config({
|
|
|
|
|
base: '/App/layuiadmin/' //静态资源所在路径
|
|
|
|
|
}).extend({
|
|
|
|
|
index: 'lib/index' //主入口模块
|
|
|
|
|
}).use(['index']);
|
|
|
|
|
|
|
|
|
|
$(function () {
|
|
|
|
|
var webUser = new WebUser();
|
|
|
|
|
if (webUser.IsAdmin == 0)
|
|
|
|
|
$(".demo-list").hide();
|
|
|
|
|
var sorts = new Entities("BP.Cloud.Template.FlowSorts");
|
|
|
|
|
sorts.RetrieveAll();
|
|
|
|
|
|
|
|
|
|
var flows = new Entities("BP.Cloud.Template.Flows");
|
|
|
|
|
flows.RetrieveAll();
|
|
|
|
|
|
|
|
|
|
// alert(flows.length);
|
|
|
|
|
|
|
|
|
|
var isAddNew = false;
|
|
|
|
|
|
|
|
|
|
var html = "";
|
|
|
|
|
var flowhtml = "";
|
|
|
|
|
var sorthtml = "";
|
|
|
|
|
for (var iSort = 0; iSort < sorts.length; iSort++) {
|
|
|
|
|
var sort = sorts[iSort];
|
|
|
|
|
flowhtml = "";
|
|
|
|
|
|
|
|
|
|
sorthtml = "<div id='xx' class='layui-row' ><a href='javascript:EditFlowSort()' style='color:#009688;font-size:20px'>" + sort.Name + "</a></div>";
|
|
|
|
|
flowhtml += "<div class='layui-row layui-col-space10 demo-list'>";
|
|
|
|
|
var isHaveFlow = false;
|
|
|
|
|
for (var i = 0; i < flows.length; i++) {
|
|
|
|
|
|
|
|
|
|
var flow = flows[i];
|
|
|
|
|
if (flow.FK_FlowSort != sort.No)
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
if (isAddNew == false) {
|
|
|
|
|
isAddNew = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
flowhtml += "<div class='layui-col-sm3 layui-col-md2 layui-col-lg1'>";
|
|
|
|
|
flowhtml += "<div class='layui-card'>";
|
|
|
|
|
|
|
|
|
|
var iconObj = new Object();
|
|
|
|
|
if (flow.ICON.indexOf('@') >= 0) { //包含@符号,是按照规则组装的数据
|
|
|
|
|
iconObj = flow.ICON.split("@");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var str = flow.Name;
|
|
|
|
|
if (str.length > 10) {//超出程度用...代替
|
|
|
|
|
str = str.substring(0, 10) + "...";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
flowhtml += "<div align='center' >";
|
|
|
|
|
flowhtml += "<span style='float:right'>";
|
|
|
|
|
//html += "<a href=\"javascript:DFlow('" + flow.No + "','" + flow.Name + "');\" title='设计流程模版' ><i class='layui-icon'></i></a>";
|
|
|
|
|
if (webUser.IsAdmin == 1)
|
|
|
|
|
flowhtml += "<a href=\"javascript:DFlow('" + flow.No + "','" + flow.Name + "'," + flow.WorkModel + ",'" + flow.AtPara + "');\" title='设计流程模版' > <img style='width:14px;' src='/App/FlowDesigner/Img/Edit.png'></a> </a>";
|
|
|
|
|
|
|
|
|
|
flowhtml += "</span>";
|
|
|
|
|
|
|
|
|
|
flowhtml += "</div>";
|
|
|
|
|
flowhtml += "<br/>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
flowhtml += "<div align='center' >";
|
|
|
|
|
flowhtml += "<A href=\"javascript:WinOpenFlowDesigner('" + flow.No + "', '设计:" + flow.Name + "','" + flow.WorkModel + "');\" >";
|
|
|
|
|
flowhtml += "<img style='width:55px' src = '/App/FlowDesigner/FlowIcon/" + (iconObj == undefined ? "" : iconObj[0]) + ".png' class='" + (iconObj == undefined ? "" : iconObj[1]) + "' onerror=\"nofind();\" ' />";
|
|
|
|
|
flowhtml += "</br>" + str + "</br>";
|
|
|
|
|
flowhtml += "</A>";
|
|
|
|
|
flowhtml += "</div>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
flowhtml += "</div>";
|
|
|
|
|
flowhtml += "</div>";
|
|
|
|
|
isHaveFlow = true;
|
|
|
|
|
}
|
|
|
|
|
if (isHaveFlow == true)
|
|
|
|
|
html += sorthtml + flowhtml + "</div>";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
$("#docs").html(html);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function NewFlow() {
|
|
|
|
|
|
|
|
|
|
var webUser = new WebUser();
|
|
|
|
|
var urlEnd = "&Token=" + GetQueryString("Token") + "&OrgNo=" + webUser.OrgNo;
|
|
|
|
|
urlEnd += "&UserNo=" + webUser.No;
|
|
|
|
|
|
|
|
|
|
var url = "/App/FlowDesigner/NewFlow.htm?s1=s" + urlEnd;
|
|
|
|
|
OpenWindowRight(url, '新建模版');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function Share() {
|
|
|
|
|
|
|
|
|
|
var webUser = new WebUser();
|
|
|
|
|
var urlEnd = "&Token=" + GetQueryString("Token") + "&OrgNo=" + webUser.OrgNo;
|
|
|
|
|
urlEnd += "&UserNo=" + webUser.No;
|
|
|
|
|
|
|
|
|
|
var url = "/AppTemplate/Default.htm?1=2" + urlEnd;
|
|
|
|
|
OpenWindowRight(url, '共享模版');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function nofind() {
|
|
|
|
|
var img = event.srcElement;
|
|
|
|
|
img.src = "/App/FlowDesigner/AppTemplate/DefaultIcon.png";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//已知URL,在右侧打开页面
|
|
|
|
|
function OpenWindowRight(url, title) {
|
|
|
|
|
if (top.layui.index) {
|
|
|
|
|
top.layui.index.openTabsPage(url, title)
|
|
|
|
|
} else {
|
|
|
|
|
window.open(url)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function WinOpenFlowDesigner(flowNo, title, workModel) {
|
|
|
|
|
|
|
|
|
|
var webUser = new WebUser();
|
|
|
|
|
var urlEnd = "&Token=" + GetQueryString("Token") + "&OrgNo=" + webUser.OrgNo;
|
|
|
|
|
urlEnd += "&UserNo=" + webUser.No;
|
|
|
|
|
|
|
|
|
|
var url = "";
|
|
|
|
|
if (workModel == 0 || workModel == 1)
|
|
|
|
|
url = "/App/OneFlow/Default.htm?FK_Flow=" + flowNo + "&RunModel=2" + urlEnd;
|
|
|
|
|
else
|
|
|
|
|
url = "/App/OneFrm/Default.htm?FrmID=Frm_" + flowNo + "&FK_MapData=Frm_" + flowNo + "&WorkModel=" + workModel + "&FK_Flow=" + flowNo + urlEnd;
|
|
|
|
|
window.open(url);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function DFlow(flowNo, title, workModel, atPara) {
|
|
|
|
|
|
|
|
|
|
if (atPara.indexOf("FlowDevModel=1") <= 0) {
|
|
|
|
|
|
|
|
|
|
var msg = "提示:";
|
|
|
|
|
msg += "\t\n1. 当前流程模版不是采用SaaS模式设计的,您需要跳转到专业版才能设计它";
|
|
|
|
|
msg += "\t\n2. 您确定要跳转到专业版本流程设计器吗?";
|
|
|
|
|
msg += "";
|
|
|
|
|
if (window.confirm(msg) == false)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
NewFlowMastrer();
|
|
|
|
|
//var url = "/WF/Admin/CCBPMDesigner/";
|
|
|
|
|
//alert("当前流程模版不是采用SaaS模式设计的,您需要跳转到专业版才能设计它");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var webUser = new WebUser();
|
|
|
|
|
var urlEnd = "&Token=" + GetQueryString("Token") + "&OrgNo=" + webUser.OrgNo;
|
|
|
|
|
urlEnd += "&UserNo=" + webUser.No;
|
|
|
|
|
|
|
|
|
|
var url = "";
|
|
|
|
|
if (workModel == 0 || workModel == 1) {
|
|
|
|
|
url = "./App/FlowDesigner/Designer.htm?FK_Flow=" + flowNo + "&RunModel=2" + urlEnd;
|
|
|
|
|
OpenWindowRight(url, "设计:" + title);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
url = "../WF/Admin/FoolFormDesigner/Designer.htm?FrmID=Frm_" + flowNo + "&FK_MapData=Frm_" + flowNo + "&WorkModel=" + workModel + urlEnd;
|
|
|
|
|
OpenWindowRight(url, "设计表单:" + title);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function DelFlow(flowNo) {
|
|
|
|
|
|
|
|
|
|
if (confirm("确定删除流程吗?") == false)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
var en = new Entity("BP.Cloud.Template.Flow", flowNo);
|
|
|
|
|
en.Delete();
|
|
|
|
|
} catch (e) {
|
|
|
|
|
alert(e);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Reload();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function EditFlowSort() {
|
|
|
|
|
var url = "../WF/Comm/Ens.htm?EnsName=BP.Cloud.Template.FlowSorts";
|
|
|
|
|
WinOpen(url);
|
|
|
|
|
}
|
|
|
|
|
function NewFlowMastrer() {
|
|
|
|
|
|
|
|
|
|
var webUser = new WebUser();
|
|
|
|
|
var sid = GetQueryString("Token");
|
|
|
|
|
|
|
|
|
|
var url = "../WF/Admin/Portal/Login.htm?OrgNo=" + webUser.OrgNo + "&UserNo=" + webUser.No;
|
|
|
|
|
url += "&Token=" + sid;
|
|
|
|
|
WinOpenFull(url);
|
|
|
|
|
//alert('尚未对您开放...');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<style>
|
|
|
|
|
/* 这段样式只是用于演示 */
|
|
|
|
|
#LAY-component-grid-list .demo-list .layui-card {
|
|
|
|
|
height: 100px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media screen and (min-width: 1200px) {
|
|
|
|
|
.layui-col-lg1 {
|
|
|
|
|
width: 10% !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<div class="layui-fluid" id="LAY-component-grid-list">
|
|
|
|
|
|
|
|
|
|
<div class='layui-row layui-col-space10 demo-list'>
|
|
|
|
|
|
|
|
|
|
<div class='layui-col-sm4 layui-col-md3 layui-col-lg2'>
|
|
|
|
|
<div class='layui-card'>
|
|
|
|
|
<A href='javascript:NewFlow();'>
|
|
|
|
|
<div align='center'>
|
|
|
|
|
<br />新建模版<br />
|
|
|
|
|
<img style='width:55px' src='./Img/Add.png' />
|
|
|
|
|
</div>
|
|
|
|
|
</A>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='layui-col-sm4 layui-col-md3 layui-col-lg2'>
|
|
|
|
|
<div class='layui-card'>
|
|
|
|
|
<A href='javascript:Share();'>
|
|
|
|
|
<div align='center'>
|
|
|
|
|
<br />共享模版<br />
|
|
|
|
|
<img style='width:55px' src='./Img/Share.png' />
|
|
|
|
|
</div>
|
|
|
|
|
</A>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='layui-col-sm4 layui-col-md3 layui-col-lg2'>
|
|
|
|
|
<div class='layui-card'>
|
|
|
|
|
<A href='javascript:NewFlowMastrer();'>
|
|
|
|
|
<div align='center'>
|
|
|
|
|
<br />新建专业版流程<br />
|
|
|
|
|
<img style='width:55px' src='./Img/AddMasterFlow.png' />
|
|
|
|
|
</div>
|
|
|
|
|
</A>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="docs"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|