import{e as A}from"./projectStore.b7c79eaf.js";import S from"./memberOpinion.dc139c8a.js";import{N as B}from"./index.dea5e324.js";import{_ as C}from"./index.3f9c5e64.js";import{d as h,r as D,o as U,c as u,e as m,f as T,h as i,i as s,j as V,t as O,F as R,J as j,I}from"./index.5bb861d3.js";const J=h({name:"approvalInfo"}),G=Object.assign(J,{props:{detailData:Object},setup(c){const F=c,g=D([]),f=D(),M=async()=>{var v,d;const N=await A(F.detailData.projectCode);f.value=(d=(v=N.data)==null?void 0:v.reviews)==null?void 0:d.map(r=>{var _,y;return{...r,finalReview:[{...r.finalReview,reviewTemplateOptions:((y=(_=r.finalReview)==null?void 0:_.reviewTemplateOptions)==null?void 0:y.map(t=>{var a,e;const p=N.data.templates.find(l=>r.finalReview.templateId===l.templateId).templates;return{...t,title:(a=p.find(l=>l.serialNo===t.questionSerialNo))==null?void 0:a.title,optionsValue:(e=p.find(l=>l.serialNo===t.questionSerialNo))==null?void 0:e.options.filter(l=>t.optionSerialNo.includes(l.serialNo)).map(l=>l.option).join("\u3001")}}))||[]}],teamMemberReviews:r.teamMemberReviews.map(t=>{var p;return{...t,reviewTemplateOptions:((p=t==null?void 0:t.reviewTemplateOptions)==null?void 0:p.map(a=>{var l,w;const e=N.data.templates.find(o=>t.templateId===o.templateId).templates;return{...a,title:(l=e.find(o=>o.serialNo===a.questionSerialNo))==null?void 0:l.title,optionsValue:(w=e.find(o=>o.serialNo===a.questionSerialNo))==null?void 0:w.options.filter(o=>a.optionSerialNo.includes(o.serialNo)).map(o=>o.option).join("\u3001")}}))||[]}})}})},b=D(new Array(4).fill("\u6700\u7EC8\u610F\u89C1")),q=["\u521D\u6B65\u65B9\u6848\u8BC4\u5BA1","\u90E8\u95E8\u8054\u5BA1","\u5EFA\u8BBE\u65B9\u6848\u8BC4\u5BA1","\u9A8C\u6536\u8BC4\u5BA1"];return U(()=>{M()}),(N,v)=>{const d=u("el-descriptions-item"),r=u("el-descriptions"),_=u("el-radio-button"),y=u("el-radio-group"),t=u("el-collapse-item"),p=u("el-collapse");return m(),T(R,null,[i(r,{column:2,border:"",class:"mb-16"},{default:s(()=>[i(d,{label:"\u5EFA\u8BAE\u603B\u6295\u8D44"},{default:s(()=>[V(O(c.detailData.proposeTotalInvest||"-")+"\u4E07\u5143 ",1)]),_:1}),i(d,{label:"\u5EFA\u8BAE\u5E74\u5EA6\u9884\u7B97"},{default:s(()=>[V(O(c.detailData.proposeAnnualBudget||"-")+"\u4E07\u5143 ",1)]),_:1}),i(d,{label:"\u8BC4\u5BA1\u610F\u89C1\u9644\u4EF6",span:2},{default:s(()=>[(m(!0),T(R,null,j(c.detailData.proposeAttachFiles&&JSON.parse(c.detailData.proposeAttachFiles),(a,e)=>(m(),T("p",{key:e,class:"mb-4"},[i(C,{"file-name":a.originalFileName,"file-id":a.id,"is-down-load":!0},null,8,["file-name","file-id"])]))),128))]),_:1})]),_:1}),i(p,{modelValue:g.value,"onUpdate:modelValue":v[0]||(v[0]=a=>g.value=a)},{default:s(()=>[(m(),T(R,null,j(q,(a,e)=>i(t,{key:e,name:a,title:a},{default:s(()=>{var l,w,o,k;return[i(y,{modelValue:b.value[e],"onUpdate:modelValue":n=>b.value[e]=n,class:"mb-16"},{default:s(()=>[i(_,{label:"\u6700\u7EC8\u610F\u89C1"},{default:s(()=>[V("\u6700\u7EC8\u610F\u89C1")]),_:1}),i(_,{label:"\u7EC4\u5458\u610F\u89C1"},{default:s(()=>[V("\u7EC4\u5458\u610F\u89C1")]),_:1})]),_:2},1032,["modelValue","onUpdate:modelValue"]),((l=f.value)==null?void 0:l.find(n=>n.reviewType===e+1))&&b.value[e]==="\u6700\u7EC8\u610F\u89C1"?(m(),I(S,{key:0,"member-opinions":(w=f.value)==null?void 0:w.find(n=>n.reviewType===e+1).finalReview},null,8,["member-opinions"])):((o=f.value)==null?void 0:o.find(n=>n.reviewType===e+1))&&b.value[e]==="\u7EC4\u5458\u610F\u89C1"?(m(),I(S,{key:1,"member-opinions":(k=f.value)==null?void 0:k.find(n=>n.reviewType===e+1).teamMemberReviews},null,8,["member-opinions"])):(m(),I(B,{key:2}))]}),_:2},1032,["name","title"])),64))]),_:1},8,["modelValue"])],64)}}});export{G as default};
