Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

2 рядки
2.7KB

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