var G=Object.defineProperty,K=Object.defineProperties;var P=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var U=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var R=(o,t,e)=>t in o?G(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,g=(o,t)=>{for(var e in t||(t={}))U.call(t,e)&&R(o,e,t[e]);if(O)for(var e of O(t))$.call(t,e)&&R(o,e,t[e]);return o},C=(o,t)=>K(o,P(t));var b=(o,t,e)=>new Promise((s,_)=>{var q=a=>{try{m(e.next(a))}catch(y){_(y)}},I=a=>{try{m(e.throw(a))}catch(y){_(y)}},m=a=>a.done?s(a.value):Promise.resolve(a.value).then(q,I);m((e=e.apply(o,t)).next())});import{_ as z,d as E,C as J,u as L,r as d,o as H,f as v,g as j,h as S,i as h,l as u,m as c,K as B,j as k,k as F,p as M,G as Q,q as W}from"./index.9fabe127.js";import X from"./reviewComments.86cd412c.js";import Y from"./memberOpinion.81ec16ff.js";import{t as Z}from"./reviewTemplateConfig.883cbd53.js";import{s as ee,a as te,t as ae}from"./expertReview.46d2c33b.js";import"./uploadAction.3a8ed42d.js";import"./index.15f81060.js";const oe={class:"footerPage"},ne=h("span",null,"\u67E5\u770B\u8BC4\u5BA1\u610F\u89C1",-1),se={class:"footer"},le=E({name:"fillReviewComments"}),re=Object.assign(le,{setup(o){const{proxy:t}=W(),e=J(),s=L(),_=d(),q=()=>b(this,null,function*(){const p=yield Z({templateType:s.query.reviewType,regionCode:s.query.regionCode});_.value=p.data,I.value=!0}),I=d(!1),m=d(!1),a=d(),y=()=>{a.value.validForm(p=>b(this,null,function*(){var i;if(p){m.value=!0;const l=C(g({meetingId:s.query.meetingId,projectId:s.query.projectId,projectCode:s.query.projectCode},a.value.form),{reviewTemplateOptions:a.value.form.templates.map(n=>C(g({},n),{optionSerialNo:Array.isArray(n.optionSerialNo)?n.optionSerialNo.map(f=>f):[n.optionSerialNo]})),attachFileId:((i=a.value.form.attachments)==null?void 0:i.length)&&a.value.form.attachments[0].response.data.id||void 0,isFinal:s.query.type*1===2,templates:void 0,attachments:void 0});try{yield ee(l),t.$message.success("\u63D0\u4EA4\u6210\u529F"),m.value=!1,e.go(-2)}catch(n){m.value=!1}}}))},N=d(!1),V=d([]),T=d([]),A=()=>b(this,null,function*(){const p=yield te({projectId:s.query.projectId,meetingId:s.query.meetingId}),i=yield ae({templateIds:p.data.map(l=>l.templateId).join(",")});V.value=i.data,T.value=p.data&&p.data.map(l=>C(g({},l),{reviewTemplateOptions:l.reviewTemplateOptions&&l.reviewTemplateOptions.map(n=>{var x,w;const f=V.value.find(r=>l.templateId===r.templateId).templates;return C(g({},n),{title:(x=f.find(r=>r.serialNo===n.questionSerialNo))==null?void 0:x.title,optionsValue:(w=f.find(r=>r.serialNo===n.questionSerialNo))==null?void 0:w.options.filter(r=>n.optionSerialNo.includes(r.serialNo)).map(r=>r.option).join("\u3001")})})||[]}))||[],N.value=!0});return H(()=>{q()}),(p,i)=>{const l=v("el-col"),n=v("svg-icon"),f=v("el-row"),x=v("el-card"),w=v("el-button"),r=v("el-drawer");return j(),S(Q,null,[h("div",oe,[u(x,{class:"w-full",shadow:"never"},{default:c(()=>[u(f,{gutter:16},{default:c(()=>[u(l,{span:14},{default:c(()=>[I.value?(j(),B(X,{key:0,ref_key:"reviewCommentsRef",ref:a,"template-data":_.value},null,8,["template-data"])):k("v-if",!0)]),_:1}),k("      \u6700\u7EC8\u610F\u89C1\u663E\u793A\u6309\u94AE"),F(s).query.type*1===2?(j(),B(l,{key:0,span:10},{default:c(()=>[N.value?k("v-if",!0):(j(),S("div",{key:0,class:"viewBtn",onClick:A},[u(n,{name:"eye"}),ne]))]),_:1})):k("v-if",!0)]),_:1})]),_:1}),h("div",se,[u(w,{type:"primary",loading:m.value,onClick:y},{default:c(()=>[M("\u63D0\u4EA4")]),_:1},8,["loading"]),u(w,{onClick:i[0]||(i[0]=D=>F(e).go(-1))},{default:c(()=>[M("\u5173\u95ED")]),_:1})])]),u(r,{modelValue:N.value,"onUpdate:modelValue":i[1]||(i[1]=D=>N.value=D),title:"\u7EC4\u5458\u610F\u89C1",style:{position:"absolute"},direction:"rtl",size:"40%",modal:!1,"append-to-body":!1,"modal-class":"myDrawerModal"},{default:c(()=>[u(Y,{"member-opinions":T.value},null,8,["member-opinions"])]),_:1},8,["modelValue"])],64)}}}),_e=z(re,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/expertManage/expertReview/fillReviewComments/index.vue"]]);export{_e as default};
