You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

recommendInfo.bd1bb674.js 2.6KB

2 kuukautta sitten
1
  1. import{d as h,D as u,r as f,o as k,c as n,e as d,I as _,i as l,h as r,f as B,J as C,u as i,F as D,j as N,g as U,x as S}from"./index.20c8d60f.js";import{h as q,b as E,f as L}from"./uploadAction.eabcc122.js";const M=U("div",{class:"el-upload__tip"}," \u652F\u6301\u6269\u5C55\u540D:.pdf .png .jpg .pdf ,\u6587\u4EF6\u5927\u5C0F\u4E0D\u8D85\u8FC71M ",-1),R=h({name:"recommendInfo"}),$=Object.assign(R,{setup(z,{expose:g}){const v=u.dictStore.uploadUrl,{proxy:y}=S(),a=f({}),m=f(),F={recommendedWay:[{required:!0,message:"\u8BF7\u9009\u62E9\u63A8\u8350\u7C7B\u578B",trigger:"blur"}],recommendationProofFile:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u63A8\u8350\u8BC1\u660E",trigger:"blur"}]},b=t=>{m.value.validate(e=>{t(e)})},x=(t,e)=>{y.$message.warning("\u4EC5\u9650\u4E0A\u4F20\u4E00\u4E2A\u6587\u4EF6")};return g({validForm:b,formData:a,setFormData:t=>{var e;a.value={...t,recommendedWay:((e=t.recommendedWay)==null?void 0:e[0])||void 0,recommendationProofFile:t.recommendationProofFile&&t.recommendationProofFile.map(s=>({name:s.fileName,response:{data:{id:s.fileId}},fileUrlById:s.url}))}}}),k(async()=>{}),(t,e)=>{const s=n("el-option"),w=n("el-select"),c=n("el-form-item"),p=n("el-col"),P=n("el-button"),j=n("el-upload"),I=n("el-row"),V=n("el-form");return d(),_(V,{ref_key:"formRef",ref:m,model:a.value,rules:F,"label-position":"right","label-width":"120px","label-suffix":":","scroll-to-error":"",class:"recommendInfo"},{default:l(()=>[r(I,{gutter:8},{default:l(()=>[r(p,{span:8},{default:l(()=>[r(c,{label:"\u63A8\u8350\u7C7B\u578B",prop:"recommendedWay"},{default:l(()=>[r(w,{modelValue:a.value.recommendedWay,"onUpdate:modelValue":e[0]||(e[0]=o=>a.value.recommendedWay=o),class:"w-full",placeholder:"\u8BF7\u9009\u62E9","value-key":"dictionaryCode"},{default:l(()=>[(d(!0),B(D,null,C(i(u).dictStore.recommendedWayDict,(o,W)=>(d(),_(s,{key:W,label:o.dictionaryName,value:o},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),r(p,{span:24},{default:l(()=>[r(c,{label:"\u63A8\u8350\u8BC1\u660E",prop:"recommendationProofFile"},{default:l(()=>[r(j,{"file-list":a.value.recommendationProofFile,"onUpdate:fileList":e[1]||(e[1]=o=>a.value.recommendationProofFile=o),class:"w-full",action:i(v),limit:1,"on-exceed":x,"on-success":o=>i(q)(o,a.value.recommendationProofFile),"on-preview":i(E),accept:"application/pdf,image/png,image/jpeg,image/jpg","before-upload":o=>i(L)(o,{types:["png","jpg","jpeg","pdf"],size:1024})},{tip:l(()=>[M]),default:l(()=>[r(P,{type:"primary",plain:""},{default:l(()=>[N("\u9009\u62E9\u6587\u4EF6")]),_:1})]),_:1},8,["file-list","action","on-success","on-preview","before-upload"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])}}});export{$ as default};