|
- import{E as N,r as _,B as V,b as a,c as $,L as j,h as o,f as l,i as m,u as r,e as v,k as L,s as O}from"./index-dd5fae99.js";import{j as S,h as U,i as q,c as D,f as E,g as I}from"./uploadAction-3962500e.js";import{d as P}from"./inquirySheetManage-6139194f.js";const R=L({name:"upLoadZxDialog"}),Z=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=_(),x=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(I(s.value.consultationForm))||void 0};await P({...d}),F.$message.success("提交成功!"),u("close",!0)}})};return V(()=>c.visible,async i=>{i&&(s.value.consultationForm=[])}),(i,e)=>{const n=a("el-button"),d=a("el-upload"),g=a("el-form-item"),y=a("el-col"),C=a("el-row"),k=a("el-form"),B=a("el-dialog");return $(),j(B,{"model-value":f.visible,title:"上传咨询单",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=>x(p.value))},{default:o(()=>e[6]||(e[6]=[m(" 提交 ")])),_:1}),l(n,{onClick:e[2]||(e[2]=t=>u("close"))},{default:o(()=>e[7]||(e[7]=[m(" 关闭 ")])),_: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(g,{label:"上传新咨询单",prop:"consultationForm",rules:[{required:!0,message:"请上传文件",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(q),"on-preview":r(D),"before-upload":t=>r(E)(t,{types:["doc","docx","wps"]}),accept:".doc,.docx,.wps"},{tip:o(()=>e[5]||(e[5]=[v("div",{class:"el-upload__tip"},"支持word文件",-1),v("a",{class:"ml-4",href:"/湖州市本级政府投资信息化项目绩效评价咨询单.wps",download:"湖州市本级政府投资信息化项目绩效评价咨询单.wps"},"下载模板",-1)])),default:o(()=>[l(n,{type:"primary",class:"mr-4"},{default:o(()=>e[4]||(e[4]=[m("上传附件")])),_: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};
|