Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test_ls
This commit is contained in:
commit
07cf9f0ca7
@ -5,7 +5,6 @@
|
||||
<training-tip ref="trainingTip" />
|
||||
<training-position-tip ref="trainingPositionTip" />
|
||||
<training-menu v-if="trainingDetail" ref="trainingMenu" :offset-bottom="offsetBottom" />
|
||||
<el-button size="small" class="fault-button" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式':'切换到故障模式' }}</el-button>
|
||||
<div class="trainBack">
|
||||
<el-button-group>
|
||||
<el-button v-if="record" v-loading="loading" type="danger" :disabled="loading" size="small" @click="init">初始化</el-button>
|
||||
@ -24,7 +23,6 @@ import { startTraining, endTraining, endTrainingStep } from '@/api/jmap/training
|
||||
import TrainingJlmap from './trainingJlmap';
|
||||
import MenuDemon from '@/views/trainingManage/demonMenu.vue';
|
||||
import TrainingTip from './trainingTip';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import TrainingPositionTip from './trainingPositionTip';
|
||||
import TrainingMenu from './trainingMenu';
|
||||
|
||||
@ -59,9 +57,6 @@ export default {
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
faultMode() {
|
||||
return this.$store.state.training.operatemode === OperateMode.FAULT;
|
||||
},
|
||||
teachMode() {
|
||||
return 'TEACHING_MODE';
|
||||
},
|
||||
@ -107,13 +102,6 @@ export default {
|
||||
}
|
||||
}, 500);
|
||||
},
|
||||
changeOperateMode() {
|
||||
let mode = OperateMode.FAULT;
|
||||
if (this.faultMode) {
|
||||
mode = OperateMode.NORMAL;
|
||||
}
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: mode });
|
||||
},
|
||||
init() {
|
||||
this.loading = true;
|
||||
exitRunPlan(this.group).then(() => {
|
||||
@ -202,9 +190,5 @@ export default {
|
||||
bottom: 15px;
|
||||
z-index: 19;
|
||||
}
|
||||
.fault-button{
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -1,10 +1,19 @@
|
||||
<template>
|
||||
<div class="train">
|
||||
<div v-show="maskOpen" class="trainMask" />
|
||||
<div v-show="maskOpen || prdType === '02'" class="trainMask" />
|
||||
<component :is="menus" :selected="selected" />
|
||||
<jlmap-visual ref="jlmapVisual" @onSelect="clickEvent" @onMenu="onContextmenu" />
|
||||
<voice-chat-box v-if="$route.query.lineCode == '16'" ref="chatbox" :group="group" :user-role="userRole" />
|
||||
<voice-chat-box v-if="lineCode == '16'" ref="chatbox" :group="group" :user-role="userRole" />
|
||||
<chat-box v-else ref="chatbox" :group="group" :user-role="userRole" />
|
||||
<div v-if="lineCode === '16'" v-show="prdType === '02'" style="position:absolute;width: 100%;top:0;left:0;z-index:10">
|
||||
<dispatcher-station ref="dispatcherStation" />
|
||||
</div>
|
||||
<div class="fault-button">
|
||||
<el-button-group>
|
||||
<el-button v-if="prdType === '01'" size="small" @click="goCtc">车务终端</el-button>
|
||||
</el-button-group>
|
||||
<el-button size="small" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式':'切换到故障模式' }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -12,7 +21,7 @@ import JlmapVisual from '@/views/newMap/jlmapNew/index';
|
||||
import {loadMapDataById } from '@/utils/loaddata';
|
||||
import { clearSimulation } from '@/api/simulation';
|
||||
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getToken, getSessionStorage } from '@/utils/auth';
|
||||
import chatBox from '@/views/newMap/chatView/chatBox.vue';
|
||||
import VoiceChatBox from '@/views/newMap/chatView/voiceChatBox.vue';
|
||||
import { getDeviceMenuByDeviceType, MouseEvent } from '@/scripts/ConstDic';
|
||||
@ -22,13 +31,16 @@ import { getSimulationMemberList, getAllSimulationUser } from '@/api/simulation'
|
||||
import { getMemberListCommon, getUserListCommon } from '@/api/rtSimulation';
|
||||
import Vue from 'vue';
|
||||
import {mapGetters} from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import DispatcherStation from '@/views/newMap/jointTrainingNew/dispatcherStation.vue';
|
||||
|
||||
export default {
|
||||
name: 'TrainingDesign',
|
||||
components: {
|
||||
JlmapVisual,
|
||||
chatBox,
|
||||
VoiceChatBox
|
||||
VoiceChatBox,
|
||||
DispatcherStation
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -51,6 +63,18 @@ export default {
|
||||
'trainList',
|
||||
'trainWindowList'
|
||||
]),
|
||||
prdType() {
|
||||
return this.$store.state.training.prdType;
|
||||
},
|
||||
lineCode() {
|
||||
return this.$route.query.lineCode;
|
||||
},
|
||||
faultMode() {
|
||||
return this.$store.state.training.operatemode === OperateMode.FAULT;
|
||||
},
|
||||
project() {
|
||||
return getSessionStorage('project');
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
@ -128,6 +152,31 @@ export default {
|
||||
this.initLoadData();
|
||||
},
|
||||
methods: {
|
||||
changeOperateMode() {
|
||||
let mode = OperateMode.FAULT;
|
||||
if (this.faultMode) {
|
||||
mode = OperateMode.NORMAL;
|
||||
}
|
||||
this.$store.dispatch('training/changeOperateMode', { mode: mode });
|
||||
},
|
||||
goCtc() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/displayNew/demon',
|
||||
query:{
|
||||
lineCode:this.$route.query.lineCode,
|
||||
group: this.$route.query.group,
|
||||
prdType: '01',
|
||||
mapId:this.$route.query.mapId,
|
||||
project: this.project,
|
||||
newApi: false,
|
||||
ctc: true,
|
||||
try: this.$route.query.try || 0,
|
||||
token: getToken(),
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank');
|
||||
},
|
||||
// 获取设备数据
|
||||
getDeviceByEm(em) {
|
||||
var device = this.$store.getters['map/getDeviceByCode'](em.deviceCode) || null;
|
||||
@ -531,4 +580,9 @@ export default {
|
||||
bottom: 15px;
|
||||
z-index: 19;
|
||||
}
|
||||
.fault-button{
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 10px;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user