This commit is contained in:
zyy 2020-06-04 17:59:08 +08:00
commit 24f089be32
7 changed files with 74 additions and 37 deletions

View File

@ -29,13 +29,6 @@ export function participantCreatTrainingRoom(id, data) {
data: data data: data
}); });
} }
/** 参赛者完成竞赛 */
export function participantCompleteCompetition(id, group) {
return request({
url: `/api/v1/competition/${id}/room/${group}`,
method: 'post'
});
}
/** 分页获取地图下的实操列表 */ /** 分页获取地图下的实操列表 */
export function getQuestionListByMapId(params) { export function getQuestionListByMapId(params) {

View File

@ -1,27 +1,34 @@
<template> <template>
<div class="main" :style="{width: canvasWidth+'px'}"> <!-- :style="{width: canvasWidth+'px'}" -->
<transition name="el-zoom-in-bottom"> <div class="main" style="overflow:hidden;width:auto;height:100%;">
<map-system-draft ref="mapCanvas" @back="back" /> <div class="map-view" style="width:auto;overflow:hidden;height:100%;">
</transition> <jlmap-visual ref="jlmapVisual" @onMenu="onContextmenu" />
<pop-menu ref="popMenu" :menu="menu" />
</div>
<menu-replay ref="menuReplay" /> <menu-replay ref="menuReplay" />
</div> </div>
</template> </template>
<script> <script>
import MapSystemDraft from '@/views/newMap/mapsystemNew/index'; import JlmapVisual from '@/views/newMap/jlmapNew/index';
import PopMenu from '@/components/PopMenu';
import { loadNewMapDataByMapId } from '@/utils/loaddata'; import { loadNewMapDataByMapId } from '@/utils/loaddata';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { checkLoginLine } from '@/api/login'; import { checkLoginLine } from '@/api/login';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import MenuReplay from './menuReplay'; import MenuReplay from './menuReplay';
import { DeviceMenu, getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
export default { export default {
name:'RefereeDisplay', name:'RefereeDisplay',
components: { components: {
MapSystemDraft, JlmapVisual,
PopMenu,
MenuReplay MenuReplay
}, },
data() { data() {
return { return {
checkLine: null checkLine: null,
menu: [],
menuNormal: []
}; };
}, },
computed: { computed: {
@ -32,7 +39,7 @@ export default {
return this.$route.query.mapId; return this.$route.query.mapId;
}, },
...mapGetters('map', [ ...mapGetters('map', [
'map' 'stationList'
]), ]),
...mapGetters('training', [ ...mapGetters('training', [
'offsetStationCode' 'offsetStationCode'
@ -52,9 +59,9 @@ export default {
this.mapBoxP = document.getElementById(this.canvasId).children[0]; this.mapBoxP = document.getElementById(this.canvasId).children[0];
this.mapBoxP.style.cursor = ''; this.mapBoxP.style.cursor = '';
}, },
'size.width': function(val) { // 'size.width': function(val) {
this.setWindowSize(); // this.setWindowSize();
}, // },
'$store.state.app.windowSizeCount': function() { '$store.state.app.windowSizeCount': function() {
this.setWindowSize(); this.setWindowSize();
} }
@ -87,6 +94,16 @@ export default {
this.endViewLoading(); this.endViewLoading();
} }
}, },
onContextmenu(em) {
this.point = {
x: em.clientX,
y: em.clientY
};
if (!em.deviceType) {
var menu = getDeviceMenuByDeviceType('Cancel');
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
}
},
// 线 // 线
clearAllTimer() { clearAllTimer() {
if (this.ierval) { if (this.ierval) {
@ -189,13 +206,12 @@ export default {
// } // }
// }, // },
setWindowSize() { setWindowSize() {
// this.$nextTick(() => { this.$nextTick(() => {
const width = this.size ? this.size.width : this.width; const width = this.width;
const height = this.size ? this.size.height : this.height; const height = this.height;
this.$store.dispatch('config/resize', { width, height });
this.$store.dispatch('config/resize', { width, height }); this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode });
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode }); });
// });
} }
} }
}; };

View File

@ -227,7 +227,7 @@ export default {
playBack(index, row) { playBack(index, row) {
const group = row.group; const group = row.group;
getPublishMapInfo(this.mapId).then(resp=>{ getPublishMapInfo(this.mapId).then(resp=>{
const query = { lineCode: resp.data.lineCode, mapId: this.mapId, group: group, raceId: this.$route.query.raceId}; 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}); this.$router.push({ path: `/refereeJsxtDisplay`, query: query});
}); });
}, },
@ -249,5 +249,6 @@ export default {
font-size: 18px; font-size: 18px;
background: #fff; background: #fff;
text-align: center; text-align: center;
color: #409eff;
} }
</style> </style>

View File

@ -14,18 +14,33 @@
</div> </div>
</div> </div>
</div> </div>
<div class="comercialName">{{ userName }}的实操回放</div>
<el-button type="primary" class="back" @click="back">返回</el-button> <el-button type="primary" class="back" @click="back">返回</el-button>
<chat-box :group="group" :user-role="userRole" />
</div> </div>
</template> </template>
<script> <script>
import { Notification } from 'element-ui'; import { Notification } from 'element-ui';
import ChatBox from '@/views/newMap/jointTrainingNew/chatView/chatBox';
export default { export default {
name:'MenuPlay', name:'MenuPlay',
components:{
ChatBox
},
data() { data() {
return { return {
playSpeed:'' playSpeed:'',
userRole:'AUDIENCE'
}; };
}, },
computed:{
userName() {
return this.$route.query.userName;
},
group() {
return this.$route.query.group;
}
},
methods:{ methods:{
back() { back() {
this.$store.dispatch('training/over').then(() => { this.$store.dispatch('training/over').then(() => {
@ -39,14 +54,14 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.menuReplay{ .menuReplay{
position: absolute; position: absolute;
width: 300px; width: 215px;
height: 40px; height: 40px;
left: 10px; right: 20px;
bottom: 15px; top: 15px;
z-index: 2; z-index: 2;
background: #fff; background: #fff;
border-radius: 4px; border-radius: 4px;
font-size:0px; font-size: 0px;
} }
.replay,.speedAdd,.speedMinus{ .replay,.speedAdd,.speedMinus{
display: inline-block; display: inline-block;
@ -76,8 +91,20 @@ export default {
vertical-align: bottom; vertical-align: bottom;
} }
.back{ .back{
position:absolute; position: absolute;
right:10px; right: 20px;
bottom:10px; bottom: 15px;
}
.comercialName{
position: absolute;
left: 50%;
top: 0px;
padding: 10px 30px;
color: #000;
font-size: 18px;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
background: #fff;
border-radius: 0px 0px 10px 10px;
} }
</style> </style>

View File

@ -92,7 +92,7 @@ export default {
language:'zh', language:'zh',
sex:'1' sex:'1'
}, },
headerTitle:'所有人' headerTitle:''
}; };
}, },
computed:{ computed:{

View File

@ -61,7 +61,7 @@ export default {
} }
this.scrollTop(); this.scrollTop();
} else { } else {
debugger; // debugger;
if (!simulationText.all) { if (!simulationText.all) {
this.$emit('changeCoversition', simulationText); this.$emit('changeCoversition', simulationText);
// this.$emit('addCoversition', {data:simulationText, headerTitle:''}); // this.$emit('addCoversition', {data:simulationText, headerTitle:''});

View File

@ -34,7 +34,7 @@ import { putJointTrainingSimulationUserNew} from '@/api/jointTraining';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import { getSessionStorage } from '@/utils/auth'; import { getSessionStorage } from '@/utils/auth';
import RealDevice from './menuDraft/realDevice'; 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 { prefixIntrger } from '@/utils/date';
export default { export default {