This commit is contained in:
fan 2021-01-21 13:45:32 +08:00
commit e71fe4cea8
8 changed files with 269 additions and 137 deletions

View File

@ -320,13 +320,16 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
}
function otherTrainRun(data){
if(data.length != trainlisttest.otherTrainmodels.length && trainlisttest.updatStatus == false){
if(data.length > trainlisttest.otherTrainmodels.length && trainlisttest.updatStatus == false){
trainlisttest.addDriveTrain(data);
}else if(data.length < trainlisttest.otherTrainmodels.length){
let removelength = trainlisttest.otherTrainmodels.length - data.length;
trainlisttest.removeDriveTrain(removelength);
}else{
for(let i=0,leni=data.length;i<leni;i++){
let updateTrain = trainlisttest.otherTrainList[data[i].code];
let updateTrain = trainlisttest.otherTrainmodels[i];
if(data[i].code != trainmodel.code){

View File

@ -52,12 +52,20 @@ export function TrainListN() {
}
scope.otherTrainList = [];
for(let j=0,lenj = data.length;j<lenj;j++){
this.otherTrainmodels[j].code = data[j].code;
scope.otherTrainmodels[j].code = data[j].code;
scope.otherTrainList[data[j].code] = this.otherTrainmodels[j];
}
this.updatStatus = false;
}
this.removeDriveTrain = function(removeLength){
console.log(removeLength);
scope.group.remove(scope.otherTrainmodels[0]);
scope.otherTrainmodels.splice(0,removeLength);
}
this.drivertrain = function(data,scene,assetloader,mixers,actionss,mode){
return new Promise(function(resolve, reject){
@ -170,6 +178,8 @@ export function TrainListN() {
resolve("loadedtrain");
});
}
this.initpromise = function(data,scene,assetloader,mixers,actionss,mode){
return new Promise(function(resolve, reject){
let selectmesh,ntracks1,ntracks2,tclip,fclip;

View File

@ -384,7 +384,10 @@ export default class ELines extends Group {
this.centerSquare && this.centerSquare.setStyle({fill:this.model.style.Section.cross.centerSquare.defaultColor});
}
setCrossSpeedUpperLimit(speedLimit) {
this.crossSpeedText && this.crossSpeedText.setStyle({text:speedLimit, textFill: 'red' });
if (speedLimit) {
debugger;
this.crossSpeedText && this.crossSpeedText.setStyle({text:speedLimit, textFill: 'red' });
}
}
setZleve(lev) {

View File

@ -1,6 +1,6 @@
<template>
<div id="menuBar">
<div class="nav">
<div class="nav" style="padding-left:40px">
<template v-for="(item,i) in menu">
<template v-if="noShowingChildren(item.children)">
<li :id="getDomId(item)" :key="i" class="nav-li" @click="hookClick(item)">
@ -769,7 +769,7 @@ export default {
},
getDomId(item) {
if (item && item.operate) {
return item.operate.domId;
return item.operate.domId;
}
return '';
},
@ -809,17 +809,20 @@ export default {
popupMenuA(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
this.clickEvent();
const operate = {
this.tempClassA = index;
this.tempClassB = -1;
const operate = {
type: 'bar',
operation: item.operate.operation
};
this.tempClassA = index;
this.tempClassB = -1;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
this.$nextTick(() => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
})
},
selectedClassB(item, index) {
const order = this.order || 0;
@ -831,16 +834,19 @@ export default {
},
popupMenuB(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
const operate = {
this.tempClassB = index;
const operate = {
type: 'bar',
operation: item.operate.operation
};
this.tempClassB = index;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
this.$nextTick(() => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
});
},
//
mapLocation(code) {

View File

@ -30,7 +30,7 @@
<el-form-item prop="stationType">
<el-radio-group :id="domIdChooseControl" v-model="formModel.stationType">
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px">
<el-radio :label="item" :disabled="!controlModeList.includes(item)" @change="handleChooseChangeControl">
<el-radio :label="item" :disabled="!controlModeList.includes(item)" @change="handleChooseChangeControl(item)">
{{ controlProps[item] }}</el-radio>
</el-row>
</el-radio-group>
@ -218,7 +218,8 @@ export default {
},
handleChooseChangeControl(val) {
const operate = {
operation: OperationEvent.Command.order.choose.operation
operation: OperationEvent.Command.order.choose.operation,
val
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {

View File

@ -33,42 +33,42 @@
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
list: [
// {
// maxDuration: 15,
// minDuration: 8,
// operateType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL.value,
// skinCode: '02',
// trainingName: '系统/站遥控({1})',
// trainingRemark: '控制模式转换,中控转站控',
// trainingType: 'ControlConvertMenu',
// productTypes: ['01'],
// stepVOList: [
// { deviceType: 'bar', orderNum: 1, operateCode: '002', tip: '鼠标左键点击顶部菜单栏【系统】' },
// { deviceType: 'bar', orderNum: 2, operateCode: '2999', tip: '鼠标左键点击【站遥控】' },
// { deviceType: '05', orderNum: 3, operateCode: '0071', tip: '鼠标左键选择所需要转换的集中站【{1}】', val: '{2}' },
// { deviceType: '05', orderNum: 4, operateCode: '007', tip: '鼠标左键选择【站控】'},
// { deviceType: '05', orderNum: 5, operateCode: '202', tip: '鼠标左键点击【设置】按钮' },
// { deviceType: '05', orderNum: 6, operateCode: '2023', tip: '鼠标左键点击【确认】按钮' },
// ]
// },
// {
// maxDuration: 15,
// minDuration: 8,
// operateType: CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL.value,
// skinCode: '02',
// trainingName: '系统/站遥控({1})',
// trainingRemark: '控制模式转换,中控转紧急站控',
// trainingType: 'ControlConvertMenu',
// productTypes: ['01'],
// stepVOList: [
// { deviceType: 'bar', orderNum: 1, operateCode: '002', tip: '鼠标左键点击顶部菜单栏【系统】' },
// { deviceType: 'bar', orderNum: 2, operateCode: '2999', tip: '鼠标左键点击【站遥控】' },
// { deviceType: '05', orderNum: 3, operateCode: '0071', tip: '鼠标左键选择所需要转换的集中站【{1}】', val: '{2}' },
// { deviceType: '05', orderNum: 4, operateCode: '007', tip: '鼠标左键选择【紧急站控】'},
// { deviceType: '05', orderNum: 5, operateCode: '201', tip: '鼠标左键点击【设置】按钮' },
// { deviceType: '05', orderNum: 6, operateCode: '2013', tip: '鼠标左键点击【确认】按钮' },
// ]
// },
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL.value,
skinCode: '02',
trainingName: '系统/站遥控({1})',
trainingRemark: '控制模式转换,中控转站控',
trainingType: 'ControlConvertMenu',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'bar', orderNum: 1, operateCode: '002', tip: '鼠标左键点击顶部菜单栏【系统】' },
{ deviceType: 'bar', orderNum: 2, operateCode: '2999', tip: '鼠标左键点击【站遥控】' },
{ deviceType: '05', orderNum: 3, operateCode: '0071', tip: '鼠标左键选择所需要转换的集中站【{1}】', val: '{2}' },
{ deviceType: '05', orderNum: 4, operateCode: '007', tip: '鼠标左键选择【站控】', val: 'Local'},
{ deviceType: '05', orderNum: 5, operateCode: '202', tip: '鼠标左键点击【设置】按钮' },
{ deviceType: '05', orderNum: 6, operateCode: '2023', tip: '鼠标左键点击【确认】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL.value,
skinCode: '02',
trainingName: '系统/站遥控({1})',
trainingRemark: '控制模式转换,中控转紧急站控',
trainingType: 'ControlConvertMenu',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'bar', orderNum: 1, operateCode: '002', tip: '鼠标左键点击顶部菜单栏【系统】' },
{ deviceType: 'bar', orderNum: 2, operateCode: '2999', tip: '鼠标左键点击【站遥控】' },
{ deviceType: '05', orderNum: 3, operateCode: '0071', tip: '鼠标左键选择所需要转换的集中站【{1}】', val: '{2}' },
{ deviceType: '05', orderNum: 4, operateCode: '007', tip: '鼠标左键选择【紧急站控】', val: 'Emergency'},
{ deviceType: '05', orderNum: 5, operateCode: '201', tip: '鼠标左键点击【设置】按钮' },
{ deviceType: '05', orderNum: 6, operateCode: '2013', tip: '鼠标左键点击【确认】按钮' }
]
},
{
maxDuration: 8,
minDuration: 5,
@ -183,6 +183,20 @@ export default {
{ deviceType: '06', orderNum: 2, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN.value,
skinCode: '02',
trainingName: '强制取消扣车({10}-{12}站台)',
trainingRemark: '强制取消扣车功能',
trainingType: 'Stand',
productTypes: ['01'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '506', tip: '鼠标右键菜单选择【强制取消扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '506', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
@ -263,7 +277,6 @@ export default {
{ deviceType: '06', orderNum: 2, operateCode: '501', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
@ -292,6 +305,36 @@ export default {
{ deviceType: '03', orderNum: 2, operateCode: '406', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType:CMD.Switch.CMD_SWITCH_CUT_OFF.value,
skinCode: '08',
trainingName: '区段切除({7} 道岔)',
trainingRemark: '区段切除功能',
trainingType:'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '111', tip: '鼠标右键菜单选择【区段切除】' },
{ deviceType: '02', orderNum: 2, operateCode: '111', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType:CMD.Switch.CMD_SWITCH_ACTIVE.value,
skinCode: '08',
trainingName: '区段激活({7} 道岔)',
trainingRemark: '区段激活功能',
trainingType:'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '112', tip: '鼠标右键菜单选择【区段激活】' },
{ deviceType: '02', orderNum: 2, operateCode: '112', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
@ -311,20 +354,6 @@ export default {
{ deviceType: '03', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
// {
// maxDuration: 15,
// minDuration: 8,
// operateType:CMD.Section.CMD_SECTION_SET_LIMIT_SPEED.value,
// skinCode: '08',
// trainingName: '全线取消限速({8}{9} 区段)',
// trainingRemark: '设置全线取消限速',
// trainingType: 'Section',
// productTypes: ['01', '02'],
// stepVOList: [
// { deviceType: '03', orderNum: 1, operateCode: '408', tip: '鼠标右键菜单选择【设置全线取消限速】' },
// { deviceType: '03', orderNum: 4, operateCode: '4082', tip: '鼠标左键点击【确定】按钮' },
// ]
// },
{
maxDuration: 15,
minDuration: 8,
@ -512,6 +541,54 @@ export default {
{ deviceType: '02', orderNum: 1, operateCode: '1040', tip: '鼠标左键点击【道岔解锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '104', tip: '鼠标左键点击【道岔】', codeType:'SWITCH' }
]
},
// 全局指令,分属不同设备,暂无法配置
// {
// maxDuration: 15,
// minDuration: 8,
// operateType: CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED.value,
// skinCode: '08',
// trainingName: '全线取消限速',
// trainingRemark: '设置全线取消限速',
// trainingType: 'Switch',
// productTypes: ['01', '02'],
// stepVOList: [
// { deviceType: '02', orderNum: 1, operateCode: '114', tip: '鼠标右键菜单选择【全线取消限速】' },
// { deviceType: '02', orderNum: 2, operateCode: '1142', tip: '鼠标左键点击【确定】按钮' },
// ]
// },
// {
// maxDuration: 15,
// minDuration: 8,
// operateType: CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED.value,
// skinCode: '08',
// trainingName: '全线取消限速',
// trainingRemark: '设置全线取消限速',
// trainingType: 'Section',
// productTypes: ['01', '02'],
// stepVOList: [
// { deviceType: '03', orderNum: 1, operateCode: '408', tip: '鼠标右键菜单选择【全线取消限速】' },
// { deviceType: '03', orderNum: 2, operateCode: '4082', tip: '鼠标左键点击【确定】按钮' },
// ]
// },
{
maxDuration: 15,
minDuration: 8,
operateType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED.value,
skinCode: '08',
trainingName: '设置临时限速({7} 道岔)',
trainingRemark: '设置临时限速功能限速值15',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '113', tip: '鼠标右键菜单选择【设置临时限速】' },
{ deviceType: '02', orderNum: 2, operateCode: '1136', tip: '鼠标左键选择【限速值15】', val: '15' },
{ deviceType: '02', orderNum: 3, operateCode: '1131', tip: '鼠标左键点击【下达】按钮' },
{ deviceType: '02', orderNum: 4, operateCode: '1132', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '02', orderNum: 5, operateCode: '1133', tip: '鼠标左键点击【确认1】按钮' },
{ deviceType: '02', orderNum: 6, operateCode: '1134', tip: '鼠标左键点击【确认2】按钮', val: '15' },
{ deviceType: '02', orderNum: 7, operateCode: '001', tip: '鼠标左键点击【关闭】按钮' }
]
},
{
@ -671,6 +748,34 @@ export default {
{ deviceType: '04', orderNum: 2, operateCode: '312', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 8,
minDuration: 5,
operateType:CMD.Signal.CMD_SIGNAL_SET_CI_AUTO.value,
skinCode: '08',
trainingName: '设置联锁自动进路({3} 进路)',
trainingRemark: '设置联锁自动进路',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '309', tip: '鼠标右键菜单选择【设置联锁自动进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '309', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 8,
minDuration: 5,
operateType:CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO.value,
skinCode: '08',
trainingName: '取消联锁自动进路({3} 进路)',
trainingRemark: '取消联锁自动进路',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '310', tip: '鼠标右键菜单选择【取消联锁自动进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '310', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,

View File

@ -2553,25 +2553,29 @@ export const OperationEvent = {
// 取消故障
cancelStoppage: {
menu: {
operation: '2995'
operation: '2995',
domId: '_Tips-CancelStoppage-Menu{TOP}'
}
},
// 道岔故障
stoppage: {
menu: {
operation: '2996'
operation: '2996',
domId: '_Tips-Stoppage-Menu{TOP}'
}
},
// 设置托管
collocation: {
menu: {
operation: '2997'
operation: '2997',
domId: '_Tips-Collocation-Menu{TOP}'
}
},
// 设置连挂
setLink: {
menu: {
operation: '2999'
operation: '2998',
domId: '_Tips-SetLink-Menu{TOP}'
}
},
/** 控制模式操作 */

View File

@ -37,63 +37,63 @@ export default {
},
methods: {
tipInit() {
this.$nextTick(() => {
this.$store.dispatch('training/isTeachMode').then(() => {
this.tipShow = true;
const offset = this.$store.state.config.canvasOffset;
if (this.$store.state.training.trainingStart) {
const order = this.$store.state.training.order;
const steps = this.$store.state.training.steps;
if (order > -1 && order < steps.length) {
const step = steps[order];
const distance = 5;
this.tip = step.tip;
/** 如果mbm或者bar的处理*/
if (step.type === 'mbm' || step.type === 'bar') {
const position = this.getOtherTipPoint(step);
if (position) {
this.position = position;
this.position.y -= distance;
this.popTipShow();
}
} else if (step.code) {
/** 默认是shape类型如果找不到坐标则可以认为是存在code的dailog*/
const position = this.getShapeTipPoint(step);
if (position) {
this.position = {
x: position.x + offset.x,
y: position.y + offset.y - distance
};
this.popTipShow();
} else {
const position = this.getOtherTipPoint(step);
if (position) {
this.position = position;
this.position.y -= distance;
this.popTipShow();
}
}
} else {
/** 不存在code字段的dialog处理*/
const position = this.getOtherTipPoint(step);
if (position) {
this.position = position;
this.position.y -= distance;
this.popTipShow();
} else {
this.popTipHide();
}
}
} else {
this.tipShow = false;
}
} else {
this.tipShow = false;
}
}).catch(() => {
this.tipShow = false;
});
});
this.$store.dispatch('training/isTeachMode').then(() => {
this.tipShow = true;
this.$nextTick(() => {
const offset = this.$store.state.config.canvasOffset;
if (this.$store.state.training.trainingStart) {
const order = this.$store.state.training.order;
const steps = this.$store.state.training.steps;
if (order > -1 && order < steps.length) {
const step = steps[order];
const distance = 5;
this.tip = step.tip;
/** 如果mbm或者bar的处理*/
if (step.type === 'mbm' || step.type === 'bar') {
const position = this.getOtherTipPoint(step);
if (position) {
this.position = position;
this.position.y -= distance;
this.popTipShow();
}
} else if (step.code) {
/** 默认是shape类型如果找不到坐标则可以认为是存在code的dailog*/
const position = this.getShapeTipPoint(step);
if (position) {
this.position = {
x: position.x + offset.x,
y: position.y + offset.y - distance
};
this.popTipShow();
} else {
const position = this.getOtherTipPoint(step);
if (position) {
this.position = position;
this.position.y -= distance;
this.popTipShow();
}
}
} else {
/** 不存在code字段的dialog处理*/
const position = this.getOtherTipPoint(step);
if (position) {
this.position = position;
this.position.y -= distance;
this.popTipShow();
} else {
this.popTipHide();
}
}
} else {
this.tipShow = false;
}
} else {
this.tipShow = false;
}
});
}).catch(() => {
this.tipShow = false;
});
},
popTipShow() {
this.popShow = true;
@ -142,7 +142,7 @@ export default {
//
getOtherTipPoint(step) {
const domId = OperationHandler.getDomIdByOperation(step.operation);
const btnDom = document.getElementById(domId);
const btnDom = document.getElementById(domId);
if (btnDom) {
const offset = getDomOffset(btnDom);
if (offset.x == 0 && offset.y == 0) {