1 Star 0 Fork 85

weiguozhen/flowable-diagram

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
demo-tablelayout.html 2.11 KB
一键复制 编辑 原始数据 按行查看 历史
lianglongqun 提交于 2017-07-18 23:19 . 修复bug
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="snap.svg.js"></script>
<script src="diagram.js"></script>
</head>
<body>
<style>
#svg {
border : 1px solid #000000;
}
</style>
<svg id="svg"></svg>
<script>
(function(){
var data = {
"cellPadding" : 15,
"tableMargin" : 10,
"nodes": [
{
"type": "start",
"cell" : "0,0"
},
{
"type" : "task",
"cell" : "1,0",
"id" : "manager",
"name" : "直属上司审批"
},
{
"type" : "decision",
"id" : "decision",
"name" : "请假天数是否大于3",
"cell" : "2,0",
"w" : 180
},
{
"type" : "task",
"cell" : "3,1",
"id" : "director",
"name" : "总监审批",
"highlight" : true
},
{
"type": "end",
"cell" : "4,0"
}
],
"lines": [
{
"from": "start",
"to": "manager"
},
{
"from": "manager",
"to": "decision"
},
{
"from": "decision",
"to": "director",
"direction" : "x",
"text" : ""
},
{
"from": "decision",
"to": "end",
"text" : ""
},
{
"from": "director",
"to": "end",
"direction" : "y"
}
]
};
var flow = new Flow("svg", data);
flow.renderByTableLayout();
})();
</script>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/weiguozhen/flowable-diagram.git
git@gitee.com:weiguozhen/flowable-diagram.git
weiguozhen
flowable-diagram
flowable-diagram
master

搜索帮助