-
Notifications
You must be signed in to change notification settings - Fork 32
/
index.html
60 lines (58 loc) · 1.85 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="css/public.css"/>
<link rel="stylesheet" href="css/iconfont.css"/>
<link rel="stylesheet" href="css/style.css"/>
<script src="jquery-1.12.0.js"></script>
<script src="js/json.js"></script>
<script src="js/goofunc.js"></script>
<script charset="GB2312" src="js/gooflow.js"></script>
<style>
</style>
<script>
var property = {
width: 1200,
height: 600,
toolBtns: ["start round", "end", "task", "node"],
haveHead: true,
headBtns: ["new", "open", "save", "undo", "redo", "reload"],//如果haveHead=true,则定义HEAD区的按钮
haveTool: true,
haveGroup: true,
useOperStack: true
};
var remark = {
cursor: "选择指针",
direct: "转换连线",
start: "开始结点",
"end": "结束结点",
"task": "任务结点",
group: "组织划分框编辑开关",
"new": "新建",
"open": "打开"
};
var gf;
$(document).ready(function () {
gf = $.createGooFlow($("#gf"), property);
gf.setNodeRemarks(remark);
});
var out;
function Export() {
document.getElementById("result").value = JSON.stringify(gf.exportData());
}
function Import() {
gf.clearData()
gf.loadData(JSON.parse($("#result").val()));
}
</script>
</head>
<body>
<div id="gf" style="margin:10px"></div>
<input id="submito" type="button" value='导出结果' onclick="Export()"/>
<input id="submiti" type="button" value='导入数据' onclick="Import()"/>
<br/>
<textarea id="result" rows="20" cols="100"></textarea>
</body>
</html>