import{d as V,r as v,ax as C,G as x,a as g,c as E,b as l,e as t,H as w,a7 as h,aj as j,an as D,ab as F,ao as k,ac as B,_ as N}from"./index-e450010e.js";import{b as P,e as R}from"./api-a5615f3c.js";const U=V({__name:"editduty",props:{title:{type:String,default:""},editPostCont:{type:Boolean,default:!1},rowInfo:{type:Object,default(){return{}}},arrayNum:{type:Number,default:0}},emits:["update:editPostCont","editRow","addRow"],setup(u,{emit:i}){const m=u,_=i,c=v([]);function p(){R().then(d=>{c.value=d.data.list}).catch(d=>{console.error("Error fetching data:",d)})}const e=C({title:"",outId:"",sort:1}),r=()=>{_("update:editPostCont",!1)},f=d=>{P(e).then(()=>h.success("编辑成功")),r(),p()};return x(()=>{Object.assign(e,m.rowInfo)}),(d,a)=>{const s=j,n=D,b=F,y=k,I=B;return g(),E(I,{"model-value":!0,title:u.title,onClose:r,style:{width:"30%"}},{default:l(()=>[t(y,{ref:"ruleFormRef",model:e,"label-width":"120px",class:"demo-ruleForm"},{default:l(()=>[t(n,{label:"考核维度名称:",prop:"title"},{default:l(()=>[t(s,{modelValue:e.title,"onUpdate:modelValue":a[0]||(a[0]=o=>e.title=o),placeholder:"请输入标题"},null,8,["modelValue"])]),_:1}),t(n,{label:"考核维度ID:",prop:"outId"},{default:l(()=>[t(s,{modelValue:e.outId,"onUpdate:modelValue":a[1]||(a[1]=o=>e.outId=o),disabled:"",placeholder:"请输入ID"},null,8,["modelValue"])]),_:1}),t(n,{label:"排序:",prop:"sort"},{default:l(()=>[t(s,{modelValue:e.sort,"onUpdate:modelValue":a[2]||(a[2]=o=>e.sort=o),disabled:"",placeholder:"请输入ID"},null,8,["modelValue"])]),_:1}),t(n,null,{default:l(({row:o})=>[t(b,{type:"primary",onClick:M=>f(o)},{default:l(()=>[w("确定")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1},8,["title"])}}});const H=N(U,[["__scopeId","data-v-adf77bdc"]]);export{H as default};