|
@@ -48,6 +48,7 @@ import {
|
|
|
listMeasureLine,
|
|
|
listWaterLevel,
|
|
|
getPointConfigByPlanid,
|
|
|
+ getAchievement,
|
|
|
} from "@/api/analysis/achievement";
|
|
|
|
|
|
export default {
|
|
@@ -127,6 +128,14 @@ export default {
|
|
|
getPointConfigByPlanid(this.siteId, this.task.planid).then((res) => {
|
|
|
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() {
|
|
@@ -141,6 +150,7 @@ 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);
|
|
@@ -148,6 +158,7 @@ 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>
|