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.
154 lines
6.3 KiB
Plaintext
154 lines
6.3 KiB
Plaintext
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>节点-事件</title>
|
|
<link href="../../Scripts/easyUI/themes/default/easyui.css" rel="stylesheet" type="text/css" />
|
|
<link href="../../Scripts/easyUI/themes/icon.css" rel="stylesheet" type="text/css" />
|
|
<script src="../../Scripts/easyUI/jquery-1.8.0.min.js" type="text/javascript"></script>
|
|
<script src="../../Scripts/easyUI/jquery.easyui.min.js" type="text/javascript"></script>
|
|
<script src="../../Scripts/QueryString.js" type="text/javascript"></script>
|
|
<script type="text/javascript" src="../../Scripts/bootstrap/js/jquery.min.js"></script>
|
|
<script src="../../Scripts/QueryString.js" type="text/javascript"></script>
|
|
<link href="../../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
|
|
<link href="../../Style/skin/css/Default.css" rel="stylesheet" />
|
|
<link href="../../Style/skin/adminfont/iconfont.css" rel="stylesheet" />
|
|
<link href="../../Scripts/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
|
|
|
|
<!-- 引用通用的js文件. -->
|
|
<script type="text/javascript" src="../../Scripts/config.js"></script>
|
|
<script type="text/javascript" src="../../Comm/Gener.js"></script>
|
|
<script src="../Admin.js"></script>
|
|
<style>
|
|
body {
|
|
margin: 0px auto;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
//页面启动函数.
|
|
$(function () {
|
|
|
|
$("#Msg").html("正在加载,请稍后......");
|
|
|
|
//初始化groupID.
|
|
var nodeID = GetQueryString("FK_Node");
|
|
|
|
var ens = new Entities("BP.Sys.FrmEvents");
|
|
ens.Retrieve("FK_Node", nodeID);
|
|
|
|
//修改节点事件数量
|
|
var node = new Entity("BP.WF.Node", nodeID)
|
|
node.SetPara("FrmEventsNum", ens.length);
|
|
node.Update();
|
|
|
|
|
|
var html = "<table class='table table-striped'>";
|
|
|
|
html += "<tr>";
|
|
html += "<th>序</th>";
|
|
html += "<th>事件标记</th>";
|
|
html += "<th>事件</th>";
|
|
html += "<th>类型</th>";
|
|
html += "<th>内容</th>";
|
|
html += "<th>操作</th>";
|
|
html += "</tr>";
|
|
|
|
for (var i = 0; i < ens.length; i++) {
|
|
|
|
var en = ens[i];
|
|
|
|
html += "<tr>";
|
|
html += "<td class=Idx>" + (i + 1) + "</td>";
|
|
html += "<td>" + en.EventID + "</td>";
|
|
html += "<td>" + GetActionTypeName(en.FK_Event) + "</td>";
|
|
html += "<td>" + GetDoType(en.EventDoType) + "</td>";
|
|
html += "<td>" + en.DoDoc + "</td>";
|
|
html += "<td><a href=\"javascript:Edit('" + en.MyPK + "')\"><img src='../../Img/Btn/Edit.gif' border=0 />编辑</a>";
|
|
html += " <a href=\"javascript:Delete('" + en.MyPK + "')\"><img src='../../Img/Btn/Delete.gif' border=0 />删除</a></td>";
|
|
html += "</tr>";
|
|
}
|
|
html += "</table>";
|
|
|
|
$("#Msg").html(html);
|
|
});
|
|
|
|
function New() {
|
|
var url = "ActionDtl.htm?FK_Node=" + GetQueryString("FK_Node");
|
|
SetHref(url);
|
|
}
|
|
|
|
function Edit(mypk) {
|
|
var url = "ActionDtl.htm?FK_Node=" + GetQueryString("FK_Node") + "&MyPK=" + mypk;
|
|
SetHref(url);
|
|
}
|
|
function Delete(mypk) {
|
|
|
|
if (confirm('您确定要删除吗?') == false)
|
|
return;
|
|
|
|
var en = new Entity("BP.Sys.FrmEvent", mypk);
|
|
en.Delete();
|
|
Reload();
|
|
return;
|
|
}
|
|
function GetActionTypeName(type) {
|
|
|
|
//事件类型.
|
|
var eventLists = [
|
|
{ No: "WorkArrive", Name: "工作到达", IsHaveMsg: 1, Note: '到达当前的工作的时候.' },
|
|
{ No: "SendWhen", Name: "当节点发送前", IsHaveMsg: 0, Note: '发送前事件,可以抛出异常阻止流程向下发送.' },
|
|
{ No: "SendSuccess", Name: "节点发送成功时", IsHaveMsg: 1, Note: '成功的事件.' },
|
|
{ No: "SendError", Name: "节点发送失败时", IsHaveMsg: 0, Note: '失败后的处理业务.' },
|
|
{ No: "ReturnBefore", Name: "当节点退回前", IsHaveMsg: 0, Note: '退回前的业务逻辑,可以抛出异常阻止退回.' },
|
|
{ No: "ReturnAfter", Name: "当节点退回后", IsHaveMsg: 1, Note: '退回后的业务逻辑.' },
|
|
{ No: "UndoneBefore", Name: "当节点撤销发送前", IsHaveMsg: 0, Note: '可以抛出异常阻止撤销动作.' },
|
|
{ No: "UndoneAfter", Name: "当节点撤销发送后", IsHaveMsg: 1, Note: '.' },
|
|
{ No: "WhenReadWork", Name: "工作打开后", IsHaveMsg: 0, Note: '打开工作的时候,就是接受人阅读的时候.' }
|
|
]
|
|
|
|
for (var i = 0; i < eventLists.length; i++) {
|
|
var en = eventLists[i];
|
|
if (en.No == type)
|
|
return en.Name;
|
|
}
|
|
return "xxxx";
|
|
}
|
|
|
|
function GetDoType(doType) {
|
|
|
|
var cfg = "@0=禁用@1=执行存储过程@2=执行SQL语句@3=执行URL@4=WebServices(未完成)@5=执行ddl文件的类与方法@6=EventBase类@7=业务单元@8=自定义WebApi";
|
|
|
|
var cfgs = cfg.split('@');
|
|
|
|
for (var i = 0; i < cfgs.length; i++) {
|
|
var vss = cfgs[i];
|
|
if (vss.indexOf('=') == -1)
|
|
continue;
|
|
var vals = vss.split('=');
|
|
if (vals[0] == doType)
|
|
return vals[1];
|
|
}
|
|
return doType + 'ss';
|
|
}
|
|
function Help() {
|
|
var url = "http://doc.ccbpm.cn";
|
|
window.open(url);
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div class="container-full">
|
|
|
|
<div id="titleH4" class="attrnode-bar-header">
|
|
<span class="pull-right">
|
|
<button id="Btn_New" class="cc-btn-tab btn-new" onclick="javascript:New()">新建</button>
|
|
<button id="Btn_Help" class="cc-btn-tab btn-hlep" onclick="javascript:Help()">帮助</button>
|
|
</span>
|
|
<strong>节点事件 </strong>
|
|
</div>
|
|
<div id="Msg">
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|