import{d as B,u as A,p as s,o as K,i as g,a as L,z as D,m as n,k as i,e,K as N,L as R,l as $,v as E}from"./index-deffec86.js";import{I as H}from"./IndexPagePro-904e4e7b.js";import{_ as I}from"./index.vue_vue_type_script_setup_true_name_ProTable_lang-de39478e.js";import{_ as M}from"./index.vue_vue_type_script_setup_true_name_SearchForm_lang-692eb4fd.js";import{T as U}from"./index-0e777de8.js";import{u as q}from"./useTable-823c55eb.js";import{a as G}from"./plan-2fedc155.js";import{g as O}from"./common-8a6acaa7.js";import{u as W}from"./useMatchActivityPlan-b5b1e489.js";import{u as j}from"./useGetTagHook-96c6412e.js";import"./sortable.esm-441d9e5f.js";import"./tagManage-2aab0a1e.js";const ue=B({__name:"index",setup(J){const{statusList:f}=j(),{columns:_,tableColumns:h,dataCallBack:C}=W([{prop:"status",label:"\u586B\u62A5\u5BA1\u6838\u72B6\u6001",tag:!0,isFilterEnum:!0,width:150,enum:f}],!1,150),{tableData:y,pageable:o,searchParam:u,handleSizeChange:b,handleCurrentChange:v,getTableList:z,search:p,reset:k}=q(G,{},C),x=A(),w=s(!0),T=s(null),S=t=>{u.value.company_area_id=t,p()},m=s([]),c=s([]),d=s(""),V=async()=>{var l;let t=await O({});m.value=t.data;let a=(l=t==null?void 0:t.data[0])==null?void 0:l.company_area_id;c.value=[a],d.value=String(a)},F=t=>{x.push({name:"matchActivityPlanEdit",query:{type:2,id:t.plan_id}})};return K(async()=>{await V(),await z()}),(t,a)=>{const l=g("el-button"),P=g("el-pagination");return L(),D(H,{filterWidth:280},{treeCard:n(()=>[i(U,{ref_key:"TreeFilterRef",ref:T,title:"\u533A\u57DF",data:e(m),defaultValue:e(d),expandKeys:e(c),onChange:S},null,8,["data","defaultValue","expandKeys"])]),searchForm:n(()=>[N(i(M,{"search-param":e(u),columns:e(_),search:e(p),reset:e(k)},null,8,["search-param","columns","search","reset"]),[[R,e(w)]])]),pagination:n(()=>[i(P,{"current-page":e(o).page,"onUpdate:currentPage":a[0]||(a[0]=r=>e(o).page=r),"page-size":e(o).size,"onUpdate:pageSize":a[1]||(a[1]=r=>e(o).size=r),"page-sizes":[10,20,50,100],background:"",layout:"total, sizes, prev, pager, next",total:e(o).count,onSizeChange:e(b),onCurrentChange:e(v)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])]),default:n(()=>[i(I,{columns:e(h),data:e(y)},{tableHeader:n(()=>a[2]||(a[2]=[])),toolButton:n(()=>[$(' <el-button type="primary">\u5BFC\u51FA</el-button> ')]),operation:n(r=>[i(l,{type:"primary",link:"",onClick:Q=>F(r.row)},{default:n(()=>a[3]||(a[3]=[E("\u67E5\u770B")])),_:2},1032,["onClick"])]),_:1},8,["columns","data"])]),_:1})}}});export{ue as default};
