import{k as R,A,a7 as B}from"./index.CL7yl-Wb.js";import{G,c as T}from"./crud.B5g3LF1x.js";import{h as D}from"./columnPermission.Dp34cz6S.js";import{G as P}from"./api.ssM5yC3w.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 j}from"./vue.D1BjjNmv.js";import{_ as q}from"./_plugin-vue_export-helper.DlAUqK2U.js";import"./md5.DLPczxzP.js";const F={class:"account-box account-left"},H={class:"company-tree-com"},I={class:"account-box account-table"},J=m({name:"account"}),M=m({...J,setup(Q){const{crudBinding:h,crudRef:y,crudExpose:i,crudOptions:x,resetCrudOptions:g}=R({createCrudOptions:T}),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=B.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(G,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",F,[o(s,{modelValue:c.value,"onUpdate:modelValue":n[0]||(n[0]=l=>c.value=l),"prefix-icon":f(A),placeholder:"请输入企业名称"},null,8,["modelValue","prefix-icon"]),r("div",H,[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:X})=>[r("span",null,U(l.label),1)]),_:1},8,["data"])])])]),_:1}),o(_,{span:18},{default:a(()=>[r("div",I,[o(V,j({ref_key:"crudRef",ref:y},f(h)),null,16)])]),_:1})]),_:1})]),_:1})}}}),oe=q(M,[["__scopeId","data-v-b51ac8e5"]]);export{oe as default};
