You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
5.5KB

  1. import{_ as M}from"./index.b8af1d9b.js";import{N as $}from"./index.0c2b3f6e.js";import{d as G,c as p,e,G as a,i as _,f as o,F as f,H as h,g as l,h as y,t as c,j as N,k as u}from"./index.88314652.js";const P={class:"flex items-center"},q={class:"font-semibold"},z={class:"ml-40"},J={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={key:2,class:"flex text-info mt-5"},fe={key:2,class:"bx-timeline"},_e={class:"flex overflow-x-auto mt-8 justify-between"},me=G({name:"flowRecord"}),ke=Object.assign(me,{props:{flowData:Array,isShowSline:{type:Boolean,default:!1},detail:{}},setup(m){const x=i=>{var t;return(t=i.children)!=null&&t.length?T(i.children.slice(-1)[0]):i.withdrawFlag==="cancel-end"?"timelineIcon4":i.result?i.result==="process-end"||i.nodeType==="ROOT"||i.result==="PASS"?"timelineIcon1":"timelineIcon3":"timelineIcon2"},T=i=>{if(i.approvalMode==="OR"){const t=[];return i.list.forEach(d=>{t.push(x(d))}),t.includes("timelineIcon1")?"timelineIcon1":t.includes("timelineIcon3")?"timelineIcon3":t.includes("timelineIcon4")?"timelineIcon4":"timelineIcon2"}else if(i.approvalMode==="AND"){const t=[];return i.list.forEach(d=>{t.push(x(d))}),t.includes("timelineIcon3")?"timelineIcon3":t.includes("timelineIcon2")?"timelineIcon2":t.includes("timelineIcon4")?"timelineIcon4":"timelineIcon1"}else return"timelineIcon1"};return(i,t)=>{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:_(()=>[(e(!0),o(f,null,h(m.flowData,(n,U)=>(e(),a(R,{key:U},{dot:_(()=>[n.nodeType==="CC"?(e(),a(d,{key:0,name:"timelineIcon1"})):(e(),a(d,{key:1,name:x(n)},null,8,["name"]))]),default:_(()=>{var O,A,H,S,F;return[l("div",null,[n.nodeType==="ROOT"||n.nodeType==="CC"?(e(),o(f,{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",J,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(f,{key:1},[l("div",Q,[l("p",W,[N(c((H=n.parallelChildren)!=null&&H.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:_(()=>[y(V)]),_:1})):(e(),a(b,{key:1},{default:_(()=>[y(E)]),_:1}))],8,Y)]),m.isShowSline?(e(),o("p",Z)):u("",!0),((S=n.children)==null?void 0:S.length)&&!n.isHideChild?(e(),a(B,{key:1,class:"pt-26 childTimeLine"},{default:_(()=>[(e(!0),o(f,null,h(n.children,(r,v)=>(e(),a(R,{key:v},{dot:_(()=>[r.nodeType==="CC"?(e(),a(d,{key:0,name:"timelineIcon1"})):(e(),a(d,{key:1,name:T(r)},null,8,["name"]))]),default:_(()=>[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(f,null,h(r.list,(s,g)=>{var k,I;return e(),o("p",{key:g,class:"flex items-center mr-4"},[s.nodeType!=="CC"?(e(),a(d,{key:0,name:x(s),class:"mr-4"},null,8,["name"])):u("",!0),l("span",null,c(((k=s==null?void 0:s.user)==null?void 0:k.userName)||""),1),l("span",ie,"\uFF08"+c(((I=s==null?void 0:s.user)==null?void 0:I.orgName)||"")+"\uFF09",1)])}),128))]),(e(!0),o(f,null,h(r.list,(s,g)=>{var k,I,j;return e(),o("div",{key:g},[s.auditInfo?(e(),o("div",ae,[l("div",ce,[l("p",null,c(((k=s==null?void 0:s.user)==null?void 0:k.userName)||""),1),l("p",null,c(s.finishTime),1)]),s.auditInfo?(e(),o("p",re,[t[0]||(t[0]=N("\u610F\u89C1\uFF1A")),l("span",null,c(s.auditInfo.text),1)])):u("",!0),s.auditInfo&&((I=s.auditInfo.attachments)==null?void 0:I.length)?(e(),o("div",de,[t[1]||(t[1]=l("span",null,"\u9644\u4EF6\uFF1A",-1)),l("div",null,[(e(!0),o(f,null,h(s.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",ue,[t[2]||(t[2]=l("span",null,"\u7EC8\u9A8C\u610F\u89C1\uFF1A",-1)),l("div",null,[(e(!0),o(f,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",fe,[l("div",_e,[t[3]||(t[3]=l("p",{class:"top-line"},null,-1)),(e(!0),o(f,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{ke as default};