Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

2 řádky
2.3KB

  1. import{d as k,B,r as _,J as N,c as a,e as R,G as V,i as o,h as t,j as f,u as n,g as $,q}from"./index.88314652.js";import{j as O,h as S,i as U,b as D,f as I,g as J}from"./uploadAction.a771741b.js";import{u as L}from"./inquirySheetManage.03d629d6.js";const P=k({name:"upLoadReplayDialog"}),z=Object.assign(P,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close"],setup(m,{emit:g}){const v=B.dictStore.uploadUrl,{proxy:b}=q(),c=m,u=g,r=_({replyForm:[]}),y=_(),F=async i=>{!i||await i.validate(async e=>{var s,p;if(e){const d={formId:(s=c.data)==null?void 0:s.id,replyForm:((p=r.value.replyForm)==null?void 0:p.length)&&JSON.stringify(J(r.value.replyForm))||void 0};await L({...d}),b.$message.success("\u63D0\u4EA4\u6210\u529F\uFF01"),u("close",!0)}})};return N(()=>c.visible,async i=>{i&&(r.value.replyForm=[])}),(i,e)=>{const s=a("el-button"),p=a("el-upload"),d=a("el-form-item"),w=a("el-col"),x=a("el-row"),j=a("el-form"),C=a("el-dialog");return R(),V(C,{"model-value":m.visible,title:"\u4E0A\u4F20\u56DE\u590D\u5355",width:"600px","destroy-on-close":"",onClose:e[3]||(e[3]=l=>u("close"))},{footer:o(()=>[t(s,{type:"primary",onClick:e[1]||(e[1]=l=>F(y.value))},{default:o(()=>e[6]||(e[6]=[f(" \u63D0\u4EA4 ")])),_:1}),t(s,{onClick:e[2]||(e[2]=l=>u("close"))},{default:o(()=>e[7]||(e[7]=[f(" \u5173\u95ED ")])),_:1})]),default:o(()=>[t(j,{ref_key:"formRef",ref:y,model:r.value,"label-width":"120px","label-suffix":":"},{default:o(()=>[t(x,null,{default:o(()=>[t(w,{span:24},{default:o(()=>[t(d,{label:"\u56DE\u590D\u5355",prop:"replyForm",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u6587\u4EF6",trigger:"blur"}]},{default:o(()=>[t(p,{"file-list":r.value.replyForm,"onUpdate:fileList":e[0]||(e[0]=l=>r.value.replyForm=l),class:"w-full",action:n(v),limit:1,"on-exceed":n(O),"on-success":l=>n(S)(l,r.value.replyForm,!0),"on-error":n(U),"on-preview":n(D),"before-upload":l=>n(I)(l,{types:["pdf","png","jpeg","jpg"]}),accept:".pdf,.png,.jpeg"},{tip:o(()=>e[5]||(e[5]=[$("div",{class:"el-upload__tip"},"\u652F\u6301.png\u3001.jpg\u3001.jpeg\u3001.pdf",-1)])),default:o(()=>[t(s,{type:"primary"},{default:o(()=>e[4]||(e[4]=[f("\u4E0A\u4F20\u9644\u4EF6")])),_:1})]),_:1},8,["file-list","action","on-exceed","on-success","on-error","on-preview","before-upload"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value"])}}});export{z as default};