From 7764f89797fa33e5350dbf2febaaf83f67388566 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Thu, 4 Jun 2020 19:19:58 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=A3=81=E5=88=A4=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/competition.js | 55 ++++++++++++++++++ src/views/jsxt/refereeList/index.vue | 13 ++++- src/views/jsxt/refereeList/menuReplay.vue | 70 +++++++++++++++++++++-- 3 files changed, 129 insertions(+), 9 deletions(-) diff --git a/src/api/competition.js b/src/api/competition.js index 03cd585d6..3aefb65fe 100644 --- a/src/api/competition.js +++ b/src/api/competition.js @@ -177,3 +177,58 @@ export function getPracticalCompetitionResult(competitionId) { method: 'get' }); } + +/** 回访准备 */ +export function playBackReady(params) { + return request({ + url: `/api/v1/simulationRecord/playback/ready`, + method: 'get', + params + }); +} + +/** 设置倍速 */ +export function setPlaySpeed(params) { + return request({ + url: `/api/v1/simulationRecord/playback/setPlaySpeed`, + method: 'get', + params + }); +} + +/** 开始播放 */ +export function startPlaying(params) { + return request({ + url: `/api/v1/simulationRecord/playback/startPlaying`, + method: 'get', + params + }); +} + +/** 暂停播放 */ +export function playingPause(params) { + return request({ + url: `/api/v1/simulationRecord/playback/pausePlaying`, + method: 'get', + params + }); +} + +/** 结束播放 */ +export function endPlaying(params) { + return request({ + url: `/api/v1/simulationRecord/playback/endPlaying`, + method: 'get', + params + }); +} + +/** 从暂停中播放 */ +export function fromPauseToPlay(params) { + return request({ + url: `/api/v1/simulationRecord/playback/playing`, + method: 'get', + params + }); +} + diff --git a/src/views/jsxt/refereeList/index.vue b/src/views/jsxt/refereeList/index.vue index e1bf803a4..6e1e26e99 100644 --- a/src/views/jsxt/refereeList/index.vue +++ b/src/views/jsxt/refereeList/index.vue @@ -7,7 +7,7 @@ + diff --git a/src/views/newMap/jointTrainingNew/menuDemon.vue b/src/views/newMap/jointTrainingNew/menuDemon.vue index cb97a70fa..fde9811da 100644 --- a/src/views/newMap/jointTrainingNew/menuDemon.vue +++ b/src/views/newMap/jointTrainingNew/menuDemon.vue @@ -12,6 +12,7 @@ @@ -34,8 +35,9 @@ import { putJointTrainingSimulationUserNew} from '@/api/jointTraining'; import { EventBus } from '@/scripts/event-bus'; import { getSessionStorage } from '@/utils/auth'; import RealDevice from './menuDraft/realDevice'; -import { participantCompleteCompetition, refereeExitSimulation, quitCurrentRace, startPracticalCompetition, submitPracticalCompetition } from '@/api/competition'; +import { refereeExitSimulation, quitCurrentRace, startPracticalCompetition, submitPracticalCompetition } from '@/api/competition'; import { prefixIntrger } from '@/utils/date'; +import localStore from 'storejs'; export default { name: 'MenuDemonJoint', @@ -56,6 +58,10 @@ export default { type: String, required: true }, + countdownTime: { + type: String, + required: true + }, deviceCode: { type: String, default() { @@ -315,6 +321,7 @@ export default { }, startCompetition() { startPracticalCompetition(this.group, this.$route.query.raceId).then(resp => { + this.$emit('startCounting'); this.jsStart = false; }).catch(()=> { this.$message.error('开始竞赛失败'); @@ -326,12 +333,7 @@ export default { cancelButtonText: this.$t('global.cancel'), type: 'warning' }).then(() => { - submitPracticalCompetition(this.group, this.$route.query.raceId).then(resp => { - // this.$router.go(-1); - this.submit(); - }).catch(()=> { - this.$message.error('提交试卷失败!'); - }); + this.submit(); }); }, refeeEndCompetition() { @@ -343,10 +345,13 @@ export default { }); }, submit() { - // this.$store.dispatch('exam/over').then(() => { - // this.$store.dispatch('trainingList/clearTrainingList'); - this.$router.replace({ path: `/jsxt/result`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId, type: 'operate', raceId:this.$route.query.raceId } }); - // }); + submitPracticalCompetition(this.group, this.$route.query.raceId).then(resp => { + const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'practical'; + localStore.remove(storeKey); + this.$router.replace({ path: `/jsxt/result`, query: { subSystem: this.$route.query.subSystem, mapId: this.$route.query.mapId, type: 'operate', raceId:this.$route.query.raceId } }); + }).catch(()=> { + this.$message.error('提交试卷失败!'); + }); } } };