From 0d919bbc4b4245c1ebea0385d62b4cdf8f256947 Mon Sep 17 00:00:00 2001 From: lihongyu <504404568@qq.com> Date: Tue, 20 Sep 2022 18:12:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E5=BA=A6=E6=A8=A1=E5=9E=8B=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=93=8D=E4=BD=9C=E6=8C=87=E5=AF=BC=E5=BD=A2=E7=8A=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../method/control.policy/diagram.schema.tpl | 141 +++++++++++------- 1 file changed, 88 insertions(+), 53 deletions(-) diff --git a/com.actionsoft.apps.coe.pal/method/control.policy/diagram.schema.tpl b/com.actionsoft.apps.coe.pal/method/control.policy/diagram.schema.tpl index ba2ecb47..601f8766 100644 --- a/com.actionsoft.apps.coe.pal/method/control.policy/diagram.schema.tpl +++ b/com.actionsoft.apps.coe.pal/method/control.policy/diagram.schema.tpl @@ -1,68 +1,103 @@ /** - * Data shapes + * Policy */ Schema.addCategory({ - name: "data_form", - text: "表单图", + name: "control_policy", + text: "制度图", dataAttributes: [] }); -/* Form*/ -Schema.addShape({name:"form", title:"表单",text:"表单", category:"data_form", props:{w:100, h:70}, - anchors:[ - {x:"w*0.5", y:"0"}, - {x:"w", y:"h*0.5"}, - {x:"w*0.5", y:"h-Math.min(Math.min(w,h)/8,w/12)"}, - {x:"0", y:"h*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:[ - {actions:[ - {action:"move", x:"0", y:"h-Math.min(Math.min(w,h)/8,w/12)"}, - {action:"line", x:"0", y:"0"}, - {action:"line", x:"w", y:"0"}, - {action:"line", x:"w", y:"h-Math.min(Math.min(w,h)/8,w/12)"}, - {action:"quadraticCurve", x1:"w*0.75", y1:"h-3*Math.min(Math.min(w,h)/8,w/12)", x:"w*0.5", y:"h-Math.min(Math.min(w,h)/8,w/12)"}, - {action:"quadraticCurve", x1:"w*0.25", y1:"h+Math.min(Math.min(w,h)/8,w/12)", x:"0", y:"h-Math.min(Math.min(w,h)/8,w/12)"}, - {action:"close"} - ]} +/* Regulation*/ +Schema.addShape({name:"regulation", title:"制度",text:"制度", category:"control_policy",lineStyle:{lineWidth: 1}, 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"} +], textBlock:{x:"0", y:"0", w:"w", h:"h*0.9"},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"}, path:[ + {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"} + ]}, + {actions:[ + {action:"move",x:"w", y:"h*0.4"}, + {action:"line",x:"w*0.76",y:"h-2*Math.min(h/8,w/12)"} + ]}, + {lineStyle:{lineStyle:"none"}, fillStyle:{type:"none"}, 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"} + ]} ]}); -/*Forms*/ -Schema.addShape({name:"forms", title:"多个表单", text:"多个表单", category:"data_form", props:{w:100, h:70}, textBlock:{x:"0", y:"h*0.2", w:"w*0.8", h:"h*0.8"},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"}, - anchors:[ - {x:"w*0.5", y:"h-h/8"}, - {x:"0", y:"h*0.5"}, - {x:"w*0.5", y:"0"}, - {x:"w", y:"h*0.5"} - ], path:[{actions:[ - {action:"move", x:"0", y:"h*0.2"}, - {action:"line", x:"w*0.1", y:"h*0.2"}, - {action:"line", x:"w*0.1", y:"h*0.1"}, - {action:"line", x:"w*0.2", y:"h*0.1"}, - {action:"line", x:"w*0.2", y:"0"}, +Schema.addShape({name:"I/O_L4", title:"操作指导",text:"操作指导", category:"control_policy",lineStyle:{lineWidth: 1}, 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"} +], textBlock:{x:"0", y:"0", w:"w", h:"h*0.9"},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"}, path:[ + {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*0.7"}, - {action:"line", x:"w*0.9", y:"h*0.7"}, - {action:"line", x:"w*0.9", y:"h*0.8"}, - {action:"line", x:"w*0.8", y:"h*0.8"}, - {action:"line", x:"w*0.8", y:"h*0.9"}, - {action:"quadraticCurve", x1:"w*0.75*0.8", y1:"h*0.8", x:"w*0.8*0.5", y:"h*0.9"}, - {action:"quadraticCurve", x1:"w*0.25*0.8", y1:"h", x:"0", y:"h*0.9"}, - {action:"line", x:"0", y:"h*0.2"}, - {action:"move", x:"0", y:"h*0.2"}, - {action:"line", x:"w*0.8", y:"h*0.2"}, - {action:"line", x:"w*0.8", y:"h*0.9"}, - {action:"quadraticCurve", x1:"w*0.75*0.8", y1:"h*0.8", x:"w*0.8*0.5", y:"h*0.9"}, - {action:"quadraticCurve", x1:"w*0.25*0.8", y1:"h", x:"0", y:"h*0.9"}, - {action:"line", x:"0", y:"h*0.2"}, - {action:"move", x:"w*0.1", y:"h*0.2"}, - {action:"line", x:"w*0.1", y:"h*0.1"}, - {action:"line", x:"w*0.9", y:"h*0.1"}, - {action:"line", x:"w*0.9", y:"h*0.8"}, - {action:"line", x:"w*0.8", y:"h*0.8"}, - {action:"line", x:"w*0.8", y:"h*0.2"} + {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"} + ]}, + {lineStyle:{lineStyle:"none"}, fillStyle:{type:"none"}, 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:"move", x:"Math.min(w/6,20)", y:"0"}, + {action:"line", x:"Math.min(w/6,20)", y:"h"}, + {action:"move", x:"0", y:"Math.min(h/5,20)"}, + {action:"line", x:"w", y:"Math.min(h/5,20)"}, + {action:"close"} ]} ]}); +/*Item*/ +Schema.addShape({name:"item1", title:"段落正文",text:"段落正文", category:"control_policy", lineStyle:{lineWidth: 1}, +props:{w:220, h:50}, textBlock:{x:"w*0.1", y:"2", w:"(w-Math.min(h/2,w/6))*0.8", h:"h-2"},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"}, anchors:[ + {x:"w*0.5", y:"0"}, + {x:"w-Math.min(h/2,w/6)", y:"h*0.5"}, + {x:"w*0.5", y:"h"}, + {x:"0", y:"h*0.5"} +],path:[ + {actions:[ + {action:"move", x:"0", y:"0"}, + {action:"line", x:"w", y:"0"}, + {action:"line", x:"w-Math.min(h/2,w/6)", y:"h*0.5"}, + {action:"line", x:"w", y:"h"}, + {action:"line", x:"0", y:"h"}, + {action:"line", x:"0", y:"0"}, + {action:"close"} + ]} +]}); +/***胶囊型:Terminator*/Schema.addShape({name:"item2", title:"条款", text:"条款", category:"control_policy",lineStyle:{lineWidth: 1}, + props:{w:220, h:50},textBlock:{x:"Math.min(w,h)/3", y:"2", w:"w-(Math.min(w,h)/3)*2", h:"h-2"}, path:[ + {actions:[ + {action:"move", x:"Math.min(w,h)/3+5", y:"0"}, + {action:"line", x:"w-Math.min(w,h)/3-5", 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-5", y:"h"}, + {action:"line", x:"Math.min(w,h)/3+5", 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+5", y:"0"}, + {action:"close"} + ]} + +]});