import{d as U,r as v,l as $,v as j,C as F,a as d,o as A,i as M,e as r,b as o,u as a,m as G,H as J,I as K,j as u,_ as Q}from"./index-8184dd63-1780045603901v=1.0.0.js";import{I as W}from"./IndexPagePro-13c09835-1780045603901v=1.0.0.js";import{u as X,P as Y}from"./useTable-6673e486-1780045603901v=1.0.0.js";import{S as Z}from"./index-a4b7c6d3-1780045603901v=1.0.0.js";import{E as ee}from"./index-1b521f19-1780045603901v=1.0.0.js";import{u as ae}from"./useHandleData-5092af5e-1780045603901v=1.0.0.js";import{f as te,g as f}from"./index-59bbc758-1780045603901v=1.0.0.js";import{j as re,D as oe}from"./areaSupply-2a8dcd36-1780045603901v=1.0.0.js";import"./notData-5e24f986-1780045603901v=1.0.0.js";import"./sortable.esm-cb107890-1780045603901v=1.0.0.js";import"./common-5ba50e89-1780045603901v=1.0.0.js";import"./useGetTagHook-d138769d-1780045603901v=1.0.0.js";import"./tagManage-1b66d64b-1780045603901v=1.0.0.js";import"./reportingYear-23c6c3e7-1780045603901v=1.0.0.js";import"./index-7b6cf23d-1780045603901v=1.0.0.js";const ne=U({__name:"index",setup(se){const{columns:b,tableColumns:p}=te(),C=v(!0),{tableData:h,pageable:l,baseParam:c,searchParam:k,handleSizeChange:S,handleCurrentChange:w,getTableList:_,search:T,reset:x,totalParam:z,pageParam:P}=X(re),D=t=>(t.sport_project_id&&t.sport_project_id.length>0&&(t.sport_project_id=t.sport_project_id[t.sport_project_id.length-1]),t),V=()=>{T(D)},s=v(1),E=$(()=>({param:{...z.value,...P.value}})),m=j(),N=()=>{c.value.report_type=s.value,l.value.page=1,s.value==1&&(p.value[1].label="\u586B\u62A5\u5E74\u5EA6",p.value[1].prop="reporting_year"),s.value==2&&(p.value[1].label="\u8BA1\u5212\u5E74\u5EA6",p.value[1].prop="plan_year"),_()},R=()=>{m.push({name:"sSupplyTrainEdit",query:{report_type:s.value}})},q=t=>{m.push({name:"sSupplyTrainDetail",query:{edit_id:t.sports_train_report_id,report_type:s.value}})},B=t=>{m.push({name:"sSupplyTrainEdit",query:{edit_id:t.sports_train_report_id,report_type:s.value}})},I=async t=>{let e="\u5220\u9664\u5F53\u524D\u586B\u62A5\u6570\u636E";await ae(oe,{sports_train_report_id:t.sports_train_report_id},e),_()},H=()=>{m.push({name:"importData",query:{title:"\u4F53\u80B2\u57F9\u8BAD\u586B\u62A5\u5BFC\u5165",type:"train",report_type:s.value}})};return F(async()=>{c.value.report_type=1,await _()}),(t,e)=>{const g=d("el-tab-pane"),L=d("el-tabs"),i=d("el-button"),O=d("el-pagination");return A(),M(W,null,{tabSelect:r(()=>[o(L,{modelValue:a(s),"onUpdate:modelValue":e[0]||(e[0]=n=>G(s)?s.value=n:null),type:"card",class:"no_margin_tab",onTabChange:N},{default:r(()=>[o(g,{label:"\u5B9E\u9645\u60C5\u51B5",name:1}),o(g,{label:"\u8BA1\u5212\u5B89\u6392",name:2})]),_:1},8,["modelValue"])]),searchForm:r(()=>[J(o(Z,{"search-param":a(k),columns:a(b),search:V,reset:a(x)},null,8,["search-param","columns","reset"]),[[K,a(C)]])]),pagination:r(()=>[o(O,{"current-page":a(l).page,"onUpdate:currentPage":e[1]||(e[1]=n=>a(l).page=n),"page-size":a(l).size,"onUpdate:pageSize":e[2]||(e[2]=n=>a(l).size=n),"page-sizes":[10,20,50,100],background:"",layout:"total, sizes, prev, pager, next",total:a(l).count,onSizeChange:a(S),onCurrentChange:a(w)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])]),default:r(()=>[o(Y,{columns:a(p),data:a(h)},{tableHeader:r(()=>[...e[3]||(e[3]=[])]),toolButton:r(()=>[o(i,{type:"primary",onClick:R},{default:r(()=>[...e[4]||(e[4]=[u("\u65B0\u589E",-1)])]),_:1}),o(ee,{taskName:"sportsTrainReportListExport",class:"mr10 ml10",taskOption:a(E)},null,8,["taskOption"]),o(i,{onClick:H},{default:r(()=>[...e[5]||(e[5]=[u("\u5BFC\u5165",-1)])]),_:1})]),operation:r(n=>[o(i,{type:"primary",link:"",onClick:y=>q(n.row)},{default:r(()=>[...e[6]||(e[6]=[u("\u67E5\u770B",-1)])]),_:1},8,["onClick"]),o(i,{type:"primary",link:"",onClick:y=>B(n.row),disabled:a(f)(n.row)},{default:r(()=>[...e[7]||(e[7]=[u("\u7F16\u8F91",-1)])]),_:1},8,["onClick","disabled"]),o(i,{type:"primary",link:"",onClick:y=>I(n.row),disabled:a(f)(n.row)},{default:r(()=>[...e[8]||(e[8]=[u("\u5220\u9664",-1)])]),_:1},8,["onClick","disabled"])]),_:1},8,["columns","data"])]),_:1})}}}),ke=Q(ne,[["__file","D:/desktop/yunNan/vue-area-submit/src/views/stadium/supply/train/index.vue"]]);export{ke as default};
