No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

2 líneas
5.6KB

  1. import{d as Q,D as X,ak as g,c as C,e as o,f as l,J as w,g as n,n as j,h as c,V as U,t as u,F as m,I as D,i as s,j as h,k as f,u as x}from"./index.d340e473.js";const Y={key:0},Z={class:"node flex flex-col justify-center items-center"},L=["onClick"],ee={class:"tit"},te={class:"content"},oe={key:2,class:"text-info"},ne={class:"flex flex-col"},le={class:"conNode"},se={key:0,class:"topLine"},ce=["onClick"],ae={class:"conOut flex justify-between"},de={class:"node flex flex-col justify-center items-center"},ie=n("p",{class:"line"},null,-1),re=["onClick"],_e={class:"tit"},pe={key:0},ue={key:1},he={key:2,class:"content"},ye=n("a",null,"\u7B5B\u9009\u6570\u636E",-1),Ce=[ye],fe={key:3,class:"content"},ke=n("span",{class:"text-info"},"\u5E76\u884C\u4EFB\u52A1\uFF08\u540C\u65F6\u8FDB\u884C\uFF09",-1),Ne=[ke];const ve=n("p",{class:"spec_line"},null,-1),ge={key:1,class:"bot_line"},me={key:0,class:"flex justify-center items-center"},Te={class:"flex flex-col"},we=Q({name:"childFlow"}),be=Object.assign(we,{props:{nodeData:Array},setup(d){const{filedConditionsOptions:O}=X.dictStore.globalDicts||{},G=g("showApprovalDialog"),M=g("showConditionDialog"),F=g("showConcurrentDialog"),P=g("addNode"),W=g("removeNode"),z=g("addCondition"),k=i=>{P(i)},E=(i,a,p,b)=>{W(i,a,p,b)},J=(i,a)=>{z(i,a)},I=({key:i,type:a,item:p})=>{a==="SUB"&&G({key:i,type:a,item:p}),a==="CONDITION"&&M({key:i,type:a,item:p}),a==="CONCURRENT"&&F({key:i,type:a,item:p})};return(i,a)=>{const p=C("svg-icon"),b=C("el-tag"),R=C("Plus"),S=C("el-icon"),N=C("el-button"),V=C("el-popover"),q=C("child-flow",!0);return o(!0),l(m,null,w(d.nodeData,(t,r)=>{var $;return o(),l("div",{key:r,class:"childFlow"},[t.branchs?(o(),l(m,{key:1},[n("div",le,[t.branchs?(o(),l("p",se,[n("span",{class:"text-primary cursor-pointer bg-white text-center text-12",onClick:e=>J(t.branchs,t.type)},u(t.type==="CONDITIONS"?"\u6DFB\u52A0\u6761\u4EF6":"\u6DFB\u52A0\u5206\u652F"),9,ce)])):f("",!0),n("div",ae,[(o(!0),l(m,null,w(t.branchs,(e,T)=>{var B;return o(),l("div",{key:T,class:"model conModel mr-8"},[n("div",de,[ie,n("div",{class:j(`box box_${e.type} px-24 py-16 bg-white rounded-4`),onClick:v=>I({key:T,type:e.type,item:e})},[c(p,{name:"delIcon","svg-class":"delIcon",onClick:U(v=>E(T,t,r,d.nodeData),["stop"])},null,8,["onClick"]),e.props&&((B=e.props.groups)==null?void 0:B.length)?(o(!0),l(m,{key:0},w(e.props.groups,(v,A)=>(o(),l("div",{key:A},[n("div",_e,[(o(!0),l(m,null,w(v.conditions,(_,H)=>(o(),l("p",{key:H},[n("span",null,u(_.title)+u(x(O).find(y=>_.id===y.value).judges[_.compare])+u(x(O).find(y=>_.id===y.value).type==="bool_condition"?`${_.value.join("\u3001")*1?"\u662F":"\u5426"}`:x(O).find(y=>_.id===y.value).type==="value_condition"?_.value.map(y=>x(O).find(K=>_.id===K.value).options[y]).join("\u3001"):_.value.join("\u3001")),1)]))),128))]),A<e.props.groups.length-1?(o(),l("p",pe," \u6216 ")):f("",!0)]))),128)):(o(),l("p",ue,u(e.name),1)),e.type==="CONDITION"?(o(),l("p",he,Ce)):(o(),l("p",fe,Ne))],10,re),(e.type!=="CONDITIONS"&&e.type,f("",!0))]),ve,e.children?(o(),D(q,{key:0,"node-data":e.children},null,8,["node-data"])):f("",!0)])}),128))]),t.branchs?(o(),l("p",ge)):f("",!0)]),t.type!=="CONDITIONS"&&t.type!=="CONCURRENTS"?(o(),l("div",me,[c(V,{placement:"right",width:100,trigger:"hover"},{reference:s(()=>[c(S,{class:"add_icon mt-20 mb-20 cursor-pointer"},{default:s(()=>[c(R)]),_:1})]),default:s(()=>[n("div",Te,[n("p",null,[c(N,{class:"mb-8 w-full",onClick:e=>k({key:r,type:"SUB",item:d.nodeData})},{default:s(()=>[h(" \u5355\u4F4D ")]),_:2},1032,["onClick"])]),n("p",null,[c(N,{class:"ml-1 w-full mb-8",onClick:e=>k({key:r,type:"CONDITIONS",item:d.nodeData})},{default:s(()=>[h(" \u6570\u636E\u7B5B\u9009 ")]),_:2},1032,["onClick"])]),n("p",null,[c(N,{class:"ml-1 w-full",onClick:e=>k({key:r,type:"CONCURRENTS",item:d.nodeData})},{default:s(()=>[h(" \u5E76\u884C\u5206\u652F ")]),_:2},1032,["onClick"])])])]),_:2},1024)])):f("",!0)],64)):(o(),l("div",Y,[n("div",Z,[n("div",{class:j(`box box_${t.type} px-24 py-16 bg-white rounded-4`),onClick:e=>I({key:r,type:t.type,item:d.nodeData})},[c(p,{name:"delIcon","svg-class":"delIcon",onClick:U(e=>E(r,d.nodeData),["stop"])},null,8,["onClick"]),n("p",ee,u(t.name),1),n("div",te,[t.props&&(($=t.props.assignedOrg)==null?void 0:$.length)?(o(!0),l(m,{key:0},w(t.props.assignedOrg,(e,T)=>(o(),D(b,{key:T,type:"info"},{default:s(()=>[h(u(e.orgType==="TARGET_LABEL"?e.orgName:e.orgType==="TARGET_MANAGEMENT"?"\u4E3B\u7BA1\u5355\u4F4D":e.orgType==="TARGET_OWNER"?"\u53D1\u8D77\u5355\u4F4D":"\u4E0A\u7EA7\u6761\u7EBF\u4E3B\u7BA1\u5355\u4F4D"),1)]),_:2},1024))),128)):t.props&&t.props.orgType&&t.props.orgType!=="TARGET_LABEL"?(o(),D(b,{key:1,type:"info"},{default:s(()=>[h(u(t.props.orgType==="TARGET_MANAGEMENT"?"\u4E3B\u7BA1\u5355\u4F4D":t.props.orgType==="TARGET_OWNER"?"\u53D1\u8D77\u5355\u4F4D":"\u4E0A\u7EA7\u6761\u7EBF\u4E3B\u7BA1\u5355\u4F4D"),1)]),_:2},1024)):(o(),l("span",oe,"\u8BF7\u9009\u62E9\u5BA1\u6279\u5355\u4F4D"))])],10,L),t.type!=="CONDITIONS"&&t.type!="CONCURRENTS"?(o(),D(V,{key:0,placement:"right",width:100,trigger:"hover"},{reference:s(()=>[c(S,{class:"add_icon mt-20 mb-20 cursor-pointer"},{default:s(()=>[c(R)]),_:1})]),default:s(()=>[n("div",ne,[n("p",null,[c(N,{class:"mb-8 w-full",onClick:e=>k({key:r,type:"SUB",item:d.nodeData})},{default:s(()=>[h(" \u5355\u4F4D ")]),_:2},1032,["onClick"])]),n("p",null,[c(N,{class:"ml-1 w-full mb-8",onClick:e=>k({key:r,type:"CONDITIONS",item:d.nodeData})},{default:s(()=>[h(" \u6570\u636E\u7B5B\u9009 ")]),_:2},1032,["onClick"])]),n("p",null,[c(N,{class:"ml-1 w-full",onClick:e=>k({key:r,type:"CONCURRENTS",item:d.nodeData})},{default:s(()=>[h(" \u5E76\u884C\u5206\u652F ")]),_:2},1032,["onClick"])])])]),_:2},1024)):f("",!0)])]))])}),128)}}});export{be as default};