import{d as I,r as b,p as B,c as n,e as o,k as V,i as t,h as e,g as w,f as _,j as f,H as F,F as g,m as d,_ as N}from"./index.0308b213.js";const $=d("\u5F00\u542F"),j=d("\u5173\u95ED"),H=d("\u662F"),T=d("\u5426"),q={style:{display:"flex","flex-direction":"column"}},G=d("\u5220\u9664"),J=d("\u6DFB\u52A0"),K={style:{display:"flex","flex-direction":"column"}},M=d("\u5220\u9664"),O=d("\u6DFB\u52A0"),P=I({props:{modelValue:null},emits:["update:modelValue"],setup(k,{emit:A}){const C=k,a=b({status:1,show_agent:0,agentList:[],bind_agents:[],bind_admins:[]});b([]);const E=()=>{a.value.bind_agents.push({uid:"",agents:[]})},U=()=>{a.value.bind_admins.push({uid:"",agents:[]})},D=i=>{a.value.bind_agents.splice(i,1)},z=i=>{a.value.bind_admins.splice(i,1)};return B(()=>C.modelValue,i=>{a.value=i},{deep:!0}),B(()=>a,()=>{A("update:modelValue",a.value)},{deep:!0}),(i,p)=>{const r=n("el-radio"),v=n("el-radio-group"),c=n("el-form-item"),h=n("el-input"),y=n("el-option"),x=n("el-select"),m=n("el-button"),L=n("el-form");return o(),V(L,{model:a.value,"label-width":"180px"},{default:t(()=>[e(c,{label:"\u4EE3\u7406\u72B6\u6001"},{default:t(()=>[e(v,{modelValue:a.value.status,"onUpdate:modelValue":p[0]||(p[0]=u=>a.value.status=u)},{default:t(()=>[e(r,{label:1},{default:t(()=>[$]),_:1}),e(r,{label:0},{default:t(()=>[j]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,{label:"\u5B9A\u4F4D\u9875\u662F\u5426\u5C55\u793A\u533A\u57DF\u5217\u8868"},{default:t(()=>[e(v,{modelValue:a.value.show_agent,"onUpdate:modelValue":p[1]||(p[1]=u=>a.value.show_agent=u)},{default:t(()=>[e(r,{label:1},{default:t(()=>[H]),_:1}),e(r,{label:0},{default:t(()=>[T]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(c,{label:"uid\u7ED1\u5B9A\u4EE3\u7406"},{default:t(()=>[w("view",q,[(o(!0),_(g,null,f(a.value.bind_agents,(u,s)=>(o(),_("view",{key:s,style:{display:"flex","align-items":"center","margin-top":"10px"},class:F(s==0?"first":"")},[e(h,{modelValue:u.uid,"onUpdate:modelValue":l=>u.uid=l,placeholder:"\u8BF7\u8F93\u5165uid",style:{width:"300px"}},null,8,["modelValue","onUpdate:modelValue"]),e(x,{modelValue:u.agents,"onUpdate:modelValue":l=>u.agents=l,placeholder:"\u8BF7\u9009\u62E9\u4EE3\u7406",style:{width:"300px","margin-left":"10px"},clearable:"",multiple:""},{default:t(()=>[(o(!0),_(g,null,f(a.value.agentList,l=>(o(),V(y,{key:l.id,label:l.title,value:l.id},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"]),e(m,{type:"danger",size:"small",onClick:l=>D(s),style:{width:"60px","margin-left":"10px"}},{default:t(()=>[G]),_:2},1032,["onClick"])],2))),128)),e(m,{type:"primary",size:"small",onClick:E,style:{width:"60px","margin-top":"10px"}},{default:t(()=>[J]),_:1})])]),_:1}),e(c,{label:"uid\u7ED1\u5B9A\u7BA1\u7406\u5458"},{default:t(()=>[w("view",K,[(o(!0),_(g,null,f(a.value.bind_admins,(u,s)=>(o(),_("view",{key:s,style:{display:"flex","align-items":"center","margin-top":"10px"},class:F(s==0?"first":"")},[e(h,{modelValue:u.uid,"onUpdate:modelValue":l=>u.uid=l,placeholder:"\u8BF7\u8F93\u5165uid",style:{width:"300px"}},null,8,["modelValue","onUpdate:modelValue"]),e(x,{modelValue:u.agents,"onUpdate:modelValue":l=>u.agents=l,placeholder:"\u8BF7\u9009\u62E9\u7BA1\u7406\u5458",style:{width:"300px","margin-left":"10px"},clearable:"",multiple:""},{default:t(()=>[(o(!0),_(g,null,f(a.value.agentList,l=>(o(),V(y,{key:l.id,label:l.title,value:l.id},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"]),e(m,{type:"danger",size:"small",onClick:l=>z(s),style:{width:"60px","margin-left":"10px"}},{default:t(()=>[M]),_:2},1032,["onClick"])],2))),128)),e(m,{type:"primary",size:"small",onClick:U,style:{width:"60px","margin-top":"10px"}},{default:t(()=>[O]),_:1})])]),_:1})]),_:1},8,["model"])}}});const R=N(P,[["__scopeId","data-v-29aea1de"]]);export{R as default};
