升降机数据导出bug修复

This commit is contained in:
骆乐 2022-10-24 17:31:42 +08:00
parent f138dd9e4e
commit 3ed69fc04c
3 changed files with 8 additions and 11 deletions

View File

@ -440,19 +440,12 @@ export default {
this.selectLifterCurrentData() this.selectLifterCurrentData()
}, },
exportExcel(){ exportExcel(){
console.log('点击this.valueTime',this.valueTime) // console.log('this.valueTime',this.valueTime)
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
if(this.valueTime){ if(this.valueTime){
window.location.href = window.location.href =
this.$http.defaults.baseURL + this.$http.defaults.baseURL +
"xmgl/download/exporExcelTowerAlarm?projectSn=" + this.projectSn + "xmgl/download/exporExcelTowerAlarm?projectSn=" + this.projectSn +
"&devSn=" + this.devSn + "&startTime=" + this.valueTime[0] + "&endTime=" + this.valueTime[1]; "&devSn=" + this.devSn + "&startTime=" + this.valueTime[0] + "&endTime=" + this.valueTime[1];
loading.close();
}else { }else {
window.location.href = window.location.href =
this.$http.defaults.baseURL + this.$http.defaults.baseURL +

View File

@ -13,7 +13,9 @@
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<component :is="componentName"></component> <!-- <component :is="componentName"></component> -->
<workCycleTable v-if="activeNav == 1"></workCycleTable>
<liveDataTable v-else></liveDataTable>
</div> </div>
</div> </div>
</template> </template>

View File

@ -311,12 +311,14 @@ export default {
this.selectLifterWorkCycle() this.selectLifterWorkCycle()
}, },
exportExcel(){ exportExcel(){
// console.log('this.valueTime',this.valueTime)
if(this.valueTime){ if(this.valueTime){
window.location.href = window.location.href =
this.$http.defaults.baseURL + this.$http.defaults.baseURL +
"xmgl/download/exporExcelTowerAlarm?projectSn=" + this.projectSn + "xmgl/download/exporExcelTowerAlarm?projectSn=" + this.projectSn +
"&devSn=" + this.devSn?this.devSn:"" + "&startTime=" + this.transformTimestamp2(this.valueTime[0]) + "&endTime=" + this.transformTimestamp2(this.valueTime[1]); "&devSn=" + this.devSn + "&startTime=" + this.valueTime[0] + "&endTime=" + this.valueTime[1];
}else { }
else {
window.location.href = window.location.href =
this.$http.defaults.baseURL + this.$http.defaults.baseURL +
"xmgl/download/exporExcelTowerAlarm?projectSn=" + this.projectSn + "xmgl/download/exporExcelTowerAlarm?projectSn=" + this.projectSn +