var F=(b,g,i)=>new Promise((h,_)=>{var l=o=>{try{f(i.next(o))}catch(r){_(r)}},y=o=>{try{f(i.throw(o))}catch(r){_(r)}},f=o=>o.done?h(o.value):Promise.resolve(o.value).then(l,y);f((i=i.apply(b,g)).next())});import{_ as E,d as I,H as K,r as R,o as O,f as n,g as p,K as d,m as e,l as a,h as N,G as U,L as x,p as c,t as S,j as P,k as m,i as G}from"./index.9fabe127.js";import{h as H,i as J,f as W,c as j,b as z,e as Q}from"./uploadAction.3a8ed42d.js";const X={class:"el-upload__tip"},Y=I({name:"reviewCommentsDialog"}),Z=Object.assign(Y,{props:{templateData:Object},setup(b,{expose:g}){const i=K.dictStore.uploadUrl,h=b,_=R(),l=R({templates:[],attachments:[]}),y={otherAdvice:[{required:!0,message:"\u8BF7\u8F93\u5165\u610F\u89C1",trigger:"blur"}],reviewResult:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BC4\u5BA1\u7ED3\u679C",trigger:"blur"}]},f=o=>{_.value.validate(r=>{o(r)})};return O(()=>F(this,null,function*(){l.value.templates=h.templateData.templates.map(o=>({optionSerialNo:void 0,otherAdvice:"",questionSerialNo:o.serialNo})),l.value.templateId=h.templateData.templateId})),g({validForm:f,form:l}),(o,r)=>{const q=n("el-checkbox"),B=n("el-checkbox-group"),w=n("el-radio"),D=n("el-radio-group"),v=n("el-form-item"),A=n("el-input"),V=n("el-col"),$=n("el-button"),L=n("el-upload"),M=n("el-row"),T=n("el-form");return p(),d(T,{ref_key:"formRef",ref:_,model:l.value,rules:y,"label-width":"auto","label-suffix":":","label-position":"top",class:"reviewForm"},{default:e(()=>[a(M,null,{default:e(()=>{var C;return[(C=l.value.templates)!=null&&C.length?(p(!0),N(U,{key:0},x(b.templateData.templates,(t,u)=>(p(),d(V,{key:u,span:24},{default:e(()=>[a(v,{label:t.title,prop:`templates[${u}].optionSerialNo`,rules:[{required:!0,message:"\u8BF7\u9009\u62E9"}]},{default:e(()=>[t.optionType===2?(p(),d(B,{key:0,modelValue:l.value.templates[u].optionSerialNo,"onUpdate:modelValue":s=>l.value.templates[u].optionSerialNo=s},{default:e(()=>[(p(!0),N(U,null,x(t.options,(s,k)=>(p(),d(q,{key:k,label:s.serialNo},{default:e(()=>[c(S(s.option),1)]),_:2},1032,["label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):(p(),d(D,{key:1,modelValue:l.value.templates[u].optionSerialNo,"onUpdate:modelValue":s=>l.value.templates[u].optionSerialNo=s,class:"myWrap"},{default:e(()=>[(p(!0),N(U,null,x(t.options,(s,k)=>(p(),d(w,{key:k,label:s.serialNo},{default:e(()=>[c(S(s.option),1)]),_:2},1032,["label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"]))]),_:2},1032,["label","prop"]),a(v,{prop:`templates[${u}].otherAdvice`},{default:e(()=>[a(A,{modelValue:l.value.templates[u].otherAdvice,"onUpdate:modelValue":s=>l.value.templates[u].otherAdvice=s,rows:2,type:"textarea",placeholder:`\u8BF7\u8F93\u5165${t.title}\u7684\u5176\u4ED6\u610F\u89C1\u6216\u5EFA\u8BAE`},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["prop"])]),_:2},1024))),128)):P("v-if",!0),a(V,{span:24},{default:e(()=>[a(v,{label:"\u5176\u4ED6\u610F\u89C1\u6216\u5EFA\u8BAE",prop:"otherAdvice"},{default:e(()=>[a(A,{modelValue:l.value.otherAdvice,"onUpdate:modelValue":r[0]||(r[0]=t=>l.value.otherAdvice=t),rows:2,maxlength:"200",type:"textarea","show-word-limit":"",placeholder:"\u8BF7\u8F93\u5165\u5176\u4ED6\u610F\u89C1\u6216\u5EFA\u8BAE"},null,8,["modelValue"])]),_:1})]),_:1}),a(V,{span:24},{default:e(()=>[a(v,{label:"\u9644\u4EF6",prop:"attachments"},{default:e(()=>[a(L,{"file-list":l.value.attachments,"onUpdate:fileList":r[1]||(r[1]=t=>l.value.attachments=t),class:"w-full",action:m(i),"on-success":t=>m(H)(t,l.value.attachments,!0),"on-error":m(J),"before-upload":t=>m(W)(t,{types:m(j)}),accept:m(j).map(t=>`.${t}`).join(","),limit:1,"on-preview":m(z)},{tip:e(()=>[G("div",X,"\u652F\u6301"+S(m(Q))+"\u6587\u4EF6",1)]),default:e(()=>[a($,{type:"primary",class:"mr-4"},{default:e(()=>[c("\u4E0A\u4F20\u9644\u4EF6")]),_:1})]),_:1},8,["file-list","action","on-success","on-error","before-upload","accept","on-preview"])]),_:1})]),_:1}),a(V,{span:24,class:"result"},{default:e(()=>[a(v,{label:"\u8BC4\u5BA1\u7ED3\u679C",prop:"reviewResult",class:"mb-0"},{default:e(()=>[a(D,{modelValue:l.value.reviewResult,"onUpdate:modelValue":r[2]||(r[2]=t=>l.value.reviewResult=t),class:"ml-4"},{default:e(()=>[a(w,{label:1},{default:e(()=>[c("\u8BC4\u5BA1\u901A\u8FC7")]),_:1}),a(w,{label:2},{default:e(()=>[c("\u901A\u8FC7\u9700\u8C03\u6574")]),_:1}),a(w,{label:3},{default:e(()=>[c("\u4FEE\u6539\u65B9\u6848\u540E\u91CD\u65B0\u8BC4\u5BA1")]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]}),_:1})]),_:1},8,["model"])}}}),ae=E(Z,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/expertManage/expertReview/components/reviewComments.vue"]]);export{ae as default};
