demo
This commit is contained in:
parent
520c95a00c
commit
b4bf5114c6
@ -25,7 +25,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { getTrainingDetailNew } from '@/api/jmap/training';
|
||||
import TipTrainingDetail from './tipTrainingDetail';
|
||||
import LeftSlider from './LeftSlider';
|
||||
import { mapGetters } from 'vuex';
|
||||
@ -68,6 +67,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
result: {},
|
||||
timeInterval: null,
|
||||
TrainingMode: TrainingMode,
|
||||
trainingObj:{},
|
||||
@ -100,13 +100,16 @@ export default {
|
||||
return timeFormat(this.usedTime);
|
||||
},
|
||||
isShowLeftSlider() {
|
||||
return this.$route.query.lessonId != '0';
|
||||
return this.$route.query.lessonId != '0' && !this.isOther;
|
||||
},
|
||||
prdType() {
|
||||
return this.$route.query.prdType;
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
},
|
||||
isOther() {
|
||||
return this.$route.query.from == 'kzfmooc';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -217,7 +220,6 @@ export default {
|
||||
}
|
||||
},
|
||||
endCommit() {
|
||||
// this.$store.dispatch('training/setStopCountTime');
|
||||
const mode = {
|
||||
mode: this.demoMode,
|
||||
id: this.trainingObj.id,
|
||||
@ -226,6 +228,7 @@ export default {
|
||||
};
|
||||
endTrainingNew(mode, this.group).then(response => {
|
||||
const data = response.data;
|
||||
this.result = data;
|
||||
this.$store.dispatch('training/judgeFinish', data).then(rsp => {
|
||||
this.$store.dispatch('training/setStopCountTime');
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
@ -259,7 +262,7 @@ export default {
|
||||
usedTime: this.usedTime
|
||||
};
|
||||
endTrainingNew(mode, this.group).then(response => {
|
||||
// const data = response.data;
|
||||
this.result = response.data;
|
||||
this.$store.dispatch('training/end', null);
|
||||
this.$store.dispatch('training/setStopCountTime');
|
||||
this.$store.dispatch('training/setScore', 0);
|
||||
@ -278,7 +281,9 @@ export default {
|
||||
},
|
||||
back() {
|
||||
Notification.closeAll();
|
||||
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 } });
|
||||
|
Loading…
Reference in New Issue
Block a user