43 lines
2.1 KiB
Smarty
43 lines
2.1 KiB
Smarty
Schema.addCategory({name:"control_risk", text:"风险控制图", dataAttributes:[]});
|
||
/*Risk 菱形*/
|
||
/***Schema.addShape({name:"risk", title:"风险",text:"风险", category:"control_risk", props:{w:80, h:80}, fillStyle:{type:"solid", color:"255,153,153"}, textBlock:{x:"10", y:"10", w:"w-20", h:"h-20"},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"}, path:[
|
||
{actions:[
|
||
{action:"move", x:"0", y:"h*0.5"},
|
||
{action:"line", x:"w*0.5", y:"0"},
|
||
{action:"line", x:"w", y:"h*0.5"},
|
||
{action:"line", x:"w*0.5", y:"h"},
|
||
{action:"line", x:"0", y:"h*0.5"},
|
||
{action:"close"}
|
||
]}
|
||
]});*/
|
||
|
||
/***下三角锥型:risk*/Schema.addShape({name:"risk", title:"风险", text:"风险", category:"control_risk", props:{w:70, h:60},lineStyle:{lineColor:"255,192,192"},fillStyle:{type: "gradient",gradientType: "linear",beginColor: "255,244,244",endColor: "255,229,229",angle: Math.PI*0.5}, textBlock:{x:"0", y:"0", w:"w", h:"h-Math.min(h,w)/3"},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"}, path:[
|
||
{actions:[
|
||
{action:"move", x:"0", y:"0"},
|
||
{action:"line", x:"w", y:"0"},
|
||
{action:"line", x:"w", y:"h-Math.min(h,w)/3"},
|
||
{action:"line", x:"w*0.5", y:"h"},
|
||
{action:"line", x:"0", y:"h-Math.min(h,w)/3"},
|
||
{action:"line", x:"0", y:"0"},
|
||
{action:"close"}
|
||
]}
|
||
]});
|
||
|
||
/*Control 绿色三角形*/
|
||
Schema.addShape({name:"control", title:"控制",text:"控制", category:"control_risk", props:{w:80, h:70},lineStyle:{lineColor:"128,201,144"}, fillStyle:{type: "gradient",gradientType: "linear",beginColor: "242,255,245",endColor: "224,255,231",angle: Math.PI*0.5}, textBlock:{x:"10", y:"h*0.25", w:"w-20", h:"h*0.75"},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"},
|
||
anchors:[
|
||
{x:"w/2", y:"0"},
|
||
{x:"w/2", y:"h"},
|
||
{x:"w*0.25", y:"h/2"},
|
||
{x:"w*0.75", y:"h/2"}
|
||
],path:[
|
||
{actions:[
|
||
{action:"move", x:"w/2", y:"0"},
|
||
{action:"line", x:"w", y:"h"},
|
||
{action:"line", x:"0", y:"h"},
|
||
{action:"close"}
|
||
]}
|
||
]});
|
||
|
||
|