Files
qhmes/deploy-qhmes/frontend/js/LeftDepart-TEh4ybua-Csjw0ayw.js
2026-05-15 11:34:12 +08:00

2 lines
1.6 KiB
Java

import{d as f,f as u,ah as m,ar as h,as as y,aC as v,ag as x,aF as K,k,aB as D}from"./vue-vendor-C7Zq48Yl.js";import{an as S}from"./index-BI6CMai0.js";import{h as C}from"./main.index-Cs5ETdXF.js";import"./antd-vue-vendor-BPnV8VqP.js";import"./vxe-table-vendor-B88kchpX.js";import"./usePopBiz-CG0vVpgI.js";import"./useMethods-DVip17X8.js";import"./index-Dg4HCEvo.js";var w=(a,r,n)=>new Promise((s,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?s(e.value):Promise.resolve(e.value).then(i,d);o((n=n.apply(a,r)).next())});const B=f({name:"LeftDepart",emits:["select"],setup(a,{emit:r}){const n=u([]),s=u([]),l=u([]);function i(t,c){let p=c.node.dataRef;s.value=[p.key],r("select",p.id)}d();function d(){return w(this,null,function*(){let t=yield S();n.value=[],t.forEach(c=>o(c))})}function o(t,c=1){if(t.slots={icon:"depIcon"},c===1&&(n.value.push(t),l.value.push(t.id)),t.children&&t.children.length>0)for(const p of t.children)o(p,c+1)}function e(){s.value=[]}return{treeData:n,expandedKeys:l,selectedKeys:s,clearSelected:e,onSelect:i}}});function g(a,r,n,s,l,i){const d=m("a-icon"),o=m("a-tree");return y(),h("div",null,[a.treeData.length>0?(y(),v(o,{key:0,showIcon:"",autoExpandParent:"",treeData:a.treeData,selectedKeys:a.selectedKeys,expandedKeys:a.expandedKeys,"onUpdate:expandedKeys":r[0]||(r[0]=e=>a.expandedKeys=e),onSelect:a.onSelect},{depIcon:K(({selected:e})=>[k(d,{style:D({color:e?"blue":""}),type:"apartment"},null,8,["style"])]),_:1},8,["treeData","selectedKeys","expandedKeys","onSelect"])):x("",!0)])}const z=C(B,[["render",g]]);export{z as default};