orgTree-x85gQK47.js 1.4 KB

1
  1. var u=(m,l,r)=>new Promise((i,a)=>{var s=t=>{try{n(r.next(t))}catch(o){a(o)}},c=t=>{try{n(r.throw(t))}catch(o){a(o)}},n=t=>t.done?i(t.value):Promise.resolve(t.value).then(s,c);n((r=r.apply(m,l)).next())});import{_ as y}from"./index-BU9Iz3Dt.js";import{a as h}from"./sysOrgApi-tY_yXKfV.js";import{bq as v,_ as k}from"./entry/index-CRWhxBeP.js";import{d as x,f as p,D as g,Z as _,_ as w,a4 as D,u as E,a8 as T}from"./vue-DM5HGU8Z.js";import"./antd-BfqWtMX3.js";import"./useContextMenu-BxsYlfTO.js";const B={class:"mr-0 overflow-hidden bg-white"},b=x({__name:"orgTree",emits:["select"],setup(m,{expose:l,emit:r}){const i=r,a=p([]),s=p();g(()=>{c()});function c(){return u(this,null,function*(){const e=yield h({});a.value=[{id:"0",name:"领域列表",children:e}]})}function n(e,f){i("select",e[0])}function t(e){return u(this,null,function*(){yield c();const f=e?[e]:[];s.value.setSelectedKeys(f);const d=v(a.value,e);s.value.setExpandedKeys(e?[...d,e]:[])})}function o(){return"icon-apartment|iconfont"}return l({refresh:t}),(e,f)=>(_(),w("div",B,[a.value.length>0?(_(),D(E(y),{key:0,ref_key:"treeRef",ref:s,title:"",toolbar:!1,search:!0,treeData:a.value,clickRowToExpand:!1,fieldNames:{key:"id",title:"name"},showIcon:"",renderIcon:o,defaultExpandAll:!0,defaultExpandLevel:1,onSelect:n},null,8,["treeData"])):T("",!0)]))}}),q=k(b,[["__scopeId","data-v-d0414299"]]);export{q as default};