import{d as z,u as k,j as D,k as w,l as g,r as m,_ as N,a as y,b as P,c as l,e as o,f as v,n as f,F as b,g as C,o as u,m as $,t as h,w as x}from"./index-C6Ampb56.js";import{_ as S}from"./banner.vue_vue_type_style_index_0_lang-CQMv34b5.js";import{_ as I}from"./pagination.vue_vue_type_script_setup_true_lang-D2u7Kd-t.js";const q=z({setup(){const e=k(),p=D();w();const i=g({});let a=m({params:{categoryid:0,pageNum:1,pageSize:100,order:"sortindex",active:!0},index:"",sub:0}),r=g();function d(n){n.id!=r.value&&(i.value=n,a={params:{categoryid:n.id,pageNum:1,pageSize:10,order:"sortindex",active:!0},index:e.state.currentPagePath,sub:e.state.sub},r.value=n.id,e.dispatch("getPageData",a))}function c(n){let t={path:"/services_Read",query:{categoryid:n.categoryid,id:n.id,isUrlId:1}};e.commit("setRoute",t),p.push(t)}function s(n){a.params.pageNum=n,e.dispatch("getPageData",a).then(()=>{})}return{store:e,facilityClick:d,handleCurrentChange:s,details:c}},components:{banner:S,pagination:I},asyncData({store:e,route:p}){let i=m(p.value);return e.dispatch("getMenuList").then(()=>{var c;const a=e.state.menuList;let r=m({params:{categoryid:0,pageNum:1,pageSize:100,order:"sortindex"},index:"",sub:0}),d=g("");i.path.indexOf("_")>-1&&(d.value=i.path.split("_")[0]);for(let s=0;s<a.length;s++)if(!a[s].sname&&i.path==a[s].path||a[s].path==d.value)return r={params:{categoryid:a[s].id,pageNum:1,pageSize:100,order:"sortindex"},index:i.path,sub:s},(c=i.query)!=null&&c.categoryid?r.params.categoryid=i.query.categoryid:r.params.categoryid=a[s].children[0].id,e.dispatch("getPageData",r).then(()=>{e.commit("setColumnTypes",e.state.menuList[e.state.sub].children)})})}}),B={class:"pageContain"},L={class:"common-bradcrumb-section"},R={class:"cannot_selected tabs_selected"},M=["onMouseover"],T={class:"product-grid-section container pt-20 pb-60 lazyContainer"},F={class:"row pt-80 content"},O=["onClick"],V={class:"img"},j=["data-src"],E={class:"line-two"},U={class:"line-two"};function A(e,p,i,a,r,d){const c=y("banner"),s=y("pagination"),n=P("lazy");return u(),l("div",B,[o("section",L,[v(c),o("section",{class:"product-grid-section",style:f([{"text-align":"center",position:"absolute",bottom:"0"},{width:"100%"}])},[o("ul",R,[(u(!0),l(b,null,C(e.store.state.columnTypes,(t,_)=>(u(),l("a",{class:$(t.id==e.store.state.acitveId?"active":""),onMouseover:G=>e.facilityClick(t),style:f({width:1/e.store.state.columnTypes.length*100+"%"}),key:_},h(t.categoryName),47,M))),128))])])]),o("section",T,[o("div",F,[(u(!0),l(b,null,C(e.store.state.pageContent,t=>(u(),l("div",{class:"col-md-4 newItemOne",key:t.id},[o("div",{class:"oneInnerBox",onClick:_=>e.details(t)},[o("div",V,[x(o("img",{alt:"","data-src":t.image},null,8,j),[[n,t.image]])]),o("a",E,h(t.title),1),o("span",U,h(t.zhaiyao),1)],8,O)]))),128))]),v(s,{data:e.store.state.pagination,onPagination:e.handleCurrentChange},null,8,["data","onPagination"])])])}const Q=N(q,[["render",A]]);export{Q as default};
