create-c2a819d4.js 3.0 KB

1
  1. import{d as B,r as m,e as C,u as D,x as U,a as e,o as i,v as p,w as s,f as t,c as k,q as z,F as E,n as L,y as O,z as P,A as j,B as R,V as F,C as I,D as M,I as Y,_ as G,__tla as H}from"./index-6d7b82ba.js";import{a as J,D as K,__tla as N}from"./dict-efb5f3b6.js";import{c as Q,__tla as S}from"./index-48241f57.js";import{u as W,__tla as X}from"./tagsView-e5f9218a.js";import{u as Z,__tla as $}from"./useMessage-be161634.js";let c,ee=Promise.all([(()=>{try{return H}catch{}})(),(()=>{try{return N}catch{}})(),(()=>{try{return S}catch{}})(),(()=>{try{return X}catch{}})(),(()=>{try{return $}catch{}})()]).then(async()=>{c=G(B({name:"BpmOALeaveCreate",__name:"create",setup(ae){const f=Z(),o=m(!1),l=m({type:void 0,reason:void 0,startTime:void 0,endTime:void 0}),y=C({type:[{required:!0,message:"\u8BF7\u5047\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],reason:[{required:!0,message:"\u8BF7\u5047\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}],startTime:[{required:!0,message:"\u8BF7\u5047\u5F00\u59CB\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}],endTime:[{required:!0,message:"\u8BF7\u5047\u7ED3\u675F\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A",trigger:"change"}]}),d=m(),{delView:v}=W(),{push:b,currentRoute:g}=D(),h=async()=>{if(d&&await d.value.validate()){o.value=!0;try{const n=l.value;await Q(n),f.success("\u53D1\u8D77\u6210\u529F"),v(e(g)),await b({name:"BpmOALeave"})}finally{o.value=!1}}};return(n,r)=>{const V=O,T=P,u=j,_=R,x=F,w=I,q=M,A=Y;return U((i(),p(q,{ref_key:"formRef",ref:d,model:e(l),rules:e(y),"label-width":"80px"},{default:s(()=>[t(u,{label:"\u8BF7\u5047\u7C7B\u578B",prop:"type"},{default:s(()=>[t(T,{modelValue:e(l).type,"onUpdate:modelValue":r[0]||(r[0]=a=>e(l).type=a),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u8BF7\u5047\u7C7B\u578B"},{default:s(()=>[(i(!0),k(E,null,z(e(J)(e(K).BPM_OA_LEAVE_TYPE),a=>(i(),p(V,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(u,{label:"\u5F00\u59CB\u65F6\u95F4",prop:"startTime"},{default:s(()=>[t(_,{modelValue:e(l).startTime,"onUpdate:modelValue":r[1]||(r[1]=a=>e(l).startTime=a),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4",type:"datetime","value-format":"x"},null,8,["modelValue"])]),_:1}),t(u,{label:"\u7ED3\u675F\u65F6\u95F4",prop:"endTime"},{default:s(()=>[t(_,{modelValue:e(l).endTime,"onUpdate:modelValue":r[2]||(r[2]=a=>e(l).endTime=a),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4",type:"datetime","value-format":"x"},null,8,["modelValue"])]),_:1}),t(u,{label:"\u539F\u56E0",prop:"reason"},{default:s(()=>[t(x,{modelValue:e(l).reason,"onUpdate:modelValue":r[3]||(r[3]=a=>e(l).reason=a),placeholder:"\u8BF7\u8F93\u8BF7\u5047\u539F\u56E0",type:"textarea"},null,8,["modelValue"])]),_:1}),t(u,null,{default:s(()=>[t(w,{disabled:e(o),type:"primary",onClick:h},{default:s(()=>[L("\u786E \u5B9A")]),_:1},8,["disabled"])]),_:1})]),_:1},8,["model","rules"])),[[A,e(o)]])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/bpm/oa/leave/create.vue"]])});export{ee as __tla,c as default};