Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

2 řádky
3.2KB

  1. import{h as $,f as j,c as b,b as k,e as D,g as S}from"./uploadAction.95992a5e.js";import{d as U}from"./delayApply.5119e80e.js";import{d as q,D as B,r as g,L as I,c as r,e as N,I as O,i as t,h as o,j as m,u as s,g as L,t as P,x as T}from"./index.d340e473.js";const A={class:"el-upload__tip"},J=q({name:"applyDialog"}),K=Object.assign(J,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close"],setup(v,{emit:M}){const{proxy:w}=T(),h=B.dictStore.uploadUrl,f=v,c=M,p=g(!1),l=g({supportingMaterials:[]}),x={delayedMonth:[{required:!0,message:"\u8BF7\u8F93\u5165\u5EF6\u671F\u65F6\u957F"}],delayedReason:[{required:!0,message:"\u8BF7\u8F93\u5165\u5EF6\u671F\u7406\u7531"}],supportingMaterials:[{required:!0,message:"\u8BF7\u4E0A\u4F20"}]},y=g(),V=async d=>{!d||d.validate(async e=>{var u,i;if(e){p.value=!0;try{const n={...l.value,supportingMaterials:((i=(u=l.value)==null?void 0:u.supportingMaterials)==null?void 0:i.length)&&JSON.stringify(S(l.value.supportingMaterials))||void 0,projectId:f.data.id};await U(n),w.$message.success("\u63D0\u4EA4\u6210\u529F\uFF01"),p.value=!1,c("close",!0)}catch{p.value=!1}}})};return I(()=>f.visible,async d=>{d?console.log("props.data",f.data):l.value={higherLineSuperOrgReviewComments:[]}}),(d,e)=>{const u=r("el-input"),i=r("el-form-item"),n=r("el-button"),C=r("el-upload"),F=r("el-form"),R=r("el-dialog");return N(),O(R,{"model-value":v.visible,title:"\u7533\u8BF7\u5EF6\u671F",width:"600px","destroy-on-close":"",onClose:e[6]||(e[6]=a=>c("close"))},{footer:t(()=>[o(n,{type:"primary",loading:p.value,onClick:e[4]||(e[4]=a=>V(y.value))},{default:t(()=>[m(" \u63D0\u4EA4 ")]),_:1},8,["loading"]),o(n,{onClick:e[5]||(e[5]=a=>c("close"))},{default:t(()=>[m(" \u5173\u95ED ")]),_:1})]),default:t(()=>[o(F,{ref_key:"dialogFormRef",ref:y,model:l.value,rules:x,"label-width":"auto","status-icon":"",class:"mt-16"},{default:t(()=>[o(i,{label:"\u5EF6\u671F\u65F6\u957F",prop:"delayedMonth"},{default:t(()=>[o(u,{modelValue:l.value.delayedMonth,"onUpdate:modelValue":e[0]||(e[0]=a=>l.value.delayedMonth=a),placeholder:"\u8BF7\u586B\u5199\u9700\u8981\u5EF6\u957F\u51E0\u4E2A\u6708",onInput:e[1]||(e[1]=a=>{var _;return l.value.delayedMonth=(_=l.value.delayedMonth)==null?void 0:_.replace(/[^\d]/g,"")})},{suffix:t(()=>[m("\u6708")]),_:1},8,["modelValue"])]),_:1}),o(i,{label:"\u5EF6\u671F\u7406\u7531",prop:"delayedReason"},{default:t(()=>[o(u,{modelValue:l.value.delayedReason,"onUpdate:modelValue":e[2]||(e[2]=a=>l.value.delayedReason=a),type:"textarea",maxlength:"1000","show-word-limit":"",placeholder:"\u8BF7\u586B\u5199"},null,8,["modelValue"])]),_:1}),o(i,{label:"\u4F50\u8BC1\u6750\u6599:",prop:"supportingMaterials"},{default:t(()=>[o(C,{"file-list":l.value.supportingMaterials,"onUpdate:fileList":e[3]||(e[3]=a=>l.value.supportingMaterials=a),class:"w-full",action:s(h),limit:1,"on-success":a=>s($)(a,l.value.supportingMaterials,!0),"before-upload":a=>s(j)(a,{types:s(b)}),accept:s(b).map(a=>`.${a}`).join(","),"on-preview":s(k)},{tip:t(()=>[L("div",A," \u652F\u6301"+P(s(D))+"\u6587\u4EF6 ",1)]),default:t(()=>[o(n,{type:"primary",plain:""},{default:t(()=>[m("\u9009\u62E9\u6587\u4EF6")]),_:1})]),_:1},8,["file-list","action","on-success","before-upload","accept","on-preview"])]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value"])}}});export{K as default};