diff --git a/src/views/comment/components/report.vue b/src/views/comment/components/report.vue index 32c414a..d3c14ff 100644 --- a/src/views/comment/components/report.vue +++ b/src/views/comment/components/report.vue @@ -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, diff --git a/src/views/energyEfficiency/clockIn/index.vue b/src/views/energyEfficiency/clockIn/index.vue index b6c413e..3bba623 100644 --- a/src/views/energyEfficiency/clockIn/index.vue +++ b/src/views/energyEfficiency/clockIn/index.vue @@ -129,6 +129,7 @@ export default { showSubmit: false, taskId: '', customerId: '', + doDebounce: null, } }, mounted() { @@ -136,6 +137,9 @@ export default { this.taskId = JSON.parse(sessionStorage.getItem('tidCid')).taskId this.customerId = JSON.parse(sessionStorage.getItem('tidCid')).customerId this.getHistory() + this.doDebounce = debounce(function () { + this.save() + }, 5000, true) }, methods: { // 查询打卡记录 @@ -240,9 +244,9 @@ export default { }) return list }, - handleClick:debounce(function () { - this.save() - }, 5000, true), + handleClick(){ + this.doDebounce() + }, // 保存 save() { if (this.$refs.uploaderRef.checkImgisUpload(this.text1)) { diff --git a/src/views/energyEfficiency/constructionInfo.vue b/src/views/energyEfficiency/constructionInfo.vue index adf8e88..b849df4 100644 --- a/src/views/energyEfficiency/constructionInfo.vue +++ b/src/views/energyEfficiency/constructionInfo.vue @@ -1,6 +1,6 @@