Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

2 lignes
2.2KB

  1. import{E as k,r as _,B,b as a,c as N,L as R,h as o,f as t,i as f,u as n,e as V,k as $,s as L}from"./index-dd5fae99.js";import{j as O,h as S,i as U,c as q,f as D,g as E}from"./uploadAction-3962500e.js";import{u as I}from"./inquirySheetManage-6139194f.js";const P=$({name:"upLoadReplayDialog"}),A=Object.assign(P,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close"],setup(m,{emit:v}){const g=k.dictStore.uploadUrl,{proxy:b}=L(),c=m,u=v,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(E(r.value.replyForm))||void 0};await I({...d}),b.$message.success("提交成功!"),u("close",!0)}})};return B(()=>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 N(),R(C,{"model-value":m.visible,title:"上传回复单",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(" 提交 ")])),_:1}),t(s,{onClick:e[2]||(e[2]=l=>u("close"))},{default:o(()=>e[7]||(e[7]=[f(" 关闭 ")])),_: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:"回复单",prop:"replyForm",rules:[{required:!0,message:"请上传文件",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(g),limit:1,"on-exceed":n(O),"on-success":l=>n(S)(l,r.value.replyForm,!0),"on-error":n(U),"on-preview":n(q),"before-upload":l=>n(D)(l,{types:["pdf","png","jpeg","jpg"]}),accept:".pdf,.png,.jpeg"},{tip:o(()=>e[5]||(e[5]=[V("div",{class:"el-upload__tip"},"支持.png、.jpg、.jpeg、.pdf",-1)])),default:o(()=>[t(s,{type:"primary"},{default:o(()=>e[4]||(e[4]=[f("上传附件")])),_: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{A as default};