text: webpackJsonp([6],{kheV:function(e,t){},kzEz:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("Xxa5"),i=r.n(n),a=r("exGp"),s=r.n(a),o=r("Dd8w"),c=r.n(o),l=r("NYxO"),d=r("woOf"),u=r.n(d),p={props:["page"],methods:{handlePage:function(e){var t=u()({},this.$route.query);t.page=e;var r=this.$route.path;this.$router.push({path:r,query:t}),this.$emit("on-change",e)}}},h={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"list-pager-box"},[t("Page",{attrs:{total:this.page.total,"page-size":this.page.per_page,current:this.page.current_page,size:"small","show-total":""},on:{"on-change":this.handlePage}})],1)},staticRenderFns:[]},g={components:{pagination:r("VU/8")(p,h,!1,null,null,null).exports},data:function(){var e=this;return{id:"",showModel:!1,tipsText:"",is_del:0,list:[],page:null,pagination:"",columns:[{title:"ID",key:"id",width:50,align:"center"},{title:"文章封面",key:"cover",width:110,render:function(e,t){return e("div",{style:{padding:"10px 0px"}},[e("img",{attrs:{src:t.row.cover+"?imageView2/1/w/150/h/150"},style:{width:"75px"}}),e("h2",t.row.name)])}},{title:"文章标题",key:"title",render:function(e,t){return e("div",[e("div",{props:{type:"success",size:"small"},style:{fontWeight:800,fontSize:20,color:"#000"}},t.row.title)])}},{title:"标签",key:"tag",width:120},{title:"分类",key:"category",width:120,align:"center",render:function(e,t){return e("div",[e("Button",{props:{type:"warning",size:"small"}},t.row.category.name)])}},{title:"是否被删除",key:"is_del",width:100,align:"center",render:function(e,t){return e("div",[e("Button",{props:{type:t.row.is_del?"error":"success",size:"small"}},t.row.is_del?"已被隐藏":"正常显示中")])}},{title:"浏览",key:"browser",width:80,align:"center"},{title:"操作",key:"action",width:150,align:"center",render:function(t,r){return t("div",[t("Button",{props:{type:"primary",size:"small",disabled:r.row.is_del},style:{marginRight:"5px"},on:{click:function(){e.update(r.row.id)}}},"修改"),t("Button",{props:{type:r.row.is_del?"warning":"error",size:"small"},on:{click:function(){e.id=r.row.id,e.showModel=!0,e.tipsText=r.row.is_del?"确定恢复文章吗":"确定隐藏文章吗",e.is_del=r.row.is_del?0:1}}},r.row.is_del?"恢复文章":"隐藏文章")])}}]}},computed:c()({},Object(l.d)({})),created:function(){this.fetchData()},methods:c()({},Object(l.b)({articleList:"article/articleList",deleteArticle:"article/deleteArticle"}),{fetchData:function(e){var t=this;return s()(i.a.mark(function r(){var n;return i.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,t.pagination=e,r.next=4,t.articleList({include:"is_del",page:e});case 4:n=r.sent,t.page=n.meta,t.$Message.success("获取文章列表成功"),t.list=n.data,r.next=13;break;case 10:r.prev=10,r.t0=r.catch(0),t.$Message.error("获取文章列表失败");case 13:case"end":return r.stop()}},r,t,[[0,10]])}))()},update:function(e){var t=this;return s()(i.a.mark(function r(){return i.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:t.$router.push("/article/update/"+e);case 1:case"end":return r.stop()}},r,t)}))()},remove:function(e){var t=this;return s()(i.a.mark(function r(){return i.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,t.deleteArticle({id:e,is_del:t.is_del});case 3:t.$Message.success("删除文章成功"),t.fetchData(t.pagination),r.next=11;break;case 7:r.prev=7,r.t0=r.catch(0),console.log(r.t0),t.$Message.error("删除文章失败");case 11:case"end":return r.stop()}},r,t,[[0,7]])}))()}})},w={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("section",{staticClass:"list-wrap"},[e.list.length>0?r("div",{staticClass:"list"},[r("Table",{attrs:{border:"",columns:e.columns,data:e.list}}),e._v(" "),r("div",{staticClass:"page"},[r("pagination",{attrs:{page:e.page},on:{"on-change":e.fetchData}})],1)],1):e._e(),e._v(" "),r("div",{staticClass:"model"},[r("Modal",{attrs:{title:"提示"},on:{"on-ok":function(t){e.remove(e.id)}},model:{value:e.showModel,callback:function(t){e.showModel=t},expression:"showModel"}},[r("p",[e._v(e._s(e.tipsText))])])],1)])},staticRenderFns:[]};var f=r("VU/8")(g,w,!1,function(e){r("kheV")},"data-v-5409ddc4",null);t.default=f.exports}});
  //# sourceMappingURL=6.6030e9762e6183dabe12.js.map