按钮顺序调整

This commit is contained in:
fan 2021-03-18 11:21:00 +08:00
parent 36aee735a8
commit 23d8feb8b7

View File

@ -14,9 +14,9 @@
</div>
<div id="teachGroupButton" class="display-draft" :style="{bottom: offsetBottom + 'px'}">
<el-button-group>
<el-button type="primary" :disabled="backDisable" class="back" @click="back">{{ $t('display.backBtn') }}</el-button>
<el-button type="danger" class="end" :disabled="!isDisable || dataError" @click="end">{{ $t('display.endBtn') }}</el-button>
<el-button type="success" class="start" :disabled="isDisable || dataError" :loading="startLoading" @click="start">{{ $t('display.startBtn') }}</el-button>
<el-button type="danger" class="end" :disabled="!isDisable || dataError" @click="end">{{ $t('display.endBtn') }}</el-button>
<el-button type="primary" :disabled="backDisable" class="back" @click="back">{{ $t('display.backBtn') }}</el-button>
</el-button-group>
</div>
<tip-training-detail :training-obj="trainingObj" :offset-bottom="offsetBottom + tipBottom" />
@ -67,7 +67,7 @@ export default {
},
data() {
return {
result: {},
result: {},
timeInterval: null,
TrainingMode: TrainingMode,
trainingObj:{},
@ -108,9 +108,9 @@ export default {
project() {
return getSessionStorage('project');
},
isOther() {
return this.$route.query.from == 'kzfmooc';
}
isOther() {
return this.$route.query.from == 'kzfmooc';
}
},
watch: {
demoMode: function (val) {
@ -159,7 +159,7 @@ export default {
}
},
setTrainingData(resp) {
const detail = resp.data;
const detail = resp.data;
this.trainingObj = detail;
this.$store.dispatch('exam/setCenter', detail.locateDeviceCode);
this.$store.dispatch('training/setTrainingData', this.trainingObj); //
@ -228,7 +228,7 @@ export default {
};
endTrainingNew(mode, this.group).then(response => {
const data = response.data;
this.result = data;
this.result = data;
this.$store.dispatch('training/judgeFinish', data).then(rsp => {
this.$store.dispatch('training/setStopCountTime');
this.$store.dispatch('training/emitTipFresh');
@ -262,7 +262,7 @@ export default {
usedTime: this.usedTime
};
endTrainingNew(mode, this.group).then(response => {
this.result = response.data;
this.result = response.data;
this.$store.dispatch('training/end', null);
this.$store.dispatch('training/setStopCountTime');
this.$store.dispatch('training/setScore', 0);
@ -281,9 +281,9 @@ export default {
},
back() {
Notification.closeAll();
if (this.isOther) {
EventBus.$emit('demoResult', this.result);
} else if (this.$route.params.mode == 'record') {
if (this.isOther) {
EventBus.$emit('demoResult', this.result);
} else if (this.$route.params.mode == 'record') {
/** 如果是演示返回时,需要重新创建仿真*/
trainingNotifyNew({ trainingId: this.$route.query.trainingId }).then(resp => {
this.$router.push({ path: `${UrlConfig.lesson.record}/${this.$route.query.trainingId}/${this.$route.query.trainingName}`, query: { group: resp.data } });