|
@@ -18,7 +18,7 @@
|
|
|
<script>
|
|
|
import {getSiteSection, listPlainPoint} from "@/api/site/berthing";
|
|
|
import {getConfig} from "@/api/site/site";
|
|
|
-import {getWaterLevel, manualMeasure} from "@/api/analysis/achievement";
|
|
|
+import {getLatestTask, getWaterLevel, manualMeasure} from "@/api/analysis/achievement";
|
|
|
import ChartList from '@/views/site/plain-point/chart-list';
|
|
|
import Chart from '@/views/site/plain-point/chart';
|
|
|
|
|
@@ -117,10 +117,32 @@ export default {
|
|
|
data.positions = this.plain.sections.filter((s) => this.plain.positions.includes(s.x));
|
|
|
}
|
|
|
manualMeasure(data).then(() => {
|
|
|
- this.$message.success("加测指令下发成功");
|
|
|
+ if (this.notify) {
|
|
|
+ return this.$message.warning('请勿重复下发指令');
|
|
|
+ }
|
|
|
+ this.notify = this.$notify.success({
|
|
|
+ title: '成功',
|
|
|
+ message: '加测指令下发成功,收到测流开始指令后页面会自动跳转',
|
|
|
+ showClose: false,
|
|
|
+ duration: 0,
|
|
|
+ });
|
|
|
this.dialogFormVisible = false;
|
|
|
+ this.checkStarting();
|
|
|
});
|
|
|
+ },
|
|
|
+ checkStarting() {
|
|
|
+ getLatestTask(this.site.siteId).then((res) => {
|
|
|
+ if (res.data.status === 0) {
|
|
|
+ this.notify.close();
|
|
|
+ this.$emit('refresh');
|
|
|
+ } else {
|
|
|
+ this.timer = setTimeout(() => this.checkStarting(), 2e3)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
+ },
|
|
|
+ beforeDestroy() {
|
|
|
+ if(this.timer)clearTimeout(this.timer);
|
|
|
}
|
|
|
}
|
|
|
</script>
|