├── .DS_Store ├── dist ├── .DS_Store ├── js │ └── andflow_themes.min.js └── css │ └── andflow.min.css ├── img ├── demo1.png ├── demo2.png ├── demos.png ├── flow1.png ├── flow2.png ├── flow3.png ├── flow4.png ├── flow5.png ├── flow6.png ├── flow7.png ├── flow8.png ├── github.png ├── logo.jpeg ├── meta │ ├── cmd.png │ ├── end.png │ ├── list.png │ ├── tip.png │ ├── begin.png │ ├── group.png │ ├── mongodb.png │ ├── mysql.png │ ├── nginx.png │ ├── person.png │ ├── redis.png │ ├── script.png │ ├── server.png │ └── fireware.png └── shape │ ├── circle.png │ ├── diamond.png │ ├── ellipse.png │ ├── triangle.png │ ├── rectangle.png │ └── triangle_90.png ├── index.html ├── src ├── css │ └── demo.css └── js │ ├── andflow_themes.js │ └── demo.js ├── examples ├── tip.html ├── erd.html ├── link_style.html ├── action_theme.html ├── custom_meta.html ├── topology.html ├── action_color.html ├── group.html ├── design.html └── design_min.html ├── depends └── custombox │ └── custombox.min.js └── readme.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/.DS_Store -------------------------------------------------------------------------------- /dist/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/dist/.DS_Store -------------------------------------------------------------------------------- /img/demo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/demo1.png -------------------------------------------------------------------------------- /img/demo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/demo2.png -------------------------------------------------------------------------------- /img/demos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/demos.png -------------------------------------------------------------------------------- /img/flow1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/flow1.png -------------------------------------------------------------------------------- /img/flow2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/flow2.png -------------------------------------------------------------------------------- /img/flow3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/flow3.png -------------------------------------------------------------------------------- /img/flow4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/flow4.png -------------------------------------------------------------------------------- /img/flow5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/flow5.png -------------------------------------------------------------------------------- /img/flow6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/flow6.png -------------------------------------------------------------------------------- /img/flow7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/flow7.png -------------------------------------------------------------------------------- /img/flow8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/flow8.png -------------------------------------------------------------------------------- /img/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/github.png -------------------------------------------------------------------------------- /img/logo.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/logo.jpeg -------------------------------------------------------------------------------- /img/meta/cmd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/meta/cmd.png -------------------------------------------------------------------------------- /img/meta/end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/meta/end.png -------------------------------------------------------------------------------- /img/meta/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/meta/list.png -------------------------------------------------------------------------------- /img/meta/tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/meta/tip.png -------------------------------------------------------------------------------- /img/meta/begin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/meta/begin.png -------------------------------------------------------------------------------- /img/meta/group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/meta/group.png -------------------------------------------------------------------------------- /img/meta/mongodb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/meta/mongodb.png -------------------------------------------------------------------------------- /img/meta/mysql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/meta/mysql.png -------------------------------------------------------------------------------- /img/meta/nginx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/meta/nginx.png -------------------------------------------------------------------------------- /img/meta/person.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/meta/person.png -------------------------------------------------------------------------------- /img/meta/redis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/meta/redis.png -------------------------------------------------------------------------------- /img/meta/script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/meta/script.png -------------------------------------------------------------------------------- /img/meta/server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/meta/server.png -------------------------------------------------------------------------------- /img/shape/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/shape/circle.png -------------------------------------------------------------------------------- /img/meta/fireware.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/meta/fireware.png -------------------------------------------------------------------------------- /img/shape/diamond.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/shape/diamond.png -------------------------------------------------------------------------------- /img/shape/ellipse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/shape/ellipse.png -------------------------------------------------------------------------------- /img/shape/triangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/shape/triangle.png -------------------------------------------------------------------------------- /img/shape/rectangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/shape/rectangle.png -------------------------------------------------------------------------------- /img/shape/triangle_90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zone-7/andflow_js/HEAD/img/shape/triangle_90.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 |
29 | andflow 一个用于在web端进行设计和展示各种流程、关系图形的JS组件。 30 |
31 |![]() |
57 | ![]() |
58 |
![]() |
61 | ![]() |
62 |
![]() |
65 | ![]() |
66 |
![]() |
69 | ![]() |
70 |
![]() |
73 | ![]() |
74 |
| 名称 | 描述 | 值 | 默认值 | 307 |
| tags | 组件标签列表 | 数组 | null | 310 |
| metadata | 组件定义元数据 | 数组 | null | 313 |
| flowModel | 流程模型 | object | null | 316 |
| editable | 是否可设计 | true/false | true | 319 |
| show_toolbar | 是否显示工具栏 | true/false | true | 322 |
| show_thumbnail | 是否显示缩略图 | true/false | false | 325 |
| show_rulers | 是否显示标尺 | true/false | true | 328 |
| show_grid | 是否显示背景格子 | true/false | true | 331 |
| drag_step | 每次拖动的单步距离 | number | 10 | 334 |
| lang | 一些标题的方言 | json | 337 | { 338 | metadata_tag_all: '所有组件', 339 | delete_action_confirm: '确定删除该节点?', 340 | } 341 | | 342 |
| render_action | 组件节点渲染函数 | function(metadata,action,html){ return null; } | null | 346 |
| render_action_helper | 组件节点拖拉过程渲染函数 | function(metadata,html){ return null; } | null | 349 |
| render_endpoint | 组件节点拖拉点渲染函数 | function(metadata,action,html){ return null; } | null | 352 |
| render_removebtn | 组件节点拖拉点渲染函数 | function(metadata,action,html){ return null; } | null | 355 |
| render_link | 组件节点连线渲染函数 | function(conn,linktype,linkdata){return null} | null | 358 |
| event_action_click | 节点单击事件 | function(metadata,action){} | null | 362 |
| event_action_dblclick | 节点双击事件 | function(metadata,action){} | null | 365 |
| event_link_click | 连线单击事件 | function (link) | null | 369 |
| event_link_dblclick | 连线双击事件 | function (link) | null | 373 |
| event_canvas_click | 画布单击事件 | function (event) | null | 376 |
| 名称 | 417 |描述 | 418 |取值 | 419 |
| name | 422 |组件名称 | 423 |唯一字符串 | 424 |
| title | 427 |组件标题 | 428 |中英文标题 | 429 |
| group | 432 |组件所属组别 | 433 |中英文名称 | 434 |
| tag | 437 |组件标签,用于过滤 | 438 |中英文名称 | 439 |
| css | 442 |组件样式 | 443 |CSS样式名称 | 444 |
| icon | 448 |组件图标 | 449 |图标路径或者使用base64格式(例如 data:image/png;base64,....) | 450 |
| params | 454 |组件设计参数数组 | 455 |这个部分可以自定义 | 456 |
| params | 459 |组件设计参数数组 | 460 |这个部分可以自定义 | 461 |
| params_html | 464 |组件设计参数设置界面HTMl | 465 |这个部分可以自定义 | 466 |
| params_script | 469 |组件设计参数设置界面javascript | 470 |这个部分可以自定义 | 471 |
| 名称 | 499 |描述 | 500 |取值 | 501 |默认 | 502 |
| code | 505 |流程唯一编码 | 506 |字符串 | 507 |null | 508 |
| name | 511 |流程名称 | 512 |字符串 | 513 |null | 514 |
| theme | 517 |组件节点样式 | 518 |flow_theme_default、flow_theme_icon、flow_theme_zone、flow_theme_box,也可以自定义 | 519 |flow_theme_default | 520 |
| link_type | 523 |连线样式 | 524 |Flowchart、Straight、Bezier、StateMachine | 525 |Flowchart | 526 |
| show_action_body | 529 |是否显示组件节点中的Body部分 | 530 |“true"、“false" | 531 |"true" | 532 |
| show_action_content | 535 |是否显示组件节点中的内容 | 536 |“true"、“false" | 537 |"true" | 538 |
| show_action_state_list | 541 |是否显示流程状态列表 | 542 |“true"、“false" | 543 |"false" | 544 |
| actions | 547 |节点列表:可以在设计后自动生成 | 548 |object | 549 |null | 550 |actions | 552 |连线列表:可以设计后自动生成 | 553 |object | 554 |null | 555 | 556 | 557 |
| 名称 | 563 |描述 | 564 |参数 | 565 |返回值 | 566 |DEMO | 567 |
| andflow.showFlow(); | 570 |显示流程模型 | 571 |flowModel,可以为空 | 572 |null | 573 |574 | |
| andflow.getFlow(); | 577 |获取流程模型对象 | 578 |null | 579 |flowModel | 580 |581 | |
| andflow.snap("流程"); | 585 |截图 | 586 |截图导出的文件名称 | 587 |null | 588 ||
| andflow.setTheme(theme); | 592 |设置组件节点样式名称 | 593 |flow_theme_default、flow_theme_icon、flow_theme_zone、flow_theme_box、或者其他自定义 | 594 |null | 595 |596 | andflow.setTheme(theme); 597 | andflow.reflow(); 598 | | 599 |
| andflow.setEditable(false); | 604 |设置是否可设计 | 605 |true、false | 606 |null | 607 |608 | |
| andflow.reflow(); | 612 |重新渲染设计器,在改变样式、风格之后需要执行这个函数。 | 613 |null | 614 |null | 615 |616 | |
| andflow.getLinkInfo(sourceId, targetId); | 620 |获取连线信息 | 621 |sourceId:起始节点ID, targetId:目的节点ID | 622 |连线信息 | 623 |624 | |
| andflow.setLinkInfo(linkInfo); | 628 |设置连线信息 | 629 |linkInfo连线信息 | 630 |null | 631 |632 | |
| andflow.setLinkType(link_type); | 636 |设置连接线样式名称 | 637 |Flowchart、Straight、Bezier、StateMachine | 638 |null | 639 |640 | andflow.setLinkType(link_type); 641 | andflow.reflow(); 642 | | 643 |
| andflow.getLinkLabel(source_id,target_id); | 647 |获取连线中间标签标题 | 648 |sourceId:起始节点ID, targetId:目的节点ID | 649 |标签标题 | 650 |651 | |
| andflow.setLinkLabel(source_id,target_id,title); | 654 |设置连线中间标签标题 | 655 |sourceId:起始节点ID, targetId:目的节点ID,title:标题 | 656 |null | 657 |658 | |
| andflow.removeLink(sourceId, targetId); | 662 |删除链接线 | 663 |sourceId:起始节点ID, targetId:目的节点ID | 664 |null | 665 |666 | |
| andflow.removeLinkBySource(sourceId); | 669 |删除从SoureceID节点开始的所有链接线 | 670 |sourceId:起始节点ID | 671 |null | 672 |673 | |
| andflow.removeLinkByTarget(targetId); | 676 |删除所有到达targetId节点的所有链接线 | 677 |targetId:目标节点ID | 678 |null | 679 |680 | |
| andflow.getActionInfo(actionId); | 687 |获取节点配置信息 | 688 |actionId:节点ID | 689 |节点信息 | 690 |691 | |
| andflow.setActionInfo(actionInfo); | 696 |设置节点配置信息 | 697 |actionInfo:节点信息 | 698 |null | 699 |700 | |
| andflow.setActionTheme(actionId, theme); | 704 |设置节点样式 | 705 |
706 | actionId: 节点ID 707 | theme:节点样式,action_theme_default,action_theme_icon,action_theme_zone,action_theme_box 等 |
708 | null | 709 |710 | |
| andflow.setActionTitle(actionId,title); | 714 |设置节点标题 | 715 |actionId: 节点ID,title:标题 | 716 |null | 717 |718 | |
| andflow.getActionTitle(actionId); | 722 |获取节点标题 | 723 |actionId: 节点ID | 724 |string | 725 |726 | |
| andflow.setActionContentVisible(true); | 730 |设置内容是否可见 | 731 |true、false | 732 |null | 733 |734 | |
| andflow.getActionContent(actionId); | 738 |获取节点内容 | 739 |actionId:节点ID | 740 |string | 741 |742 | |
| andflow.setActionContent(actionId, content, content_type); | 746 |设置内容 | 747 |actionId:节点ID;content:内容; content_type:类型("msg"、"html","chart") | 748 |null | 749 |750 | |
| andflow.setActionParam(actionId,key,value); | 754 |设置节点参数。 | 755 |actionId:节点ID,key:参数名,value:参数值 | 756 |null | 757 |758 | |
| andflow.getActionParam(actionId,key); | 762 |设置节点参数。 | 763 |actionId:节点ID,key:参数名 | 764 |参数值 | 765 |766 | |
| andflow.setActionBorderColor(actionId,color); | 770 |设置节点边框颜色。 | 771 |actionId:节点ID,color: 颜色 | 772 |null | 773 |774 | |
| andflow.setActionHeaderColor(actionId,color); | 778 |设置节点头部背景颜色。 | 779 |actionId:节点ID,color: 颜色 | 780 |null | 781 |782 | |
| andflow.setActionHeaderTextColor(actionId,color); | 786 |设置节点头部字体颜色。 | 787 |actionId:节点ID,color: 颜色 | 788 |null | 789 |790 | |
| andflow.setActionBodyColor(actionId,color); | 794 |设置节点内容背景颜色。 | 795 |actionId:节点ID,color: 颜色 | 796 |null | 797 |798 | |
| andflow.setActionBodyTextColor(actionId,color); | 802 |设置节点内容字体颜色。 | 803 |actionId:节点ID,color: 颜色 | 804 |null | 805 |806 | |
| andflow.removeAction(actionId); | 810 |删除节点 | 811 |actionId:节点ID | 812 |813 | | 814 | |
| andflow.getGroupInfo(groupId); | 819 |获取组配置信息 | 820 |groupId:组ID | 821 |组信息 | 822 |823 | |
| andflow.setGroupInfo(groupInfo); | 827 |设置组配置信息 | 828 |groupInfo:组信息 | 829 |null | 830 |831 | |
| andflow.getGroupTitle(groupId); | 835 |获取组标题 | 836 |groupId:组ID | 837 |组标题 | 838 |839 | |
| andflow.setGroupTitle(groupId,title); | 843 |设置组标题 | 844 |groupId:组ID, title:组标题 | 845 |null | 846 |847 | |
| andflow.setGroupBorderColor(groupId,color); | 851 |设置组边框颜色。 | 852 |groupId:组ID,color: 颜色 | 853 |null | 854 |855 | |
| andflow.setGroupHeaderColor(groupId,color); | 859 |设置组头部背景颜色。 | 860 |groupId:组ID,color: 颜色 | 861 |null | 862 |863 | |
| andflow.setGroupHeaderTextColor(groupId,color); | 867 |设置组头部字体颜色。 | 868 |groupId:组ID,color: 颜色 | 869 |null | 870 |871 | |
| andflow.setGroupBodyColor(groupId,color); | 875 |设置组内容背景颜色。 | 876 |groupId:组ID,color: 颜色 | 877 |null | 878 |879 | |
| andflow.setGroupBodyTextColor(groupId,color); | 883 |设置组内容字体颜色。 | 884 |groupId:组ID,color: 颜色 | 885 |null | 886 |887 | |
| andflow.removeGroup(groupId,deleteMembers); | 890 |删除组 | 891 |groupId:组ID, deleteMembers: 是否删除子元素(true,false) | 892 |null | 893 |894 | |
| andflow.getListInfo(listId); | 900 |获取列表配置信息 | 901 |listId: 列表ID | 902 |列表信息 | 903 |904 | |
| andflow.setListInfo(listInfo); | 908 |设置列表配置信息 | 909 |listInfo: 列表信息 | 910 |null | 911 |912 | |
| andflow.getListTitle(listId); | 916 |获取列表标题 | 917 |listId: 列表ID | 918 |列表标题 | 919 |920 | |
| andflow.setListTitle(listId,title); | 924 |设置列表标题 | 925 |listId: 列表ID, title:标题 | 926 |null | 927 |928 | |
| andflow.setListBorderColor(listId,color); | 932 |设置列表边框颜色。 | 933 |listId:列表ID,color: 颜色 | 934 |null | 935 |936 | |
| andflow.setListHeaderColor(listId,color); | 940 |设置列表头部背景颜色。 | 941 |listId: 列表ID,color: 颜色 | 942 |null | 943 |944 | |
| andflow.setListHeaderTextColor(listId,color); | 948 |设置列表头部字体颜色。 | 949 |listId: 列表ID,color: 颜色 | 950 |null | 951 |952 | |
| andflow.setListBodyColor(listId,color); | 956 |设置列表内容背景颜色。 | 957 |listId: 列表ID,color: 颜色 | 958 |null | 959 |960 | |
| andflow.setListBodyTextColor(listId,color); | 964 |设置列表内容字体颜色。 | 965 |listId:列表ID,color: 颜色 | 966 |null | 967 |968 | |
| andflow.setListItemColor(listId,color); | 972 |设置列表元素背景颜色。 | 973 |listId: 列表ID,color: 颜色 | 974 |null | 975 |976 | |
| andflow.setListItemTextColor(listId,color); | 980 |设置列表元素字体颜色。 | 981 |listId:列表ID,color: 颜色 | 982 |null | 983 |984 | |
| andflow.removeList(listId); | 988 |删除列表 | 989 |listId: 列表ID | 990 |null | 991 |992 | |
| andflow.getTipInfo(tipId); | 997 |获取标签配置信息 | 998 |tipId:标签ID | 999 |标签信息 | 1000 |1001 | |
| andflow.setTipInfo(tipInfo); | 1005 |设置标签配置信息 | 1006 |tipInfo:标签信息 | 1007 |null | 1008 |1009 | |
| andflow.getTipTitle(tipId); | 1013 |获取标签标题 | 1014 |tipId:标签ID | 1015 |标签标题 | 1016 |1017 | |
| andflow.setTipTitle(tipId,title); | 1021 |设置标签标题 | 1022 |tipId:标签ID, title:标题 | 1023 |null | 1024 |1025 | |
| andflow.getTipContent(tipId); | 1029 |获取标签内容 | 1030 |tipId:标签ID | 1031 |标签内容 | 1032 |1033 | |
| andflow.setTipContent(tipId,content); | 1037 |设置标签内容 | 1038 |tipId:标签ID, content:内容 | 1039 |null | 1040 |1041 | |
| andflow.setTipBodyColor(tip,color); | 1045 |设置标签背景颜色。 | 1046 |tipId:标签ID,color: 颜色 | 1047 |null | 1048 |1049 | |
| andflow.setTipBodyTextColor(tip,color); | 1053 |设置标签内容字体颜色。 | 1054 |tipId:标签ID,color: 颜色 | 1055 |null | 1056 |1057 | |
| andflow.removeTip(tipId); | 1061 |删除标签 | 1062 |tipId:标签ID | 1063 |null | 1064 |1065 | |
| 事件 | 1074 |名称 | 1075 |事件函数签名 | 1076 |描述 | 1077 |
| event_action_click | 1080 |节点单击 | 1081 |event_action_click(action_meta, action) | 1082 |action_meta节点配置信息, action:节点信息 | 1083 |
| event_action_dblclick | 1086 |节点双击 | 1087 |event_action_dblclick(action_meta, action) | 1088 |action_meta节点配置信息, action:节点信息 | 1089 |
| event_action_remove | 1092 |节点被删除 | 1093 |event_action_remove( action) | 1094 |action:节点信息 | 1095 |
| event_link_click | 1098 |连接线单击 | 1099 |event_link_click(linkinfo) | 1100 |linkinfo:链接线信息 | 1101 |
| event_link_dblclick | 1104 |连接线双击 | 1105 |event_link_dblclick(linkinfo) | 1106 |linkinfo:链接线信息 | 1107 |
| event_link_remove | 1110 |连接线被删除 | 1111 |event_link_remove(linkinfo) | 1112 |linkinfo:链接线信息 | 1113 |
| event_canvas_click | 1116 |设计面板单击 | 1117 |event_canvas_click(event) | 1118 |event:事件 | 1119 |
| event_canvas_changed | 1122 |设计面板被调整 | 1123 |event_canvas_changed() | 1124 |null | 1125 |