import{_ as g,d as k,E as p,H as x,x as o,o as F,N as h,K as t,b as i,y as e,bs as y,u as d,aK as C,W as b}from"./index.743f0c80.js";import{R as w}from"./global.9ad647c8.js";const D={status:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u5BA1\u6838\u72B6\u6001"}],remark:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u5907\u6CE8"}]},N={flex:"","flex-col":"",style:{width:"50%"}},R={class:"w-full flex justify-end"},q=b("\u63D0\u4EA4\u5BA1\u6838\u7ED3\u679C"),j=k({__name:"default",props:{approveValue:{type:String,required:!0},rejectValue:{type:String,required:!0}},emits:["approval"],setup(r,{emit:_}){const v=r,c=p(null),m=p({...D}),u=p({status:"",remark:""});function E(){var a;(a=c.value)==null||a.validate(l=>{l&&_("approval",d(u))})}return x(()=>u.value,({status:a})=>{m.value.remark[0].required=a===v.rejectValue},{deep:!0}),(a,l)=>{const f=o("el-option"),B=o("el-select"),s=o("ElFormItem"),V=o("ElInput"),A=o("ElButton");return F(),h(d(C),{ref_key:"formRef",ref:c,model:u.value,rules:m.value,"label-width":"100px"},{default:t(()=>[i("div",N,[e(s,{label:"\u5BA1\u6838\u72B6\u6001",prop:"status"},{default:t(()=>[e(B,{placeholder:"\u8BF7\u9009\u62E9\u5BA1\u6838\u72B6\u6001",modelValue:u.value.status,"onUpdate:modelValue":l[0]||(l[0]=n=>u.value.status=n)},{default:t(()=>[e(f,{value:r.approveValue,label:"\u901A\u8FC7"},null,8,["value"]),e(f,{value:r.rejectValue,label:"\u9A73\u56DE"},null,8,["value"])]),_:1},8,["modelValue"])]),_:1}),e(s,{label:"\u5907\u6CE8",prop:"remark"},{default:t(()=>[e(V,y({rows:5,type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8",modelValue:u.value.remark,"onUpdate:modelValue":l[1]||(l[1]=n=>u.value.remark=n)},d(w)),null,16,["modelValue"])]),_:1})]),e(s,null,{default:t(()=>[i("div",R,[e(A,{type:"primary",onClick:E},{default:t(()=>[q]),_:1})])]),_:1})]),_:1},8,["model","rules"])}}});var H=g(j,[["__file","D:/work/accout-vue3-ui/src/components/ApprovalNode/src/default.vue"]]);export{H as D};