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.

2 lines
2.3KB

  1. import{l as j}from"./expertReview-fa1e6b52.js";import{G as S,E as F,r as g,B as R,b as o,c as y,L as q,h as t,e as D,f as l,i as u,d as O,F as T,t as b,j as E,k as G,s as L}from"./index-dd5fae99.js";const U={class:"flex justify-center"},z=G({name:"leaveDialog"}),J=Object.assign(z,{props:{visible:{type:Boolean,default:!1,required:!0},data:{type:Object,default:void 0},title:{type:String,default:void 0}},emits:["close"],setup(s,{emit:x}){const w=S(F.userStore).userInfo,{proxy:k}=L(),n=s,m=x,f=g(),r=g({}),C={postscript:[{required:!0,message:"请输入请假原因",trigger:"blur"}]},I=async i=>{i&&await i.validate(async e=>{e&&(await j({...r.value,type:3,expertId:n.data.expertId||w.value.userId,meetingId:n.data.meetingId}),k.$message.success("提交成功!"),m("close",!0))})};return R(()=>n.visible,async i=>{i?console.log(n.data):(f.value.resetFields(),r.value={})}),(i,e)=>{var _;const c=o("el-form-item"),p=o("el-col"),V=o("el-input"),B=o("el-row"),N=o("el-form"),v=o("el-button"),$=o("el-dialog");return y(),q($,{"model-value":s.visible,title:n.title||`填写请假原因-${(_=s.data)==null?void 0:_.meetingName}`,width:"600px","destroy-on-close":"",onClose:e[3]||(e[3]=d=>m("close"))},{footer:t(()=>[D("div",U,[l(v,{class:"ml-22",type:"primary",onClick:e[1]||(e[1]=d=>I(f.value))},{default:t(()=>e[4]||(e[4]=[u(" 提交 ")])),_:1}),l(v,{onClick:e[2]||(e[2]=d=>m("close"))},{default:t(()=>e[5]||(e[5]=[u(" 关闭 ")])),_:1})])]),default:t(()=>[l(N,{ref_key:"formRef",ref:f,model:r.value,rules:C,"label-width":"auto","label-suffix":":"},{default:t(()=>[l(B,null,{default:t(()=>{var d;return[(d=s.data)!=null&&d.connecter?(y(),O(T,{key:0},[l(p,{span:24},{default:t(()=>[l(c,{label:"联系人"},{default:t(()=>{var a;return[u(b((a=s.data)==null?void 0:a.connecter),1)]}),_:1})]),_:1}),l(p,{span:24},{default:t(()=>[l(c,{label:"联系方式"},{default:t(()=>{var a;return[u(b((a=s.data)==null?void 0:a.contact),1)]}),_:1})]),_:1})],64)):E("",!0),l(p,{span:24},{default:t(()=>[l(c,{label:"请假原因",prop:"postscript"},{default:t(()=>[l(V,{modelValue:r.value.postscript,"onUpdate:modelValue":e[0]||(e[0]=a=>r.value.postscript=a),maxlength:"200",placeholder:"请输入","show-word-limit":"",type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1})]}),_:1})]),_:1},8,["model"])]),_:1},8,["model-value","title"])}}});export{J as default};