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
3.4KB

  1. import{e as A}from"./projectStore-30136ff6.js";import S from"./memberOpinion-5935afa0.js";import{N as B}from"./index-be0b3801.js";import{_ as C}from"./index-33a0e6e3.js";import{r as D,o as U,b as f,c as d,d as T,f as i,h as r,i as V,t as O,F as R,H as j,L as k,k as L}from"./index-dd5fae99.js";const $=L({name:"approvalInfo"}),G=Object.assign($,{props:{detailData:Object},setup(c){const F=c,g=D([]),v=D(),M=async()=>{var n,u;const N=await A(F.detailData.projectCode);v.value=(u=(n=N.data)==null?void 0:n.reviews)==null?void 0:u.map(p=>{var _,y;return{...p,finalReview:[{...p.finalReview,reviewTemplateOptions:((y=(_=p.finalReview)==null?void 0:_.reviewTemplateOptions)==null?void 0:y.map(t=>{var a,e;const m=N.data.templates.find(l=>p.finalReview.templateId===l.templateId).templates;return{...t,title:(a=m.find(l=>l.serialNo===t.questionSerialNo))==null?void 0:a.title,optionsValue:(e=m.find(l=>l.serialNo===t.questionSerialNo))==null?void 0:e.options.filter(l=>t.optionSerialNo.includes(l.serialNo)).map(l=>l.option).join("、")}}))||[]}],teamMemberReviews:p.teamMemberReviews.map(t=>{var m;return{...t,reviewTemplateOptions:((m=t==null?void 0:t.reviewTemplateOptions)==null?void 0:m.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("、")}}))||[]}})}})},b=D(new Array(4).fill("最终意见")),q=["初步方案评审","部门联审","建设方案评审","验收评审"];return U(()=>{M()}),(N,n)=>{const u=f("el-descriptions-item"),p=f("el-descriptions"),_=f("el-radio-button"),y=f("el-radio-group"),t=f("el-collapse-item"),m=f("el-collapse");return d(),T(R,null,[i(p,{column:2,border:"",class:"mb-16"},{default:r(()=>[i(u,{label:"建议总投资"},{default:r(()=>[V(O(c.detailData.proposeTotalInvest||"-")+"万元 ",1)]),_:1}),i(u,{label:"建议年度预算"},{default:r(()=>[V(O(c.detailData.proposeAnnualBudget||"-")+"万元 ",1)]),_:1}),i(u,{label:"评审意见附件",span:2},{default:r(()=>[(d(!0),T(R,null,j(c.detailData.proposeAttachFiles&&JSON.parse(c.detailData.proposeAttachFiles),(a,e)=>(d(),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(m,{modelValue:g.value,"onUpdate:modelValue":n[0]||(n[0]=a=>g.value=a)},{default:r(()=>[(d(),T(R,null,j(q,(a,e)=>i(t,{key:e,name:a,title:a},{default:r(()=>{var l,w,o,I;return[i(y,{modelValue:b.value[e],"onUpdate:modelValue":s=>b.value[e]=s,class:"mb-16"},{default:r(()=>[i(_,{label:"最终意见"},{default:r(()=>n[1]||(n[1]=[V("最终意见")])),_:1}),i(_,{label:"组员意见"},{default:r(()=>n[2]||(n[2]=[V("组员意见")])),_:1})]),_:2},1032,["modelValue","onUpdate:modelValue"]),(l=v.value)!=null&&l.find(s=>s.reviewType===e+1)&&b.value[e]==="最终意见"?(d(),k(S,{key:0,"member-opinions":(w=v.value)==null?void 0:w.find(s=>s.reviewType===e+1).finalReview},null,8,["member-opinions"])):(o=v.value)!=null&&o.find(s=>s.reviewType===e+1)&&b.value[e]==="组员意见"?(d(),k(S,{key:1,"member-opinions":(I=v.value)==null?void 0:I.find(s=>s.reviewType===e+1).teamMemberReviews},null,8,["member-opinions"])):(d(),k(B,{key:2}))]}),_:2},1032,["name","title"])),64))]),_:1},8,["modelValue"])],64)}}});export{G as default};