Commit c269ea6d authored by zhengke's avatar zhengke

修改下载

parent 014f77a8
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</style> </style>
<template> <template>
<div class="Bus_Content" v-loading="loading"> <div class="Bus_Content">
<div class="BusExportTitle"> <div class="BusExportTitle">
{{Year}}{{Month}}月公社车账 {{Year}}{{Month}}月公社车账
<input type="button" style="float:right;" @click="downLoadExcel" class="excelBtn" value="下载excel"/> <input type="button" style="float:right;" @click="downLoadExcel" class="excelBtn" value="下载excel"/>
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
dataList:[], dataList:[],
TotalJan:'', TotalJan:'',
TotalCn:'', TotalCn:'',
loading:false, downList: "",
} }
}, },
mounted() { mounted() {
...@@ -182,9 +182,7 @@ ...@@ -182,9 +182,7 @@
}, },
methods: { methods: {
getList(){ getList(){
this.loading=true;
this.apipost('bus_get_CarfareApportionExport',this.msg, res => { this.apipost('bus_get_CarfareApportionExport',this.msg, res => {
this.loading=false;
if(res.data.resultCode == 1) { if(res.data.resultCode == 1) {
this.dataList = res.data.data.RObj; this.dataList = res.data.data.RObj;
this.msg.CurrName = res.data.data.CurrName; this.msg.CurrName = res.data.data.CurrName;
...@@ -197,15 +195,12 @@ ...@@ -197,15 +195,12 @@
}, },
//点击下载 //点击下载
downLoadExcel(){ downLoadExcel(){
this.loading=true; let msg = JSON.parse(JSON.stringify(this.msg));
this.apipost('bus_get_CarfareApportionExcelExport',this.msg, res => { this.GetLocalFile(
this.loading=false; "bus_get_CarfareApportionExcelExport",
if(res.data.resultCode == 1) { msg,
this.Success(res.data.message); this.Year+'年'+this.Month+'月'+'公社车账.xls'
}else{ );
this.Error(res.data.message);
}
}, err => {})
} }
}, },
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment