webpackJsonp([36],{UUvi:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("2Uyi"),i={name:"data_news",data:function(){return{count:0,pindex:1,curIndex:0,modalTitle:"",lastTitle:"",nextTitle:"",modal_con:"",is_newDetail:!1,newsList:[{title:"编号",key:"id",width:140},{title:"标题",key:"title"},{title:"分类",render:function(t,e){return"gonggao"==e.row.category?t("span","公告通知"):"biaoyang"==e.row.category?t("span","内部表扬"):"falv"==e.row.category?t("span","法律法规"):void 0}},{title:"通知时间",render:function(t,e){return 0===e.row.start_time?t("span","未推送"):t("span",Object(n.b)(e.row.start_time))}}],newsData:[]}},watch:{is_newDetail:function(t){}},methods:{open_detail:function(t,e){document.getElementById("data_new_html_con").scrollTop=0,this.curIndex=e,this.is_newDetail=!0,this.modalTitle=t.title,this.modal_con=t.content,this.lastTitle=0!==e?this.newsData[e-1].title:"无",this.nextTitle=e+1<=Number(this.newsData.length)-1?this.newsData[e+1].title:"无"},intoNewInfo:function(t,e){if("无"===e)return!1;document.getElementById("data_new_html_con").scrollTop=0;var a=Number(this.curIndex+t);this.modalTitle=this.newsData[a].title,this.modal_con=this.newsData[a].content,this.lastTitle=0!==a?this.newsData[a-1].title:"无",this.nextTitle=a+1<=Number(this.newsData.length)-1?this.newsData[a+1].title:"无",this.curIndex=a},getNewsInfo:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.pindex=e,this.$store.commit("changeloading",!0),this.$api.getDataNewsInfo({limit:10,page:this.pindex}).then(function(e){200==e.code?(t.newsData=e.data,t.count=e.count,t.$store.commit("changeloading",!1)):(t.$store.commit("changeloading",!1),t.$Message.info(e.msg))})}},created:function(){this.getNewsInfo()}},s={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"right_con"},[a("div",{staticClass:"news_info_fgx fl"}),t._v(" "),a("p",{staticClass:"fl titles"},[t._v("公告通知")]),t._v(" "),a("div",{staticClass:"clear"}),t._v(" "),a("Table",{staticClass:"tables newtable",attrs:{columns:t.newsList,data:t.newsData,border:""},on:{"on-row-click":t.open_detail}}),t._v(" "),a("div",{staticClass:"page"},[a("Page",{attrs:{total:t.count,"page-size":10,size:"small","show-total":"","show-elevator":""},on:{"on-change":t.getNewsInfo}})],1)],1),t._v(" "),a("Modal",{attrs:{title:t.modalTitle,id:"new_detail_modal","class-name":"vertical-center-modal",width:"776"},model:{value:t.is_newDetail,callback:function(e){t.is_newDetail=e},expression:"is_newDetail"}},[a("div",{staticClass:"modal_con",staticStyle:{height:"340px",overflow:"auto"},attrs:{id:"data_new_html_con"}},[a("p",{domProps:{innerHTML:t._s(t.modal_con)}})]),t._v(" "),a("div",{staticClass:"modal_footer"},[a("p",{staticClass:"fl"},[t._v("上一篇："),a("span",{staticClass:"lasttitle",on:{click:function(e){return t.intoNewInfo(-1,t.lastTitle)}}},[t._v(t._s(t.lastTitle))])]),t._v(" "),a("p",{staticClass:"fr"},[t._v("下一篇："),a("span",{staticClass:"nexttitle",on:{click:function(e){return t.intoNewInfo(1,t.nextTitle)}}},[t._v(t._s(t.nextTitle))])])])])],1)},staticRenderFns:[]};var l=a("VU/8")(i,s,!1,function(t){a("gZM0")},"data-v-4b1aee88",null);e.default=l.exports},gZM0:function(t,e){}});