|
@@ -108,9 +108,6 @@ export default {
|
|
|
mounted() {
|
|
|
this.queryStartTime = this.startTime
|
|
|
this.queryEndTime = this.endTime
|
|
|
- this.getDraw()
|
|
|
- this.getTable()
|
|
|
-
|
|
|
},
|
|
|
methods:{
|
|
|
async getDraw(){
|
|
@@ -154,8 +151,15 @@ export default {
|
|
|
}
|
|
|
this.$axios.get('/forecastPowerShortTermController/getAll',
|
|
|
{params: searchParams}).then((res) => {
|
|
|
- this.tableData = res.data.records
|
|
|
- this.total = res.data.total
|
|
|
+ if (res.code=='0'){
|
|
|
+ this.tableData = res.data.records
|
|
|
+ this.total = res.data.total
|
|
|
+ this.getDraw()
|
|
|
+ }
|
|
|
+ else if (res.code=='1'){
|
|
|
+ this.$message.error(res.data)
|
|
|
+ return
|
|
|
+ }
|
|
|
}).catch((error) => {
|
|
|
// this.$message.error(error)
|
|
|
})
|
|
@@ -216,16 +220,9 @@ export default {
|
|
|
this.loading = false
|
|
|
return
|
|
|
}
|
|
|
- if(this.endTime-this.startTime> 60 * 60 * 24 * 1000*3){
|
|
|
- // this.startTime = this.queryStartTime
|
|
|
- // this.endTime = this.queryEndTime
|
|
|
- this.$message.error("只能最多查询3天的数据哦")
|
|
|
- this.loading = false
|
|
|
- return
|
|
|
- }
|
|
|
+
|
|
|
this.queryStartTime = this.startTime
|
|
|
this.queryEndTime = this.endTime
|
|
|
- this.getDraw(this.queryStartTime,this.queryEndTime)
|
|
|
this.currentPage = 1
|
|
|
this.pageSize = 10
|
|
|
this.getTable()
|