UserTypeTree-8534c160.js 1.8 KB

1
  1. var m=(t,_,l)=>new Promise((d,a)=>{var o=e=>{try{s(l.next(e))}catch(n){a(n)}},c=e=>{try{s(l.throw(e))}catch(n){a(n)}},s=e=>e.done?d(e.value):Promise.resolve(e.value).then(o,c);s((l=l.apply(t,_)).next())});import{B as g,__tla as k}from"./Tree-6c35f2c0.js";import{d as D,r as w,n as K,a4 as B,_ as b,y as T,o as p,l as x,e as E,w as u,c as v,b as f,H,t as N,__tla as C}from"./index-b5895273.js";import{d as O,__tla as P}from"./UserController-a84d4e35.js";import{__tla as R}from"./useContextMenu-c4ffe073.js";import{__tla as U}from"./difference-9954c5db.js";let S,j=Promise.all([(()=>{try{return k}catch(t){}})(),(()=>{try{return C}catch(t){}})(),(()=>{try{return P}catch(t){}})(),(()=>{try{return R}catch(t){}})(),(()=>{try{return U}catch(t){}})()]).then(()=>m(void 0,null,function*(){const{t}=B(),_=D({name:"UserTypeTree",components:{BasicTree:g},emits:["select"],setup(a,{emit:o}){const c=w([]),s=w([]);function e(){return m(this,null,function*(){c.value=yield O({});const r=c.value[0];s.value.push(r.id),o("select",{id:r.id,type:r.type})})}function n(r,y){const i=y.node;o("select",{id:i.id,type:i.type})}return K(()=>{e()}),{treeData:c,handleSelect:n,selectedKeys:s,t}}}),l={class:"mr-2 overflow-hidden bg-white h-full"};function d(a,o,c,s,e,n){const r=T("a-tag"),y=T("BasicTree");return p(),x("div",l,[E(y,{title:a.t("\u7EC4\u7EC7\u5217\u8868"),toolbar:"",search:"",clickRowToExpand:!0,treeData:a.treeData,selectedKeys:a.selectedKeys,expandOnSearch:"",fieldNames:{key:"id",title:"name"},onSelect:a.handleSelect},{title:u(({name:i,departmentType:h})=>[h===1?(p(),v(r,{key:0,color:"processing"},{default:u(()=>[f("\u516C\u53F8")]),_:1})):h===0?(p(),v(r,{key:1,color:"warning"},{default:u(()=>[f("\u90E8\u95E8")]),_:1})):H("",!0),f(" "+N(i),1)]),_:1},8,["title","treeData","selectedKeys","onSelect"])])}S=b(_,[["render",d]])}));export{j as __tla,S as default};