import{_ as B,d as V,C as G,r as _,f as d,a9 as J,g as n,h as l,w as F,K as C,m as r,p as I,l as h,G as N,L as A,i as v,n as $,t as k,j as c}from"./index.32929554.js";import b from"./sjFlowRecord.cce13c3b.js";const q={class:"mt-6"},K={key:0},z={key:0},U=["onClick"];const H=V({name:"projectProgress"}),Q=Object.assign(H,{props:{detailData:Object,stepData:{type:Array,default:void 0},progressLoading:{type:Boolean,default:!1}},emits:["showFlowRecordDialog"],setup(a,{emit:O}){const e=a,E=G(),L=_([{title:"\u9879\u76EE\u7533\u62A5",stage:1e4,instName:"\u9879\u76EE\u7533\u62A5",status:[1e4]},{title:"\u5355\u4F4D\u5185\u90E8\u5BA1\u6838",stage:1e4,finishLinkText:"\u67E5\u770B\u5BA1\u6838\u8BB0\u5F55",instName:"\u5355\u4F4D\u5185\u90E8\u5BA1\u6279\u6D41\u7A0B",status:[10001,10002]},{title:"\u9879\u76EE\u9884\u5BA1",stage:1e4,finishLinkText:"\u67E5\u770B\u5BA1\u6838\u8BB0\u5F55",instName:"\u9879\u76EE\u9884\u5BA1\u5BA1\u6279\u6D41\u7A0B",status:[10003,10006,10007]},{title:"\u90E8\u95E8\u8054\u5BA1",stage:1e4,finishLinkText:"\u67E5\u770B\u5BA1\u6838\u8BB0\u5F55",instName:"\u90E8\u95E8\u8054\u5408\u5BA1\u6279\u6D41\u7A0B",status:[10004,10005,10008,10009]},{title:"\u5E74\u5EA6\u8BA1\u5212",stage:1e4,status:[10010,10011]},{title:"\u5EFA\u8BBE\u65B9\u6848\u8BC4\u5BA1",stage:1e4,finishLinkText:"\u67E5\u770B\u5BA1\u6838\u8BB0\u5F55",instName:"\u5EFA\u8BBE\u65B9\u6848\u8BC4\u5BA1\u6D41\u7A0B",status:[10012,10013,10016]},{title:"\u7ACB\u9879\u6279\u590D",stage:1e4,status:[10014]},{title:"\u62DB\u6807\u91C7\u8D2D",stage:2e4,status:[20001]},{title:"\u9879\u76EE\u521D\u9A8C",stage:2e4,status:[20002]},{title:"\u9879\u76EE\u7EC8\u9A8C",stage:2e4,status:[20003,20004,20005]},{title:"\u5F52\u6863",stage:3e4,status:[3e4,30001]}]),p={NOT_START:"wait",ON_GOING:"process",REJECTED:"error",COMPLETED:"success"},P=O,m=()=>{var o;if(e.stepData&&e.stepData.find(s=>s.stepStatus!=="COMPLETED"))return e.stepData.findIndex(s=>s.stepStatus!=="COMPLETED");if((o=e.stepData)!=null&&o.length)return e.stepData.length-1},w=()=>{var o,s,u;if(e.stepData&&e.stepData.find(i=>i.stepStatus!=="COMPLETED"))return p[e.stepData.find(i=>i.stepStatus!=="COMPLETED").stepStatus];if((o=e.stepData)!=null&&o.length)return p[(u=e.stepData[((s=e==null?void 0:e.stepData)==null?void 0:s.length)-1])==null?void 0:u.stepStatus]},j=()=>{e.detailData.status===20005?E.push({name:"declarationFinal",query:{id:e.detailData.id}}):E.push({name:"declarePage",query:{id:e.detailData.id}})},g=_(!1),f=_(),W=o=>{g.value=!0,f.value=JSON.parse(o),console.log(f.value)};return(o,s)=>{const u=d("el-step"),i=d("el-steps"),x=d("el-card"),y=d("el-dialog"),R=J("loading");return n(),l(N,null,[F((n(),C(x,{shadow:"never"},{header:r(()=>[I("\u5F53\u524D\u8FDB\u5EA6")]),default:r(()=>[h(i,{active:m(),"finish-status":"success","process-status":w()},{default:r(()=>[(n(!0),l(N,null,A(a.stepData,(t,M)=>(n(),C(u,{key:M,title:t.processName},{description:r(()=>{var S;return[v("div",{class:$(`${t.stepStatus==="COMPLETED"?"text-success":t.stepStatus==="ON_GOING"?"text-warning":t.stepStatus==="REJECTED"?"text-danger":""}`)},[v("p",q,k(t.stepStatus==="COMPLETED"?"\u5DF2\u5B8C\u6210":t.stepStatus==="NOT_START"?"\u672A\u5F00\u59CB":t.stepStatus==="ON_GOING"?"\u8FDB\u884C\u4E2D":t.stepStatus==="REJECTED"&&a.detailData.status!==10011?"\u88AB\u9A73\u56DE":t.stepStatus==="REJECTED"&&a.detailData.status===10011?"\u88AB\u6682\u7F13":""),1),t.finishTime?(n(),l("p",K,k(t.finishTime),1)):c("v-if",!0)],2),t.processProgressVo||t.content?(n(),l("p",z,[t.processProgressVo||t.content?(n(),l("a",{key:0,onClick:D=>{var T;return P("showFlowRecordDialog",(T=t==null?void 0:t.processProgressVo)==null?void 0:T.progressInfo,t==null?void 0:t.content)}},"\u67E5\u770B\u5BA1\u6838\u8BB0\u5F55",8,U)):c("v-if",!0)])):c("v-if",!0),c("v-if",!0),v("p",null,[((S=L.value.find(D=>D.status.includes(a.detailData.status)))==null?void 0:S.title)===t.processName&&p[t.stepStatus]==="error"&&a.detailData.status!==10009&&a.detailData.status!=10011?(n(),l("a",{key:0,class:"ml-0",onClick:j},"\u91CD\u65B0\u7533\u62A5")):c("v-if",!0)])]}),_:2},1032,["title"]))),128))]),_:1},8,["active","process-status"])]),_:1})),[[R,a.progressLoading]]),h(y,{"model-value":g.value,title:"\u7701\u7EA7\u8054\u5BA1\u610F\u89C1",width:"70%","destroy-on-close":"",onCloss:s[0]||(s[0]=t=>g.value=!1)},{default:r(()=>[h(b,{"flow-data":f.value},null,8,["flow-data"])]),_:1},8,["model-value"])],64)}}}),Z=B(Q,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/projectStoreManage/projectStore/projectDetail/components/projectProgress.vue"]]);export{Z as default};
