import{k as R,x as B,X as G}from"./index.Df8UJ10K.js";import{G as T,c as A}from"./crud.DCeNgAWK.js";import{h as D}from"./columnPermission.qmX6FdM9.js";import{G as P}from"./api.DLjJ2FSX.js";import{a as m,r as d,w as S,q as E,aj as t,J as K,o as L,K as a,S as o,b as s,u as f,Q as U,H as X}from"./vue.D1BjjNmv.js";import{_ as j}from"./_plugin-vue_export-helper.DlAUqK2U.js";import"./md5.DLPczxzP.js";const q={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:x,crudExpose:i,crudOptions:y,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)}),E(async()=>{await v();const e=await D(T,y);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 L(),K(O,null,{default:a(()=>[o(N,{class:"account-el-row"},{default:a(()=>[o(_,{span:4},{default:a(()=>[s("div",q,[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,U(l.label),1)]),_:1},8,["data"])])])]),_:1}),o(_,{span:20},{default:a(()=>[s("div",H,[o(V,X({ref_key:"crudRef",ref:x},f(h)),null,16)])]),_:1})]),_:1})]),_:1})}}}),oe=j(J,[["__scopeId","data-v-58b13764"]]);export{oe as default};
