代码调整
This commit is contained in:
parent
19a87a79db
commit
e2c9fa3c3e
@ -6,9 +6,9 @@
|
|||||||
<el-button size="small" class="fault-button" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式':'切换到故障模式' }}</el-button>
|
<el-button size="small" class="fault-button" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式':'切换到故障模式' }}</el-button>
|
||||||
<div class="trainBack">
|
<div class="trainBack">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button v-loading="loading" type="danger" :disabled="loading" size="small" @click="init">初始化</el-button>
|
<el-button v-if="record" v-loading="loading" type="danger" :disabled="loading" size="small" @click="init">初始化</el-button>
|
||||||
<el-button v-if="!isPause" size="small" type="primary" @click="pauseScript">暂停</el-button>
|
<el-button v-if="!isPause && record" size="small" type="primary" @click="pauseScript">暂停</el-button>
|
||||||
<el-button v-else size="small" type="primary" @click="executePlayScript">恢复</el-button>
|
<el-button v-if="isPause && record" size="small" type="primary" @click="executePlayScript">恢复</el-button>
|
||||||
<el-button v-if="!trainingSwitch && trainingDetail" type="success" size="small" @click="handlerStart">开始</el-button>
|
<el-button v-if="!trainingSwitch && trainingDetail" type="success" size="small" @click="handlerStart">开始</el-button>
|
||||||
<el-button v-if="trainingSwitch" type="danger" size="small" @click="handlerEnd">结束</el-button>
|
<el-button v-if="trainingSwitch" type="danger" size="small" @click="handlerEnd">结束</el-button>
|
||||||
<el-button type="primary" size="small" @click="back">返回</el-button>
|
<el-button type="primary" size="small" @click="back">返回</el-button>
|
||||||
@ -38,6 +38,9 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
record() { // 编制
|
||||||
|
return this.$route.query.record;
|
||||||
|
},
|
||||||
mapId() {
|
mapId() {
|
||||||
return this.$route.query.mapId;
|
return this.$route.query.mapId;
|
||||||
},
|
},
|
||||||
|
@ -182,7 +182,10 @@ export default {
|
|||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
drawUp(index, row) {
|
drawUp(index, row) {
|
||||||
console.log('编辑', index, row);
|
const qObj = {...this.$route.query};
|
||||||
|
qObj.record = true;
|
||||||
|
this.$router.push({ query:{...qObj}});
|
||||||
|
console.log('编辑', qObj, index, row);
|
||||||
getTrainingAll(row.id).then(resp => {
|
getTrainingAll(row.id).then(resp => {
|
||||||
this.$store.dispatch('trainingNew/setTrainingDetail', null);
|
this.$store.dispatch('trainingNew/setTrainingDetail', null);
|
||||||
if (resp.data && resp.data.mapLocationJson) {
|
if (resp.data && resp.data.mapLocationJson) {
|
||||||
@ -239,6 +242,9 @@ export default {
|
|||||||
this.$message.error('请先结束当前实训后再加载新的实训!');
|
this.$message.error('请先结束当前实训后再加载新的实训!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const qObj = {...this.$route.query};
|
||||||
|
delete qObj.record;
|
||||||
|
this.$router.push({ query:{...qObj}});
|
||||||
try {
|
try {
|
||||||
const detailResp = await getTrainingAll(data.id);
|
const detailResp = await getTrainingAll(data.id);
|
||||||
this.training = detailResp.data;
|
this.training = detailResp.data;
|
||||||
|
Loading…
Reference in New Issue
Block a user