From 898a048d2468f716f815fd1483c3fe80d52604f1 Mon Sep 17 00:00:00 2001 From: lihongyu <504404568@qq.com> Date: Tue, 20 Sep 2022 17:18:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=B3=E9=81=93=E5=9B=BE=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=BD=A2=E7=8A=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../process.flowchart/diagram.schema.tpl | 669 ++++++++++++++++++ 1 file changed, 669 insertions(+) diff --git a/com.actionsoft.apps.coe.method.process.flowchart/method/process.flowchart/diagram.schema.tpl b/com.actionsoft.apps.coe.method.process.flowchart/method/process.flowchart/diagram.schema.tpl index 687873de..b3f604af 100644 --- a/com.actionsoft.apps.coe.method.process.flowchart/method/process.flowchart/diagram.schema.tpl +++ b/com.actionsoft.apps.coe.method.process.flowchart/method/process.flowchart/diagram.schema.tpl @@ -429,6 +429,517 @@ Schema.addShape({name:"method_service_node4", title:"人工任务", text:"人工 +/***两条水平线:Parallelmode*/Schema.addShape({name:"parallelMode", title:"并行模式", text:"并行模式", category:"process_flowchart", props:{w:150, h:66}, anchors:[ + {x:"w*0.5", y:"0"}, + {x:"w*0.5", y:"0"}, + {x:"w*0.5", y:"h"}, + {x:"w*0.5", y:"h"} +], path:[ + {actions:[ + {action:"move", x:"0", y:"0"}, + {action:"line", x:"w", y:"0"}, + {action:"line", x:"0", y:"0"}, + {action:"move", x:"0", y:"h"}, + {action:"line", x:"w", y:"h"}, + {action:"line", x:"0", y:"h"}, + {action:"close"} + ]}, + {fillStyle:{type:"none"}, lineStyle:{lineWidth:0}, actions:[ + {action:"move", x:"0", y:"0"}, + {action:"line", x:"w", y:"0"}, + {action:"line", x:"w", y:"h"}, + {action:"line", x:"0", y:"h"}, + {action:"line", x:"0", y:"0"}, + {action:"close"} + ]} +]}); + +/***圆形:On-pagereference*/Schema.addShape({name:"onPageReference", title:"页面内引用", text:"页面内引用", category:"process_flowchart", props:{w:66, h:66}, fontStyle:{size:8}, path:[ + {actions:{ref:"round"}} +]}); + +/***特殊线矩形:Annotation*/Schema.addShape({name:"annotation", title:"注释", text:"注释", category:"process_flowchart", props:{w:150, h:66}, anchors:[ + {x:"0", y:"h*0.5"}, + {x:"0", y:"h*0.5"}, + {x:"0", y:"h*0.5"}, + {x:"0", y:"h*0.5"} +], path:[ + {fillStyle:{type:"none"}, lineStyle:{lineWidth:0}, actions:[ + {action:"move", x:"0", y:"0"}, + {action:"line", x:"w", y:"0"}, + {action:"line", x:"w", y:"h"}, + {action:"line", x:"0", y:"h"}, + {action:"line", x:"0", y:"0"}, + {action:"close"} + ]}, + {fillStyle:{type:"none"}, actions:[ + {action:"move", x:"w/6", y:"0"}, + {action:"line", x:"0", y:"0"}, + {action:"line", x:"0", y:"h"}, + {action:"line", x:"w/6", y:"h"} + ]}, + {fillStyle:{type:"none"}, lineStyle:{lineWidth:0}, actions:[ + {action:"move", x:"0", y:"0"}, + {action:"line", x:"w", y:"0"}, + {action:"line", x:"w", y:"h"}, + {action:"line", x:"0", y:"h"}, + {action:"close"} + ]} +]}); +/***组:Group*/Schema.addShape({name:"group", title:"组", text:"组", category:"process_flowchart", attribute:{container:true,editable:true}, props:{w:150, h:66}, textBlock:{x:"10", y:"0", w:"w-20", h:"h"},textBlockFinal:{x:5, y:0, w:"w-10", h:"h"}, fontStyle:{textAlign:"top", vAlign:"left"}, path:[ + {lineStyle:{lineWidth:2, lineStyle:"dashed"}, fillStyle:{type:"none"}, actions:{ref:"roundRectangle"}} +]}); + +Schema.addGlobalCommand("method_script_task", [ + {action:"move", x:"100*0.15- 100*0.05", y:"60*0.24- 60*0.1"}, + {action:"line", x:"100*0.15 + 100*0.05", y:"60*0.24 - 60*0.1"}, + {action:"curve", x1:"100*0.15 + 100*0.02", y1:"60*0.24 - 60*0.1", x2:"100*0.15 + 100*0.02", y2:"60*0.24", x:"100*0.15 + 100*0.04", y:"60*0.24"}, + {action:"curve", x1:"100*0.15 + 100*0.06", y1:"60*0.24", x2:"100*0.15 + 100*0.06", y2:"60*0.24 + 60*0.1", x:"100*0.15 + 100*0.03", y:"60*0.24 + 60*0.1"}, + {action:"line", x:"100*0.15 - 100*0.08", y:"60*0.24 + 60*0.1"}, + {action:"curve", x1:"100*0.15 - 100*0.05", y1:"60*0.24 + 60*0.1", x2:"100*0.15 - 100*0.05", y2:"60*0.24", x:"100*0.15 - 100*0.07", y:"60*0.24"}, + {action:"curve", x1:"100*0.15 - 100*0.09", y1:"60*0.24", x2:"100*0.15 - 100*0.09", y2:"60*0.24 - 60*0.1", x:"100*0.15 - 100*0.05", y:"60*0.24 - 60*0.1"}, + {action:"close"}, + {action:"move", x:"100*0.15 - 100*0.08", y:"60*0.24 - 60*0.05"}, + {action:"line", x:"100*0.15 + 100*0.025", y:"60*0.24 - 60*0.05"}, + {action:"move", x:"100*0.15 - 100*0.07", y:"60*0.24 - 0"}, + {action:"line", x:"100*0.15 + 100*0.04", y:"60*0.24 - 0"}, + {action:"move", x:"100*0.15 - 100*0.055", y:"60*0.24 + 60*0.06"}, + {action:"line", x:"100*0.15 + 100*0.05", y:"60*0.24 + 60*0.06"} +]); + + + +Schema.addCategory({name:"process_flowchart", text:"流程图", dataAttributes:[ + {name:"No.", type:"number", value:"", category:"default"}, + {name:"Name", type:"string", value:"", category:"default"}, + {name:"Owner", type:"string", value:"", category:"default"}, + {name:"Link", type:"link", value:"", category:"default"}, + {name:"Memo", type:"string", value:"", category:"default"}, + {name:"Cost", type:"number", value:"", category:"default"}, + {name:"Time", type:"number", value:"", category:"default"}, + {name:"Manner", type:"list", value:"", category:"default"}, + {name:"Department", type:"string", value:"", category:"default"}, + {name:"Input", type:"string", value:"", category:"default"}, + {name:"Output", type:"string", value:"", category:"default"}, + {name:"Risk", type:"string", value:"", category:"default"}, + {name:"Remarks", type:"string", value:"", category:"default"} +]}); + +Schema.addGlobalCommand("method_user_task", [ + {action:"move", x:"100*0.05+ 100/11*2*0.5-100/11*2*0.2", y:"60*0.1+ 60/55*16*0.3"}, + {action:"curve", x1:"100*0.05+ 100/11*2*0.30", y1:"60*0.1+ 60/55*16*0.3 - 60/55*16*0.4*2/3", x2:"100*0.05+ 100/11*2*0.5+100/11*2*0.2", y2:"60*0.1+ 60/55*16*0.3 - 60/55*16*0.4*2/3", x:"100*0.05+ 100/11*2*0.5+100/11*2*0.2", y:"60*0.1+ 60/55*16*0.3"}, + {action:"line", x:"100*0.05+ 100/11*2*0.5-100/11*2*0.2", y:"60*0.1+ 60/55*16*0.3"}, + {action:"close"}, + {action:"move", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.1", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.96"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.1", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.68"}, + {action:"quadraticCurve", x1:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.1", y1:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.45", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.35", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.45"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.35", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.58"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.60", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.58"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.60", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.45"}, + {action:"quadraticCurve", x1:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.95", y1:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.45", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.95", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.68"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.95", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.96"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.77", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.96"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.77", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.77"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.77", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.96"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.23", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.96"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.23", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.77"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.23", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.96"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.05", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.96"}, + {action:"close"}, + {action:"move", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.35", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.45"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.38", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.42"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.35", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.40"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.32", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.35"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.32", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.27"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.43", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.27"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.46", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.24"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.68", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.24"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.68", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.35"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.60", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.40"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.62", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.42"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.60", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.45"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.60", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.58"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.35", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.58"}, + {action:"line", x:"100*0.05+ 100/11*2*0.0 + 100/11*2*0.35", y:"60*0.1+ 60/55*16*0.0 + 60/55*16*0.45"}, + {action:"close"} +]); +Schema.addGlobalCommand("method_service_task", [ + {action:"move", x:"100*0.09 -100*0.26 *0.16", y:"60*0.14 + 60/5*8 *0.16 *0.16"}, + {action:"line", x:"100*0.09 -100*0.28 *0.16", y:"60*0.14 + 60/5*8 *0.11 *0.16"}, + {action:"line", x:"100*0.09 - 100*0.26 *0.16", y:"60*0.14 + 60/5*8 *0.05 *0.16"}, + {action:"line", x:"100*0.09 -100*0.17 *0.16", y:"60*0.14 + 60/5*8 *0.05 *0.16"}, + {action:"line", x:"100*0.09 -100*0.12 *0.16", y:"60*0.14 -60/5*8 *0.02 *0.16"}, + {action:"line", x:"100*0.09 -100*0.21 *0.16", y:"60*0.14 -60/5*8 *0.13 *0.16"}, + {action:"line", x:"100*0.09 -100*0.18 *0.16", y:"60*0.14 -60/5*8 *0.17 *0.16"}, + {action:"line", x:"100*0.09 -100*0.13 *0.16", y:"60*0.14 -60/5*8 *0.19 *0.16"}, + {action:"line", x:"100*0.09 -100*0.05 *0.16", y:"60*0.14 -60/5*8 *0.11 *0.16"}, + {action:"line", x:"100*0.09 +100*0.03 *0.16", y:"60*0.14 -60/5*8 *0.15 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.04 *0.16", y:"60*0.14 -60/5*8 *0.25 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.10 *0.16", y:"60*0.14 -60/5*8 *0.27 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.15 *0.16", y:"60*0.14 -60/5*8 *0.25 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.15 *0.16", y:"60*0.14 -60/5*8 *0.15 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.23 *0.16", y:"60*0.14 -60/5*8 *0.12 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.30 *0.16", y:"60*0.14 -60/5*8 *0.19 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.35 *0.16", y:"60*0.14 -60/5*8 *0.16 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.38 *0.16", y:"60*0.14 -60/5*8 *0.12 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.32 *0.16", y:"60*0.14 -60/5*8 *0.05 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.37 *0.16", y:"60*0.14 + 60/5*8 *0.05 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.46 *0.16", y:"60*0.14 + 60/5*8 *0.05 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.48 *0.16", y:"60*0.14 + 60/5*8 *0.10 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.46 *0.16", y:"60*0.14 + 60/5*8 *0.16 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.37 *0.16", y:"60*0.14 + 60/5*8 *0.16 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.33 *0.16", y:"60*0.14 + 60/5*8 *0.25 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.38 *0.16", y:"60*0.14 + 60/5*8 *0.31 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.36 *0.16", y:"60*0.14 + 60/5*8 *0.37 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.29 *0.16", y:"60*0.14 + 60/5*8 *0.39 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.25 *0.16", y:"60*0.14 + 60/5*8 *0.35 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.16 *0.16", y:"60*0.14 + 60/5*8 *0.37 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.16 *0.16", y:"60*0.14 + 60/5*8 *0.46 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.10 *0.16", y:"60*0.14 + 60/5*8 *0.48 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.04 *0.16", y:"60*0.14 + 60/5*8 *0.46 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.04 *0.16", y:"60*0.14 + 60/5*8 *0.37 *0.16"}, + {action:"line", x:"100*0.09 -100*0.04 *0.16", y:"60*0.14 + 60/5*8 *0.33 *0.16"}, + {action:"line", x:"100*0.09 -100*0.12 *0.16", y:"60*0.14 + 60/5*8 *0.38 *0.16"}, + {action:"line", x:"100*0.09 -100*0.18 *0.16", y:"60*0.14 + 60/5*8 *0.37 *0.16"}, + {action:"line", x:"100*0.09 -100*0.21 *0.16", y:"60*0.14 + 60/5*8 *0.33 *0.16"}, + {action:"line", x:"100*0.09 -100*0.14 *0.16", y:"60*0.14 + 60/5*8 *0.25 *0.16"}, + {action:"line", x:"100*0.09 -100*0.16 *0.16", y:"60*0.14 + 60/5*8 *0.16 *0.16"}, + {action:"line", x:"100*0.09 -100*0.26 *0.16", y:"60*0.14 + 60/5*8 *0.16 *0.16"}, + {action:"close"}, + {action:"move", x:"100*0.09 -100*0.01 *0.16", y:"60*0.14 + 60/5*8 *0.01 *0.16"}, + {action:"line", x:"100*0.09 +100*0.01 *0.16", y:"60*0.14 - 60*0.01 /5*8 *0.16"}, + {action:"line", x:"100*0.09 +100*0.04 *0.16", y:"60*0.14 + 60*0.01 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.08 *0.16", y:"60*0.14 + 60*0.01 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.08 *0.16", y:"60*0.14 - 60*0.03 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.12 *0.16", y:"60*0.14 - 60*0.03 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.12 *0.16", y:"60*0.14 - 60*0.0 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.15 *0.16", y:"60*0.14 + 60*0.02 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.18 *0.16", y:"60*0.14 -60*0.01 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.22 *0.16", y:"60*0.14 + 60*0.01 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.18 *0.16", y:"60*0.14 + 60*0.04 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.20 *0.16", y:"60*0.14 + 60*0.08 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.25 *0.16", y:"60*0.14 + 60*0.08 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.25 *0.16", y:"60*0.14 + 60*0.12 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.20 *0.16", y:"60*0.14 + 60*0.12 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.18 *0.16", y:"60*0.14 + 60*0.16 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.21 *0.16", y:"60*0.14 + 60*0.19 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.18 *0.16", y:"60*0.14 + 60*0.22 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.15 *0.16", y:"60*0.14 + 60*0.19 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.12 *0.16", y:"60*0.14 + 60*0.21 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.12 *0.16", y:"60*0.14 + 60*0.25 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.08 *0.16", y:"60*0.14 + 60*0.26 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.08 *0.16", y:"60*0.14 + 60*0.21 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.05 *0.16", y:"60*0.14 + 60*0.18 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.01 *0.16", y:"60*0.14 + 60*0.22 /5*8 *0.16"}, + {action:"line", x:"100*0.09 - 100*0.02 *0.16", y:"60*0.14 + 60*0.19 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.0 *0.16", y:"60*0.14 + 60*0.16 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.0 *0.16", y:"60*0.14 + 60*0.12 /5*8 *0.16"}, + {action:"line", x:"100*0.09 -100*0.04 *0.16", y:"60*0.14 + 60*0.12 /5*8 *0.16"}, + {action:"line", x:"100*0.09 -100*0.04 *0.16", y:"60*0.14 + 60*0.08 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0. *0.16", y:"60*0.14 + 60*0.08 /5*8 *0.16"}, + {action:"line", x:"100*0.09 + 100*0.01 *0.16", y:"60*0.14 + 60*0.05 /5*8 *0.16"}, + {action:"line", x:"100*0.09 -100*0.01 *0.16", y:"60*0.14 + 60*0.01 /5*8 *0.16"}, + {action:"close"}, + {action:"move", x:"100*0.15 -100*0.26 *0.16", y:"60*0.24 + 60/5*8 *0.16 *0.16"}, + {action:"line", x:"100*0.15 -100*0.28 *0.16", y:"60*0.24 + 60/5*8 *0.11 *0.16"}, + {action:"line", x:"100*0.15 -100*0.26 *0.16", y:"60*0.24 + 60/5*8 *0.05 *0.16"}, + {action:"line", x:"100*0.15 -100*0.17 *0.16", y:"60*0.24 + 60/5*8 *0.05 *0.16"}, + {action:"line", x:"100*0.15 -100*0.12 *0.16", y:"60*0.24 -60/5*8 *0.02 *0.16"}, + {action:"line", x:"100*0.15 -100*0.21 *0.16", y:"60*0.24 -60/5*8 *0.13 *0.16"}, + {action:"line", x:"100*0.15 -100*0.18 *0.16", y:"60*0.24 -60/5*8 *0.17 *0.16"}, + {action:"line", x:"100*0.15 -100*0.13 *0.16", y:"60*0.24 -60/5*8 *0.19 *0.16"}, + {action:"line", x:"100*0.15 -100*0.05 *0.16", y:"60*0.24 -60/5*8 *0.11 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.03 *0.16", y:"60*0.24 -60/5*8 *0.15 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.04 *0.16", y:"60*0.24 -60/5*8 *0.25 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.10 *0.16", y:"60*0.24 -60/5*8 *0.27 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.15 *0.16", y:"60*0.24 -60/5*8 *0.25 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.15 *0.16", y:"60*0.24 -60/5*8 *0.15 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.23 *0.16", y:"60*0.24 -60/5*8 *0.12 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.30 *0.16", y:"60*0.24 -60/5*8 *0.19 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.35 *0.16", y:"60*0.24 -60/5*8 *0.16 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.38 *0.16", y:"60*0.24 -60/5*8 *0.12 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.32 *0.16", y:"60*0.24 -60/5*8 *0.05 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.37 *0.16", y:"60*0.24 +60/5*8 *0.05 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.46 *0.16", y:"60*0.24 +60/5*8 *0.05 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.48 *0.16", y:"60*0.24 +60/5*8 *0.10 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.46 *0.16", y:"60*0.24 +60/5*8 *0.16 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.37 *0.16", y:"60*0.24 +60/5*8 *0.16 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.33 *0.16", y:"60*0.24 +60/5*8 *0.25 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.38 *0.16", y:"60*0.24 +60/5*8 *0.31 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.36 *0.16", y:"60*0.24 +60/5*8 *0.37 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.29 *0.16", y:"60*0.24 +60/5*8 *0.39 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.25 *0.16", y:"60*0.24 +60/5*8 *0.35 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.16 *0.16", y:"60*0.24 +60/5*8 *0.37 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.16 *0.16", y:"60*0.24 +60/5*8 *0.46 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.10 *0.16", y:"60*0.24 +60/5*8 *0.48 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.04 *0.16", y:"60*0.24 +60/5*8 *0.46 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.04 *0.16", y:"60*0.24 +60/5*8 *0.37 *0.16"}, + {action:"line", x:"100*0.15 -100*0.04 *0.16", y:"60*0.24 +60/5*8 *0.33 *0.16"}, + {action:"line", x:"100*0.15 -100*0.12 *0.16", y:"60*0.24 +60/5*8 *0.38 *0.16"}, + {action:"line", x:"100*0.15 -100*0.18 *0.16", y:"60*0.24 +60/5*8 *0.37 *0.16"}, + {action:"line", x:"100*0.15 -100*0.21 *0.16", y:"60*0.24 +60/5*8 *0.33 *0.16"}, + {action:"line", x:"100*0.15 -100*0.14 *0.16", y:"60*0.24 +60/5*8 *0.25 *0.16"}, + {action:"line", x:"100*0.15 -100*0.16 *0.16", y:"60*0.24 +60/5*8 *0.16 *0.16"}, + {action:"line", x:"100*0.15 -100*0.26 *0.16", y:"60*0.24 +60/5*8 *0.16 *0.16"}, + {action:"close"}, + {action:"move", x:"100*0.15 -100*0.01 *0.16", y:"60*0.24 +60/5*8 *0.01 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.01 *0.16", y:"60*0.24 - 60*0.01 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.04 *0.16", y:"60*0.24 + 60*0.01 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.08 *0.16", y:"60*0.24 + 60*0.01 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.08 *0.16", y:"60*0.24 - 60*0.03 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.12 *0.16", y:"60*0.24 - 60*0.03 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.12 *0.16", y:"60*0.24 - 60*0.0 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.15 *0.16", y:"60*0.24 + 60*0.02 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.18 *0.16", y:"60*0.24 -60*0.01 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.22 *0.16", y:"60*0.24 + 60*0.01 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.18 *0.16", y:"60*0.24 + 60*0.04 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.20 *0.16", y:"60*0.24 + 60*0.08 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.25 *0.16", y:"60*0.24 + 60*0.08 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.25 *0.16", y:"60*0.24 + 60*0.12 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.20 *0.16", y:"60*0.24 + 60*0.12 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.18 *0.16", y:"60*0.24 + 60*0.16 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.21 *0.16", y:"60*0.24 + 60*0.19 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.18 *0.16", y:"60*0.24 + 60*0.22 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.15 *0.16", y:"60*0.24 + 60*0.19 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.12 *0.16", y:"60*0.24 + 60*0.21 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.12 *0.16", y:"60*0.24 + 60*0.25 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.08 *0.16", y:"60*0.24 + 60*0.26 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.08 *0.16", y:"60*0.24 + 60*0.21 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.05 *0.16", y:"60*0.24 + 60*0.18 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.01 *0.16", y:"60*0.24 + 60*0.22 /5*8 *0.16"}, + {action:"line", x:"100*0.15 - 100*0.02 *0.16", y:"60*0.24 + 60*0.19 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.0 *0.16", y:"60*0.24 + 60*0.16 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.0 *0.16", y:"60*0.24 + 60*0.12 /5*8 *0.16"}, + {action:"line", x:"100*0.15 -100*0.04 *0.16", y:"60*0.24 + 60*0.12 /5*8 *0.16"}, + {action:"line", x:"100*0.15 -100*0.04 *0.16", y:"60*0.24 + 60*0.08 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0 *0.16", y:"60*0.24 + 60*0.08 /5*8 *0.16"}, + {action:"line", x:"100*0.15 + 100*0.01 *0.16", y:"60*0.24 + 60*0.05 /5*8 *0.16"}, + {action:"line", x:"100*0.15 -100*0.01 *0.16", y:"60*0.24 + 60*0.01 /5*8 *0.16"}, + {action:"close"} +]); +Schema.addGlobalCommand("method_business_rule", [ + {action:"move", x:"100*0.15- 100*0.08", y:"60*0.24- 60*0.1"}, + {action:"line", x:"100*0.15 + 100*0.08", y:"60*0.24- 60*0.1"}, + {action:"line", x:"100*0.15 + 100*0.08", y:"60*0.24 + 60*0.1"}, + {action:"line", x:"100*0.15 - 100*0.08", y:"60*0.24 + 60*0.1"}, + {action:"close"}, + {action:"move", x:"100*0.15 - 100*0.08", y:"60*0.24 - 60*0.05"}, + {action:"line", x:"100*0.15 + 100*0.08", y:"60*0.24 - 60*0.05"}, + {action:"move", x:"100*0.15 - 100*0.08", y:"60*0.24 + 60*0.0"}, + {action:"line", x:"100*0.15 + 100*0.08", y:"60*0.24 + 60*0.0"}, + {action:"move", x:"100*0.15 - 100*0.08", y:"60*0.24 + 60*0.05"}, + {action:"line", x:"100*0.15 + 100*0.08", y:"60*0.24 + 60*0.05"}, + {action:"move", x:"100*0.15 - 100*0.04", y:"60*0.24 - 60*0.1"}, + {action:"line", x:"100*0.15 - 100*0.04", y:"60*0.24 + 60*0.1"} +]); +Schema.addGlobalCommand("method_script_task", [ + {action:"move", x:"100*0.15- 100*0.05", y:"60*0.24- 60*0.1"}, + {action:"line", x:"100*0.15 + 100*0.05", y:"60*0.24 - 60*0.1"}, + {action:"curve", x1:"100*0.15 + 100*0.02", y1:"60*0.24 - 60*0.1", x2:"100*0.15 + 100*0.02", y2:"60*0.24", x:"100*0.15 + 100*0.04", y:"60*0.24"}, + {action:"curve", x1:"100*0.15 + 100*0.06", y1:"60*0.24", x2:"100*0.15 + 100*0.06", y2:"60*0.24 + 60*0.1", x:"100*0.15 + 100*0.03", y:"60*0.24 + 60*0.1"}, + {action:"line", x:"100*0.15 - 100*0.08", y:"60*0.24 + 60*0.1"}, + {action:"curve", x1:"100*0.15 - 100*0.05", y1:"60*0.24 + 60*0.1", x2:"100*0.15 - 100*0.05", y2:"60*0.24", x:"100*0.15 - 100*0.07", y:"60*0.24"}, + {action:"curve", x1:"100*0.15 - 100*0.09", y1:"60*0.24", x2:"100*0.15 - 100*0.09", y2:"60*0.24 - 60*0.1", x:"100*0.15 - 100*0.05", y:"60*0.24 - 60*0.1"}, + {action:"close"}, + {action:"move", x:"100*0.15 - 100*0.08", y:"60*0.24 - 60*0.05"}, + {action:"line", x:"100*0.15 + 100*0.025", y:"60*0.24 - 60*0.05"}, + {action:"move", x:"100*0.15 - 100*0.07", y:"60*0.24 - 0"}, + {action:"line", x:"100*0.15 + 100*0.04", y:"60*0.24 - 0"}, + {action:"move", x:"100*0.15 - 100*0.055", y:"60*0.24 + 60*0.06"}, + {action:"line", x:"100*0.15 + 100*0.05", y:"60*0.24 + 60*0.06"} +]); + +/***胶囊型:Terminator*/Schema.addShape({name:"terminator", title:"开始/结束", text:"开始/结束", category:"process_flowchart", props:{w:150, h:66},lineStyle:{lineColor:"137,188,255"}, path:[ + {actions:[ + {action:"move", x:"Math.min(w,h)/3", y:"0"}, + {action:"line", x:"w-Math.min(w,h)/3", y:"0"}, + {action:"curve", x1:"w+Math.min(w,h)/3/3", y1:"0", x2:"w+Math.min(w,h)/3/3", y2:"h", x:"w-Math.min(w,h)/3", y:"h"}, + {action:"line", x:"Math.min(w,h)/3", y:"h"}, + {action:"curve", x1:"-Math.min(w,h)/3/3", y1:"h", x2:"-Math.min(w,h)/3/3", y2:"0", x:"Math.min(w,h)/3", y:"0"}, + {action:"close"} + ]} +]}); +/***Method*/Schema.addShape({name:"method_approval_node", title:"线上审批", text:"线上审批",groupName:"features", category:"process_flowchart", props:{w:150, h:66}, lineStyle:{lineWidth:1, lineColor:"137,188,255"}, fillStyle:{type:"gradient", gradientType:"linear", beginColor:"245,250,255", endColor:"232,242,255", angle:Math.PI * 0.5}, path:[ + {actions:[ + {action:"move", x:"w*0", y:"5"}, + {action:"quadraticCurve", x1:"0", y1:"0", x:"5", y:"0"}, + {action:"line", x:"w-5", y:"0"}, + {action:"quadraticCurve", x1:"w", y1:"0", x:"w", y:"5"}, + {action:"line", x:"w", y:"h-5"}, + {action:"quadraticCurve", x1:"w", y1:"h", x:"w-5", y:"h"}, + {action:"line", x:"5", y:"h"}, + {action:"quadraticCurve", x1:"0", y1:"h", x:"0", y:"h-5"}, + {action:"line", x:"0", y:"5"}, + {action:"close"} + ]}, + {lineStyle:{lineStyle:"solid"}, actions:{ref:"roundRectangle"}}, + {lineStyle:{lineWidth:1, lineColor:"137,188,255", lineStyle:"solid"}, fillStyle:{type:"solid", color:"255,255,255"}, actions:{ref:"method_script_task"}}, + {lineStyle:{lineWidth:0}, fillStyle:{type:"none"}, actions:{ref:"roundRectangle"}} + ]}); + + Schema.addGlobalCommand("business_rule", [ + {action:"move", x:"100*0.15- 100*0.08", y:"60*0.24- 60*0.1"}, + {action:"line", x:"100*0.15 + 100*0.08", y:"60*0.24- 60*0.1"}, + {action:"line", x:"100*0.15 + 100*0.08", y:"60*0.24 + 60*0.1"}, + {action:"line", x:"100*0.15 - 100*0.08", y:"60*0.24 + 60*0.1"}, + {action:"close"}, + {action:"move", x:"100*0.15 - 100*0.08", y:"60*0.24 - 60*0.05"}, + {action:"line", x:"100*0.15 + 100*0.08", y:"60*0.24 - 60*0.05"}, + {action:"move", x:"100*0.15 - 100*0.08", y:"60*0.24 + 60*0.0"}, + {action:"line", x:"100*0.15 + 100*0.08", y:"60*0.24 + 60*0.0"}, + {action:"move", x:"100*0.15 - 100*0.08", y:"60*0.24 + 60*0.05"}, + {action:"line", x:"100*0.15 + 100*0.08", y:"60*0.24 + 60*0.05"}, + {action:"move", x:"100*0.15 - 100*0.04", y:"60*0.24 - 60*0.1"}, + {action:"line", x:"100*0.15 - 100*0.04", y:"60*0.24 + 60*0.1"} + ]); + + + + Schema.addShape({name:"method_service_node", title:"线下审批", text:"线下审批",groupName:"features", category:"process_flowchart", props:{w:150, h:66}, lineStyle:{lineWidth:1, lineColor:"137,188,255"}, fillStyle:{type:"gradient", gradientType:"linear", beginColor:"245,250,255", endColor:"232,242,255", angle:Math.PI * 0.5}, path:[ + {actions:[ + {action:"move", x:"w*0", y:"5"}, + {action:"quadraticCurve", x1:"0", y1:"0", x:"5", y:"0"}, + {action:"line", x:"w-5", y:"0"}, + {action:"quadraticCurve", x1:"w", y1:"0", x:"w", y:"5"}, + {action:"line", x:"w", y:"h-5"}, + {action:"quadraticCurve", x1:"w", y1:"h", x:"w-5", y:"h"}, + {action:"line", x:"5", y:"h"}, + {action:"quadraticCurve", x1:"0", y1:"h", x:"0", y:"h-5"}, + {action:"line", x:"0", y:"5"}, + {action:"close"} + ]}, + + {lineStyle:{lineStyle:"solid"}, actions:{ref:"roundRectangle"}}, + {lineStyle:{lineWidth:1, lineColor:"137,188,255", lineStyle:"solid"}, fillStyle:{type:"solid"}, actions:{ref:"business_rule"}}, + {lineStyle:{lineWidth:0}, fillStyle:{type:"none"}, actions:{ref:"roundRectangle"}} + + + ]}); +/***Method*/Schema.addShape({name:"method_approval_node3", title:"系统任务", text:"系统任务",groupName:"features3", category:"process_flowchart", props:{w:150, h:66}, lineStyle:{lineWidth:1, lineColor:"137,188,255"}, fillStyle:{type:"gradient", gradientType:"linear", beginColor:"245,250,255", endColor:"232,242,255", angle:Math.PI * 0.5}, path:[ + {actions:[ + {action:"move", x:"w*0", y:"5"}, + {action:"quadraticCurve", x1:"0", y1:"0", x:"5", y:"0"}, + {action:"line", x:"w-5", y:"0"}, + {action:"quadraticCurve", x1:"w", y1:"0", x:"w", y:"5"}, + {action:"line", x:"w", y:"h-5"}, + {action:"quadraticCurve", x1:"w", y1:"h", x:"w-5", y:"h"}, + {action:"line", x:"5", y:"h"}, + {action:"quadraticCurve", x1:"0", y1:"h", x:"0", y:"h-5"}, + {action:"line", x:"0", y:"5"}, + {action:"close"} + ]}, + {lineStyle:{lineStyle:"solid"}, actions:{ref:"roundRectangle"}}, + {lineStyle:{lineWidth:1, lineColor:"137,188,255", lineStyle:"solid"}, fillStyle:{type:"solid", color:"255,255,255"}, actions:{ref:"method_service_task"}}, + {lineStyle:{lineWidth:0}, fillStyle:{type:"none"}, actions:{ref:"roundRectangle"}} +]}); + +Schema.addGlobalCommand("business_rule", [ + {action:"move", x:"100*0.15- 100*0.08", y:"60*0.24- 60*0.1"}, + {action:"line", x:"100*0.15 + 100*0.08", y:"60*0.24- 60*0.1"}, + {action:"line", x:"100*0.15 + 100*0.08", y:"60*0.24 + 60*0.1"}, + {action:"line", x:"100*0.15 - 100*0.08", y:"60*0.24 + 60*0.1"}, + {action:"close"}, + {action:"move", x:"100*0.15 - 100*0.08", y:"60*0.24 - 60*0.05"}, + {action:"line", x:"100*0.15 + 100*0.08", y:"60*0.24 - 60*0.05"}, + {action:"move", x:"100*0.15 - 100*0.08", y:"60*0.24 + 60*0.0"}, + {action:"line", x:"100*0.15 + 100*0.08", y:"60*0.24 + 60*0.0"}, + {action:"move", x:"100*0.15 - 100*0.08", y:"60*0.24 + 60*0.05"}, + {action:"line", x:"100*0.15 + 100*0.08", y:"60*0.24 + 60*0.05"}, + {action:"move", x:"100*0.15 - 100*0.04", y:"60*0.24 - 60*0.1"}, + {action:"line", x:"100*0.15 - 100*0.04", y:"60*0.24 + 60*0.1"} +]); + + + +Schema.addShape({name:"method_service_node4", title:"人工任务", text:"人工任务",groupName:"features3", category:"process_flowchart", props:{w:150, h:66}, lineStyle:{lineWidth:1, lineColor:"137,188,255"}, fillStyle:{type:"gradient", gradientType:"linear", beginColor:"245,250,255", endColor:"232,242,255", angle:Math.PI * 0.5}, path:[ + {actions:[ + {action:"move", x:"w*0", y:"5"}, + {action:"quadraticCurve", x1:"0", y1:"0", x:"5", y:"0"}, + {action:"line", x:"w-5", y:"0"}, + {action:"quadraticCurve", x1:"w", y1:"0", x:"w", y:"5"}, + {action:"line", x:"w", y:"h-5"}, + {action:"quadraticCurve", x1:"w", y1:"h", x:"w-5", y:"h"}, + {action:"line", x:"5", y:"h"}, + {action:"quadraticCurve", x1:"0", y1:"h", x:"0", y:"h-5"}, + {action:"line", x:"0", y:"5"}, + {action:"close"} + ]}, + +{lineStyle:{lineStyle:"solid"}, actions:{ref:"roundRectangle"}}, +{lineStyle:{lineWidth:1, lineColor:"137,188,255", lineStyle:"solid"}, fillStyle:{type:"solid"}, actions:{ref:"method_user_task"}}, +{lineStyle:{lineWidth:0}, fillStyle:{type:"none"}, actions:{ref:"roundRectangle"}} +]}); +/***Procedure*/Schema.addShape({name:"procedure", title:"流程接口", text:"流程接口", category:"process_flowchart", props:{w:150, h:66}, lineStyle:{lineWidth:1, lineColor:"197,197,197"}, fillStyle:{type:"gradient", gradientType:"linear", beginColor:"255,255,255", endColor:"237,237,237", angle:Math.PI * 0.5}, textBlock:{x:"0", y:"0", w:"w*0.8", h:"h*0.8"},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"}, path:[ + {actions:[ + {action:"move", x:"0", y:"4*0.8"}, + {action:"quadraticCurve", x1:"0", y1:"0", x:"4*0.8", y:"0"}, + {action:"line", x:"(w-4)*0.8", y:"0"}, + {action:"quadraticCurve", x1:"w*0.8", y1:"0", x:"w*0.8", y:"4*0.8"}, + {action:"line", x:"w*0.8", y:"(h-4)*0.8"}, + {action:"quadraticCurve", x1:"w*0.8", y1:"h*0.8", x:"(w-4)*0.8", y:"h*0.8"}, + {action:"line", x:"4*0.8", y:"h*0.8"}, + {action:"quadraticCurve", x1:"0", y1:"h*0.8", x:"0", y:"(h-4)*0.8"}, + {action:"line", x:"0", y:"4*0.8"}, + {action:"move", x:"w*0.8", y:"6"}, + {action:"line", x:"w", y:"h*0.5"}, + {action:"line", x:"(w-4)*0.8", y:"h"}, + {action:"line", x:"w*3/8", y:"h"}, + {action:"line", x:"w/4", y:"h*0.8"}, + {action:"line", x:"(w-4)*0.8", y:"h*0.8"}, + {action:"quadraticCurve", x1:"w*0.8", y1:"h*0.8", x:"w*0.8", y:"(h-4)*0.8"} + ]} +]}); + + + +/***菱形:Decision*/Schema.addShape({name:"decision", title:"判定", text:"判定", category:"process_flowchart", props:{w:90, h:50},fillStyle:{color:"175,210,255"}, path:[ + {actions:[ + {action:"move", x:"0", y:"h/2"}, + {action:"line", x:"w/2", y:"0"}, + {action:"line", x:"w", y:"h/2"}, + {action:"line", x:"w/2", y:"h"}, + {action:"line", x:"0", y:"h/2"}, + {action:"close"} + ]} +]}); + +/***下边波浪矩形:Document*/Schema.addShape({name:"document", title:"文档", text:"文档", category:"process_flowchart", props:{w:150, h:66}, anchors:[ + {x:"w*0.5", y:"0"}, + {x:"w", y:"h*0.5"}, + {x:"w*0.5", y:"h-Math.min(h/8,w/12)"}, + {x:"0", y:"h*0.5"} +],fillStyle:{type: "gradient",gradientType: "linear",beginColor: "255,255,255",endColor: "237,237,237",angle: Math.PI*0.5}, textBlock:{x:"0", y:"0", w:"w", h:"h*0.9"},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"}, path:[ + {lineStyle:{lineWidth:1,lineColor:"197,197,197"},actions:[ + {action:"move", x:"0", y:"h-Math.min(h/8,w/12)"}, + {action:"line", x:"0", y:"0"}, + {action:"line", x:"w", y:"0"}, + {action:"line", x:"w", y:"h-Math.min(h/8,w/12)"}, + {action:"quadraticCurve", x1:"w*0.75", y1:"h-3*Math.min(h/8,w/12)", x:"w*0.5", y:"h-Math.min(h/8,w/12)"}, + {action:"quadraticCurve", x1:"w*0.25", y1:"h+Math.min(h/8,w/12)", x:"0", y:"h-Math.min(h/8,w/12)"}, + {action:"close"} + ]} +]}); +/***平行四边形:Data*/Schema.addShape({name:"data", title:"数据", text:"数据", category:"process_flowchart", props:{w:150, h:66}, anchors:[ + {x:"w*0.5", y:"0"}, + {x:"w-Math.min(h/3,w/3)/2", y:"h*0.5"}, + {x:"w*0.5", y:"h"}, + {x:"Math.min(h/3,w/3)/2", y:"h*0.5"} +], textBlock:{x:"w*0.15", y:"0", w:"w*0.7", h:"h"},textBlockFinal:{x:"w/2-60", y:"h", w:"150", h:"66"}, path:[ + {actions:[ + {action:"move", x:"Math.min(h/3,w/3)", y:"0"}, + {action:"line", x:"w", y:"0"}, + {action:"line", x:"w-Math.min(h/3,w/3)", y:"h"}, + {action:"line", x:"0", y:"h"}, + {action:"line", x:"Math.min(h/3,w/3)", y:"0"}, + {action:"close"} + ]} +]}); + + + + + + /***两条水平线:Parallelmode*/Schema.addShape({name:"parallelMode", title:"并行模式", text:"并行模式", category:"process_flowchart", props:{w:150, h:66}, anchors:[ {x:"w*0.5", y:"0"}, {x:"w*0.5", y:"0"}, @@ -1000,3 +1511,161 @@ Schema.addShape({name:"verticalSeparator", title:"分隔符(垂直)", category:" } this.props.zindex = Model.maxZIndex + 1 }}); + + + +Schema.addShape({name:"verticalSeparatorBar", title:"水平分隔条", category:"lane", attribute:{rotatable:false, linkable:false, visible:false}, props:{w:20, h:500}, anchors:[], resizeDir:[], textBlock:{}, textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"},path:[ + {lineStyle:{lineStyle:"solid"}, actions:{ref:"rectangle"}} +]}); +Schema.addShape({name:"horizontalSeparator", title:"分隔符(水平)", category:"lane", attribute:{rotatable:false, linkable:false}, props:{w:300, h:0}, fontStyle:{orientation:"horizontal", textAlign:"left"}, textBlock:{x:0, y:5, w:20, h:"h-10"},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"}, text:"阶段", + anchors:[], resizeDir:["b"], path:[ + {fillStyle:{type:"none"}, lineStyle:{lineStyle:"solid"}, actions:[ + {action:"move", x:0, y:"h"}, + {action:"line", x:"w", y:"h"} + ]}, + {actions:[ + {action:"move", x:0, y:0}, + {action:"line", x:20, y:0}, + {action:"line", x:20, y:"h"}, + {action:"line", x:0, y:"h"}, + {action:"close"} + ]} + ], drawIcon:function (a, b) { + return[ + {fillStyle:{type:"none"}, lineStyle:{lineStyle:"solid"}, actions:[ + {action:"move", x:0, y:0}, + {action:"line", x:a, y:0} + ]} + ] + }, onCreated:function () { + var g = getPool(this, "verticalPool"); + if (g == null) { + return false + } + var j = getChild(g, "verticalSeparatorBar"); + if (j == null) { + j = Model.create("verticalSeparatorBar", g.props.x - 20, g.props.y + 40); + j.props.h = g.props.h - 40; + j.parent = g.id; + Model.add(j); + Designer.painter.renderShape(j); + g.props.x -= j.props.w; + g.props.w += j.props.w; + g.children.push(j.id); + Designer.painter.renderShape(g) + } + var a = this.props.y + this.props.h; + var h = g.props.y + 40; + var f = null; + for (var e = 0; e < g.children.length; e++) { + var d = g.children[e]; + var b = Model.getShapeById(d); + if (b.name != "horizontalSeparator") { + continue + } + var c = b.props.y + b.props.h; + if (c <= a) { + h += b.props.h + } else { + if (f == null || b.props.y < f.props.y) { + f = b + } + } + } + this.props.x = g.props.x; + this.props.w = g.props.w; + this.props.h = a - h; + this.props.y = h; + g.children.push(this.id); + this.parent = g.id; + if (a > g.props.y + g.props.h) { + this.props.h = g.props.y + g.props.h - h + } + Designer.painter.renderShape(this); + if (f != null) { + f.props.y += this.props.h; + f.props.h -= this.props.h; + Designer.painter.renderShape(f); + Model.updateMulti([g, f]) + } else { + Model.update(g) + } + this.props.zindex = Model.maxZIndex + 1 + }}); +Schema.addShape({name:"horizontalSeparatorBar", title:"垂直分隔条", category:"lane", attribute:{rotatable:false, linkable:false, visible:false}, props:{w:600, h:20}, anchors:[], resizeDir:[], textBlock:{},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"}, path:[ + {lineStyle:{lineStyle:"solid"}, actions:{ref:"rectangle"}} +]}); +Schema.addShape({name:"verticalSeparator", title:"分隔符(垂直)", category:"lane", attribute:{rotatable:false, linkable:false}, props:{w:0, h:300}, fontStyle:{textAlign:"right"}, textBlock:{x:5, y:0, w:"w-10", h:20},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"}, text:"阶段", anchors:[], resizeDir:["r"], path:[ + {fillStyle:{type:"none"}, lineStyle:{lineStyle:"solid"}, actions:[ + {action:"move", x:"w", y:0}, + {action:"line", x:"w", y:"h"} + ]}, + {actions:[ + {action:"move", x:0, y:0}, + {action:"line", x:"w", y:0}, + {action:"line", x:"w", y:20}, + {action:"line", x:0, y:20}, + {action:"close"} + ]} +], drawIcon:function (a, b) { + return[ + {fillStyle:{type:"none"}, lineStyle:{lineStyle:"solid"}, actions:[ + {action:"move", x:0, y:0}, + {action:"line", x:0, y:b} + ]} + ] +}, onCreated:function () { + var e = getPool(this, "horizontalPool"); + if (e == null) { + return false + } + var g = getChild(e, "horizontalSeparatorBar"); + if (g == null) { + g = Model.create("horizontalSeparatorBar", e.props.x + 40, e.props.y - 20); + e.props.y -= g.props.h; + e.props.h += g.props.h; + e.children.push(g.id); + Designer.painter.renderShape(e); + g.props.w = e.props.w - 40; + g.parent = e.id; + Model.add(g); + Designer.painter.renderShape(g) + } + var j = this.props.x + this.props.w; + var h = e.props.x + 40; + var d = null; + for (var c = 0; c < e.children.length; c++) { + var b = e.children[c]; + var a = Model.getShapeById(b); + if (a.name != "verticalSeparator") { + continue + } + var f = a.props.x + a.props.w; + if (f <= j) { + h += a.props.w + } else { + if (d == null || a.props.x < d.props.x) { + d = a + } + } + } + this.props.x = h; + this.props.w = j - h; + this.props.y = e.props.y; + this.props.h = e.props.h; + if (j > e.props.x + e.props.w) { + this.props.w = e.props.x + e.props.w - h + } + Designer.painter.renderShape(this); + e.children.push(this.id); + this.parent = e.id; + if (d != null) { + d.props.x += this.props.w; + d.props.w -= this.props.w; + Designer.painter.renderShape(d); + Model.updateMulti([e, d]) + } else { + Model.update(e) + } + this.props.zindex = Model.maxZIndex + 1 +}});