|
- import{E as Q,al as g,b as f,c as l,d as s,H as w,e as n,n as j,f as c,N as U,t as _,F as m,L as x,h as a,i as y,j as k,u as D,k as X}from"./index-dd5fae99.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"},le={class:"flex flex-col"},ne={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=X({name:"childFlow"}),he=Object.assign(Ne,{props:{nodeData:Array},setup(d){const{filedConditionsOptions:b}=Q.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,O)=>{W(i,e,u,O)},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"),O=f("el-tag"),I=f("Plus"),S=f("el-icon"),v=f("el-button"),$=f("el-popover"),q=f("child-flow",!0);return l(!0),s(m,null,w(d.nodeData,(o,r)=>{var B;return l(),s("div",{key:r,class:"childFlow"},[o.branchs?(l(),s(m,{key:1},[n("div",ne,[o.branchs?(l(),s("p",se,[n("span",{class:"text-primary cursor-pointer bg-white text-center text-12",onClick:t=>H(o.branchs,o.type)},_(o.type==="CONDITIONS"?"添加条件":"添加分支"),9,ae)])):k("",!0),n("div",ce,[(l(!0),s(m,null,w(o.branchs,(t,T)=>{var V;return l(),s("div",{key:T,class:"model conModel mr-8"},[n("div",de,[e[8]||(e[8]=n("p",{class:"line"},null,-1)),n("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&&V.length)?(l(!0),s(m,{key:0},w(t.props.groups,(h,A)=>(l(),s("div",{key:A},[n("div",re,[(l(!0),s(m,null,w(h.conditions,(p,J)=>(l(),s("p",{key:J},[n("span",null,_(p.title)+_(D(b).find(C=>p.id===C.value).judges[p.compare])+_(D(b).find(C=>p.id===C.value).type==="bool_condition"?`${p.value.join("、")*1?"是":"否"}`:D(b).find(C=>p.id===C.value).type==="value_condition"?p.value.map(C=>D(b).find(K=>p.id===K.value).options[C]).join("、"):p.value.join("、")),1)]))),128))]),A<t.props.groups.length-1?(l(),s("p",pe," 或 ")):k("",!0)]))),128)):(l(),s("p",ue,_(t.name),1)),t.type==="CONDITION"?(l(),s("p",_e,e[3]||(e[3]=[n("a",null,"筛选数据",-1)]))):(l(),s("p",ye,e[4]||(e[4]=[n("span",{class:"text-info"},"并行任务(同时进行)",-1)])))],10,ie),(t.type!=="CONDITIONS"&&t.type,k("",!0))]),e[9]||(e[9]=n("p",{class:"spec_line"},null,-1)),t.children?(l(),x(q,{key:0,"node-data":t.children},null,8,["node-data"])):k("",!0)])}),128))]),o.branchs?(l(),s("p",Ce)):k("",!0)]),o.type!=="CONDITIONS"&&o.type!=="CONCURRENTS"?(l(),s("div",fe,[c($,{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(()=>[n("div",ke,[n("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(" 单位 ")])),_:2},1032,["onClick"])]),n("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(" 数据筛选 ")])),_:2},1032,["onClick"])]),n("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(" 并行分支 ")])),_:2},1032,["onClick"])])])]),_:2},1024)])):k("",!0)],64)):(l(),s("div",Y,[n("div",Z,[n("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"]),n("p",ee,_(o.name),1),n("div",te,[o.props&&((B=o.props.assignedOrg)!=null&&B.length)?(l(!0),s(m,{key:0},w(o.props.assignedOrg,(t,T)=>(l(),x(O,{key:T,type:"info"},{default:a(()=>[y(_(t.orgType==="TARGET_LABEL"?t.orgName:t.orgType==="TARGET_MANAGEMENT"?"主管单位":t.orgType==="TARGET_OWNER"?"发起单位":"上级条线主管单位"),1)]),_:2},1024))),128)):o.props&&o.props.orgType&&o.props.orgType!=="TARGET_LABEL"?(l(),x(O,{key:1,type:"info"},{default:a(()=>[y(_(o.props.orgType==="TARGET_MANAGEMENT"?"主管单位":o.props.orgType==="TARGET_OWNER"?"发起单位":"上级条线主管单位"),1)]),_:2},1024)):(l(),s("span",oe,"请选择审批单位"))])],10,L),o.type!=="CONDITIONS"&&o.type!="CONCURRENTS"?(l(),x($,{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(()=>[n("div",le,[n("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(" 单位 ")])),_:2},1032,["onClick"])]),n("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(" 数据筛选 ")])),_:2},1032,["onClick"])]),n("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(" 并行分支 ")])),_:2},1032,["onClick"])])])]),_:2},1024)):k("",!0)])]))])}),128)}}});export{he as default};
|