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