import{d as Q,r,a as W,a1 as X,b as Y,e as p,al as Z,o as d,f as g,w as s,i as f,g as l,j as ee,h as t,v as ae,n as b,l as m,t as h,am as te,I as ne,F as le}from"./index-17740f03-1778929502341v=1.0.0.js";import{u as se}from"./useTable-9e9e4bef-1778929502341v=1.0.0.js";import{g as C}from"./systemManage-e620987f-1778929502341v=1.0.0.js";import{g as oe,u as re}from"./unit-70ad741a-1778929502341v=1.0.0.js";const ie={style:{"margin-bottom":"10px"}},ce={style:{color:"#409eff"}},_e=Q({__name:"unitSelect copy",props:{selectedItems:{type:Array,default:()=>[]}},emits:["update:selectedItems"],setup(w,{emit:z}){const S=w,x=z,k=r(),_=W({get:()=>S.selectedItems,set:e=>x("update:selectedItems",e)}),D=e=>{_.value=e},I=e=>(e.level_id&&e.level_id.length>0&&(e.level_ids=e.level_id.join(","),delete e.level_id),e),{tableData:B,pageable:i,searchParam:P,baseParam:y,handleSizeChange:R,handleCurrentChange:T,getTableList:U,search:v,reset:V,renderEmpty:A,loading:L,BaseCompanyAreaId:pe}=se(oe,null,null,I);re();const N=r(!0),u=r([{prop:"keyword",label:"",search:{el:"input",placeholder:"\u8BF7\u8F93\u5165\u5355\u4F4D\u540D\u79F0/\u8054\u7CFB\u4EBA/\u8054\u7CFB\u65B9\u5F0F",props:{onChange:v}}},{prop:"level_id",label:"",enum:[],fieldNames:{label:"name",value:"value"},search:{el:"select",placeholder:"\u5168\u90E8\u7EA7\u522B",props:{multiple:!0}}}]),F=r(null),j=()=>{F.value.treeRef.setCurrentKey(c.value),y.value.company_area_id=c.value,V()},E=r([]),K=r([]),c=r(""),H=async()=>{var n;let e=await le({with_up:0});E.value=e.data;let a=(n=e==null?void 0:e.data[0])==null?void 0:n.company_area_id;K.value=[a],c.value=String(a)},M=async()=>{let a=await C({page:1,size:100,type:3});u.value[1].enum=a.data.list};r([]);const $=async()=>{let a=await C({page:1,size:100,type:2});u.value[2].enum=a.data.list};return X(()=>{}),Y(async()=>{await H(),M(),$(),y.value.company_area_id=c.value,U()}),(e,a)=>{const n=p("el-table-column"),q=p("el-tag"),G=p("el-table"),J=p("el-pagination"),O=Z("loading");return d(),g(ne,null,{searchForm:s(()=>[f(l(ee,{"search-param":t(P),columns:t(u),search:t(v),reset:j},null,8,["search-param","columns","search"]),[[ae,t(N)]])]),tableHeader:s(()=>[b("div",ie,[a[2]||(a[2]=m(" \u5F53\u524D\u5DF2\u9009\u4E2D")),b("span",ce,h(t(_).length),1),a[3]||(a[3]=m("\u6761\u6570\u636E,\u5F53\u9875\u6570\u636E\u91CF\u8F83\u5927\u65F6\uFF0C\u52FE\u9009\u53EF\u80FD\u5B58\u5728\u5361\u987F\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85\u3002 "))])]),toolButton:s(()=>a[4]||(a[4]=[])),pagination:s(()=>[l(J,{"current-page":t(i).page,"onUpdate:currentPage":a[0]||(a[0]=o=>t(i).page=o),"page-size":t(i).size,"onUpdate:pageSize":a[1]||(a[1]=o=>t(i).size=o),"page-sizes":[10,20,50,100,200,300,500],background:"",layout:"total, sizes, prev, pager, next",total:t(i).count,onSizeChange:t(R),onCurrentChange:t(T)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])]),dialog:s(()=>a[5]||(a[5]=[])),default:s(()=>[f((d(),g(G,{ref_key:"tableRef",ref:k,data:t(B),size:"small",border:"",onSelectionChange:D,"row-key":o=>o.organ_unit_id},{empty:s(()=>[(d(),g(te(t(A))))]),default:s(()=>[l(n,{type:"selection",width:"55",align:"center","reserve-selection":!0}),l(n,{label:"\u5E8F\u53F7",type:"index",align:"center"}),l(n,{label:"\u5355\u4F4D\u540D\u79F0",prop:"name",align:"center"}),l(n,{label:"\u7EA7\u522B",prop:"level_id_str",align:"center"}),l(n,{label:"\u7BA1\u7406\u673A\u6784",prop:"manage_organ_id_str",align:"center"}),l(n,{label:"\u8054\u7CFB\u4EBA",prop:"contact_name",align:"center"}),l(n,{label:"\u8054\u7CFB\u65B9\u5F0F",prop:"contact_way",align:"center"}),l(n,{label:"\u72B6\u6001",align:"center"},{default:s(o=>[l(q,{type:o.row.status==1?"success":"danger","disable-transitions":""},{default:s(()=>[m(h(o.row.status_str),1)]),_:2},1032,["type"])]),_:1})]),_:1},8,["data","row-key"])),[[O,t(L)]])]),_:1})}}});export{_e as default};
