import{k as R,q as B,X as G}from"./index.IRF5Ik0K.js";import{G as T,c as A}from"./crud.D_K0gxKa.js";import{h as D}from"./columnPermission.C3Cy8VJb.js";import{G as P}from"./api.CvdRCO16.js";import{a as m,r as d,w as S,q,aj as t,J as E,o as K,K as a,S as o,b as s,u as f,Q as L,H as U}from"./vue.YrNK8sx4.js";import{_ as X}from"./_plugin-vue_export-helper.DlAUqK2U.js";import"./md5.DLPczxzP.js";const j={class:"account-box account-left"},F={class:"company-tree-com"},H={class:"account-box account-table"},I=m({name:"account"}),J=m({...I,setup(M){const{crudBinding:h,crudRef:y,crudExpose:i,crudOptions:x,resetCrudOptions:g}=R({createCrudOptions:A}),p=d([]),c=d(""),u=d(),w={children:"children",label:"name"},v=async()=>{const e=await P({});console.log(e),(e==null?void 0:e.code)===2e3&&Array.isArray(e.data)&&(p.value=G.toArrayTree(e.data,{parentKey:"parent",children:"children",strict:!0}))},C=(e,n)=>{var r;return e?((r=n.name)==null?void 0:r.indexOf(e))!==-1:!0},k=e=>{console.log(e),i.doSearch({form:{tenant_id:e.id}})};return S(c,e=>{u.value.filter(e)}),q(async()=>{await v();const e=await D(T,x);g(e),i.doRefresh()}),(e,n)=>{const r=t("el-input"),b=t("el-tree"),_=t("el-col"),V=t("fs-crud"),N=t("el-row"),O=t("fs-page");return K(),E(O,null,{default:a(()=>[o(N,{class:"account-el-row"},{default:a(()=>[o(_,{span:4},{default:a(()=>[s("div",j,[o(r,{modelValue:c.value,"onUpdate:modelValue":n[0]||(n[0]=l=>c.value=l),"prefix-icon":f(B),placeholder:"请输入企业名称"},null,8,["modelValue","prefix-icon"]),s("div",F,[o(b,{style:{"margin-top":"10px"},ref_key:"treeRef",ref:u,data:p.value,props:w,"filter-node-method":C,"highlight-current":"",onNodeClick:k},{default:a(({node:l,data:Q})=>[s("span",null,L(l.label),1)]),_:1},8,["data"])])])]),_:1}),o(_,{span:20},{default:a(()=>[s("div",H,[o(V,U({ref_key:"crudRef",ref:y},f(h)),null,16)])]),_:1})]),_:1})]),_:1})}}}),oe=X(J,[["__scopeId","data-v-58b13764"]]);export{oe as default};