import{_ as g,d as k,w as p,z as C,r as o,o as x,G as F,C as t,b as i,l as e,bw as h,u as d,M as w,aR as y}from"./index.1d1a5ecb.js";import{R as b}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"}]},R={flex:"","flex-col":"",style:{width:"50%"}},N={class:"w-full flex justify-end"},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 C(()=>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 x(),F(d(y),{ref_key:"formRef",ref:c,model:u.value,rules:m.value,"label-width":"100px"},{default:t(()=>[i("div",R,[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,h({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(b)),null,16,["modelValue"])]),_:1})]),e(s,null,{default:t(()=>[i("div",N,[e(A,{type:"primary",onClick:E},{default:t(()=>[w("\u63D0\u4EA4\u5BA1\u6838\u7ED3\u679C")]),_:1})])]),_:1})]),_:1},8,["model","rules"])}}});var M=g(j,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/components/ApprovalNode/src/default.vue"]]);export{M as D};
