Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

2 Zeilen
3.1KB

  1. import{d as F,A as O,z as D,r,o as R,c as d,e as v,f as q,g as w,h as s,i,I as h,k as y,u as j,j as V,F as $,x as A}from"./index.7e23eab2.js";import z from"./reviewComments.dde5173b.js";import M from"./memberOpinion.3bf76247.js";import{t as E}from"./reviewTemplateConfig.5beb855c.js";import{s as G,a as L,t as P}from"./expertReview.07ccb574.js";import"./uploadAction.2e6282f1.js";import"./index.80af04bf.js";const U={class:"footerPage"},H=w("span",null,"\u67E5\u770B\u8BC4\u5BA1\u610F\u89C1",-1),J={class:"footer"},K=F({name:"fillReviewComments"}),oe=Object.assign(K,{setup(Q){const{proxy:x}=A(),g=O(),o=D(),I=r(),T=async()=>{const n=await E({templateType:o.query.reviewType,regionCode:o.query.regionCode});I.value=n.data,C.value=!0},C=r(!1),c=r(!1),u=r(),S=()=>{u.value.validForm(async n=>{var l;if(n){c.value=!0;const t={meetingId:o.query.meetingId,projectId:o.query.projectId,projectCode:o.query.projectCode,...u.value.form,reviewTemplateOptions:u.value.form.templates.map(e=>({...e,optionSerialNo:Array.isArray(e.optionSerialNo)?e.optionSerialNo.map(m=>m):[e.optionSerialNo]})),attachFileId:((l=u.value.form.attachments)==null?void 0:l.length)&&u.value.form.attachments[0].response.data.id||void 0,isFinal:o.query.type*1===2,templates:void 0,attachments:void 0};try{await G(t),x.$message.success("\u63D0\u4EA4\u6210\u529F"),c.value=!1,g.go(-2)}catch{c.value=!1}}})},_=r(!1),N=r([]),b=r([]),B=async()=>{const n=await L({projectId:o.query.projectId,meetingId:o.query.meetingId}),l=await P({templateIds:n.data.map(t=>t.templateId).join(",")});N.value=l.data,b.value=n.data&&n.data.map(t=>({...t,reviewTemplateOptions:t.reviewTemplateOptions&&t.reviewTemplateOptions.map(e=>{var f,p;const m=N.value.find(a=>t.templateId===a.templateId).templates;return{...e,title:(f=m.find(a=>a.serialNo===e.questionSerialNo))==null?void 0:f.title,optionsValue:(p=m.find(a=>a.serialNo===e.questionSerialNo))==null?void 0:p.options.filter(a=>e.optionSerialNo.includes(a.serialNo)).map(a=>a.option).join("\u3001")}})||[]}))||[],_.value=!0};return R(()=>{T()}),(n,l)=>{const t=d("el-col"),e=d("svg-icon"),m=d("el-row"),f=d("el-card"),p=d("el-button"),a=d("el-drawer");return v(),q($,null,[w("div",U,[s(f,{class:"w-full",shadow:"never"},{default:i(()=>[s(m,{gutter:16},{default:i(()=>[s(t,{span:14},{default:i(()=>[C.value?(v(),h(z,{key:0,ref_key:"reviewCommentsRef",ref:u,"template-data":I.value},null,8,["template-data"])):y("",!0)]),_:1}),j(o).query.type*1===2?(v(),h(t,{key:0,span:10},{default:i(()=>[_.value?y("",!0):(v(),q("div",{key:0,class:"viewBtn",onClick:B},[s(e,{name:"eye"}),H]))]),_:1})):y("",!0)]),_:1})]),_:1}),w("div",J,[s(p,{type:"primary",loading:c.value,onClick:S},{default:i(()=>[V("\u63D0\u4EA4")]),_:1},8,["loading"]),s(p,{onClick:l[0]||(l[0]=k=>j(g).go(-1))},{default:i(()=>[V("\u5173\u95ED")]),_:1})])]),s(a,{modelValue:_.value,"onUpdate:modelValue":l[1]||(l[1]=k=>_.value=k),title:"\u7EC4\u5458\u610F\u89C1",style:{position:"absolute"},direction:"rtl",size:"40%",modal:!1,"append-to-body":!1,"modal-class":"myDrawerModal"},{default:i(()=>[s(M,{"member-opinions":b.value},null,8,["member-opinions"])]),_:1},8,["modelValue"])],64)}}});export{oe as default};