import{d as j,D as B,r as _,L as N,c as s,e as V,I as $,i as e,h as l,j as d,u as r,g as v,x as D}from"./index.5bb861d3.js";import{j as I,h as L,i as O,b as S,f as U,g as q}from"./uploadAction.60610a95.js";import{d as P}from"./inquirySheetManage.7abf5210.js";const R=v("div",{class:"el-upload__tip"},"\u652F\u6301word\u6587\u4EF6",-1),A=v("a",{class:"ml-4",href:"/\u6E56\u5DDE\u5E02\u672C\u7EA7\u653F\u5E9C\u6295\u8D44\u4FE1\u606F\u5316\u9879\u76EE\u7EE9\u6548\u8BC4\u4EF7\u54A8\u8BE2\u5355.wps",download:"\u6E56\u5DDE\u5E02\u672C\u7EA7\u653F\u5E9C\u6295\u8D44\u4FE1\u606F\u5316\u9879\u76EE\u7EE9\u6548\u8BC4\u4EF7\u54A8\u8BE2\u5355.wps"},"\u4E0B\u8F7D\u6A21\u677F",-1),E=j({name:"upLoadZxDialog"}),z=Object.assign(E,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close"],setup(m,{emit:w}){const b=B.dictStore.uploadUrl,{proxy:x}=D(),f=m,u=w,a=_({consultationForm:[]}),p=_(),F=async i=>{!i||await i.validate(async o=>{var n;if(o){const c={status:5,formId:f.data.id,consultationForm:((n=a.value.consultationForm)==null?void 0:n.length)&&JSON.stringify(q(a.value.consultationForm))||void 0};await P({...c}),x.$message.success("\u63D0\u4EA4\u6210\u529F\uFF01"),u("close",!0)}})};return N(()=>f.visible,async i=>{i&&(a.value.consultationForm=[])}),(i,o)=>{const n=s("el-button"),c=s("el-upload"),g=s("el-form-item"),y=s("el-col"),h=s("el-row"),C=s("el-form"),k=s("el-dialog");return V(),$(k,{"model-value":m.visible,title:"\u4E0A\u4F20\u54A8\u8BE2\u5355",width:"600px","destroy-on-close":"",onClose:o[3]||(o[3]=t=>u("close"))},{footer:e(()=>[l(n,{type:"primary",onClick:o[1]||(o[1]=t=>F(p.value))},{default:e(()=>[d(" \u63D0\u4EA4 ")]),_:1}),l(n,{onClick:o[2]||(o[2]=t=>u("close"))},{default:e(()=>[d(" \u5173\u95ED ")]),_:1})]),default:e(()=>[l(C,{ref_key:"formRef",ref:p,model:a.value,"label-width":"120px","label-suffix":":"},{default:e(()=>[l(h,null,{default:e(()=>[l(y,{span:24},{default:e(()=>[l(g,{label:"\u4E0A\u4F20\u65B0\u54A8\u8BE2\u5355",prop:"consultationForm",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u6587\u4EF6",trigger:"blur"}]},{default:e(()=>[l(c,{"file-list":a.value.consultationForm,"onUpdate:fileList":o[0]||(o[0]=t=>a.value.consultationForm=t),class:"w-full",action:r(b),limit:1,"on-exceed":r(I),"on-success":t=>r(L)(t,a.value.consultationForm,!0),"on-error":r(O),"on-preview":r(S),"before-upload":t=>r(U)(t,{types:["doc","docx","wps"]}),accept:".doc,.docx,.wps"},{tip:e(()=>[R,A]),default:e(()=>[l(n,{type:"primary",class:"mr-4"},{default:e(()=>[d("\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};
