|
@@ -4,18 +4,26 @@
|
|
<div class="realtime-foot">
|
|
<div class="realtime-foot">
|
|
<div class="realtime-foot-title">实时动态模拟</div>
|
|
<div class="realtime-foot-title">实时动态模拟</div>
|
|
<div class="realtime-foot-actions">
|
|
<div class="realtime-foot-actions">
|
|
- <div class="realtime-foot-action" v-if="task.status === 0">
|
|
|
|
- <svg-icon icon-class="realtime-pause" class-name="realtime-foot-action-icon" @click="pause" />
|
|
|
|
- <div class="realtime-foot-action-label">暂停任务</div>
|
|
|
|
- </div>
|
|
|
|
- <div class="realtime-foot-action" v-if="task.status === 3">
|
|
|
|
- <svg-icon icon-class="realtime-play" class-name="realtime-foot-action-icon" @click="play" />
|
|
|
|
- <div class="realtime-foot-action-label">开始任务</div>
|
|
|
|
- </div>
|
|
|
|
- <div class="realtime-foot-action" v-if="task.status === 0 || task.status === 3">
|
|
|
|
- <svg-icon icon-class="realtime-stop" class-name="realtime-foot-action-icon" @click="stop" />
|
|
|
|
- <div class="realtime-foot-action-label">终止任务</div>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <template v-if="stopped">
|
|
|
|
+ <div class="realtime-foot-action">
|
|
|
|
+ <svg-icon icon-class="realtime-stop" class-name="realtime-foot-action-icon" />
|
|
|
|
+ <div class="realtime-foot-action-label">已终止</div>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <div class="realtime-foot-action" v-if="task.status === 0">
|
|
|
|
+ <svg-icon icon-class="realtime-pause" class-name="realtime-foot-action-icon" @click="pause" />
|
|
|
|
+ <div class="realtime-foot-action-label">暂停任务</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="realtime-foot-action" v-if="task.status === 3">
|
|
|
|
+ <svg-icon icon-class="realtime-play" class-name="realtime-foot-action-icon" @click="play" />
|
|
|
|
+ <div class="realtime-foot-action-label">开始任务</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="realtime-foot-action" v-if="task.status === 0 || task.status === 3">
|
|
|
|
+ <svg-icon icon-class="realtime-stop" class-name="realtime-foot-action-icon" @click="stop" />
|
|
|
|
+ <div class="realtime-foot-action-label">终止任务</div>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
</div>
|
|
</div>
|
|
<div class="realtime-foot-time">
|
|
<div class="realtime-foot-time">
|
|
<div class="realtime-foot-time-label">施测时间:</div>
|
|
<div class="realtime-foot-time-label">施测时间:</div>
|
|
@@ -48,6 +56,7 @@ export default {
|
|
config: {},
|
|
config: {},
|
|
location: 0,
|
|
location: 0,
|
|
waterlevel: 0,
|
|
waterlevel: 0,
|
|
|
|
+ stopped: false,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -90,7 +99,7 @@ export default {
|
|
this.$modal.confirm('是否确认终止当前任务?').then(() => {
|
|
this.$modal.confirm('是否确认终止当前任务?').then(() => {
|
|
return taskAction(this.siteId, 0);
|
|
return taskAction(this.siteId, 0);
|
|
}).then(() => {
|
|
}).then(() => {
|
|
- this.$router.back();
|
|
|
|
|
|
+ this.stopped = true;
|
|
this.$modal.msgSuccess("终止成功");
|
|
this.$modal.msgSuccess("终止成功");
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
},
|
|
},
|