|
1 |
- import{_ as M}from"./index.bc2bb157.js";import{N as $}from"./index.dadf798f.js";import{d as J,c as p,e,I as a,i as f,f as o,F as _,J as h,g as l,h as y,t as c,j as N,k as u}from"./index.63921713.js";const P={class:"flex items-center"},q={class:"font-semibold"},z={class:"ml-40"},G={class:"mb-8"},K={class:"text-info"},Q={class:"flex items-center"},W={class:"font-semibold mr-8"},X={key:0},Y=["onClick"],Z={key:0,class:"sline"},ee={class:"flex items-center"},ne={class:"font-semibold"},le={key:0,class:"text-info"},oe={key:1,class:"text-info"},te={class:"ml-40"},se={class:"flex w-full"},ie={class:"text-info"},ae={key:0,class:"bg-gray-100 p-8 mt-8"},ce={class:"flex justify-between text-info"},re={key:0,class:"text-info",style:{"word-break":"break-all"}},de={key:1,class:"flex text-info mt-5"},ue=l("span",null,"\u9644\u4EF6\uFF1A",-1),_e={key:2,class:"flex text-info mt-5"},fe=l("span",null,"\u7EC8\u9A8C\u610F\u89C1\uFF1A",-1),me={key:2,class:"bx-timeline"},pe={class:"flex overflow-x-auto mt-8 justify-between"},he=l("p",{class:"top-line"},null,-1),ye=J({name:"flowRecord"}),xe=Object.assign(ye,{props:{flowData:Array,isShowSline:{type:Boolean,default:!1},detail:{}},setup(m){const x=s=>{var i;return(i=s.children)!=null&&i.length?T(s.children.slice(-1)[0]):s.withdrawFlag==="cancel-end"?"timelineIcon4":s.result?s.result==="process-end"||s.nodeType==="ROOT"||s.result==="PASS"?"timelineIcon1":"timelineIcon3":"timelineIcon2"},T=s=>{if(s.approvalMode==="OR"){const i=[];return s.list.forEach(d=>{i.push(x(d))}),i.includes("timelineIcon1")?"timelineIcon1":i.includes("timelineIcon3")?"timelineIcon3":i.includes("timelineIcon4")?"timelineIcon4":"timelineIcon2"}else if(s.approvalMode==="AND"){const i=[];return s.list.forEach(d=>{i.push(x(d))}),i.includes("timelineIcon3")?"timelineIcon3":i.includes("timelineIcon2")?"timelineIcon2":i.includes("timelineIcon4")?"timelineIcon4":"timelineIcon1"}else return"timelineIcon1"};return(s,i)=>{var D;const d=p("svg-icon"),V=p("ArrowDownBold"),b=p("el-icon"),E=p("ArrowUpBold"),R=p("el-timeline-item"),B=p("el-timeline"),L=p("flow-record",!0);return(D=m.flowData)!=null&&D.length?(e(),a(B,{key:0,class:"flowRecord"},{default:f(()=>[(e(!0),o(_,null,h(m.flowData,(n,U)=>(e(),a(R,{key:U},{dot:f(()=>[n.nodeType==="CC"?(e(),a(d,{key:0,name:"timelineIcon1"})):(e(),a(d,{key:1,name:x(n)},null,8,["name"]))]),default:f(()=>{var O,A,S,H,F;return[l("div",null,[n.nodeType==="ROOT"||n.nodeType==="CC"?(e(),o(_,{key:0},[l("div",P,[y(d,{name:"portraitIcon",class:"text-32 mr-8"}),l("p",q,c(n.nodeType==="ROOT"?"\u53D1\u8D77":"\u6284\u9001"),1)]),l("div",z,[l("p",G,c(((O=n==null?void 0:n.user)==null?void 0:O.userName)||"-")+"\uFF08"+c(((A=n==null?void 0:n.user)==null?void 0:A.orgName)||"-")+"\uFF09",1),l("p",K,c(n&&n.finishTime),1)])],64)):(e(),o(_,{key:1},[l("div",Q,[l("p",W,[N(c((S=n.parallelChildren)!=null&&S.length?"\u5E76\u884C\u5206\u652F":n.name),1),n.withdrawFlag==="cancel-end"?(e(),o("span",X,"\u88AB\u64A4\u56DE")):u("",!0)]),l("a",{class:"flex items-center",onClick:r=>n.isHideChild=!n.isHideChild},[l("span",null,c(n.isHideChild?"\u5C55\u5F00":"\u6536\u8D77"),1),n.isHideChild?(e(),a(b,{key:0},{default:f(()=>[y(V)]),_:1})):(e(),a(b,{key:1},{default:f(()=>[y(E)]),_:1}))],8,Y)]),m.isShowSline?(e(),o("p",Z)):u("",!0),((H=n.children)==null?void 0:H.length)&&!n.isHideChild?(e(),a(B,{key:1,class:"pt-26 childTimeLine"},{default:f(()=>[(e(!0),o(_,null,h(n.children,(r,v)=>(e(),a(R,{key:v},{dot:f(()=>[r.nodeType==="CC"?(e(),a(d,{key:0,name:"timelineIcon1"})):(e(),a(d,{key:1,name:T(r)},null,8,["name"]))]),default:f(()=>[l("div",ee,[y(d,{name:"portraitIcon",class:"text-32 mr-8"}),l("p",ne,[N(c(r.name)+" ",1),r.withdrawFlag==="cancel-end"?(e(),o("span",le,"\uFF08\u88AB\u64A4\u56DE\uFF09")):u("",!0),r.list.length>1?(e(),o("span",oe,c(r.approvalMode==="OR"?"\uFF08\u6216\u7B7E\uFF09":r.approvalMode==="AND"?"\uFF08\u4F1A\u7B7E\uFF09":""),1)):u("",!0)])]),l("div",te,[l("div",se,[(e(!0),o(_,null,h(r.list,(t,g)=>{var k,I;return e(),o("p",{key:g,class:"flex items-center mr-4"},[t.nodeType!=="CC"?(e(),a(d,{key:0,name:x(t),class:"mr-4"},null,8,["name"])):u("",!0),l("span",null,c(((k=t==null?void 0:t.user)==null?void 0:k.userName)||""),1),l("span",ie,"\uFF08"+c(((I=t==null?void 0:t.user)==null?void 0:I.orgName)||"")+"\uFF09",1)])}),128))]),(e(!0),o(_,null,h(r.list,(t,g)=>{var k,I,j;return e(),o("div",{key:g},[t.auditInfo?(e(),o("div",ae,[l("div",ce,[l("p",null,c(((k=t==null?void 0:t.user)==null?void 0:k.userName)||""),1),l("p",null,c(t.finishTime),1)]),t.auditInfo?(e(),o("p",re,[N("\u610F\u89C1\uFF1A"),l("span",null,c(t.auditInfo.text),1)])):u("",!0),t.auditInfo&&((I=t.auditInfo.attachments)==null?void 0:I.length)?(e(),o("div",de,[ue,l("div",null,[(e(!0),o(_,null,h(t.auditInfo.attachments,(w,C)=>(e(),o("p",{key:C,class:"mb-4"},[y(M,{"file-name":w.fileName,"file-id":w.fileId},null,8,["file-name","file-id"])]))),128))])])):u("",!0),m.detail&&m.detail.opinions&&((j=m.detail.opinions)==null?void 0:j.length)?(e(),o("div",_e,[fe,l("div",null,[(e(!0),o(_,null,h(m.detail.opinions,(w,C)=>(e(),o("p",{key:C,class:"mb-4"},[y(M,{"file-name":w.fileName,"file-id":w.fileId},null,8,["file-name","file-id"])]))),128))])])):u("",!0)])):u("",!0)])}),128))])]),_:2},1024))),128))]),_:2},1024)):((F=n.parallelChildren)==null?void 0:F.length)&&!n.isHideChild?(e(),o("div",me,[l("div",pe,[he,(e(!0),o(_,null,h(n.parallelChildren,(r,v)=>(e(),a(L,{key:v,"flow-data":[r],class:"pt-20 timeline","is-show-sline":!0},null,8,["flow-data"]))),128))])])):u("",!0)],64))])]}),_:2},1024))),128))]),_:1})):(e(),a($,{key:1}))}}});export{xe as default};
|