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