|
@@ -48,7 +48,6 @@ import {
|
|
|
listMeasureLine,
|
|
|
listWaterLevel,
|
|
|
getPointConfigByPlanid,
|
|
|
- getAchievement,
|
|
|
} from "@/api/analysis/achievement";
|
|
|
|
|
|
export default {
|
|
@@ -102,6 +101,13 @@ export default {
|
|
|
},
|
|
|
loadSiteRealTime() {
|
|
|
getSiteRealTime(this.siteId).then((res) => {
|
|
|
+ if (res.data && res.data.siteStatus === '0') {
|
|
|
+ this.$notify.success({
|
|
|
+ title: '提示',
|
|
|
+ message: '本次测流任务已完成'
|
|
|
+ });
|
|
|
+ this.$emit('refresh');
|
|
|
+ }
|
|
|
this.siteRealTime = res.data || {};
|
|
|
})
|
|
|
},
|
|
@@ -129,14 +135,6 @@ export default {
|
|
|
this.positions = JSON.parse(res.data.positions || '[]');
|
|
|
})
|
|
|
},
|
|
|
- refreshTask() {
|
|
|
- getAchievement(this.task.taskid).then((res) => {
|
|
|
- if (res.data.status === 2) {
|
|
|
- this.$message.success('本次测流已完成');
|
|
|
- this.$emit('refresh');
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
},
|
|
|
mounted() {
|
|
|
this.loadPositions();
|
|
@@ -150,7 +148,6 @@ export default {
|
|
|
this.timer4 = setInterval(() => this.loadSiteRealTime(), 5e3)
|
|
|
this.loadWaterLevel();
|
|
|
this.timer5 = setInterval(() => this.loadWaterLevel(), 5e3)
|
|
|
- this.timer6 = setInterval(() => this.refreshTask(), 5e3)
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
if (this.timer1) clearTimeout(this.timer1);
|
|
@@ -158,7 +155,6 @@ export default {
|
|
|
if (this.timer3) clearTimeout(this.timer3);
|
|
|
if (this.timer4) clearTimeout(this.timer4);
|
|
|
if (this.timer5) clearTimeout(this.timer5);
|
|
|
- if (this.timer6) clearTimeout(this.timer6);
|
|
|
}
|
|
|
}
|
|
|
</script>
|