Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
# Conflicts: # src/views/jointTraining/index.vue
This commit is contained in:
commit
842f29e5d9
@ -78,5 +78,7 @@ export default {
|
||||
modifyConversition: 'Modify Conversition',
|
||||
modifyConversitionButton: 'modify',
|
||||
drivingByPlan: 'Driving By Plan',
|
||||
scriptBack: 'Back'
|
||||
scriptBack: 'Back',
|
||||
speakTo: 'to',
|
||||
executeCommandTips: 'execute command: '
|
||||
};
|
||||
|
@ -79,5 +79,7 @@ export default {
|
||||
modifyConversitionButton: '修改',
|
||||
|
||||
drivingByPlan: '按计划行车',
|
||||
scriptBack: '返回'
|
||||
scriptBack: '返回',
|
||||
speakTo: '对',
|
||||
executeCommandTips: '执行指令: '
|
||||
};
|
||||
|
@ -74,13 +74,13 @@ export default {
|
||||
{ label: 'SHD四联段线', value: '19' }
|
||||
],
|
||||
roleType: [
|
||||
{label: '管理员', value: 'Admin'},
|
||||
{label: '教员', value: 'Instructor'},
|
||||
{label: '行调', value: 'Dispatcher'},
|
||||
{label: '行值', value: 'Attendant'},
|
||||
{label: '观众', value: 'Audience'},
|
||||
{label: '司机', value: 'Driver'},
|
||||
{label: '通号', value: 'Repair'}
|
||||
{label: '管理员', value: 'Admin', enLabel: 'Admin '},
|
||||
{label: '教员', value: 'Instructor', enLabel: 'Instructor '},
|
||||
{label: '行调', value: 'Dispatcher', enLabel: 'Dispatcher '},
|
||||
{label: '行值', value: 'Attendant', enLabel: 'Attendant '},
|
||||
{label: '观众', value: 'Audience', enLabel: 'Audience '},
|
||||
{label: '司机', value: 'Driver', enLabel: 'Driver '},
|
||||
{label: '通号', value: 'Repair', enLabel: 'Repair '}
|
||||
],
|
||||
|
||||
SimulationType: [
|
||||
|
@ -3,10 +3,10 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
|
||||
} else {
|
||||
BASE_API = process.env.VUE_APP_BASE_API;
|
||||
}
|
||||
|
@ -11,6 +11,8 @@ import IbpPan from '@/ibp/ibpPan';
|
||||
import { parser } from '@/ibp/utils/parser';
|
||||
import ibpData from '@/ibp/constant/ibpData';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { putJointTrainingSimulationUser } from '@/api/chat';
|
||||
|
||||
export default {
|
||||
name: 'Ibp',
|
||||
@ -159,7 +161,13 @@ export default {
|
||||
});
|
||||
},
|
||||
back() {
|
||||
this.$emit('hideIbp');
|
||||
this.group = this.$route.query.group;
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
putJointTrainingSimulationUser(this.group).then(() => {
|
||||
this.$router.push({ path: `/trainroom`, query: { group: this.group } });
|
||||
exitFullscreen();
|
||||
});
|
||||
});
|
||||
},
|
||||
ibpDestroy() {
|
||||
if (this.$ibp) {
|
||||
|
@ -240,9 +240,9 @@ export default {
|
||||
mapViewLoaded(loading) {
|
||||
this.loading = loading;
|
||||
if (loading) {
|
||||
this.$refs.progressBar.start();
|
||||
this.$refs.progressBar&&this.$refs.progressBar.start();
|
||||
} else {
|
||||
this.$refs.progressBar.end(true);
|
||||
this.$refs.progressBar&&this.$refs.progressBar.end(true);
|
||||
}
|
||||
},
|
||||
// 设置地图加载进度
|
||||
|
@ -43,6 +43,7 @@ import { runDiagramOver, getSimulationInfo } from '@/api/simulation';
|
||||
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import ibpData from '@/ibp/constant/ibpData';
|
||||
import { Message } from 'element-ui';
|
||||
|
||||
export default {
|
||||
name: 'JointTrainingDraft',
|
||||
@ -148,6 +149,7 @@ export default {
|
||||
this.group = this.$route.query.group;
|
||||
this.mapId = this.$route.query.mapId;
|
||||
this.skinCode = this.$route.query.skinCode;
|
||||
Message.closeAll();
|
||||
},
|
||||
async mounted() {
|
||||
await this.setWindowSize();
|
||||
@ -159,6 +161,7 @@ export default {
|
||||
await this.$store.dispatch('training/reset');
|
||||
await this.$store.dispatch('map/mapClear');
|
||||
await this.$store.dispatch('training/setGroup', '');
|
||||
Message.closeAll();
|
||||
},
|
||||
methods: {
|
||||
mousemove(e) {
|
||||
@ -167,11 +170,11 @@ export default {
|
||||
handleRoomInfo(data) {
|
||||
if (data.state == '03') { // 退出房间
|
||||
this.$router.push({ path: `/` });
|
||||
this.clearSubscribe();
|
||||
// this.clearSubscribe();
|
||||
} else if (data.state == '01') { // 进入准备中
|
||||
const query = { group: this.group };
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
this.clearSubscribe();
|
||||
// this.clearSubscribe();
|
||||
}
|
||||
this.$store.dispatch('socket/setJointRoomInfo'); // 清空房间信息
|
||||
},
|
||||
@ -281,6 +284,11 @@ export default {
|
||||
this.userRole = res.data.userRole;
|
||||
this.deviceCode = res.data.deviceCode;
|
||||
this.ibpPart = res.data.ibpPart;
|
||||
if (this.userRole === 'IBP') {
|
||||
this.showIbp(this.deviceCode);
|
||||
} else {
|
||||
this.hideIbp();
|
||||
}
|
||||
return res;
|
||||
},
|
||||
// 仿真系统
|
||||
@ -295,15 +303,15 @@ export default {
|
||||
// Admin 管理员 Instructor 教员 Dispatcher 行调 Attendant 车站 Audience 观众 Driver 司机 Repair 通号 IBP:IBP盘
|
||||
this.userRole = resp.data.userRole;
|
||||
switch (this.userRole) {
|
||||
case 'Admin': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'Admin'); break;
|
||||
case 'Instructor': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'Instructor'); break;
|
||||
case 'Dispatcher': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'Dispatcher'); break;
|
||||
case 'Attendant': this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'Attendant'); break;
|
||||
case 'Audience': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Audience'); break;
|
||||
case 'Driver': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Driver'); break;
|
||||
case 'Repair': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Repair'); break;
|
||||
case 'IBP': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'IBP'); break;
|
||||
case 'BigScreen': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'BigScreen'); break;
|
||||
case 'Admin': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'Admin'); this.hideIbp(); break;
|
||||
case 'Instructor': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'Instructor'); this.hideIbp(); break;
|
||||
case 'Dispatcher': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'Dispatcher'); this.hideIbp(); break;
|
||||
case 'Attendant': this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'Attendant'); this.hideIbp(); break;
|
||||
case 'Audience': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Audience'); this.hideIbp(); break;
|
||||
case 'Driver': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Driver'); this.hideIbp(); break;
|
||||
case 'Repair': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Repair'); this.hideIbp(); break;
|
||||
case 'IBP': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'IBP'); this.showIbp(resp.data.deviceCode); break;
|
||||
case 'BigScreen': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'BigScreen'); this.hideIbp(); break;
|
||||
}
|
||||
}
|
||||
await this.getTrainDetail(this.skinCode);
|
||||
@ -338,13 +346,15 @@ export default {
|
||||
this.ibpShow =false;
|
||||
},
|
||||
showIbp(deviceCode) {
|
||||
if (!deviceCode || !ibpData[deviceCode]) {
|
||||
this.$messageBox(this.$t('error.ibpNoDraw'));
|
||||
return;
|
||||
}
|
||||
this.drivingShow = false;
|
||||
this.panelShow = false;
|
||||
this.ibpShow = true;
|
||||
if (!deviceCode || !ibpData[deviceCode]) {
|
||||
Message.warning({message: this.$t('error.ibpNoDraw'), duration: 0, showClose: true, type: 'error'});
|
||||
return;
|
||||
} else {
|
||||
Message.closeAll();
|
||||
}
|
||||
this.$refs.ibpPlate.show(deviceCode, this.ibpPart);
|
||||
},
|
||||
hidepanel() {
|
||||
@ -354,9 +364,11 @@ export default {
|
||||
this.$refs.Jl3dDrive.show(this.skinCode);
|
||||
},
|
||||
hideIbp() {
|
||||
Message.closeAll();
|
||||
this.drivingShow = false;
|
||||
this.panelShow = true;
|
||||
this.ibpShow = false;
|
||||
this.$refs.ibpPlate.ibpDestroy();
|
||||
},
|
||||
messageInfo(message, type) {
|
||||
this.$message({
|
||||
|
@ -2,7 +2,6 @@
|
||||
<div>
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
<el-button v-if="isIBP" type="warning" @click="jumpIbp">{{ $t('joinTraining.iBPDisk') }}</el-button>
|
||||
<el-button v-if="isDriver" type="jumpjlmap3d" @click="jumpjlmap3d">{{ $t('joinTraining.driverPerspective') }}</el-button>
|
||||
<template v-if="isAdmin">
|
||||
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">{{ $t('joinTraining.drivingByPlan') }}</el-button>
|
||||
@ -79,9 +78,6 @@ export default {
|
||||
isAdmin() {
|
||||
return this.userRole == 'Admin';
|
||||
},
|
||||
isIBP() {
|
||||
return this.userRole == 'IBP';
|
||||
},
|
||||
isBigScreen() {
|
||||
return this.userRole == 'BigScreen';
|
||||
}
|
||||
@ -309,9 +305,6 @@ export default {
|
||||
},
|
||||
jumpjlmap3d() {
|
||||
this.$emit('hidepanel');
|
||||
},
|
||||
jumpIbp() {
|
||||
this.$emit('showIbp', this.deviceCode);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -67,6 +67,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import Cookies from 'js-cookie';
|
||||
import DeviceTypeDic from '@/scripts/DeviceTypeDic';
|
||||
// import CommandForm from "./commandForm";
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
@ -181,7 +182,13 @@
|
||||
let lastData=JSON.stringify(resp.data);
|
||||
roleTypeList.forEach(function(element){
|
||||
let rolename=element.value;
|
||||
// lastData=lastData.replace(new RegExp(rolename,'g'),element.label);
|
||||
if(Cookies.get("user_lang")=="en"){
|
||||
lastData=lastData.replace(new RegExp(rolename,'g'),element.enLabel);
|
||||
}else{
|
||||
|
||||
lastData=lastData.replace(new RegExp(rolename,'g'),element.label);
|
||||
}
|
||||
});
|
||||
lastData=JSON.parse(lastData);
|
||||
this.memberList=lastData;
|
||||
|
@ -13,6 +13,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import Cookies from 'js-cookie';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import {getScriptPlayMember,getScriptMemberData,cancleScriptMembers,selectScriptMembers,modifyScriptMemberSex} from '@/api/simulation';
|
||||
export default {
|
||||
@ -63,7 +64,12 @@
|
||||
let lastData=data.replace(new RegExp('id','g'),'key');
|
||||
roleTypeList.forEach(function(element){
|
||||
let rolename=element.value;
|
||||
if(Cookies.get("user_lang")=="en"){
|
||||
lastData=lastData.replace(new RegExp(rolename,'g'),element.enLabel);
|
||||
}else{
|
||||
|
||||
lastData=lastData.replace(new RegExp(rolename,'g'),element.label);
|
||||
}
|
||||
});
|
||||
lastData=JSON.parse(lastData);
|
||||
return lastData;
|
||||
|
@ -9,14 +9,14 @@
|
||||
<span class="otherInfo" v-html="actionInfo.otherInfo"></span>
|
||||
<span v-if="actionInfo.isCoversition">
|
||||
<span class="roleClass">{{actionInfo.memberName}}</span>
|
||||
<span>对</span>
|
||||
<span>{{$t('scriptRecord.speakTo')}}</span>
|
||||
<span class="roleClass">{{actionInfo.targetName}}</span>
|
||||
<span>: </span>
|
||||
<span>{{actionInfo.reply}}</span>
|
||||
</span>
|
||||
<span v-else>
|
||||
<span class="roleClass">{{actionInfo.memberName}}</span>
|
||||
<span>执行指令: </span>
|
||||
<span>{{$t('scriptRecord.executeCommandTips')}}</span>
|
||||
<span class="commandStyle">{{actionInfo.command}}</span>
|
||||
</span>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user