优化
This commit is contained in:
@@ -183,7 +183,8 @@ export default {
|
||||
taskId: '',
|
||||
customerId: '',
|
||||
// year: ''
|
||||
}
|
||||
},
|
||||
doDebounce: null,
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
@@ -220,6 +221,9 @@ export default {
|
||||
created() {
|
||||
this.level = sessionStorage.getItem('level')
|
||||
this.getEnergyReportInfo()
|
||||
this.doDebounce = debounce(function () {
|
||||
this.getGenerateReport()
|
||||
}, 5000, true)
|
||||
},
|
||||
methods: {
|
||||
...mapMutations('report', ['setEnergyReportInfo']),
|
||||
@@ -416,9 +420,9 @@ export default {
|
||||
this.$router.push({path: '/energyReport'})
|
||||
},
|
||||
// 重新生成
|
||||
generateReport:debounce(function () {
|
||||
this.getGenerateReport()
|
||||
}, 5000, true),
|
||||
generateReport(){
|
||||
this.doDebounce()
|
||||
},
|
||||
async getGenerateReport() {
|
||||
let data = {
|
||||
customerId: this.energyData.customerId,
|
||||
|
||||
Reference in New Issue
Block a user