(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[8],{"0zT6":function(e,t,a){"use strict";var r=a("tAuX"),n=a("g09b");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a("y8nQ");var l=n(a("Vl3Y"));a("+L6B");var d=n(a("2/Rp"));a("IzEo");var u=n(a("bx4M"));a("lUTK");var o=n(a("BvKs"));a("qVdP");var i=n(a("jsC+")),c=n(a("2Taf")),f=n(a("vZ4D")),s=n(a("l4Ni")),m=n(a("ujKo")),p=n(a("MhPg")),h=r(a("q1tI")),g=a("y1Nh"),y=n(a("wd/R")),E=a("Y2fQ"),v=a("ArA+"),M=a("MuoO"),k=n(a("wMks")),C=n(a("rhDX")),w=function(e,t,a,r){var n,l=arguments.length,d=l<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,a):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)d=Reflect.decorate(e,t,a,r);else for(var u=e.length-1;u>=0;u--)(n=e[u])&&(d=(l<3?n(d):l>3?n(t,a,d):n(t,a))||d);return l>3&&d&&Object.defineProperty(t,a,d),d},D=["\u221a","\xd7"],I=function(e){function t(){var e;return(0,c.default)(this,t),e=(0,s.default)(this,(0,m.default)(t).apply(this,arguments)),e.columns=[{title:"id",dataIndex:"id"},{title:(0,E.formatMessage)({id:"Category"}),dataIndex:"category.name"},{title:(0,E.formatMessage)({id:"Title"}),dataIndex:"title",render:function(e,t){return h.default.createElement("a",{href:"/article/".concat(t.id),target:"_blank",rel:"noopener noreferrer"},e)}},{title:(0,E.formatMessage)({id:"Click Counts"}),dataIndex:"views"},{title:(0,E.formatMessage)({id:"Status"}),width:80,dataIndex:"deleted_at",filters:[{text:D[0],value:"1"},{text:D[1],value:"0"}],render:function(e){return null===e?D[0]:D[1]}},{title:(0,E.formatMessage)({id:"Created_at"}),width:115,dataIndex:"created_at",sorter:!0,render:function(e){return h.default.createElement("span",null,(0,y.default)(e).format("YYYY-MM-DD"))}},{title:(0,E.formatMessage)({id:"Handle"}),width:110,render:function(t,a){return h.default.createElement(i.default,{overlay:e.generateMenu(a)},h.default.createElement("a",{className:"ant-dropdown-link",onClick:function(e){return e.preventDefault()}},(0,E.formatMessage)({id:"Handle"})))}}],e.generateMenu=function(t){return null===t.deleted_at?h.default.createElement(o.default,null,h.default.createElement(o.default.Item,{key:"0"},h.default.createElement("a",{onClick:function(){return e.handleRedirectToEditPage(t)}},(0,E.formatMessage)({id:"Edit"}))),h.default.createElement(o.default.Item,{key:"2"},h.default.createElement("a",{onClick:function(){return e.handleDestroy(t)}},(0,E.formatMessage)({id:"Delete"})))):h.default.createElement(o.default,null,h.default.createElement(o.default.Item,{key:"0"},h.default.createElement("a",{onClick:function(){return e.handleRedirectToEditPage(t)}},(0,E.formatMessage)({id:"Edit"}))),h.default.createElement(o.default.Item,{key:"1"},h.default.createElement("a",{onClick:function(){return e.handleForceDelete(t)}},(0,E.formatMessage)({id:"Force Delete"}))),h.default.createElement(o.default.Item,{key:"2"},h.default.createElement("a",{onClick:function(){return e.handleRestore(t)}},(0,E.formatMessage)({id:"Restore"}))))},e.handleRedirectToCreatePage=function(){v.router.push("/article/create")},e.handleRedirectToEditPage=function(e){v.router.push("/article/edit/".concat(e.id))},e.handleDestroy=function(t){var a=e.props.dispatch;a({type:"adminArticle/destroy",payload:t})},e.handleForceDelete=function(t){var a=e.props.dispatch;a({type:"adminArticle/forceDelete",payload:t})},e.handleRestore=function(t){var a=e.props.dispatch;a({type:"adminArticle/restore",payload:t})},e}return(0,p.default)(t,e),(0,f.default)(t,[{key:"render",value:function(){return h.default.createElement(g.PageHeaderWrapper,null,h.default.createElement(u.default,{bordered:!1},h.default.createElement("div",{className:C.default.tableList},h.default.createElement("div",{className:C.default.tableListOperator},h.default.createElement(d.default,{icon:"plus",type:"primary",onClick:this.handleRedirectToCreatePage},(0,E.formatMessage)({id:"Add"}))),h.default.createElement(k.default,{columns:this.columns,model:"adminArticle"}))))}}]),t}(h.Component);I=w([(0,M.connect)(function(e){return e})],I);var R=l.default.create()(I);t.default=R}}]);