import{a5 as d}from"./index.17037962789732.js";import"./index.170379627897316.js";import"./index.170379627897317.js";import{n as f}from"./template.1703796278973.js";import{d as _,l as g,k as y,m as v,o as w,c as h,u as r,M as k}from"./vue.1703796278973.js";const b=_({__name:"ToOrg",props:{toParty:null,type:null,configId:null},emits:["update:toParty"],setup(p,{emit:n}){const e=p,a=g({get:()=>e.toParty,set:t=>n("update:toParty",t)}),c={weixin:"wechat",dingTalk:"dingtalk"},s=y([]),l=async()=>{if(!e.configId)return;const{result:t}=await f.getDept(c[e.type],e.configId);s.value=t.map(o=>({label:o.name,value:o.id}))};l();const u=t=>{n("update:toParty",t)};return v(()=>e.configId,()=>{l()}),(t,o)=>{const i=d;return w(),h(i,{options:r(s),onChange:u,placeholder:"请选择收信部门",style:{width:"100%"},allowClear:!0,value:r(a),"onUpdate:value":o[0]||(o[0]=m=>k(a)?a.value=m:null)},null,8,["options","value"])}}});export{b as _};
