import{d as k,r as p,L as V,c as l,e as j,I as B,i as t,h as o,j as c}from"./index.5bb861d3.js";const I=k({name:"concurrentDialog"}),q=Object.assign(I,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close","update:data"],setup(i,{emit:_}){const s=i,r=_,u=p(),a=p({name:void 0}),v={name:[{required:!0,message:"\u8BF7\u8F93\u5165\u5206\u652F\u540D\u79F0",trigger:"blur"}]},b=async n=>{!n||await n.validate(async e=>{if(e){const m={name:a.value.name,id:s.data.id||"",parentId:s.data.parentId||""};r("update:data",m),r("close",!0)}})};return V(()=>s.visible,async n=>{n?a.value={name:s.data.name}:u.value.resetFields()}),(n,e)=>{const m=l("el-input"),y=l("el-form-item"),g=l("el-col"),w=l("el-row"),x=l("el-form"),f=l("el-button"),C=l("el-dialog");return j(),B(C,{"model-value":i.visible,title:"\u5E76\u884C\u5206\u652F\u8282\u70B9\u8BBE\u7F6E",width:"840px","destroy-on-close":"",onClose:e[3]||(e[3]=d=>r("close"))},{footer:t(()=>[o(f,{type:"primary",onClick:e[1]||(e[1]=d=>b(u.value))},{default:t(()=>[c(" \u63D0\u4EA4 ")]),_:1}),o(f,{onClick:e[2]||(e[2]=d=>r("close"))},{default:t(()=>[c(" \u5173\u95ED ")]),_:1})]),default:t(()=>[o(x,{ref_key:"formRef",ref:u,model:a.value,rules:v,"label-width":"115px","label-suffix":":"},{default:t(()=>[o(w,null,{default:t(()=>[o(g,{span:24},{default:t(()=>[o(y,{label:"\u5206\u652F\u540D\u79F0",prop:"name"},{default:t(()=>[o(m,{modelValue:a.value.name,"onUpdate:modelValue":e[0]||(e[0]=d=>a.value.name=d),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value"])}}});export{q as default};
