|
|
@@ -1,7 +1,7 @@
|
|
|
<!-- 设备历史数据 -->
|
|
|
<template>
|
|
|
<div class="equipInfo">
|
|
|
- <DateSearch @exportData="exportData" @dateChange="dateChange" @toggleSwitcState="toggleSwitcState"></DateSearch>
|
|
|
+ <DateSearch @exportData="exportData" @dateChange="dateChange" ref="timeSearchRefs" @toggleSwitcState="toggleSwitcState"></DateSearch>
|
|
|
<div class="charts" v-if="switcState">
|
|
|
<highcharts
|
|
|
class="highcharts"
|
|
|
@@ -66,6 +66,8 @@ export default {
|
|
|
begin:"",
|
|
|
end:"",
|
|
|
page:1,
|
|
|
+ currNum:'',
|
|
|
+ flag:'',
|
|
|
},
|
|
|
switcState:true,
|
|
|
options:{},
|
|
|
@@ -103,6 +105,8 @@ export default {
|
|
|
this.queryInfo.begin = data.begin;
|
|
|
this.queryInfo.end = data.end;
|
|
|
this.queryInfo.page = 1;
|
|
|
+ this.queryInfo.currNum = data.currNum;
|
|
|
+ this.queryInfo.flag = data.flag;
|
|
|
this.getChartLine('chart','table');
|
|
|
},
|
|
|
exportData(data){
|
|
|
@@ -301,7 +305,7 @@ export default {
|
|
|
|
|
|
})
|
|
|
}else{
|
|
|
- this.options = {};
|
|
|
+ this.options = {};
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -319,10 +323,19 @@ export default {
|
|
|
}).then((res) => {
|
|
|
if (res.data.message == "") {
|
|
|
this.total = res.data.data.counts;
|
|
|
- var data = res.data.data.data;
|
|
|
- this.tableData = [];
|
|
|
- this.tableData = data
|
|
|
+ if(this.total !== 0){
|
|
|
+ var data = res.data.data.data;
|
|
|
+ this.tableData = [];
|
|
|
+ this.tableData = data
|
|
|
+ }else{
|
|
|
+ if(this.queryInfo.flag == 'auto'){
|
|
|
+ this.queryInfo.currNum++;
|
|
|
+ this.$refs.timeSearchRefs.timeBtnClick(this.queryInfo.currNum,this.queryInfo.flag);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
break;
|