text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-bacc0f62"],{2423:function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return l})),n.d(e,"d",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"e",(function(){return c}));var a=n("b775");function i(t){return Object(a["a"])({url:"/article/list",method:"get",params:t})}function l(t){return Object(a["a"])({url:"/article/detail",method:"get",params:{id:t}})}function r(t){return Object(a["a"])({url:"/article/pv",method:"get",params:{pv:t}})}function o(t){return Object(a["a"])({url:"/article/create",method:"post",data:t})}function c(t){return Object(a["a"])({url:"/article/update",method:"post",data:t})}},ca54:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:t.$t("zip.placeholder"),"prefix-icon":"el-icon-document"},model:{value:t.filename,callback:function(e){t.filename=e},expression:"filename"}}),t._v(" "),n("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{loading:t.downloadLoading,type:"primary",icon:"document"},on:{click:t.handleDownload}},[t._v("\n    "+t._s(t.$t("zip.export"))+" Zip\n  ")]),t._v(" "),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],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:"95",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(e.row.display_time))])]}}])})],1)],1)},i=[],l=(n("6a61"),n("327b")),r=n("2423"),o={name:"ExportZip",data:function(){return{list:null,listLoading:!0,downloadLoading:!1,filename:""}},created:function(){this.fetchData()},methods:{fetchData:function(){var t=Object(l["a"])(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.listLoading=!0,t.next=3,Object(r["c"])();case 3:e=t.sent,n=e.data,console.log(n,"data"),this.list=n.items,this.listLoading=!1;case 8:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),handleDownload:function(){var t=this;this.downloadLoading=!0,Promise.all([n.e("chunk-21a0ca3e"),n.e("chunk-232ba552"),n.e("chunk-43f8ff7c")]).then(n.bind(null,"cddd")).then((function(e){console.log(e,"zzzzzzzz");var n=["Id","Title","Author","Readings","Date"],a=["id","title","author","pageviews","display_time"],i=t.list,l=t.formatJson(a,i);e.export_txt_to_zip(n,l,t.filename,t.filename),t.downloadLoading=!1}))},formatJson:function(t,e){return e.map((function(e){return t.map((function(t){return e[t]}))}))}}},c=o,u=n("2c07"),s=Object(u["a"])(c,a,i,!1,null,null,null);e["default"]=s.exports}}]);