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