1 |
- webpackJsonp([81],{"0jfF":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("Xxa5"),i=a.n(n),r=a("exGp"),o=a.n(r),s={name:"exportOffline",data:function(){return{height:"",loading:!1,pagination:{page:1,page_size:20,pages:0,total:0},tableList:[]}},created:function(){this.height=document.documentElement.clientHeight-200,this.handleGetList()},methods:{handleGetList:function(){var t=this;return o()(i.a.mark(function e(){var a,n,r,o,s;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.loading=!0,a=""+t.URL.BASEURL+t.URL.dataBoard_orderExportList,n={page:t.pagination.page,page_size:t.pagination.page_size},e.next=6,t.$axios.get(a,{params:n});case 6:r=e.sent,o=r.data,(s=void 0===o?{}:o)&&0==s.errno&&Array.isArray(s.rst.data)?(t.tableList=s.rst.data,t.pagination.total=s.rst.pageInfo.total,t.pagination.pages=s.rst.pageInfo.pages):4002!=s.errno&&(t.$message.warning(s.err),t.tableList=[],t.pagination.total=0,t.pagination.pages=0),e.next=18;break;case 12:e.prev=12,e.t0=e.catch(0),console.log(e.t0),t.tableList=[],t.pagination.total=0,t.pagination.pages=0;case 18:return e.prev=18,t.loading=!1,e.finish(18);case 21:case"end":return e.stop()}},e,t,[[0,12,18,21]])}))()},handleCurrentChange:function(t){this.pagination.page=t,this.handleGetList()},onClickRefresh:function(){this.pagination.page=1,this.handleGetList()},onClickDownloadBtn:function(t){var e=this;return o()(i.a.mark(function a(){return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,e.$confirm("确定下载当前报表吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 3:e.handleDownload(t),a.next=9;break;case 6:a.prev=6,a.t0=a.catch(0),console.log("error => ",a.t0);case 9:case"end":return a.stop()}},a,e,[[0,6]])}))()},handleDownload:function(t){var e=document.createElement("a");e.style.display="none",e.href=t,document.body.appendChild(e),e.click(),document.body.removeChild(e)}}},l={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"exportOffline-wrap"},[a("div",{staticClass:"screenBox flex"},[a("div",{staticClass:"flex"}),t._v(" "),a("div",{staticClass:"right"},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.onClickRefresh}},[t._v("刷新")])],1)]),t._v(" "),a("el-table",{staticStyle:{width:"100%","margin-top":"10px"},attrs:{height:t.height,data:t.tableList,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"名称",prop:"index_name","min-width":"300",align:"left"}}),t._v(" "),a("el-table-column",{attrs:{width:"20"}}),t._v(" "),a("el-table-column",{attrs:{label:"导出链接","min-width":"300",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[1==n.status?a("div",{staticClass:"c-FFB055"},[t._v("待处理")]):2==n.status?a("div",{staticClass:"c-448AFF"},[t._v("导出链接生成中,请稍候")]):3==n.status&&n.file_url?a("div",{staticClass:"c-00B38A"},[a("span",{staticClass:"pointer",on:{click:function(e){return t.onClickDownloadBtn(n.file_url)}}},[t._v(t._s(n.file_url))])]):-1==n.status?a("div",{staticClass:"c-F03F5C"},[t._v("导出失败")]):a("div",[t._v(" - ")])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"创建时间",prop:"created_at",width:"160",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"创建人",prop:"operator_name",width:"200",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[a("el-button",{attrs:{size:"mini",type:3==n.status&&n.file_url?"primary":"info",disabled:3!=n.status||!n.file_url},on:{click:function(e){return t.onClickDownloadBtn(n.file_url)}}},[t._v("下载")])]}}])})],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:t.pagination.total>0,expression:"pagination.total > 0"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":t.pagination.page,layout:"prev, pager, next","page-count":Number(t.pagination.pages)},on:{"current-change":t.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var c=a("VU/8")(s,l,!1,function(t){a("yTfO")},"data-v-892dbfaa",null);e.default=c.exports},yTfO:function(t,e){}});
|