File: /var/www/html/public/static/js/tree-legacy-eddc6c0f.js
System.register(["./message-legacy-10af7c73.js","./index-legacy-12f7f0b6.js","./system-legacy-bc288aa8.js","./hooks-legacy-d9b76605.js","./git-branch-line-legacy-888ded59.js","./search-legacy-595b4dfa.js","./runtime-core.esm-bundler-legacy-c5df00b7.js","./_plugin-vue_export-helper-legacy-762b7923.js","./preload-helper-legacy-f8638e03.js","./vue-i18n.runtime.esm-bundler-legacy-720876b1.js","./index-legacy-c9e20962.js","./_commonjsHelpers-legacy-5498c249.js","./vue-router-legacy-a12307c3.js","./utils-legacy-c0023c33.js","./index-legacy-82296235.js"],(function(e,l){"use strict";var t,a,n,r,i,o,d,c,u,s,h,v,p,g,f,m,y,x,b,j,_,z,w,C,k,H,M,V=document.createElement("style");return V.textContent="[data-v-48934549] .el-divider{margin:0}\n",document.head.appendChild(V),{setters:[e=>{t=e.v},e=>{a=e.X},e=>{n=e.getDeptList},e=>{r=e.u},e=>{i=e.d},e=>{o=e.d},e=>{d=e.e,c=e.f,u=e.g,s=e.d,h=e.r,v=e.c,p=e.w,g=e.o,f=e.Q,m=e.y,y=e.m,x=e.p,b=e.u,j=e.n,_=e.v,z=e.x,w=e.j,C=e.b5,k=e.b4,H=e.L},e=>{M=e._},null,null,null,null,null,null,null],execute:function(){const l={width:24,height:24,body:'<path fill="currentColor" d="M18.537 19.567A9.961 9.961 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10c0 2.136-.67 4.116-1.81 5.74L17 12h3a8 8 0 1 0-2.46 5.772l.997 1.795z"/>'},V={width:24,height:24,body:'<path fill="currentColor" d="M12 3c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0 14c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z"/>'},L={width:1024,height:1024,body:'<path fill="currentColor" d="M192 128v704h384V128H192zm-32-64h448a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32z"/><path fill="currentColor" d="M256 256h256v64H256v-64zm0 192h256v64H256v-64zm0 192h256v64H256v-64zm384-128h128v64H640v-64zm0 128h128v64H640v-64zM64 832h896v64H64v-64z"/><path fill="currentColor" d="M640 384v448h192V384H640zm-32-64h256a32 32 0 0 1 32 32v512a32 32 0 0 1-32 32H608a32 32 0 0 1-32-32V352a32 32 0 0 1 32-32z"/>'},I={width:1024,height:1024,body:'<path fill="currentColor" d="M288 896h448q32 0 32 32t-32 32H288q-32 0-32-32t32-32z"/><path fill="currentColor" d="M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416zM512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544z"/><path fill="currentColor" d="M544 384h96a32 32 0 1 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64h96v-96a32 32 0 0 1 64 0v96z"/>'},O={width:"32",height:"32",viewBox:"0 0 24 24"},B=[u("path",{fill:"currentColor",d:"M22 4V2H2v2h9v14.17l-5.5-5.5-1.42 1.41L12 22l7.92-7.92-1.42-1.41-5.5 5.5V4h9Z"},null,-1)],N={render:function(e,l){return d(),c("svg",O,B)}},q={width:"32",height:"32",viewBox:"0 0 24 24"},A=[u("path",{fill:"currentColor",d:"M4 2H2v20h2v-9h14.17l-5.5 5.5 1.41 1.42L22 12l-7.92-7.92-1.41 1.42 5.5 5.5H4V2Z"},null,-1)],E={render:function(e,l){return d(),c("svg",q,A)}},R={class:"h-full min-h-[780px] bg-bg_color overflow-auto"},S={class:"flex items-center h-[34px]"},Z=(e=>(C("data-v-48934549"),e=e(),k(),e))((()=>u("p",{class:"flex-1 ml-2 font-bold text-base truncate",title:"部门列表"}," 部门列表 ",-1))),$=s({__name:"tree",setup(e){const s=h(),C=h([]),k=h(!0),M=h(""),O=h({}),{proxy:B}=H(),q={children:"children",label:"name"},A=v((()=>["!h-[20px]","reset-margin","!text-gray-500","dark:!text-white","dark:hover:!text-primary"])),$=(e,l)=>!e||l.name.includes(e);function D(e){const l=e.$treeNodeId;O.value[l]=O.value[l]?.highlight?Object.assign({id:l},O.value[l],{highlight:!1}):Object.assign({id:l},O.value[l],{highlight:!0}),Object.values(O.value).forEach((e=>{e.id!==l&&(e.highlight=!1)}))}function Q(e){k.value=e;const l=B.$refs.treeRef.store._getAllNodes();for(let t=0;t<l.length;t++)l[t].expanded=e}function U(){O.value={},M.value="",Q(!0)}return p(M,(e=>{s.value.filter(e)})),g((async()=>{const{data:e}=await n();C.value=a(e)})),(e,a)=>{const n=f("IconifyIconOffline"),h=f("el-icon"),v=f("el-input"),p=f("el-button"),g=f("el-dropdown-item"),H=f("el-dropdown-menu"),B=f("el-dropdown"),X=f("el-divider"),F=f("el-tree");return d(),c("div",R,[u("div",S,[Z,m(v,{style:{flex:"2"},size:"small",modelValue:M.value,"onUpdate:modelValue":a[0]||(a[0]=e=>M.value=e),placeholder:"请输入部门名称",clearable:""},{suffix:y((()=>[m(h,{class:"el-input__icon"},{default:y((()=>[x(m(n,{icon:b(o)},null,8,["icon"]),[[t,0===M.value.length]])])),_:1})])),_:1},8,["modelValue"]),m(B,{"hide-on-click":!1},{dropdown:y((()=>[m(H,null,{default:y((()=>[m(g,null,{default:y((()=>[m(p,{class:j(b(A)),link:"",type:"primary",icon:b(r)(k.value?b(N):b(E)),onClick:a[1]||(a[1]=e=>Q(!k.value))},{default:y((()=>[_(z(k.value?"折叠全部":"展开全部"),1)])),_:1},8,["class","icon"])])),_:1}),m(g,null,{default:y((()=>[m(p,{class:j(b(A)),link:"",type:"primary",icon:b(r)(b(l)),onClick:U},{default:y((()=>[_(" 重置状态 ")])),_:1},8,["class","icon"])])),_:1})])),_:1})])),default:y((()=>[m(n,{class:"w-[28px] cursor-pointer",width:"18px",icon:b(V)},null,8,["icon"])])),_:1})]),m(X),m(F,{ref_key:"treeRef",ref:s,data:C.value,"node-key":"id",size:"small",props:q,"default-expand-all":"","expand-on-click-node":!1,"filter-node-method":$,onNodeClick:D},{default:y((({node:e,data:l})=>[u("span",{class:j(["pl-1","pr-1","rounded","flex","items-center","select-none",M.value.trim().length>0&&e.label.includes(M.value)&&"text-red-500",O.value[e.id]?.highlight?"dark:text-primary":""]),style:w({background:O.value[e.id]?.highlight?"var(--el-color-primary-light-7)":"transparent"})},[m(n,{icon:1===l.type?b(L):2===l.type?b(I):b(i)},null,8,["icon"]),_(" "+z(e.label),1)],6)])),_:1},8,["data"])])}}});e("default",M($,[["__scopeId","data-v-48934549"]]))}}}));