import{k as R,s as B,X as G}from"./index.BKEMpsLA.js";import{G as T,c as A}from"./crud.DiMskSbQ.js";import{h as D}from"./columnPermission.BZw343bd.js";import{G as P}from"./api.C37eV756.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 r,u as f,Q as U,H as X}from"./vue.YrNK8sx4.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:y,crudExpose:i,crudOptions:x,resetCrudOptions:g}=R({createCrudOptions:A}),u=d([]),c=d(""),p=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.results)&&(u.value=G.toArrayTree(e.data.results,{parentKey:"parent",children:"children",strict:!0}))},C=(e,n)=>{var s;return e?((s=n.name)==null?void 0:s.indexOf(e))!==-1:!0},k=e=>{console.log(e),i.doSearch({form:{tenant_id:e.tenant_id}})};return S(c,e=>{p.value.filter(e)}),E(async()=>{await v();const e=await D(T,x);g(e),i.doRefresh()}),(e,n)=>{const s=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:6},{default:a(()=>[r("div",q,[o(s,{modelValue:c.value,"onUpdate:modelValue":n[0]||(n[0]=l=>c.value=l),"prefix-icon":f(B),placeholder:"请输入企业名称"},null,8,["modelValue","prefix-icon"]),r("div",F,[o(b,{style:{"margin-top":"10px"},ref_key:"treeRef",ref:p,data:u.value,props:w,"filter-node-method":C,"highlight-current":"",onNodeClick:k},{default:a(({node:l,data:Q})=>[r("span",null,U(l.label),1)]),_:1},8,["data"])])])]),_:1}),o(_,{span:18},{default:a(()=>[r("div",H,[o(V,X({ref_key:"crudRef",ref:y},f(h)),null,16)])]),_:1})]),_:1})]),_:1})}}}),oe=j(J,[["__scopeId","data-v-99718b4a"]]);export{oe as default};
