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.3KB

  1. import{_ as M}from"./index-33a0e6e3.js";import{N as $}from"./index-be0b3801.js";import{b as p,c as e,L as a,h as _,d as o,F as f,H as h,e as l,f as y,t as c,i as N,j as u,k as P}from"./index-dd5fae99.js";const q={class:"flex items-center"},z={class:"font-semibold"},G={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=P({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?b(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"},b=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"),T=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",q,[y(d,{name:"portraitIcon",class:"text-32 mr-8"}),l("p",z,c(n.nodeType==="ROOT"?"发起":"抄送"),1)]),l("div",G,[l("p",J,c(((O=n==null?void 0:n.user)==null?void 0:O.userName)||"-")+"("+c(((A=n==null?void 0:n.user)==null?void 0:A.orgName)||"-")+")",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?"并行分支":n.name),1),n.withdrawFlag==="cancel-end"?(e(),o("span",X,"被撤回")):u("",!0)]),l("a",{class:"flex items-center",onClick:r=>n.isHideChild=!n.isHideChild},[l("span",null,c(n.isHideChild?"展开":"收起"),1),n.isHideChild?(e(),a(T,{key:0},{default:_(()=>[y(V)]),_:1})):(e(),a(T,{key:1},{default:_(()=>[y(E)]),_:1}))],8,Y)]),m.isShowSline?(e(),o("p",Z)):u("",!0),(S=n.children)!=null&&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:b(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,"(被撤回)")):u("",!0),r.list.length>1?(e(),o("span",oe,c(r.approvalMode==="OR"?"(或签)":r.approvalMode==="AND"?"(会签)":""),1)):u("",!0)])]),l("div",te,[l("div",se,[(e(!0),o(f,null,h(r.list,(s,C)=>{var k,I;return e(),o("p",{key:C,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,"("+c(((I=s==null?void 0:s.user)==null?void 0:I.orgName)||"")+")",1)])}),128))]),(e(!0),o(f,null,h(r.list,(s,C)=>{var k,I,j;return e(),o("div",{key:C},[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("意见:")),l("span",null,c(s.auditInfo.text),1)])):u("",!0),s.auditInfo&&((I=s.auditInfo.attachments)!=null&&I.length)?(e(),o("div",de,[t[1]||(t[1]=l("span",null,"附件:",-1)),l("div",null,[(e(!0),o(f,null,h(s.auditInfo.attachments,(w,g)=>(e(),o("p",{key:g,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&&j.length)?(e(),o("div",ue,[t[2]||(t[2]=l("span",null,"终验意见:",-1)),l("div",null,[(e(!0),o(f,null,h(m.detail.opinions,(w,g)=>(e(),o("p",{key:g,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&&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};