import{d as V,r as u,ac as d,c as E,aR as M,y as S,X as k,R as D,o as c,A as f,f as v,e as p,u as B,aS as I,Z as N,k as R,aF as T,aH as A,E as F,a0 as G,_ as L}from"./index-BeAZaivf.js";const U=V({__name:"SelChildCompany",props:{modelValue:{type:Boolean},modelModifiers:{},name:{},nameModifiers:{},id:{},idModifiers:{}},emits:["update:modelValue","update:name","update:id"],setup(s){const l=u(""),m=u([]),i=u(!1),t=d(s,"modelValue"),h=d(s,"name"),y=d(s,"id"),C=E(()=>m.value.filter(a=>{if(l.value.length>0){let e=a.name,o=!1;return(M(e,{pattern:"first",toneType:"none"}).replace(/\s/g,"").includes(l.value)||e.includes(l.value))&&(o=!0),o}else return!0}));S(()=>{_()});const _=async()=>{i.value=!0;try{let a=await k.GetChildCompany();m.value=a||[]}catch{D.error("获取数据失败")}finally{i.value=!1}},g=a=>{h.value=String(a.name),y.value=Number(a.id),t.value=!1};return(a,e)=>{const o=R,r=T,x=A,b=F,w=G;return c(),f(b,{title:"分公司列表",width:"40%",modelValue:t.value,"onUpdate:modelValue":e[2]||(e[2]=n=>t.value=n),onClose:e[3]||(e[3]=n=>t.value=!1)},{default:v(()=>[p(o,{modelValue:l.value,"onUpdate:modelValue":e[0]||(e[0]=n=>l.value=n),class:"input-search",clearable:"","prefix-icon":B(I),placeholder:"搜索简拼或汉字"},null,8,["modelValue","prefix-icon"]),N((c(),f(x,{stripe:"",onCurrentChange:e[1]||(e[1]=()=>{}),style:{cursor:"pointer"},"highlight-current-row":"",data:C.value,"table-layout":"fixed",border:!0,"max-height":"400px",onRowClick:g},{default:v(()=>[p(r,{type:"index","min-width":"30px",label:"序号"}),p(r,{prop:"name",label:"分公司名称","show-overflow-tooltip":"","min-width":"150px"})]),_:1},8,["data"])),[[w,i.value]])]),_:1},8,["modelValue"])}}}),X=L(U,[["__scopeId","data-v-c5376613"]]);export{X as S};
//# sourceMappingURL=SelChildCompany-aGS4_CqL.js.map
