mirror of
https://gitee.com/lakernote/easy-admin.git
synced 2026-09-03 13:37:29 +08:00
138 lines
5.2 KiB
HTML
138 lines
5.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>流程设计</title>
|
|
<link rel="stylesheet" href="../../component/snaker/snaker.css" type="text/css" media="all"/>
|
|
</head>
|
|
<body class="pear-container">
|
|
<div id="toolbox">
|
|
<div id="toolbox_handle">工具集</div>
|
|
<div class="node" id="save"><img src="../../component/snaker/images/save.gif"/> 保存</div>
|
|
<div>
|
|
<hr/>
|
|
</div>
|
|
<div class="node selectable" id="pointer">
|
|
<img src="../../component/snaker/images/select16.gif"/> Select
|
|
</div>
|
|
<div class="node selectable" id="path">
|
|
<img src="../../component/snaker/images/16/flow_sequence.png"/> transition
|
|
</div>
|
|
<div>
|
|
<hr/>
|
|
</div>
|
|
<div class="node state" id="start" type="start"><img
|
|
src="../../component/snaker/images/16/start_event_empty.png"/> start
|
|
</div>
|
|
<div class="node state" id="end" type="end"><img
|
|
src="../../component/snaker/images/16/end_event_terminate.png"/> end
|
|
</div>
|
|
<div class="node state" id="task" type="task"><img
|
|
src="../../component/snaker/images/16/task_empty.png"/> task
|
|
</div>
|
|
<div class="node state" id="task" type="custom"><img
|
|
src="../../component/snaker/images/16/task_empty.png"/> custom
|
|
</div>
|
|
<div class="node state" id="task" type="subprocess"><img
|
|
src="../../component/snaker/images/16/task_empty.png"/> subprocess
|
|
</div>
|
|
<div class="node state" id="fork" type="decision"><img
|
|
src="../../component/snaker/images/16/gateway_exclusive.png"/> decision
|
|
</div>
|
|
<div class="node state" id="fork" type="fork"><img
|
|
src="../../component/snaker/images/16/gateway_parallel.png"/> fork
|
|
</div>
|
|
<div class="node state" id="join" type="join"><img
|
|
src="../../component/snaker/images/16/gateway_parallel.png"/> join
|
|
</div>
|
|
</div>
|
|
|
|
<div id="properties">
|
|
<div id="properties_handle">属性</div>
|
|
<table class="properties_all" cellpadding="0" cellspacing="0">
|
|
</table>
|
|
<div> </div>
|
|
</div>
|
|
|
|
<div id="snakerflow"></div>
|
|
|
|
|
|
<script src="../../component/layui/layui.js"></script>
|
|
<script src="../../component/pear/pear.js"></script>
|
|
|
|
|
|
<script src="../../component/snaker/raphael-min.js" type="text/javascript"></script>
|
|
<script src="../../component/snaker/jquery-ui-1.8.4.custom/js/jquery.min.js" type="text/javascript"></script>
|
|
<script src="../../component/snaker/jquery-ui-1.8.4.custom/js/jquery-ui.min.js" type="text/javascript"></script>
|
|
<script src="../../component/snaker/dialog.js" type="text/javascript"></script>
|
|
<script src="../../component/snaker/snaker.designer.js" type="text/javascript"></script>
|
|
<script src="../../component/snaker/snaker.model.js" charset="utf-8" type="text/javascript"></script>
|
|
<script src="../../component/snaker/snaker.editors.js" type="text/javascript"></script>
|
|
<script>
|
|
layui.use(['table', 'form', 'jquery', 'common', 'easyAdmin'], function () {
|
|
let easyAdmin = layui.easyAdmin;
|
|
id = getQueryString("processId");
|
|
easyAdmin.httpGet("/flow/process/modelJson?processId=" + id, function (data) {
|
|
var model = "";
|
|
if (data) {
|
|
model = eval("(" + data + ")");
|
|
}
|
|
var userJson = {};
|
|
easyAdmin.httpGet("/sys/user/getAll", function (result) {
|
|
if (result.success) {
|
|
userJson = result.data;
|
|
}
|
|
}, true, false);
|
|
|
|
var isSubmitting = false; // 添加一个变量用于标记是否正在提交中
|
|
|
|
$('#snakerflow').snakerflow({
|
|
basePath: "../../component/snaker/",
|
|
ctxPath: "/",
|
|
restore: model,
|
|
userJson: userJson,
|
|
formPath: "forms/",
|
|
tools: {
|
|
save: {
|
|
onclick: function (data) {
|
|
if (isSubmitting) {
|
|
return false; // 如果正在提交中,则不执行后续代码
|
|
}
|
|
isSubmitting = true; // 设置为正在提交中状态
|
|
saveModel(data);
|
|
isSubmitting = false; // 处理完成后重置提交状态
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
function getQueryString(name) {
|
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
|
var r = window.location.search.substr(1).match(reg);
|
|
if (r !== null)
|
|
return unescape(r[2]);
|
|
return "";
|
|
}
|
|
|
|
|
|
window.saveModel = function (data) {
|
|
easyAdmin.http({
|
|
type: 'POST',
|
|
url: "/flow/process/deployXml",
|
|
data: "model=" + data + "&id=" + id,
|
|
async: false,
|
|
globle: false,
|
|
success: function (data) {
|
|
parent.layer.close(parent.layer.getFrameIndex(window.name));//关闭当前页
|
|
parent.layui.table.reload("user-table");
|
|
}
|
|
});
|
|
|
|
}
|
|
})
|
|
</script>
|
|
</body>
|
|
</html>
|