Merge remote-tracking branch 'origin/test'

This commit is contained in:
thesai 2021-08-19 21:00:29 +08:00
commit 1731c9b20b
14 changed files with 124 additions and 55 deletions

View File

@ -127,12 +127,12 @@ class SkinCode extends defaultStyle {
rightName: false, // 右侧限速值是否展示
nameBackgroundIsRect: true, // 限速值背景是否为矩形
nameBackgroundBorderWidth: 0, // 限速值背景是否边框宽度
nameBackgroundBorderColor: '#C00808', // 限速值背景边框颜色
nameBackgroundBorderColor: '#f00', // 限速值背景边框颜色
limitValueDistance: 18,
kilometerFontSize: 0, // 公里标大小
switchSectionNoShow: true, // 道岔区段不展示限速
nameNumberFontSize: 11, // 限速值大小
nameNumberColor: '#C00808', // 限速值颜色
nameNumberFontSize: 15, // 限速值大小
nameNumberColor: '#f00', // 限速值颜色
nameBackground: 'rgba(0,0,0,0)', // 限速名称背景颜色
drogueWidth: 15, // 浮标宽度
drogueHeight: 12 // 浮标高度

View File

@ -49,7 +49,7 @@ export default class ELimitName extends Group {
style: {
x: x1 + 2,
y: y1,
fontWeight: 'normal',
fontWeight: 'bolder',
fontSize: style.Section.speedLimitName.nameNumberFontSize,
fontFamily: style.fontFamily,
text: '',
@ -107,7 +107,7 @@ export default class ELimitName extends Group {
style: {
x: x2 - 2,
y: y2,
fontWeight: 'normal',
fontWeight: 'bolder',
fontSize: style.Section.speedLimitName.nameNumberFontSize,
fontFamily: style.fontFamily,
text: '',

View File

@ -387,6 +387,7 @@ export default class Section extends Group {
const switchModel = this.mapDevice[model.relSwitchCode];
const sectionB = this.mapDevice[switchModel.sectionBCode];
const sectionC = this.mapDevice[switchModel.sectionCCode];
const sectionA = this.mapDevice[switchModel.sectionACode];
if (switchModel && switchModel.normalPosition === 1) {
this.setSwitchSectionColor(sectionC, sectionB);// 定位
} else if (switchModel && switchModel.normalPosition === 0 && switchModel.reversePosition === 0 && switchModel.instance && switchModel.instance.switchPosition === 'reverse' && switchModel.fault !== 'SPLIT') {
@ -419,7 +420,8 @@ export default class Section extends Group {
}
} else {
if (sectionB && sectionB.instance) { sectionB.instance.line.stopAnimation(true); sectionB.delayUnlock && sectionB.instance.delayUnlock(); }
if (sectionC && sectionC.instance) { sectionC.instance.line.stopAnimation(true); sectionC.delayUnlock && sectionB.instance.delayUnlock(); }
if (sectionC && sectionC.instance) { sectionC.instance.line.stopAnimation(true); sectionC.delayUnlock && sectionC.instance.delayUnlock(); }
if (sectionA && sectionA.instance) { sectionA.instance.line.stopAnimation(true); sectionA.delayUnlock && sectionA.instance.delayUnlock(); }
}
}
}

View File

@ -726,9 +726,9 @@ export default class Switch extends Group {
if (this.style.Switch.sectionAction.flag && this.model.showMode !== '05') { // 哈尔滨线路处理道岔相关区段颜色
const switchModel = this.mapDevice[model.code];
const sectionB = this.mapDevice[switchModel.sectionBCode];
sectionB && sectionB.instance && sectionB.instance.setState(sectionB);
sectionB && sectionB.instance && sectionB.instance.handleSwitchSection(sectionB);
const sectionC = this.mapDevice[switchModel.sectionCCode];
sectionC && sectionC.instance && sectionC.instance.setState(sectionC);
sectionC && sectionC.instance && sectionC.instance.handleSwitchSection(sectionC);
}
model.noStatus && this.setAshShow();
!model.auto && this.artificialArc && this.artificialArc.show();

View File

@ -882,6 +882,16 @@ export default {
this.param.speedLimitValue = -1;
}
if (this.cmdType === CMD.Stand.CMD_STAND_EARLY_DEPART) {
const stand = this.stationStandList.find(item => item.standTrackCode === this.selectedObj.code);
this.param.standCode = stand.code;
}
if (this.cmdType === CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY) {
const stand = this.stationStandList.find(item => item.standTrackCode === this.selectedObj.code);
this.param.standCode = stand.code;
this.param.standReentryStrategy = row.params.val;
}
if (this.cmdType == CMD.Section.CMD_SECTION_SET_LIMIT_SPEED || this.cmdType == CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED) {
if (this.operate == OperationEvent.Section.setSpeed.menuButton.operation ||
this.operate == OperationEvent.Switch.setSpeed.menuButton.operation) {
@ -1301,23 +1311,23 @@ export default {
{ name: '封锁区段', commandTip: '禁止通过该轨道区段排列进路', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch },
{ name: '解封区段', commandTip: '允许通过该轨道区段排列进路', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch, isShow: () => this.$store.state.training.prdType == '01' },
{ name: '上行不折返', commandTip: '上行不折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnUp01, params: {val: '01'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType == 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '下行不折返', commandTip: '下行不折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnDown01, params: {val: '01'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType != 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '上行缺省折返', commandTip: '上行缺省折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnUp02, params: {val: '02'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType == 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '下行缺省折返', commandTip: '下行缺省折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnDown02, params: {val: '02'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType != 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '上行换端', commandTip: '上行换端', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnUp03, params: {val: '03'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType == 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '下行换端', commandTip: '下行换端', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnDown03, params: {val: '03'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType != 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '上行自动折返', commandTip: '上行自动折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnUp04, params: {val: '04'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType == 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '下行自动折返', commandTip: '下行自动折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnDown04, params: {val: '04'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType != 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '车站发车', commandTip: '车站发车', cmdType: CMD.Section.CMD_STAND_EARLY_DEPART, operate: OperationEvent.Section.earlyDeparture.menuBtn, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '上行不折返', commandTip: '上行不折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnUp01, params: {val: '01'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section && section.roadType == 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '下行不折返', commandTip: '下行不折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnDown01, params: {val: '01'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section && section.roadType != 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '上行缺省折返', commandTip: '上行缺省折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnUp02, params: {val: '02'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section && section.roadType == 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '下行缺省折返', commandTip: '下行缺省折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnDown02, params: {val: '02'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section && section.roadType != 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '上行换端', commandTip: '上行换端', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnUp03, params: {val: '03'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section && section.roadType == 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '下行换端', commandTip: '下行换端', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnDown03, params: {val: '03'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section && section.roadType != 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '上行自动折返', commandTip: '上行自动折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnUp04, params: {val: '04'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section && section.roadType == 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '下行自动折返', commandTip: '下行自动折返', cmdType: CMD.Section.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.setBackStrategy.menuBtnDown04, params: {val: '04'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section && section.roadType != 'RIGHT' && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '车站发车', commandTip: '车站发车', cmdType: CMD.Section.CMD_STAND_EARLY_DEPART, operate: OperationEvent.Section.earlyDeparture.menuBtn, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section && section.standTrack && this.$store.state.training.prdType == '02' },
{ name: '折返 DTO', commandTip: '折返 DTO', cmdType: CMD.Section.CMD_SECTION_1, operate: OperationEvent.Section.turnBackDTO.menuButton, disabledCb: (stationControl) => !this.modeMatch, isShow: () => this.$store.state.training.prdType == '01' },
{ name: '取消折返', commandTip: '取消折返', cmdType: CMD.Section.CMD_SECTION_2, operate: OperationEvent.Section.CancelTurnBack.menuButton, disabledCb: (stationControl) => !this.modeMatch, isShow: () => this.$store.state.training.prdType == '01' },
{ name: '自动折返', commandTip: '自动折返', cmdType: CMD.Section.CMD_SECTION_3, operate: OperationEvent.Section.AutoTurnBack.menuButton, disabledCb: (stationControl) => !this.modeMatch, isShow: () => this.$store.state.training.prdType == '01' },
{ name: '换上至下', commandTip: '换上至下', cmdType: CMD.Section.CMD_SECTION_4, operate: OperationEvent.Section.PutUpTheDown.menuButton, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType == 'RIGHT' && this.$store.state.training.prdType == '01' },
{ name: '换下至上', commandTip: '换下至上', cmdType: CMD.Section.CMD_SECTION_5, operate: OperationEvent.Section.PutDownTheUp.menuButton, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType != 'RIGHT' && this.$store.state.training.prdType == '01' },
{ name: '终止站停-上', commandTip: '上行终止站停', cmdType: CMD.Section.CMD_SECTION_6, operate: OperationEvent.Section.PutUpStop.menuButton, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType == 'RIGHT' && this.$store.state.training.prdType == '01' },
{ name: '终止站停-下', commandTip: '下行终止站停', cmdType: CMD.Section.CMD_SECTION_7, operate: OperationEvent.Section.PutDownStop.menuButton, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section.roadType != 'RIGHT' && this.$store.state.training.prdType == '01' }
{ name: '折返 DTO', commandTip: '折返 DTO', cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.turnBackDTO.menuButton, params: {val: 'UNMANNED'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section && section.standTrack && this.$store.state.training.prdType == '01' },
{ name: '取消折返', commandTip: '取消折返', cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.CancelTurnBack.menuButton, params: {val: 'NONE'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section && section.standTrack && this.$store.state.training.prdType == '01' },
{ name: '自动折返', commandTip: '自动折返', cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.AutoTurnBack.menuButton, params: {val: 'DEFAULT'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section && section.standTrack && this.$store.state.training.prdType == '01' },
{ name: '换上至下', commandTip: '换上至下', cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.PutUpTheDown.menuButton, params: {val: 'AUTO'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section && ((section.roadType === 'RIGHT' && this.$store.state.map.mapConfig.upRight) || (section.roadType === 'LEFT' && !this.$store.state.map.mapConfig.upRight)) && section.standTrack && this.$store.state.training.prdType == '01' },
{ name: '换下至上', commandTip: '换下至上', cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY, operate: OperationEvent.Section.PutDownTheUp.menuButton, params: {val: 'AUTO'}, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section && ((section.roadType === 'LEFT' && this.$store.state.map.mapConfig.upRight) || (section.roadType === 'RIGHT' && !this.$store.state.map.mapConfig.upRight)) && section.standTrack && this.$store.state.training.prdType == '01' },
{ name: '终止站停-上', commandTip: '上行终止站停', cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART, operate: OperationEvent.Section.PutUpStop.menuButton, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section && ((section.roadType === 'RIGHT' && this.$store.state.map.mapConfig.upRight) || (section.roadType === 'LEFT' && !this.$store.state.map.mapConfig.upRight)) && section.standTrack && this.$store.state.training.prdType == '01' },
{ name: '终止站停-下', commandTip: '下行终止站停', cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART, operate: OperationEvent.Section.PutDownStop.menuButton, disabledCb: (stationControl) => !this.modeMatch, isShow: (section) => section && ((section.roadType === 'LEFT' && this.$store.state.map.mapConfig.upRight) || (section.roadType === 'RIGHT' && !this.$store.state.map.mapConfig.upRight)) && section.standTrack && this.$store.state.training.prdType == '01' }
];
this.switchParamList = [
{ name: '岔区设限', cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED, operate: OperationEvent.Switch.setSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch},

View File

@ -21,6 +21,7 @@ export default {
sepField: '车次号',
columns: {
'停车站名称': { key: 'stationName', formatter: (val) => { return val; } },
'停车轨名称':{key: 'trackName', formatter: (val) => { return val; }},
'到达时间': { key: 'arriveTime', formatter: (val) => { return val; } },
'出发时间': { key: 'departureTime', formatter: (val) => { return val; } }
}
@ -82,7 +83,7 @@ export default {
// 添加字段值
if (Object.keys(stationObj).length) {
if (stationObj.arriveTime) {
if (stationObj.trackName || stationObj.arriveTime) {
tripObj.arrivalList.push(stationObj);
}
}

View File

@ -166,22 +166,7 @@ export default {
/** 设置折返策略 */
CMD_STAND_SET_REENTRY_STRATEGY: {value:'Stand_Set_Reentry_Strategy', label: '设置折返策略'},
/** 提前发车 */
CMD_STAND_EARLY_DEPART: {value:'Stand_Early_Depart', label: '提前发车'},
/** 折返 DTO */
CMD_SECTION_1: {value: 'Section_1', label: '折返 DTO'},
/** 取消折返 */
CMD_SECTION_2: {value: 'Section_2', label: '取消折返'},
/** 自动折返 */
CMD_SECTION_3: {value: 'Section_3', label: '自动折返'},
/** 换上至下 */
CMD_SECTION_4: {value: 'Section_4', label: '换上至下'},
/** 换下至上 */
CMD_SECTION_5: {value: 'Section_5', label: '换下至上'},
/** 上行终止站停 */
CMD_SECTION_6: {value: 'Section_6', label: '上行终止站停'},
/** 下行终止站停 */
CMD_SECTION_7: {value: 'Section_7', label: '下行终止站停'}
CMD_STAND_EARLY_DEPART: {value:'Stand_Early_Depart', label: '提前发车'}
},
// 站台

View File

@ -52,7 +52,7 @@
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
import CentercPane from '@/views/jlmap3d/drive/drivecontrol/centerpane';
import LeftPane from '@/views/jlmap3d/drive/drivecontrol/leftpane';
// import LeftPane from '@/views/jlmap3d/drive/drivecontrol/leftpane';
import RightPane from '@/views/jlmap3d/drive/drivecontrol/rightpane';
import TopRightPane from '@/views/jlmap3d/drive/drivecontrol/toprightpane';
@ -71,7 +71,7 @@ import axios from 'axios';
name: 'DriveControl',
components: {
CentercPane,
LeftPane,
// LeftPane,
RightPane,
TopRightPane,
},

View File

@ -486,21 +486,24 @@
});
},
updatabuttonlight: function (data){
// console.log(data);
if(data.runLevel){
// this.runLevel = data.runLevel;
if(data.runLevel == "CBTC"){
this.cbtcbuttonimg = this.greenlimg;
}else{
this.cbtcbuttonimg = this.greenimg;
}
}
console.log(data);
// if(data.runLevel){
// // this.runLevel = data.runLevel;
// if(data.runLevel == "CBTC"){
// this.cbtcbuttonimg = this.greenlimg;
// }else{
// this.cbtcbuttonimg = this.greenimg;
// }
// }
if(data.driveMode){
// this.driveMode = data.driveMode;
if(data.driveMode == "RM"){
this.rmbuttonimg = this.greenlimg;
this.cbtcbuttonimg = this.greenimg;
}else{
this.rmbuttonimg = this.greenimg;
this.cbtcbuttonimg = this.greenlimg;
}
}
if(typeof(data.atoOn) != "undefined"){

View File

@ -28,6 +28,13 @@
</draggable>
</el-tab-pane>
<el-tab-pane label="图片资源列表" name="picasset">
<el-tabs v-model="activeName" class="activediv" type="card" @tab-click="handleClick" >
<el-tab-pane label="图片资源列表" name="picasset">
</el-tab-pane>
</el-tabs>
<draggable v-model="picAssetList" group="picasset" @start="drag=true" @end="drag=false">
<div class="progressdiv"
v-for="item in picAssetList" @click="changePicUrl($event,item)">
@ -40,6 +47,7 @@
</draggable>
<!-- <Assets-Model></Assets-Model> -->
</el-tab-pane>
</el-tabs>

View File

@ -175,22 +175,27 @@
lessonTools:[
{
name:"步骤组件",
type:"",
isShow:false,
},
{
name:"步骤进程日志",
type:"",
isShow:false,
},
{
name:"步骤提示组件",
type:"",
isShow:false,
},
{
name:"岗位联络操作",
type:"",
isShow:false,
},
{
name:"导航工具栏",
type:"",
isShow:false,
},
],

View File

@ -31,6 +31,8 @@
</template>
<template v-else-if="!projectDevice">
<el-button type="success" :disabled="isDisable" size="small" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
<!-- isDisable&& -->
<el-button v-if="isAdmin" v-loading="pauseLoading" :type="simulationPaused?'warning':'primary'" size="small" @click="startOrPause">{{ simulationPaused?'开始':'暂停' }}</el-button>
<el-button type="danger" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
</template>
</template>
@ -67,6 +69,7 @@ import { getCountTime } from '@/utils/index';
import { TrainingMode } from '@/scripts/ConstDic';
import { quitScriptNew } from '@/api/simulation';
import { setGoodsTryUse } from '@/api/management/goods';
import { simulationPause, simulationStart } from '@/api/rtSimulation';
import {loadScriptNew } from '@/api/simulation';
import StatusIcon from '@/views/components/StatusIcon/statusIcon';
import Vue from 'vue';
@ -112,6 +115,7 @@ export default {
countTime: 0, //
remainingTime: 0,
userRole:'AUDIENCE',
pauseLoading: false,
goodsId: this.$route.query.goodsId,
try: this.$route.query.try, //
training: {
@ -153,6 +157,12 @@ export default {
},
project() {
return getSessionStorage('project');
},
isAdmin() {
return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05');
},
simulationPaused() {
return this.$store.state.socket.simulationPause;
}
},
watch: {
@ -210,6 +220,24 @@ export default {
});
},
methods: {
startOrPause() {
this.pauseLoading = true;
if (this.simulationPaused) {
simulationStart(this.group).then(resp => {
this.pauseLoading = false;
}).catch(() => {
this.pauseLoading = false;
this.$messageBox('开始失败,请稍后再试');
});
} else {
simulationPause(this.group).then(resp => {
this.pauseLoading = false;
}).catch(() => {
this.pauseLoading = false;
this.$messageBox('暂停失败,请稍后再试');
});
}
},
async initLoadPage() {
try {
if (this.try != '0') {

View File

@ -34,6 +34,7 @@
<template v-if="isAdmin && project != 'refereeJsxt' && $route.query.type !== 'ILW'">
<!-- 按计划行车 -->
<el-button type="success" :disabled="isDisable" size="small" @click="selectBeginTime">{{ $t('joinTraining.drivingByPlan') }}</el-button>
<el-button v-if="isAdministrator" v-loading="pauseLoading" :type="simulationPaused?'warning':'primary'" size="small" @click="startOrPause">{{ simulationPaused?'开始':'暂停' }}</el-button>
<el-button type="danger" size="small" @click="end">{{ $t('joinTraining.initialize') }}</el-button>
</template>
</template>
@ -62,6 +63,7 @@ import { getPublishLessonListByMapId } from '@/api/jmap/lesson';
import { getPostByProjectCode } from '@/api/learn';
import { ProjectCode } from '@/scripts/ProjectConfig';
import ContectUs from '@/views/newMap/displayNew/dispatherContest/contectUs';
import { simulationPause, simulationStart } from '@/api/rtSimulation';
export default {
name: 'MenuDemonJoint',
@ -113,6 +115,7 @@ export default {
return {
backLoading: false,
chatShow: true,
pauseLoading: false,
isGoback: false,
noSimulationQrCodeList: NoSimulationQrCodeList,
isShow3dmodel :false,
@ -134,10 +137,10 @@ export default {
return (this.$store.state.training.prdType == '02' || this.isAdmin) && (!this.$route.query.projectDevice);
},
isDISPATCHER() {
console.log("================================");
console.log('================================');
console.log(this.$store.state.training.prdType);
return (this.$store.state.training.prdType == '01'||this.$store.state.training.prdType == '02' || this.isAdmin) && (!this.$route.query.projectDevice || this.project == 'sdy');
return (this.$store.state.training.prdType == '01' || this.$store.state.training.prdType == '02' || this.isAdmin) && (!this.$route.query.projectDevice || this.project == 'sdy');
},
isStationSupervisor() {
return this.userRole == 'STATION_SUPERVISOR' && (!this.$route.query.projectDevice || this.project == 'sdy');
@ -191,6 +194,12 @@ export default {
},
statusIconShow() {
return (this.$route.query.lineCode == '11' || this.$route.query.lineCode == '10') && this.$store.state.training.prdType == '02';
},
isAdministrator() {
return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05');
},
simulationPaused() {
return this.$store.state.socket.simulationPause;
}
},
watch: {
@ -255,6 +264,24 @@ export default {
});
},
methods: {
startOrPause() {
this.pauseLoading = true;
if (this.simulationPaused) {
simulationStart(this.group).then(resp => {
this.pauseLoading = false;
}).catch(() => {
this.pauseLoading = false;
this.$messageBox('开始失败,请稍后再试');
});
} else {
simulationPause(this.group).then(resp => {
this.pauseLoading = false;
}).catch(() => {
this.pauseLoading = false;
this.$messageBox('暂停失败,请稍后再试');
});
}
},
// Admin Instructor Dispatcher Attendant Audience Driver MAINTAINER
addrolesList(list) {
list.forEach(item => {

View File

@ -106,7 +106,7 @@ export default {
async simulationError() {
await this.$store.dispatch('map/clearJlmapTrainView');
await this.$store.dispatch('map/setTrainWindowShow', false);
await this.$store.dispatch('training/setMapDefaultState');
// await this.$store.dispatch('training/setMapDefaultState');
this.$confirm(this.$t('tip.getMapStateDataException'), this.$t('tip.hint'), {
confirmButtonText: this.$t('global.confirm'),
showCancelButton: false,