text: webpackJsonp([29],{Ntvr:function(t,e,n){(t.exports=n("xCkK")(!1)).push([t.i,"\n.radio-label {\r\n  font-size: 14px;\r\n  color: #606266;\r\n  line-height: 40px;\r\n  padding: 0 12px 0 30px;\n}\r\n",""])},oz0I:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n("viA7"),l=n("0xDb"),i={name:"exportExcel",data:function(){return{list:null,listLoading:!0,downloadLoading:!1,filename:"",autoWidth:!0}},created:function(){this.fetchData()},methods:{fetchData:function(){var t=this;this.listLoading=!0,Object(a.c)().then(function(e){t.list=e.data.items,t.listLoading=!1})},handleDownload:function(){var t=this;this.downloadLoading=!0,Promise.all([n.e(2),n.e(56)]).then(n.bind(null,"zWO4")).then(function(e){var n=t.list,a=t.formatJson(["id","title","author","pageviews","display_time"],n);e.export_json_to_excel({header:["Id","Title","Author","Readings","Date"],data:a,filename:t.filename,autoWidth:t.autoWidth}),t.downloadLoading=!1})},formatJson:function(t,e){return e.map(function(e){return t.map(function(t){return"timestamp"===t?Object(l.c)(e[t]):e[t]})})}}},o={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("label",{staticClass:"radio-label",staticStyle:{"padding-left":"0"}},[t._v("Filename: ")]),t._v(" "),n("el-input",{staticStyle:{width:"340px"},attrs:{placeholder:t.$t("excel.placeholder"),"prefix-icon":"el-icon-document"},model:{value:t.filename,callback:function(e){t.filename=e},expression:"filename"}}),t._v(" "),n("label",{staticClass:"radio-label"},[t._v("Cell Auto Width: ")]),t._v(" "),n("el-radio-group",{model:{value:t.autoWidth,callback:function(e){t.autoWidth=e},expression:"autoWidth"}},[n("el-radio",{attrs:{label:!0,border:""}},[t._v("True")]),t._v(" "),n("el-radio",{attrs:{label:!1,border:""}},[t._v("False")])],1),t._v(" "),n("el-button",{staticStyle:{margin:"0 0 20px 20px"},attrs:{type:"primary",icon:"document",loading:t.downloadLoading},on:{click:t.handleDownload}},[t._v(t._s(t.$t("excel.export"))+" excel")]),t._v(" "),n("el-table",{directives:[{name:"loading",rawName:"v-loading.body",value:t.listLoading,expression:"listLoading",modifiers:{body:!0}}],attrs:{data:t.list,"element-loading-text":"拼命加载中",border:"",fit:"","highlight-current-row":""}},[n("el-table-column",{attrs:{align:"center",label:"Id",width:"95"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n        "+t._s(e.$index)+"\n      ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"Title"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n        "+t._s(e.row.title)+"\n      ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"Author",width:"110",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-tag",[t._v(t._s(e.row.author))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"Readings",width:"115",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n        "+t._s(e.row.pageviews)+"\n      ")]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"Date",width:"220"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("i",{staticClass:"el-icon-time"}),t._v(" "),n("span",[t._v(t._s(t._f("parseTime")(e.row.timestamp,"{y}-{m}-{d} {h}:{i}")))])]}}])})],1)],1)},staticRenderFns:[]};var r=n("kgPM")(i,o,!1,function(t){n("us43")},null,null);e.default=r.exports},us43:function(t,e,n){var a=n("Ntvr");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);n("MO7y")("638170b8",a,!0)}});