Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

2 rindas
2.7KB

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