import{U as y,a2 as f,a3 as m,ad as h,af as v,k as x,ac as K,V as k,d as D,f as u}from"./vue-vendor-CxLCUzY4.js";import{c9 as S,as as w}from"./index-CYriLmQo.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./vxe-table-vendor-B5h3MVdD.js";var C=(a,s,n)=>new Promise((c,l)=>{var i=e=>{try{o(n.next(e))}catch(t){l(t)}},d=e=>{try{o(n.throw(e))}catch(t){l(t)}},o=e=>e.done?c(e.value):Promise.resolve(e.value).then(i,d);o((n=n.apply(a,s)).next())});const V=D({name:"LeftDepart",emits:["select"],setup(a,{emit:s}){const n=u([]),c=u([]),l=u([]);function i(t,r){let p=r.node.dataRef;c.value=[p.key],s("select",p.id)}d();function d(){return C(this,null,function*(){let t=yield w();n.value=[],t.forEach(r=>o(r))})}function o(t,r=1){if(t.slots={icon:"depIcon"},r===1&&(n.value.push(t),l.value.push(t.id)),t.children&&t.children.length>0)for(const p of t.children)o(p,r+1)}function e(){c.value=[]}return{treeData:n,expandedKeys:l,selectedKeys:c,clearSelected:e,onSelect:i}}});function B(a,s,n,c,l,i){const d=y("a-icon"),o=y("a-tree");return f(),m("div",null,[a.treeData.length>0?(f(),h(o,{key:0,showIcon:"",autoExpandParent:"",treeData:a.treeData,selectedKeys:a.selectedKeys,expandedKeys:a.expandedKeys,"onUpdate:expandedKeys":s[0]||(s[0]=e=>a.expandedKeys=e),onSelect:a.onSelect},{depIcon:v(({selected:e})=>[x(d,{style:K({color:e?"blue":""}),type:"apartment"},null,8,["style"])]),_:1},8,["treeData","selectedKeys","expandedKeys","onSelect"])):k("",!0)])}const b=S(V,[["render",B]]);export{b as default};
