import{n as v}from"./index.17037962789732.js";import"./index.170379627897326.js";import"./index.170379627897316.js";import"./index.170379627897317.js";import{n as r}from"./config.17037962789732.js";import{d as _,k as u,m as i,o as g,c as y,u as l,M as h}from"./vue.1703796278973.js";const b=_({__name:"Org",props:{notify:{type:Object,default:()=>{}},value:{type:Array,default:()=>[]}},emits:["update:value","change"],setup(p,{emit:s}){const a=p,o=u([]),n=u([]),c=async t=>{if(a.notify.notifyType==="dingTalk"){const e=await r.dingTalkDept(t);e.status===200&&(o.value=e.result)}else{const e=await r.weChatDept(t);e.status===200&&(o.value=e.result)}};i(()=>a.value,()=>{n.value=(a==null?void 0:a.value)||[]},{deep:!0,immediate:!0}),i(()=>a.notify.notifierId,t=>{t&&c(t)},{deep:!0,immediate:!0});const m=(t,e)=>{s("update:value",{source:"fixed",value:t}),s("change",e)};return(t,e)=>{const f=v;return g(),y(f,{listHeight:200,value:l(n),"onUpdate:value":e[0]||(e[0]=d=>h(n)?n.value=d:null),placeholder:"请选择组织","tree-data":l(o),onChange:m,fieldNames:{label:"name",value:"id"}},null,8,["value","tree-data"])}}});export{b as _};
