裁判系统代码调整
This commit is contained in:
parent
78d8da26b0
commit
7764f89797
@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { refereeEnterSimulation, loadingPaper, getRaceUserList, getRaceById } from '@/api/competition';
|
||||
import { refereeEnterSimulation, loadingPaper, getRaceUserList, getRaceById, playBackReady } from '@/api/competition';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import editScore from './editScore';
|
||||
|
||||
@ -227,8 +227,15 @@ export default {
|
||||
playBack(index, row) {
|
||||
const group = row.group;
|
||||
getPublishMapInfo(this.mapId).then(resp=>{
|
||||
const query = { lineCode: resp.data.lineCode, mapId: this.mapId, group: group, raceId: this.$route.query.raceId, userName:row.name};
|
||||
this.$router.push({ path: `/refereeJsxtDisplay`, query: query});
|
||||
playBackReady({group:group}).then(res=>{
|
||||
if (res.data) {
|
||||
const query = { lineCode: resp.data.lineCode, mapId: this.mapId, group: group, raceId: this.$route.query.raceId, userName:row.name};
|
||||
this.$router.push({ path: `/refereeJsxtDisplay`, query: query});
|
||||
} else {
|
||||
this.$messageBox('回放数据出错!');
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
},
|
||||
gradeScore(index, row) { // 裁判打分
|
||||
|
@ -1,14 +1,15 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="menuReplay">
|
||||
<div class="replay">
|
||||
<span class="el-icon-caret-right" />
|
||||
<div class="replay" @click="startPlaying">
|
||||
<span v-if="isPlaying" class="ToPause" style="padding: 3px 0px">||</span>
|
||||
<span v-else class="el-icon-caret-right" />
|
||||
</div>
|
||||
<div class="playSpeedGroup">
|
||||
<div class="speedAdd">
|
||||
<div class="speedAdd" :style="isAddDisabled?'cursor:no-drop;':''" @click="addSpeed">
|
||||
<span class="el-icon-plus" />
|
||||
</div>
|
||||
<div class="speedNum">{{ playSpeed }}</div>
|
||||
<div class="speedNum">{{ playSpeedList[playSpeedIndex].name }}</div>
|
||||
<div class="speedMinus">
|
||||
<span class="el-icon-minus" />
|
||||
</div>
|
||||
@ -22,6 +23,7 @@
|
||||
<script>
|
||||
import { Notification } from 'element-ui';
|
||||
import ChatBox from '@/views/newMap/jointTrainingNew/chatView/chatBox';
|
||||
import {setPlaySpeed, startPlaying, playingPause, endPlaying, fromPauseToPlay} from '@/api/competition';
|
||||
export default {
|
||||
name:'MenuPlay',
|
||||
components:{
|
||||
@ -29,8 +31,23 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
playSpeed:'',
|
||||
userRole:'AUDIENCE'
|
||||
playSpeedIndex:5,
|
||||
playSpeedList:[
|
||||
{level:'-5', name:'-5X'},
|
||||
{level:'-4', name:'-4X'},
|
||||
{level:'-3', name:'-3X'},
|
||||
{level:'-2', name:'-2X'},
|
||||
{level:'-1', name:'-1X'},
|
||||
{level:'1', name:'1X'},
|
||||
{level:'2', name:'2X'},
|
||||
{level:'3', name:'3X'},
|
||||
{level:'4', name:'4X'},
|
||||
{level:'5', name:'5X'}
|
||||
],
|
||||
userRole:'AUDIENCE',
|
||||
isFirstPlay:true,
|
||||
isPlaying:false
|
||||
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
@ -39,6 +56,15 @@ export default {
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
isAddDisabled() {
|
||||
return this.playSpeedIndex >= this.playSpeedList.length - 1;
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.isPlaying) {
|
||||
endPlaying({}).then(res=>{
|
||||
});
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
@ -47,11 +73,43 @@ export default {
|
||||
history.go(-1);
|
||||
Notification.closeAll();
|
||||
});
|
||||
},
|
||||
addSpeed() {
|
||||
if (this.playSpeedIndex < this.playSpeedList.length - 1) {
|
||||
this.playSpeedIndex++;
|
||||
setPlaySpeed({level:this.playSpeedList[this.playSpeedIndex].level}).then(res=>{
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
startPlaying() {
|
||||
if (this.isPlaying) {
|
||||
// 暂停播放
|
||||
playingPause({}).then(res=>{
|
||||
this.isPlaying = false;
|
||||
});
|
||||
} else {
|
||||
if (this.isFirstPlay) {
|
||||
// 第一次播放
|
||||
startPlaying({}).then(res=>{
|
||||
this.isPlaying = true;
|
||||
this.isFirstPlay = false;
|
||||
});
|
||||
} else {
|
||||
// 从暂停中播放
|
||||
fromPauseToPlay({}).then(res=>{
|
||||
this.isPlaying = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.ToPause{
|
||||
display: inline-block;
|
||||
}
|
||||
.menuReplay{
|
||||
position: absolute;
|
||||
width: 215px;
|
||||
|
Loading…
Reference in New Issue
Block a user