import{q as e,r as s,a2 as a,s as t,ad as r,d as i,a as o,b as n,h as c,k as d,F as l,i as p,c as u,L as g,t as v,w as h,l as k,_}from"./index-d052b22f-1780912037814v=1.0.0.js";const m=s=>e.post("/organUnit/review/add",s,{headers:{noLoading:!0}}),w=s=>e.post("/organUnit/review/review",s,{headers:{noLoading:!0}}),L=s=>e.post("/project/project/reviewList",s,{headers:{noLoading:!0}}),y=s=>e.post("/organUnit/review/record",s,{headers:{noLoading:!0}}),b=s=>e.post("/project/project/reviewData",s,{headers:{noLoading:!0}}),f=s=>e.post("/project/project/reviewListPerformance",s,{headers:{noLoading:!0}}),j=s=>e.post("/project/project/reviewDataPerformance",s,{headers:{noLoading:!0}}),P=e=>{const i=s(!1),o=s([]),n=s(!1),c=a().userInfo,d=s(""),l=t((()=>(e,s)=>{let a=!1,t=s.status;switch(e){case"edit":(1==t||4==t||3==t||5==t)&&(a=!0);break;case"checkProgress":1!=t&&(a=!0);break;case"submit":1==t&&(a=!0);break;case"del":2!==t&&7!==t&&(a=!0)}return a})),p=t((()=>(e,s)=>{let a=!1,t=s.status;switch(e){case"edit":case"del":2!==t&&7!==t&&(a=!0);break;case"checkProgress":1!=t&&(a=!0);break;case"check":(2==t||8==t)&&(a=!0);break;case"performcheck":if(!(c.organ_unit_id===s.reviewer_id))return!1;let e=s.performance_review_status;(2==e||8==e)&&(a=!0)}return a}));return{progressVisible:i,progressList:o,getSubmitDisabled:l,getCheckDisabled:p,auditVisible:n,reviewId:d,handleCheck:async(s,a)=>{let t={resource_code:e,resource_id:s},i=await y(t);o.value=i.data,d.value=a,await r(),n.value=!0},handleCheckProgress:async s=>{let a={resource_code:e,resource_id:s},t=await y(a);o.value=t.data,await r(),i.value=!0}}},C={key:0,class:"progress-container"},x={class:"timeline-container"},D={class:"time-left"},F={class:"time-center"},I={key:1,class:"round"},U={class:"time-right"},A=i({name:"AuditProgress"}),S=_(i({...A,props:{progressList:{default:()=>[]}},setup(e){const s=e,a=e=>e.organ_unit_name.length+e.des.length>50,t=(e,s)=>0!=s||-1==[3,4,5].indexOf(e.status);return(e,r)=>{const i=o("SuccessFilled"),_=o("CircleCloseFilled"),m=o("el-icon"),w=o("el-tooltip"),L=o("el-empty");return s.progressList.length?(n(),c("div",C,[d("div",x,[d("div",D,[(n(!0),c(l,null,p(e.progressList,((e,s)=>(n(),c("span",{key:s,class:g(["4"==e.status?"danger":"primary"])},v(e.status_str),3)))),128))]),d("div",F,[(n(!0),c(l,null,p(e.progressList,((e,s)=>(n(),c("div",{key:s},["3"==e.status||"4"==e.status?(n(),u(m,{key:0,color:"3"==e.status?"#67c23a":"#f57575",class:"icon"},{default:h((()=>["3"==e.status?(n(),u(i,{key:0})):(n(),u(_,{key:1}))])),_:2},1032,["color"])):(n(),c("span",I)),t(e,s)?(n(),c("span",{key:2,class:g(["line","1"!=e.status?"active":""])},null,2)):k("v-if",!0)])))),128))]),d("div",U,[(n(!0),c(l,null,p(e.progressList,((s,t)=>(n(),c("div",{key:t},[a(s)?(n(),u(w,{key:0,placement:"top",class:"max-width","popper-class":"popper",content:`${s.organ_unit_name}: ${s.des}`},{default:h((()=>[d("span",{class:g([t==e.progressList.length-1?"active":""])},v(s.organ_unit_name)+": "+v(s.des),3)])),_:2},1032,["content"])):(n(),c("span",{key:1,class:g([t==e.progressList.length-1?"active":""])},v(s.organ_unit_name)+": "+v(s.des),3)),d("span",null,v(s.review_time),1)])))),128))])])])):(n(),u(L,{key:1,description:"暂无"}))}}}),[["__scopeId","data-v-3d05eed2"]]);export{S as A,m as a,b,f as c,j as d,L as g,w as r,P as u};
