Merge remote-tracking branch 'origin/test'

This commit is contained in:
program-walker 2020-05-20 11:10:16 +08:00
commit 18ec0312f7
11 changed files with 136 additions and 24 deletions

38
src/api/competition.js Normal file
View File

@ -0,0 +1,38 @@
import request from '@/utils/request';
/** 裁判退出仿真*/
export function refereeExitSimulation(group) {
return request({
url: `/api/v1/competition/room/${group}/refree`,
method: 'delete'
});
}
/** 裁判进入仿真 */
export function refereeEnterSimulation(group) {
return request({
url: `/api/v1/competition/room/${group}/refree`,
method: 'post'
});
}
/** 裁判查询竞赛人员的房间列表 */
export function refereeGetCompetitionList(id) {
return request({
url: `/api/v1/competition/${id}/room`,
method: 'get'
});
}
/** 参赛者创建演练房间 */
export function participantCreatTrainingRoom(id, data) {
return request({
url: `/api/v1/competition/${id}/room`,
method: 'post',
data: data
});
}
/** 参赛者完成竞赛 */
export function participantCompleteCompetition(id, group) {
return request({
url: `/api/v1/competition/${id}/room/${group}`,
method: 'post'
});
}

View File

@ -58,6 +58,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
// // console.log(event.data);
//
// }
console.log(event.data);
if(event.data.type == "Device_Load_Destroy_3D"){
DeviceDestroy(event.data);
return;

View File

@ -257,7 +257,6 @@ export default class EAxle111 extends Group {
setStyle(styles) {
if (this.model.shape.isSpecial) {
this.isogonInside.setStyle(styles);
this.isogonOutside.setStyle(styles);
this.line1.setStyle(styles);
this.line2.setStyle(styles);

View File

@ -101,7 +101,7 @@ class Handler {
const command = this.getCommand(operation);
if (command) {
// 判断当前是否是剧本 添加动作指令操作
if (store.state.scriptRecord.isScriptCommand) {
if (store.state.scriptRecord.isScriptCommand && store.state.scriptRecord.bgSet ) {
store.dispatch('scriptRecord/updateScriptCommand', {operationId:command.id, cmdType:operation.cmdType, param:command.get()});
resolve(rtn);
} else {

View File

@ -62,8 +62,7 @@ class MenuContextHandler {
const selected = this.getCurrentStateObject();
let menu = [];
const control = this.getStationControl(selected);
if (control) {
if (control && (!store.state.scriptRecord.bgSet || store.state.scriptRecord.isScriptCommand)) {
if (this.getPrdType() != '') {
const type = State2SimulationMap[this.getPrdType()];
const status = State2ControlMap[control.controlMode]; // 判断当前模式

View File

@ -7,8 +7,8 @@
</div>
<div class="area_select" style="top: 27%;">
<div>
<el-radio v-model="lcdSwitch" :label="true" border>开启LCD屏</el-radio>
<el-radio v-model="lcdSwitch" :label="false" border>关闭LCD屏</el-radio>
<el-radio v-model="lcdSwitch" :label="true" size="small" border>开启LCD屏</el-radio>
<el-radio v-model="lcdSwitch" :label="false" size="small" border>关闭LCD屏</el-radio>
</div>
<div>确定</div>
</div>
@ -69,3 +69,29 @@ export default {
line-height: 30px;
}
</style>
<style lang="scss">
.iscs_lcd_box .el-radio.is-bordered.is-checked {
border-top: 2px solid #7CDAF3;
border-left: 2px solid #7CDAF3;
border-right: 2px solid #0C3A94;
border-bottom: 2px solid #0C3A94;
background: #089DF6;
border-radius: 0;
/*width: 80px;*/
/*height: 20px;*/
}
.iscs_lcd_box .el-radio.is-bordered {
border-top: 2px solid #FFF;
border-left: 2px solid #FFF;
border-right: 2px solid #898888;
border-bottom: 2px solid #898888;
background: #989898;
border-radius: 0;
color: #FFF;
/*width: 80px;*/
/*height: 20px;*/
}
.iscs_lcd_box .el-radio__input.is-checked+.el-radio__label {
color: #FFF;
}
</style>

View File

@ -23,11 +23,7 @@
<!--
<div class="msg" v-show ="msgshow">
<div class="msgtext">
{{controlmsg}}
</div>
</div>
<div class="switchpane" style="left:0;top:47.5%;transform: rotate(90deg);" v-show="switchleft" @tap="switchl">
<image class="switchimg" :src="jiantou" />
@ -85,6 +81,7 @@ import axios from 'axios';
groupnum:"",
userrole:'',
drawWay:'',
}
},
watch: {
@ -117,8 +114,11 @@ import axios from 'axios';
}
}
bindSimulationTrain(this.group,this.groupnum);
bindSimulationTrain(this.group,this.groupnum).then(netdata => {
}).catch(error => {
console.log(error);
});
},
clickselect(e){
if(e == true){
@ -206,15 +206,7 @@ import axios from 'axios';
font-size: 4px;
}
.msgtext{
width:200px;
height:50px;
border-radius:5px;
background:#C0C0C0;
color:#FFFFFF;
font-size: 40px;
transform: rotate(90deg);
}
.switchpane{
width:30px;

View File

@ -24,6 +24,12 @@
<div id="jlcctv" v-show="cctvshow" class="jlmap3cctv">
</div>
<div class="msg" v-show ="msgshow">
<div class="msgtext">
{{controlmsg}}
</div>
</div>
<Drive-Mmi v-if="mmishow" ref="mmiui" />
<Drive-Tms v-if="mmishow" />
@ -80,6 +86,8 @@ export default {
trainnum: '',
stoptimes: '',
dcontrolshow: false,
msgshow:false,
controlmsg:"不能选择其它列车",
};
},
watch: {
@ -359,4 +367,21 @@ export default {
left: 0;
z-index: -12;
}
.msg{
width:40%;
height:50px;
left:30%;
top:0;
text-align: center;
position:absolute;
}
.msgtext{
width:400px;
height:50px;
border-radius:5px;
background:#C0C0C0;
color:#FFFFFF;
font-size: 40px;
}
</style>

View File

@ -10,7 +10,7 @@
<el-button-group>
<el-button v-if="isShowScheduling && !dataError" type="primary" @click="jumpScheduling">{{ $t('display.demon.dispatchingPlan') }}</el-button>
<el-button v-if="!isShowScheduling && !dataError" type="jl3dpassflow" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
<el-button v-if="!isShowScheduling && !dataError" type="jl3dstation" @click="jumpjl3dstation">{{ jl3dstation }}</el-button>
<!-- <el-button v-if="!isShowScheduling && !dataError" type="jl3dstation" @click="jumpjl3dstation">{{ jl3dstation }}</el-button> -->
<el-button v-if="!isShowScheduling && !dataError" type="jumpjlmap3d" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
<el-button v-if="isShow3dmodel && !isShowScheduling && !dataError" type="jumpjlmap3dmodel" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
<template v-if="isShowQuest">

View File

@ -221,11 +221,21 @@ export default {
// this.commandDataNew.action.operationId = val.operationId;
this.commandDataNew.action.operationParamMap = val.param;
this.messageTips2 = '';
},
'commandDataNew.action.memberId':function(val) {
if (val) {
this.$store.dispatch('scriptRecord/updateIsScriptCommand', true);
} else {
this.$store.dispatch('scriptRecord/updateIsScriptCommand', false);
}
}
},
mounted() {
this.initData();
},
beforeDestroy() {
this.$store.dispatch('scriptRecord/updateIsScriptCommand', false);
},
methods:{
initData() {
this.buttonName = this.$t('scriptRecord.addConversitionButton');
@ -362,10 +372,16 @@ export default {
},
changeMember(member) {
if (member) {
if (this.isFirstTips) {
this.$message('请在右侧地图上选择操作');
this.isFirstTips = false;
}
this.messageTips1 = '';
this.executeCommandName = '';
this.commandDataNew.action.operationType = '';
this.commandDataNew.action.operationParamMap = {};
this.$store.dispatch('scriptRecord/updateIsScriptCommand', true);
this.switchMode(member);
}
},
addCommandActionNew() {
@ -537,6 +553,22 @@ export default {
if (!this.drawWay) {
this.$refs.command.resetData();
}
},
switchMode(role) {
let prdType = '';
const memberInfo = this.memberList.find(member=>{
return member.id == role;
});
if (memberInfo) {
if (memberInfo.role == '行值') {
prdType = '01';
} else if (memberInfo.role == '行调') {
prdType = '02';
} else if (memberInfo.role == '司机') {
prdType = '04';
}
}
this.$store.dispatch('training/setPrdType', prdType);
}
}
};

View File

@ -63,7 +63,7 @@
@changeUser="handleUpdUser"
@delUser="handleDelUser"
/>
<e-role
<!-- <e-role
class="role"
title-i18n="trainRoom.ibp"
role-type="IBP"
@ -73,7 +73,7 @@
@addUser="handleAddUser"
@changeUser="handleUpdUser"
@delUser="handleDelUser"
/>
/> -->
<e-role
v-if="isGzbProject"
class="role"