This commit is contained in:
fan 2022-08-01 15:39:39 +08:00
commit b9cd660a7e
49 changed files with 3880 additions and 510 deletions

View File

@ -284,6 +284,15 @@ export function getEveryDayRunPlanNew(group) {
});
}
/** 大铁线路 修改系统时间 */
export function modifySystemTime(data, group) {
return request({
url: `simulation/${group}/modifySystemTime`,
method: 'PUT',
data: data
});
}
/** 新版地图按计划行车 */
export function ranAsPlan(data, group) {
return request({

View File

@ -196,6 +196,7 @@ class SkinCode extends defaultStyle {
defaultText: 0
},
lamp: {
notBlock:true, // 封锁不设置颜色
bgShow: false, // 是否被选中
guidName: 'singleRY', // 成都三号线引导类型
borderVariable: false, // 信号灯边框可变

View File

@ -196,6 +196,7 @@ class SkinCode extends defaultStyle {
defaultText: 0
},
lamp: {
notBlock:true, // 封锁不设置颜色
bgShow: false, // 是否被选中
guidName: 'singleRY', // 成都三号线引导类型
borderVariable: false, // 信号灯边框可变
@ -256,9 +257,33 @@ class SkinCode extends defaultStyle {
};
this[deviceType.SignalButton] = {
shape: 'roundWithDock'
shape: 'roundWithDock',
fillColor: '#808080',
showName: true
}
this[deviceType.SwitchFault] = {
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示
text: {
fontSize: 14, // 字体大小
fontWeight: 'normal', // 字体粗细
distance: -50 // 灯跟文字距离
},
lamp: {
square: true, // 方形
radiusR: 20,
switchState: true, // 是否用颜色表示道岔状态
controlColor: '#00ff00', // 定位颜色
reverseColor: '#ffff00', // 反位颜色
switchingColor: '#999999', // 转换中颜色
faultColor: '#ff0000', // 挤岔颜色
blockColor: '#0000ff', // 单封颜色
lockColor: '#ff0000', // 单锁颜色
lineWidth: 2,
strokeColor: '#FFFFFF' // 控制灯描边样式
}
};
// 供电线路
this[deviceType.Power] = {
noElectricStrokeColor:'#808080', // 无电颜色

View File

@ -98,12 +98,13 @@ class SkinCode extends defaultStyle {
fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: 'rgb(192,192,192)', // 信号灯字体默认色
// '#FFFFFF'
blockColor: '#FFFFFF', // 信号灯字体锁定颜色
blockColor: 'rgb(192,192,192)', // 信号灯字体锁定颜色
checkColor: '#00FF00' // 信号保护区段检查颜色
},
remainTimeColor: '#F00',
dtTextNearSignalOffset:{x:35, y:5}, // 人工解锁延时时间坐标靠近信号机名称
lamp: {
notBlock:true, // 封锁不设置颜色
bgShow: false, // 是否被选中
guidName: 'singleRY', // 成都三号线引导类型
borderVariable: false, // 信号灯边框可变

View File

@ -541,6 +541,7 @@ class SkinCode extends defaultStyle {
distance: 5 // 灯跟文字距离
},
lamp: {
square: false, // 方形
radiusR: 6, // 控制灯大小
controlColor: '#000000', // 控制灯颜色
offColor: '#ff0000',

View File

@ -45,12 +45,13 @@ export default class SaidLamp extends Group {
this.control = new EControl({
zlevel: this.zlevel,
z: this.z,
arc: {
control: {
shape: {
cx: this.computedPosition.x,
cy: this.computedPosition.y,
r: this.deviceStyle.lamp.radiusR
},
isSquare: this.deviceStyle.lamp.square,
subType: 'Control',
lineWidth: this.deviceStyle.lamp.lineWidth || 0,
fill: this.deviceStyle.lamp.controlColor,
@ -282,7 +283,6 @@ export default class SaidLamp extends Group {
}
}
}
}
}
}

View File

@ -745,7 +745,9 @@ class Signal extends Group {
}
// 封锁
block() {
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
if (!this.style.Signal.lamp.notBlock) { // 大铁线路 对信号机封锁操作,不影响信号显示 其他线路正常
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
}
if (this.style.Signal.post.blockColor) { // 设置底座颜色
this.sigPost.setColor(this.style.Signal.post.blockColor);
}

View File

@ -1,338 +1,312 @@
import Group from 'zrender/src/container/Group';
import Rect from 'zrender/src/graphic/shape/Rect';
import Line from 'zrender/src/graphic/shape/Line';
import Text from 'zrender/src/graphic/Text';
import Arc from 'zrender/src/graphic/shape/Arc';
import Circle from 'zrender/src/graphic/shape/Circle';
import store from '@/store/index';
import Group from 'zrender/src/container/Group'
import Rect from 'zrender/src/graphic/shape/Rect'
import Line from 'zrender/src/graphic/shape/Line'
import Text from 'zrender/src/graphic/Text'
import Arc from 'zrender/src/graphic/shape/Arc'
import Circle from 'zrender/src/graphic/shape/Circle'
import store from '@/store/index'
const typeList = [
'PICK_ASSIST',
'DEPART_ASSIST',
'ASSIST',
'GUIDELOCK',
'SECTION_FAULT_UNLOCK',
'LOCATE',
'REVERSE',
'CANCEL',
'HUMAN_RELEASE_ROUTE',
'MONOLOCK',
'UNLOCK',
'BLOCK',
'UNBLOCK',
'CHANGE_DIRECTION'
]
export default class SignalButton extends Group {
constructor(model, {style}) {
super();
this._code = model.code;
this._type = model._type;
this.zlevel = model.zlevel;
const pictureDevice = store.getters['map/getPictureDeviceByCode'](model.code);
if (pictureDevice) {
this.computedPosition = pictureDevice.position;
} else {
this.computedPosition = model.position;
}
this.z = 0;
this.model = model;
this.style = style;
// Line
this.create();
this.setState(model);
constructor(model, { style }) {
super()
this._code = model.code
this._type = model._type
this.zlevel = model.zlevel
const pictureDevice = store.getters['map/getPictureDeviceByCode'](model.code)
if (pictureDevice) {
this.computedPosition = pictureDevice.position
} else {
this.computedPosition = model.position
}
this.z = 0
this.model = model
this.style = style
// Line
this.create()
this.setState(model)
}
create() {
const model = this.model;
const computedPosition = this.computedPosition;
const fillColor = this.getTypeColor();
// const queryList = window.location.search.substring(1).split('&');
// const queryCtc = queryList.find(item => {
// return item.includes('ctc');
// });
// const ctcArcList = ['OCCLUSION', 'RECOVERY', 'CHANGE_DIRECTION', 'ACCIDENT', 'DEPART_ASSIST', 'PICK_ASSIST', 'ASSIST'];
const typeList = [];
// debugger;
// console.log(model.type);
// if (queryCtc && ctcArcList.includes(model.type)) {
// // debugger;
// this.arcShape = new Arc({
// zlevel: this.zlevel,
// z: this.z,
// shape: {
// cx: computedPosition.x + 7,
// cy: computedPosition.y + 7,
// r: 7
// },
// style: {
// stroke: '#69666E',
// lineWidth: 1,
// fill: fillColor
// }
// });
// this.add(this.arcShape);
// } else
if (this.style.SignalButton &&
this.style.SignalButton.shape === 'roundWithDock' &&
typeList.includes(model.type)) {
const circle1 = new Circle({
zlevel: this.zlevel,
z: this.z + 2,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 7,
r: 7
},
style: {
stroke: '#69666E',
lineWidth: 1,
fill: fillColor
}
});
const circle2 = new Circle({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 9,
r: 8
},
style: {
fill: '#000'
}
});
const circle3 = new Circle({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 9,
r: 9
},
style: {
fill: '#eee'
}
});
this.arcShape = circle1;
this.add(circle1).add(circle2).add(circle3);
create() {
const model = this.model
const computedPosition = this.computedPosition
const fillColor = this.getTypeColor()
if (this.style.SignalButton && this.style.SignalButton.shape === 'roundWithDock' && typeList.includes(model.type)) {
const circle1 = new Circle({
zlevel: this.zlevel,
z: this.z + 2,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 7,
r: 7
},
style: {
stroke: '#69666E',
lineWidth: 1,
fill: fillColor
}
})
const circle2 = new Circle({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 9,
r: 8
},
style: {
fill: '#000'
}
})
const circle3 = new Circle({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: computedPosition.x + 7,
cy: computedPosition.y + 9,
r: 9
},
style: {
fill: '#eee'
}
})
this.arcShape = circle1
this.arcShapeDock1 = circle2
this.arcShapeDock2 = circle3
this.add(circle1)
.add(circle2)
.add(circle3)
} else {
this.rectButton = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: computedPosition.x,
y: computedPosition.y,
width: 14,
height: 14
},
style: {
lineDash: null,
stroke: '#69666E',
lineWidth: 1,
fill: fillColor
}
})
this.add(this.rectButton)
}
this.leftLine = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x + 1,
y1: computedPosition.y + 1,
x2: computedPosition.x + 13,
y2: computedPosition.y + 13
},
style: {
lineWidth: 2,
stroke: '#ff0000'
}
})
this.add(this.leftLine)
this.leftLine.hide()
this.rightLine = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x + 13,
y1: computedPosition.y + 1,
x2: computedPosition.x + 1,
y2: computedPosition.y + 13
},
style: {
lineWidth: 2,
stroke: '#ff0000'
}
})
this.add(this.rightLine)
this.rightLine.hide()
this.leftBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x - 1,
y1: computedPosition.y - 1,
x2: computedPosition.x - 1,
y2: computedPosition.y + 15
},
style: {
lineWidth: 2,
stroke: '#FFFFFF'
}
})
this.add(this.leftBoard)
this.leftBoard.hide()
this.topBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x - 1,
y1: computedPosition.y - 1,
x2: computedPosition.x + 15,
y2: computedPosition.y - 1
},
style: {
lineWidth: 2,
stroke: '#FFFFFF'
}
})
this.add(this.topBoard)
this.topBoard.hide()
this.rightBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x + 15,
y1: computedPosition.y - 1,
x2: computedPosition.x + 15,
y2: computedPosition.y + 15
},
style: {
lineWidth: 2,
stroke: '#A0A0A0'
}
})
this.add(this.rightBoard)
this.rightBoard.hide()
this.bottomBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x - 1,
y1: computedPosition.y + 15,
x2: computedPosition.x + 15,
y2: computedPosition.y + 15
},
style: {
lineWidth: 2,
stroke: '#A0A0A0'
}
})
this.add(this.bottomBoard)
this.bottomBoard.hide()
const hasTextList = ['PASS', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION']
if (hasTextList.includes(model.type) || (this.style.SignalButton && this.style.SignalButton.showName)) {
this.buttonText = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: computedPosition.x + model.nameOffset.x,
y: computedPosition.y + model.nameOffset.y,
fontWeight: '400',
fontSize: 10,
fontFamily: '',
text: model.name,
textFill: '#C0C0C0',
textAlign: 'middle',
textVerticalAlign: 'top'
}
})
this.add(this.buttonText)
}
}
startAnimate() {
this.rectButton &&
this.rectButton
.animateStyle(true)
.when(0, { fill: '#000' })
.when(1000, { fill: this.getTypeColor() })
.when(2000, { fill: '#000' })
.start()
}
stopAnimation() {
this.rectButton && this.rectButton.stopAnimation(true)
// this.arcFlash && this.arcFlash.stopAnimation(false);
}
getTypeColor() {
if (this.style.SignalButton && this.style.SignalButton.fillColor && typeList.includes(this.model.type)) {
return this.style.SignalButton.fillColor
}
let color = ''
const list = ['ASSIST', 'ACCIDENT', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION']
if (this.model.type === 'FLEXIBLE' || this.model.type === 'SHUNT_TERMINAL') {
color = '#808080'
} else if (this.model.type === 'GUIDE') {
color = '#5050E1'
} else if (list.includes(this.model.type)) {
color = '#ccc'
} else {
color = '#008000'
}
return color
} //
recover() {
this.stopAnimation()
this.rectButton && this.rectButton.setStyle({ fill: this.getTypeColor() })
this.arcShape && this.arcShape.setStyle({ fill: this.getTypeColor() })
this.rightLine && this.rightLine.hide()
this.leftLine && this.leftLine.hide()
this.rectButton && this.rectButton.show()
this.arcShape && this.arcShape.show()
this.arcShapeDock1 && this.arcShapeDock1.show()
this.arcShapeDock2 && this.arcShapeDock2.show()
this.buttonText && this.buttonText.show()
this.leftBoard && this.leftBoard.hide()
this.rightBoard && this.rightBoard.hide()
this.topBoard && this.topBoard.hide()
this.bottomBoard && this.bottomBoard.hide()
}
blockShow() {
this.rightLine && this.rightLine.show()
this.leftLine && this.leftLine.show()
}
setState(model) {
this.recover()
// { value: 'ASSIST', label: '总辅助按钮' },
// { value: 'PICK_ASSIST', label: '接辅助按钮' },
// { value: 'DEPART_ASSIST', label: '发辅助按钮' },
const list = ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION']
if (list.includes(model.type)) {
if (this.rectButton) {
if (model.pressDown) {
this.rectButton.setStyle({ fill: '#FFFF00' })
} else {
this.rectButton = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: computedPosition.x,
y: computedPosition.y,
width: 14,
height: 14
},
style: {
lineDash: null,
stroke: '#69666E',
lineWidth:1,
fill: fillColor
}
});
this.add(this.rectButton);
this.rectButton.setStyle({ fill: this.getTypeColor() })
}
this.leftLine = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x + 1,
y1: computedPosition.y + 1,
x2: computedPosition.x + 13,
y2: computedPosition.y + 13
},
style: {
lineWidth: 2,
stroke: '#ff0000'
}
});
this.add(this.leftLine);
this.leftLine.hide();
this.rightLine = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x + 13,
y1: computedPosition.y + 1,
x2: computedPosition.x + 1,
y2: computedPosition.y + 13
},
style: {
lineWidth: 2,
stroke: '#ff0000'
}
});
this.add(this.rightLine);
this.rightLine.hide();
this.leftBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x - 1,
y1: computedPosition.y - 1,
x2: computedPosition.x - 1,
y2: computedPosition.y + 15
},
style: {
lineWidth: 2,
stroke: '#FFFFFF'
}
});
this.add(this.leftBoard);
this.leftBoard.hide();
this.topBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x - 1,
y1: computedPosition.y - 1,
x2: computedPosition.x + 15,
y2: computedPosition.y - 1
},
style: {
lineWidth: 2,
stroke: '#FFFFFF'
}
});
this.add(this.topBoard);
this.topBoard.hide();
this.rightBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x + 15,
y1: computedPosition.y - 1,
x2: computedPosition.x + 15,
y2: computedPosition.y + 15
},
style: {
lineWidth: 2,
stroke: '#A0A0A0'
}
});
this.add(this.rightBoard);
this.rightBoard.hide();
this.bottomBoard = new Line({
zlevel: this.zlevel,
z: this.z + 1,
shape: {
x1: computedPosition.x - 1,
y1: computedPosition.y + 15,
x2: computedPosition.x + 15,
y2: computedPosition.y + 15
},
style: {
lineWidth: 2,
stroke: '#A0A0A0'
}
});
this.add(this.bottomBoard);
this.bottomBoard.hide();
const hasTextList = ['PASS', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION'];
if (hasTextList.includes(model.type)) {
this.buttonText = new Text({
zlevel: this.zlevel,
z: this.z,
style: {
x: computedPosition.x + model.nameOffset.x,
y: computedPosition.y + model.nameOffset.y,
fontWeight: '400',
fontSize: 10,
fontFamily: '',
text: model.name,
textFill: '#C0C0C0',
textAlign: 'middle',
textVerticalAlign: 'top'
}
});
this.add(this.buttonText);
}
// if (model.type === 'CHANGE_DIRECTION') {
// this.arcFlash = new Arc({
// _subType: 'change_direction_flash',
// zlevel: this.zlevel,
// z: this.z,
// shape: {
// cx: model.position.x + 18 + 7,
// cy: model.position.y + 7,
// r: 6
// },
// style: {
// lineWidth: 0,
// fill: '#ffff00'
// }
// });
// this.add(this.arcFlash);
// }
}
}
startAnimate() {
this.rectButton && this.rectButton.animateStyle(true)
.when(0, { fill: '#000' })
.when(1000, { fill: this.getTypeColor() })
.when(2000, { fill: '#000' })
.start();
}
stopAnimation() {
this.rectButton && this.rectButton.stopAnimation(true);
// this.arcFlash && this.arcFlash.stopAnimation(false);
}
getTypeColor() {
let color = '';
const list = ['ASSIST', 'ACCIDENT', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION'];
if (this.model.type === 'FLEXIBLE' || this.model.type === 'SHUNT_TERMINAL') {
color = '#808080';
} else if (this.model.type === 'GUIDE') {
color = '#5050E1';
} else if (list.includes(this.model.type)) {
color = '#ccc';
} else {
color = '#008000';
}
return color;
}//
recover() {
this.stopAnimation();
this.rectButton && this.rectButton.setStyle({ fill:this.getTypeColor() });
this.arcShape && this.arcShape.setStyle({ fill:this.getTypeColor() });
this.rightLine && this.rightLine.hide();
this.leftLine && this.leftLine.hide();
this.rectButton && this.rectButton.show();
this.arcShape && this.arcShape.show();
this.buttonText && this.buttonText.show();
this.leftBoard && this.leftBoard.hide();
this.rightBoard && this.rightBoard.hide();
this.topBoard && this.topBoard.hide();
this.bottomBoard && this.bottomBoard.hide();
}
blockShow() {
this.rightLine && this.rightLine.show();
this.leftLine && this.leftLine.show();
}
setState(model) {
this.recover();
// { value: 'ASSIST', label: '总辅助按钮' },
// { value: 'PICK_ASSIST', label: '接辅助按钮' },
// { value: 'DEPART_ASSIST', label: '发辅助按钮' },
const list = ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION'];
if (list.includes(model.type)) {
if (this.rectButton) {
if (model.pressDown) {
this.rectButton.setStyle({ fill:'#FFFF00' });
// this.arcFlash.show();
// const style = this.style;
// this.arcFlash.animateStyle(true)
// .when(0, { fill: style.backgroundColor })
// .when(500, { fill: '#FFFF00' })
// .when(1000, { fill: style.backgroundColor })
// .start();
} else {
this.rectButton.setStyle({ fill:this.getTypeColor() });
// this.arcFlash.stopAnimation(false);
// this.arcFlash.hide();
}
}
}
// let
// { value: 'PICK', label: '接车按钮' },
// { value: 'SHUNT_TERMINAL', label: '调车终端按钮' },
if (!store.getters['map/checkDeviceShow'](this._code)) {
this.buttonText && this.buttonText.hide();
this.rectButton && this.rectButton.hide();
this.leftLine && this.leftLine.hide();
this.rightLine && this.rightLine.hide();
this.arcShape && this.arcShape.hide();
} else {
if (model.hasSelected) {
this.startAnimate();
}
}
}
getAnchorPoint() {
// let
// { value: 'PICK', label: '接车按钮' },
// { value: 'SHUNT_TERMINAL', label: '调车终端按钮' },
if (!store.getters['map/checkDeviceShow'](this._code)) {
this.buttonText && this.buttonText.hide()
this.rectButton && this.rectButton.hide()
this.leftLine && this.leftLine.hide()
this.rightLine && this.rightLine.hide()
this.arcShape && this.arcShape.hide()
this.arcShapeDock1 && this.arcShapeDock1.hide()
this.arcShapeDock2 && this.arcShapeDock2.hide()
} else {
if (model.hasSelected) {
this.startAnimate()
}
}
}
getAnchorPoint() {}
}

View File

@ -26,8 +26,6 @@ class ESwDot extends Group {
this.add(this.dot)
}
setColor(color) {
console.log(this.dot)
console.log(color)
this.dot.setStyle({ fill: color })
}
}

View File

@ -481,15 +481,27 @@ export default class Switch extends Group {
.start();
}
// N-定位 R-反位 NO-无(失表) EX-挤叉
setSwitchFault(fault) {
setSwitchFault(model) {
const { pos, fault, /* 单锁 */singleLock, /* 封锁 */blockade } = model
const faultList = ['SPLIT', 'SQUEEZE', 'NORMAL_SPLIT', 'REVERSE_SPLIT', 'SPLIT_1'];
// (fault === 'SPLIT' || fault === 'SQUEEZE' || (fault === 'NORMAL_SPLIT' && !reversePosition) || (fault === 'REVERSE_SPLIT' && !normalPosition))
if (this.model.switchFaultCode && fault && faultList.includes(fault) ) {
if (this.model.switchFaultCode) {
const switchFault = this.mapDevice[this.model.switchFaultCode];
switchFault.instance.setControlColor('#F00', true);
} else if (this.model.switchFaultCode) {
const switchFault = this.mapDevice[this.model.switchFaultCode];
switchFault.instance.setControlColor(this.style.backgroundColor, false);
if (this.style.SwitchFault.lamp.switchState) {
console.log(fault)
console.log(pos)
if (pos === 'N') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.controlColor)
else if (pos === 'R') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.reverseColor)
else if (pos === 'NO') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.switchingColor)
else if (pos === 'EX') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.faultColor)
if (singleLock) switchFault.instance.setControlColor(this.style.SwitchFault.lamp.lockColor)
if (blockade === 'EX') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.blockColor)
} else {
if ( fault && faultList.includes(fault) ) {
switchFault.instance.setControlColor('#F00', true);
} else {
switchFault.instance.setControlColor(this.style.backgroundColor, false);
}
}
}
// stopAnimation
this.shapeModelB.stopAnimation(false);
@ -803,7 +815,8 @@ export default class Switch extends Group {
this.setAshShow();
}
} else {
this.setSwitchFault(model.fault);
this.setSwitchFault(model);
console.log(model)
// model.pos == 'NO' || model.pos == 'EX';
// N-定位 R-反位 NO-无(失表) EX-挤叉

View File

@ -13,23 +13,40 @@ export default class EControl extends Group {
this.z = model.z;
this.style = model.style;
this.textStyle = model.text;
this.arcStyle = model.arc;
this.controlStyle = model.control;
this.create();
}
create() {
this.control = new Arc({
_subType: this.arcStyle.subType,
this.control = this.controlStyle.isSquare ? new Rect({
_subType: this.controlStyle.subType,
zlevel: this.zlevel,
z: this.z,
shape: this.arcStyle.shape,
style: {
lineWidth: this.arcStyle.lineWidth,
fill: this.arcStyle.fill,
stroke: this.arcStyle.stroke
shape: {
width: this.controlStyle.shape.r,
height: this.controlStyle.shape.r,
x: this.controlStyle.shape.cx - this.controlStyle.shape.r / 2,
y: this.controlStyle.shape.cy - this.controlStyle.shape.r / 2,
},
onmouseover: this.arcStyle.mouseover,
onmouseout: this.arcStyle.mouseout
style: {
lineWidth: this.controlStyle.lineWidth,
fill: this.controlStyle.fill,
stroke: this.controlStyle.stroke
},
onmouseover: this.controlStyle.mouseover,
onmouseout: this.controlStyle.mouseout
}) : new Arc({
_subType: this.controlStyle.subType,
zlevel: this.zlevel,
z: this.z,
shape: this.controlStyle.shape,
style: {
lineWidth: this.controlStyle.lineWidth,
fill: this.controlStyle.fill,
stroke: this.controlStyle.stroke
},
onmouseover: this.controlStyle.mouseover,
onmouseout: this.controlStyle.mouseout
});
this.text = new Text({
_subType: 'Text',
@ -63,7 +80,7 @@ export default class EControl extends Group {
height: arcRect.height + 4
},
style: {
lineDash: this.arcStyle.lineDash || this.style.arcBorderStyle.lineDash,
lineDash: this.controlStyle.lineDash || this.style.arcBorderStyle.lineDash,
stroke: this.style.arcBorderStyle.stroke,
fill: this.style.arcBorderStyle.fill
}
@ -106,15 +123,15 @@ export default class EControl extends Group {
setControlFlashing(color) {
if (color) {
this.control.animateStyle(true)
.when(0, { fill: this.arcStyle.fill })
.when(0, { fill: this.controlStyle.fill })
.when(1000, { stroke: color })
.when(2000, { fill: this.arcStyle.fill })
.when(2000, { fill: this.controlStyle.fill })
.start();
}
}
recover() {
this.control.stopAnimation(false);
this.control.setStyle('fill', this.arcStyle.fill);
this.control.setStyle('fill', this.controlStyle.fill);
}
setControlStroke(color, lineWidth) {
this.control.setStyle('lineWidth', lineWidth);

View File

@ -530,6 +530,11 @@ export const menuOperate = {
driverStop: {
operation: OperationEvent.Train.driverStop.menu.operation,
cmdType: CMD.Driver.CMD_DRIVER_STOP
},
// 换端
turnDirection:{
operation: OperationEvent.Train.turnDirection.menu.operation,
cmdType: CMD.Driver.CMD_DRIVER_CHANGE_HEAD
}
},
CTC: {

View File

@ -173,7 +173,8 @@ export default {
this.menu = MenuContextHandler.covert(this.menuNormal);
//
if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet) {
// if (!this.$store.state.scriptRecord.bgSet) {
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'DRIVER') {
this.menu = [...this.menuForce, ...this.menuDirective];
} else {
this.menu = [...this.menuForce];

View File

@ -71,24 +71,24 @@
<center><b>道岔解封</b></center>
</span>
</button>
<!-- <button :id="Signal.signalTurnOn.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalTurnOn.menuButton.operation, ['Signal'])">-->
<!-- <span style="color: black">-->
<!-- <center><b>点灯</b></center>-->
<!-- </span>-->
<!-- </button>-->
<!-- <button :id="Signal.signalTurnOff.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalTurnOff.menuButton.operation, ['SignalButton'])">-->
<!-- <span style="color:#800000">-->
<!-- <center><b>灭灯</b></center>-->
<!-- </span>-->
<!-- </button>-->
<button :id="Signal.signalTurnOn.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalTurnOn.menuButton.operation, ['Signal'])">
<span style="color: black">
<center><b>点灯</b></center>
</span>
</button>
<button :id="Signal.signalTurnOff.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalTurnOff.menuButton.operation, ['SignalButton'])">
<span style="color:#800000">
<center><b>灭灯</b></center>
</span>
</button>
<button :id="Station.stationMasterLock.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor: sGuideMasterLock? guideColorDown: guideColorUp}" @click="guideLockLeftButtonDown()">
<span style="color: #800000">
<center><b>S引导总锁</b></center>
</span>
</button>
<button :id="Station.powerUnLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="powerOnUnlock()">
<!--<span style="color: #800000">-->
<span style="color:black">
<!--<span style="color:black">-->
<span style="color:#800000">
<center><b>上电解锁</b></center>
</span>
</button>
@ -99,8 +99,8 @@
</span>
</button>
<button :id="Section.defectiveShunting.button.domId" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown(Section.defectiveShunting.button.operation, ['Section'])">
<!--<span style="color: #800000">-->
<span style="color: black">
<!--<span style="color:black">-->
<span style="color:#800000 ">
<center><b>分路不良</b></center>
</span>
</button>

View File

@ -74,6 +74,11 @@ export default {
handler: this.unlock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
label: '道岔钩锁',
handler: this.hookLock,
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK
},
{
label: '封锁/解封',
handle: ''
@ -205,7 +210,7 @@ export default {
} else { this.menu.forEach(item => { item.disabled = false; }); }
//
if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet) {
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'STATION_SWITCH_MAN') {
const menuHook = [{
label: '道岔钩锁',
handler: this.hookLock

View File

@ -85,6 +85,11 @@ export default {
label: '删车次号',
handler: this.removeTripNumber,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
},
{
label: '换端',
handler: this.turnDirection,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
}
],
Center: [
@ -254,7 +259,7 @@ export default {
} else { this.menu.forEach(item => { item.disabled = false; }); }
//
if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet) {
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'DRIVER') {
this.menu = [...this.menuForce, ...this.menuDirective];
} else {
this.menu = [...this.menuForce];
@ -560,6 +565,17 @@ export default {
}
});
},
//
turnDirection() {
commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.groupNumber }, 3).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleTurnDirection() {
const group = this.$route.query.group;

View File

@ -723,12 +723,17 @@ export default {
}
},
handelSwitchOperate(model) {
let code = ''
if (model._type === 'Switch') code = model.code
else if (model._type === 'SwitchFault') {
code = this.$store.getters['map/getDeviceByCode'](model.switchCode).code
}
const operate = {
over: true,
code: model.code,
operation: this.$store.state.menuOperation.buttonOperation,
cmdType: this.cmdType,
param: { switchCode: model.code }
param: { switchCode: code }
}
this.sendCommand(operate)
},
@ -837,6 +842,15 @@ export default {
this.Switch.block.button.operation,
this.Switch.unblock.button.operation
]
const signalButtonOperation = [
'LOCATE', //
'REVERSE', //
'MONOLOCK', //
'UNLOCK', //
'BLOCK', //
'UNBLOCK', //,
'SECTION_FAULT_UNLOCK' //
]
if ((this.guideLockLeftFlag || this.guideLockRightFlag) && model._type === 'SignalButton' && model.type === 'GUIDE') {
this.handleGuideLock(model)
} else if (buttonOperation && this.commandTypeList.includes(model._type)) {
@ -862,6 +876,30 @@ export default {
} else if (model._type === 'SignalButton' && signalButtonList.includes(model.type)) {
//
this.assistOperateOrChange(model)
} else if (model._type === 'SignalButton' && model.type === 'GUIDELOCK') {
//
if (model.labelEnum === 'S') {
this.guideLockLeftButtonDown()
} else if (model.labelEnum === 'X') {
this.guideLockRightButtonDown()
}
} else if (model._type === 'SignalButton' && signalButtonOperation.includes(model.type)) {
//
if (model.type === 'LOCATE') {
this.buttonDown(this.Switch.locate.button.operation, ['Switch', 'SwitchFault'])
} else if (model.type === 'REVERSE') {
this.buttonDown(this.Switch.reverse.button.operation, ['Switch', 'SwitchFault'])
} else if (model.type === 'MONOLOCK') {
this.buttonDown(this.Switch.lock.button.operation, ['Switch', 'SwitchFault'])
} else if (model.type === 'UNLOCK') {
this.buttonDown(this.Switch.unlock.button.operation, ['Switch', 'SwitchFault'])
} else if (model.type === 'BLOCK') {
this.buttonDown(this.Switch.block.button.operation, ['Switch', 'SwitchFault'])
} else if (model.type === 'UNBLOCK') {
this.buttonDown(this.Switch.unblock.button.operation, ['Switch', 'SwitchFault'])
} else if (model.type === 'SECTION_FAULT_UNLOCK') {
this.buttonDown(this.Section.fault.button.operation, ['Section'])
}
} else if (
(model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode)) ||
(model._type === 'Signal' && !model.blockade)

View File

@ -7,7 +7,7 @@
<switch-hook-lock ref="switchHookLock" pop-class="chengdou-03__systerm" />
<set-fault ref="setFault" pop-class="datie-02__systerm" />
<draw-select ref="drawSelect" />
<route-cancel ref="routeCancel" />
<route-cancel ref="routeCancel" />
</div>
</template>
@ -36,7 +36,7 @@ export default {
SetFault,
SwitchHookLock,
DrawSelect,
RouteCancel
RouteCancel
},
mixins: [
CancelMouseState
@ -54,72 +54,77 @@ export default {
menu: [],
menuNormal: {
Local: [
{
label: '定操',
handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
},
{
label: '反操',
handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
},
{
label: '单锁',
handler: this.lock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
{
label: '单解',
handler: this.unlock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
label: '封锁',
handle: this.block,
{
label: '定操',
handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
},
{
label: '反操',
handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
},
{
label: '单锁',
handler: this.lock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
{
label: '单解',
handler: this.unlock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
label: '封锁',
handle: this.block,
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
},
{
label: '解封',
handle: this.unblock,
{
label: '解封',
handle: this.unblock,
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
},
{
label: '区故解',
handle: ''
},
{
label: '岔前 分路不良',
handle: ''
},
{
label: '定位 分路不良',
handle: ''
},
{
label: '反位 分路不良',
handle: ''
},
{
label: '接触网定位无电',
handle: ''
},
{
label: '接触网反位无电',
handle: ''
},
{
label: '添加调机号',
handle: ''
},
{
label: '删除调机号',
handle: ''
},
{
label: '修改调机号',
handle: ''
}
},
{
label: '道岔钩锁',
handler: this.hookLock,
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK
},
{
label: '区故解',
handle: ''
},
{
label: '岔前 分路不良',
handle: ''
},
{
label: '定位 分路不良',
handle: ''
},
{
label: '反位 分路不良',
handle: ''
},
{
label: '接触网定位无电',
handle: ''
},
{
label: '接触网反位无电',
handle: ''
},
{
label: '添加调机号',
handle: ''
},
{
label: '删除调机号',
handle: ''
},
{
label: '修改调机号',
handle: ''
}
],
Center: [
// {
@ -193,7 +198,7 @@ export default {
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && (!this.buttonOperation || this.$route.query.ctc)) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && (!this.buttonOperation || this.$route.query.ctc)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
@ -207,7 +212,7 @@ export default {
this.menu = this.menuNormal.Local;
//
if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet) {
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'STATION_SWITCH_MAN') {
const menuHook = [{
label: '道岔钩锁',
handler: this.hookLock
@ -270,7 +275,7 @@ export default {
},
//
block() {
debugger
debugger;
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
@ -306,7 +311,7 @@ export default {
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
// this.$refs.switchControl.doShow(operate, this.selected);
this.$refs.routeCancel.doShow(operate, this.selected);
this.$refs.routeCancel.doShow(operate, this.selected);
}
});
},
@ -315,7 +320,7 @@ export default {
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
// this.$refs.switchControl.doShow(operate, this.selected);
this.$refs.routeCancel.doShow(operate, this.selected);
this.$refs.routeCancel.doShow(operate, this.selected);
}
});
},

View File

@ -82,6 +82,11 @@ export default {
label: '删车次号',
handler: this.removeTripNumber,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
},
{
label: '换端',
handler: this.turnDirection,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
}
],
Center: [
@ -244,7 +249,8 @@ export default {
console.log(this.menu, '================');
//
if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet) {
// if (!this.$store.state.scriptRecord.bgSet) {
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'DRIVER') {
this.menu = [...this.menuForce, ...this.menuDirective];
} else {
this.menu = [...this.menuForce];
@ -547,6 +553,17 @@ export default {
}
});
},
//
turnDirection() {
commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.groupNumber }, 3).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleTurnDirection() {
const group = this.$route.query.group;

View File

@ -0,0 +1,332 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-control"
:title="title"
:visible.sync="show"
width="480px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item v-if="operation != '70c'" prop="sectionCode">
<span slot="label">轨道</span>
<el-input v-model="addModel.sectionCode" />
</el-form-item>
<el-form-item v-else prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车组号:" prop="groupNumber">
<el-select v-model="addModel.groupNumber" filterable>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item v-if="operation == '708'" prop="serviceNumber">
<span slot="label">服务号</span>
<el-input v-model="addModel.serviceNumber" />
</el-form-item>
<el-form-item v-else-if="operation == '70c'" prop="targetCode">
<span slot="label">目的地</span>
<el-input v-model="addModel.targetCode" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item v-if="operation == '708'" prop="trainCode">
<span slot="label">序列号</span>
<el-input v-model="addModel.trainCode" />
</el-form-item>
<el-form-item v-else-if="operation == '70c'" prop="serviceNumber">
<span slot="label">服务号</span>
<el-input v-model="addModel.serviceNumber" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item v-if="operation == '70c'" prop="trainType">
<span slot="label">运行模式</span>
<br>
<el-radio-group v-model="addModel.runningMode" style="margin-left: 15px;">
<el-radio :label="'01'">普通</el-radio>
<el-radio :label="'02'">专列</el-radio>
<el-radio :label="'03'">不停站直达</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-train ref="confirmTrain" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import ConfirmTrain from './childDialog/confirmTrain';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
name: 'TrainControl',
components: {
ConfirmTrain,
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
trainList: [],
selected: null,
addModel: {
stationName: '',
sectionCode: '',
trainWindowCode: '',
groupNumber: '',
serviceNumber: '',
targetCode: '',
trainCode: '',
runningMode: ''
},
rules: {
stationName: [
{ required: true, message: '请输入车站', trigger: 'blur'}
],
sectionCode: [
{ required: true, message: '请输入轨道', trigger: 'blur'}
],
trainWindowCode: [
{ required: true, message: '请输入车次窗', trigger: 'blur'}
],
groupNumber: [
{ required: true, message: '请选择车组号', trigger: 'change' }
],
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'blur'}
],
targetCode: [
{ required: true, message: '请输入目的地号', trigger: 'blur'}
],
trainCode: [
{ required: true, message: '请输入序列号', trigger: 'blur'}
],
runningMode: [
{ required: true, message: '请选择运行模式', trigger: 'blur'}
]
},
operation: null,
dialogShow: false,
loading: false,
direction: 0
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
/* 设目的地*/
return OperationEvent.Train.destinationTrainId.menu.domId;
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation) {
/* 设计划车*/
return OperationEvent.Train.setPlanTrainId.menu.domId;
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation) {
/* 设人工车*/
return OperationEvent.Train.artificialTrainId.menu.domId;
}
return '';
}
return '';
},
title() {
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
return '设目的地车';
} else if ( this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
return '设计划车';
} else if ( this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
return '设人工车';
}
return '';
}
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.operation = operate.operation;
}
this.addModel = {
tripNumber: '',
groupNumber: '',
trainType: '01',
serviceNumber: '',
targetCode: ''
};
/** 加载列车数据*/
this.loadInitData(this.map);
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation ) {
this.destinationTrainId();
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
this.setPlanTrainId();
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
this.artificialTrainId();
}
},
//
destinationTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
operation: OperationEvent.Train.destinationTrainId.menu.operation,
message: [`设目的地车:成功`],
val: ''
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
//
setPlanTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
operation: OperationEvent.Train.setPlanTrainId.menu.operation,
message: [`设计划车:成功`],
val: ''
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
//
artificialTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
operation: OperationEvent.Train.artificialTrainId.menu.operation,
message: [`设人工车:成功`],
val: ''
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style scoped>
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -0,0 +1,181 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="480px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-select v-model="addModel.groupNumber" filterable>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainCreateNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName:'',
trainWindowCode: '',
groupNumber:''
},
rules: {
groupNumber: [
{ required: true, message: '请输入车组号', trigger: 'blur'}
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
},
title() {
return '新建车组号';
}
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel = {
stationName:'',
trainWindowCode: '',
groupNumber:''
};
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.createTrainNo.menu.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -0,0 +1,176 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="480px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-select v-model="addModel.groupNumber" filterable disabled>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainDeleteNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName:'',
trainWindowCode: '',
groupNumber:''
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
},
title() {
return '删除车组号';
}
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel = {
stationName:'',
trainWindowCode: '',
groupNumber:''
};
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.deleteTrainNo.menu.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -0,0 +1,378 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="480px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane :id="domIdBasicInfo" label="基本信息" name="first">
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="groupNumber">
<span slot="label">车组号</span>
<el-input v-model="addModel.groupNumber" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="type">
<span slot="label">服务类型</span>
<el-input v-model="addModel.type" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="serviceNumber">
<span slot="label">服务号</span>
<el-input v-model="addModel.serviceNumber" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainCode">
<span slot="label">序列号</span>
<el-input v-model="addModel.trainCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="driverCode">
<span slot="label">司机号</span>
<el-input v-model="addModel.driverCode" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="targetCode">
<span slot="label">目的地号</span>
<el-input v-model="addModel.targetCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="sectionCode">
<span slot="label">轨道</span>
<el-input v-model="addModel.sectionCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="nextStation">
<span slot="label">下一站</span>
<el-input v-model="addModel.nextStation" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="targetName">
<span slot="label">目的地</span>
<el-input v-model="addModel.targetName" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="trackingMode">
<span slot="label">跟踪模式</span>
<el-input v-model="addModel.trackingMode" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="runStatus">
<span slot="label">运行状态</span>
<el-input v-model="addModel.runStatus" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="departureTime">
<span slot="label">出发时刻</span>
<el-input v-model="addModel.departureTime" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="arrivedTime">
<span slot="label">到达时刻</span>
<el-input v-model="addModel.arrivedTime" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="planDeviation">
<span slot="label">计划偏离</span>
<el-input v-model="addModel.planDeviation" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane :id="domIdMarshalInfo" label="编组信息" name="second">
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="marshallingNo">
<span slot="label">编组号</span>
<el-input v-model="addModel.marshallingNo" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="carNo1">
<span slot="label">车头号1</span>
<el-input v-model="addModel.carNo1" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="carNo2">
<span slot="label">车头号2</span>
<el-input v-model="addModel.carNo2" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table :data="tableData" style="width: 100%" height="250">
<el-table-column prop="carriage" label="车厢" width="80" />
<el-table-column prop="carriageNumber" label="车厢号" width="80" />
</el-table>
</el-tab-pane>
<el-tab-pane :id="domIdAtpInfo" label="ATP信息" name="third">
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="trainId">
<span slot="label">车载ID</span>
<el-input v-model="addModel.trainId" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="directionType">
<span slot="label">运行方向</span>
<el-input v-model="addModel.directionType" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="drivingMode">
<span slot="label">驾驶模式</span>
<el-input v-model="addModel.drivingMode" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="speed">
<span slot="label">速度</span>
<el-input v-model="addModel.speed" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="stopQuasiState">
<span slot="label">停准状态</span>
<el-input v-model="addModel.stopQuasiState" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="doorStatus">
<span slot="label">车门状态</span>
<el-input v-model="addModel.doorStatus" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="runLevel">
<span slot="label">运行等级</span>
<el-input v-model="addModel.runLevel" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="stopState">
<span slot="label">停跳状态</span>
<el-input v-model="addModel.stopState" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="position">
<span slot="label">车头位置</span>
<el-input v-model="addModel.position" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="loadingRate">
<span slot="label">载重率</span>
<el-input v-model="addModel.loadingRate" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane :id="domIdCarAlarm" label="车辆报警" name="fourth" />
</el-tabs>
</div>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="19">
<el-button :id="domIdCancel" @click="cancel">退出</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainDetailInfo',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName:'',
groupNumber:'',
type:'',
serviceNumber:'',
trainCode:'',
driverCode:'',
targetCode:'',
sectionCode:'',
nextStation:'',
targetName:'',
trackingMode:'',
runStatus:'',
departureTime:'',
arrivedTime:'',
planDeviation:'',
marshallingNo:'',
carNo1:'',
carNo2:'',
trainId:'',
directionType:'',
drivingMode:'',
speed:'',
stopQuasiState:'',
doorStatus:'',
runLevel:'',
stopState:'',
position:'',
loadingRate:''
},
activeName:'first',
dialogShow: false,
loading: false,
tableData:[
{carriage:'1', carriageNumber:'101'},
{carriage:'2', carriageNumber:'102'},
{carriage:'3', carriageNumber:'103'},
{carriage:'4', carriageNumber:'104'},
{carriage:'5', carriageNumber:'105'},
{carriage:'6', carriageNumber:'106'}
]
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdCarAlarm() {
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.carAlarm.domId : '';
},
domIdBasicInfo() {
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.basicInfo.domId : '';
},
domIdMarshalInfo() {
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.marshalInfo.domId : '';
},
domIdAtpInfo() {
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.atpInfo.domId : '';
},
title() {
return '列车信息显示';
}
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel = {
stationName:'',
tripNumber: '',
groupNumber:''
};
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
handleClick() {
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -0,0 +1,378 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="480px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane :id="domIdBasicInfo" label="基本信息" name="first">
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="groupNumber">
<span slot="label">车组号</span>
<el-input v-model="addModel.groupNumber" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="type">
<span slot="label">服务类型</span>
<el-input v-model="addModel.type" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="serviceNumber">
<span slot="label">服务号</span>
<el-input v-model="addModel.serviceNumber" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainCode">
<span slot="label">序列号</span>
<el-input v-model="addModel.trainCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="driverCode">
<span slot="label">司机号</span>
<el-input v-model="addModel.driverCode" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="targetCode">
<span slot="label">目的地号</span>
<el-input v-model="addModel.targetCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="sectionCode">
<span slot="label">轨道</span>
<el-input v-model="addModel.sectionCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="nextStation">
<span slot="label">下一站</span>
<el-input v-model="addModel.nextStation" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="targetName">
<span slot="label">目的地</span>
<el-input v-model="addModel.targetName" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="trackingMode">
<span slot="label">跟踪模式</span>
<el-input v-model="addModel.trackingMode" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="runStatus">
<span slot="label">运行状态</span>
<el-input v-model="addModel.runStatus" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="departureTime">
<span slot="label">出发时刻</span>
<el-input v-model="addModel.departureTime" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="arrivedTime">
<span slot="label">到达时刻</span>
<el-input v-model="addModel.arrivedTime" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="planDeviation">
<span slot="label">计划偏离</span>
<el-input v-model="addModel.planDeviation" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane :id="domIdMarshalInfo" label="编组信息" name="second">
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="marshallingNo">
<span slot="label">编组号</span>
<el-input v-model="addModel.marshallingNo" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="carNo1">
<span slot="label">车头号1</span>
<el-input v-model="addModel.carNo1" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="carNo2">
<span slot="label">车头号2</span>
<el-input v-model="addModel.carNo2" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table :data="tableData" style="width: 100%" height="250">
<el-table-column prop="carriage" label="车厢" width="80" />
<el-table-column prop="carriageNumber" label="车厢号" width="80" />
</el-table>
</el-tab-pane>
<el-tab-pane :id="domIdAtpInfo" label="ATP信息" name="third">
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="trainId">
<span slot="label">车载ID</span>
<el-input v-model="addModel.trainId" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="directionType">
<span slot="label">运行方向</span>
<el-input v-model="addModel.directionType" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="drivingMode">
<span slot="label">驾驶模式</span>
<el-input v-model="addModel.drivingMode" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="speed">
<span slot="label">速度</span>
<el-input v-model="addModel.speed" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="stopQuasiState">
<span slot="label">停准状态</span>
<el-input v-model="addModel.stopQuasiState" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="doorStatus">
<span slot="label">车门状态</span>
<el-input v-model="addModel.doorStatus" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="runLevel">
<span slot="label">运行等级</span>
<el-input v-model="addModel.runLevel" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="stopState">
<span slot="label">停跳状态</span>
<el-input v-model="addModel.stopState" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="position">
<span slot="label">车头位置</span>
<el-input v-model="addModel.position" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="loadingRate">
<span slot="label">载重率</span>
<el-input v-model="addModel.loadingRate" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane :id="domIdCarAlarm" label="车辆报警" name="fourth" />
</el-tabs>
</div>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="19">
<el-button :id="domIdCancel" @click="cancel">退出</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainDetailInfo',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName:'',
groupNumber:'',
type:'',
serviceNumber:'',
trainCode:'',
driverCode:'',
targetCode:'',
sectionCode:'',
nextStation:'',
targetName:'',
trackingMode:'',
runStatus:'',
departureTime:'',
arrivedTime:'',
planDeviation:'',
marshallingNo:'',
carNo1:'',
carNo2:'',
trainId:'',
directionType:'',
drivingMode:'',
speed:'',
stopQuasiState:'',
doorStatus:'',
runLevel:'',
stopState:'',
position:'',
loadingRate:''
},
activeName:'first',
dialogShow: false,
loading: false,
tableData:[
{carriage:'1', carriageNumber:'101'},
{carriage:'2', carriageNumber:'102'},
{carriage:'3', carriageNumber:'103'},
{carriage:'4', carriageNumber:'104'},
{carriage:'5', carriageNumber:'105'},
{carriage:'6', carriageNumber:'106'}
]
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdCarAlarm() {
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.carAlarm.domId : '';
},
domIdBasicInfo() {
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.basicInfo.domId : '';
},
domIdMarshalInfo() {
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.marshalInfo.domId : '';
},
domIdAtpInfo() {
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.atpInfo.domId : '';
},
title() {
return '列车信息显示';
}
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel = {
stationName:'',
tripNumber: '',
groupNumber:''
};
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
handleClick() {
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -0,0 +1,174 @@
<template>
<el-dialog v-dialogDrag class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
<el-form-item>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-form-item>
<el-row>
<el-col :span="11">
<el-form-item label="旧车组号" prop="oldGroupNumber">
<el-select v-model="addModel.oldGroupNumber" filterable disabled>
<el-option v-for="train in trainList" :key="train.oldGroupNumber" :label="train.oldGroupNumber" :value="train.oldGroupNumber" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item label="新车组号" prop="newGroupNumber">
<el-select v-model="addModel.newGroupNumber">
<el-option v-for="train in trainList" :key="train.newGroupNumber" :label="train.newGroupNumber" :value="train.newGroupNumber" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-row justify="center" class="button-group-train">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainEditNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName: '',
trainWindowCode: '',
oldGroupNumber: '',
newGroupNumber: ''
},
rules: {
newGroupNumber: [
{ required: true, message: '请输入新车组号', trigger: 'blur'}
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
},
title() {
return '修改车组号';
}
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel = {
stationName: '',
trainWindowCode: '',
oldGroupNumber: '',
newGroupNumber: ''
};
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.editTrainNo.menu.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -0,0 +1,193 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="480px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="90px" :model="addModel" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-select v-model="addModel.groupNumber" filterable disabled>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="purposeStationName">
<span slot="label">车站</span>
<el-input v-model="addModel.purposeStationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="purposeTrainWindowCode">
<span slot="label">目的车次窗</span>
<el-input v-model="addModel.purposeTrainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainMoveNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName: '',
trainWindowCode: '',
groupNumber: '',
purposeStationName: '',
purposeTrainWindowCode: ''
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
},
title() {
return '移动车组号';
}
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel = {
stationName: '',
trainWindowCode: '',
groupNumber: '',
purposeStationName: '',
purposeTrainWindowCode: ''
};
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.moveTrainNo.menu.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -0,0 +1,155 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm updateTrip"
:title="title"
:visible.sync="show"
width="300px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="display: inline-block;margin-left:22px;">
<span class="tripNumberName">车次号:</span>
<div class="tripNumberClass">
<el-input v-model="tripNumber" size="mini" @blur="handleTripNumber" />
<div class="tripNumberTips">{{ messageTip1 }}</div>
</div>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'UpdateTrip',
components: {
NoticeInfo
},
data() {
return {
dialogShow:false,
tripNumber: '',
messageTip1:'',
loading: false
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.updateTrip.confirm.domId : '';
},
domIdChangeTripNumber() {
return this.dialogShow ? OperationEvent.Train.updateTrip.changeTripNumber.domId : '';
},
title() {
return '修改车次号';
}
},
methods: {
doShow(operate, tripNumber) {
this.tripNumber = tripNumber;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
handleTripNumber() {
this.judgeTripNumber();
},
judgeTripNumber() {
const figuresOfServiceMinNumber = 2;
const figuresOfServiceMaxNumber = 6;
// this.$store.state.map.mapConfig.figuresOfServiceNumber;
const tripNumber = this.tripNumber;
const judge = /^[a-zA-Z0-9]*[\d]$/.test(this.tripNumber);
let result = false;
if (judge) {
if (tripNumber.toString().length > figuresOfServiceMaxNumber || tripNumber.toString().length < figuresOfServiceMinNumber) {
this.messageTip1 = '车次号长度' + figuresOfServiceMinNumber + '-' + figuresOfServiceMaxNumber + '位';
result = false;
} else {
this.messageTip1 = '';
result = true;
}
} else {
this.tripNumber = '';
this.messageTip1 = '请输入车次号(最后一位数字)';
}
return result;
},
commit() {
const result = this.judgeTripNumber();
if (this.tripNumber && result) {
const params = {
tripNumber: this.tripNumber
};
this.messageTip1 = '';
this.loading = true;
commitOperate(menuOperate.Train.updateTripCommit, params, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
}
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.tripNumber = '';
this.$store.dispatch('training/emitTipFresh');
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.tripNumberClass{
display: inline-block;
width:140px
}
.tripNumberName{
margin-left: 5px;
height: 22px;
vertical-align: top;
margin-right:10px;
display: inline-block;
}
.tripNumberTips{
margin-top: 10px;
color: #f00;
font-size: 13px;
text-align: left;
}
</style>

View File

@ -7,8 +7,7 @@
</template>
<script>
import PopMenu from '@/components/PopMenu';
// OperateMode
import { DeviceMenu } from '@/scripts/ConstDic';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
@ -89,6 +88,11 @@ export default {
label: '区段故障解锁',
handler: this.fault,
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
},
{
label: '道岔钩锁',
handler: this.hookLock,
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK
}
],
Center: [
@ -196,17 +200,17 @@ export default {
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Local;
//
// if (this.operatemode === OperateMode.FAULT) {
// if (!this.$store.state.scriptRecord.bgSet) {
// const menuHook = [{
// label: '',
// handler: this.hookLock
// }];
// this.menu = [...this.menuForce, ...menuHook];
// } else {
// this.menu = this.menuForce;
// }
// }
if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'STATION_SWITCH_MAN') {
const menuHook = [{
label: '道岔钩锁',
handler: this.hookLock
}];
this.menu = [...this.menuForce, ...menuHook];
} else {
this.menu = this.menuForce;
}
}
}
}

View File

@ -0,0 +1,638 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<train-control ref="trainControl" />
<train-edit-number ref="trainEditNumber" />
<train-create-number ref="trainCreateNumber" />
<train-move-number ref="trainMoveNumber" />
<train-delete-number ref="trainDeleteNumber" />
<train-detail-info ref="trainDetailInfo" />
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
<speed-limit ref="speedLimit" pop-class="chengdou-03__systerm" />
<train-stop ref="trainStop" pop-class="chengdou-03__systerm" />
<!-- <train-set-plan ref="trainSetPlan" /> -->
<update-trip ref="updateTrip" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import TrainControl from './dialog/trainControl';
import TrainEditNumber from './dialog/trainEditNumber';
import TrainMoveNumber from './dialog/trainMoveNumber';
import TrainCreateNumber from './dialog/trainCreateNumber';
import TrainDeleteNumber from './dialog/trainDeleteNumber';
import TrainDetailInfo from './dialog/trainDetailInfo';
// import TrainSetPlan from './dialog/trainSetPlan';
import UpdateTrip from './dialog/updateTrip';
import CancelMouseState from '@/mixin/CancelMouseState';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
import TrainStop from '@/jmapNew/theme/components/menus/dialog/trainStop';
export default {
name: 'MenuTrain',
components: {
PopMenu,
NoticeInfo,
TrainControl,
TrainEditNumber,
TrainMoveNumber,
TrainCreateNumber,
TrainDeleteNumber,
TrainDetailInfo,
SetFault,
UpdateTrip,
SpeedLimit,
TrainStop
// TrainSetPlan
},
mixins: [
CancelMouseState
],
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
// {
// label: '',
// handler: this.setPlanTrain,
// cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN
// },
{
label: '变更车次号',
handler: this.modifyTripNumber,
cmdType: CMD.Train.CMD_TRAIN_UPDATE_TRIP_NUMBER_TRAIN
},
{
label: '删车次号',
handler: this.removeTripNumber,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
},
{
label: '换端',
handler: this.turnDirection,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
}
],
Center: [
{
label: '变更车次号',
handler: this.modifyTripNumber,
cmdType: CMD.Train.CMD_TRAIN_UPDATE_TRIP_NUMBER_TRAIN
}
// {
// label: '',
// handler: this.setPlanTrain,
// cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN
// }
// {
// label: '',
// handler: this.createTrainNo
// },
// {
// label: '',
// handler: this.moveTrainNo
// },
// {
// label: '',
// handler: this.deleteTrainNo
// },
// {
// label: '',
// handler: this.editTrainNo
// },
// {
// label: '',
// handler: this.setPlanTrainId
// },
// {
// label: '',
// handler: this.destinationTrainId
// },
// {
// label: '',
// handler: this.artificialTrainId
// },
// {
// label: '',
// handler: this.undeveloped
// },
// {
// label: '',
// handler: this.detailTrainInfo
// },
// {
// label: '',
// handler: this.undeveloped
// }
]
},
menuForce: [
{
label: '设置故障',
handler: this.setStoppage
},
{
label: '取消故障',
handler: this.cancelStoppage
},
{
label: '触发故障管理',
handler: this.triggerFaultManagement
}
],
menuDirective: [
{
label: '切换驾驶模式',
children: [
{
label: '转AM-C模式',
handler: this.handlerApplyAmcMode
},
{
label: '转SM-C模式',
handler: this.handlerApplySmcMode
},
{
label: '转AM-I模式',
handler: this.handlerApplyAmiMode
},
{
label: '转SM-I模式',
handler: this.handlerApplySmiMode
},
{
label: '转RM模式',
handler: this.handlerApplyRmMode
}
]
},
{
label: '确认运行至前方站',
handler: this.nextStation
},
{
label: '进路闭塞法行车',
handler: this.routeBlockRun
},
{
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
{
label: '越红灯行驶',
handler: this.handleOverEedLight
},
// {
// label: '',
// handler: this.handleSpeedLimit
// },
{
label: '驾驶',
handler: this.handleDriveTo
},
{
label: '换端',
handler: this.handleTurnDirection
},
{
label: '发车',
handler: this.handleDepartTrain
},
{
label: '停车',
handler: this.handleParkingTrain
}
],
menuSpeed: [
{
label: '确认运行至前方站',
handler: this.limitSpeed
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode',
'memberList'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function () {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Train) && (!this.buttonOperation || this.$route.query.ctc)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
initMenu() {
//
this.menu = MenuContextHandler.covert(this.menuNormal);
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (station && station.controlMode === 'Interlock' && this.$route.query.ctc) {
this.menu.forEach(item => { item.disabled = true; });
} else { this.menu.forEach(item => { item.disabled = false; }); }
//
if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'DRIVER') {
this.menu = [...this.menuForce, ...this.menuDirective];
} else {
this.menu = [...this.menuForce];
}
}
//
if (this.operatemode === OperateMode.DIRECTIVE) {
if (!this.$store.state.scriptRecord.bgSet) {
this.menu = [...this.menuDirective];
}
}
},
doShow(point) {
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
}
});
},
//
cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
}
});
},
triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
},
nextStation() {
this.trainSend('Drive_Ahead');
},
routeBlockRun() {
this.trainSend('Route_Block_Drive');
},
handleOverFuideSignal() {
this.trainSend('Drive_Through_The_Guide_Signal');
},
handleOverEedLight() {
this.trainSend('Drive_Through_The_Red_Light');
},
trainSend(type) {
const group = this.$route.query.group;
const param = {
commandType: type,
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleSpeedLimit() { //
this.$refs.speedLimit.doShow(this.selected);
},
//
limitSpeed() {
const operate = {
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Train.limitSpeed.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
},
//
// setPlanTrain() {
// const operate = {
// start: true,
// code: this.selected.code,
// operation: OperationEvent.Train.editTrainId.menu.operation,
// param: {}
// };
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.trainSetPlan.doShow(operate, this.selected);
// }
// });
// },
//
setPlanTrainId() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Train.setPlanTrainId.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow();
}
});
},
//
destinationTrainId() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Train.destinationTrainId.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow();
}
});
},
//
artificialTrainId() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Train.artificialTrainId.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow();
}
});
},
//
detailTrainInfo() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Train.detailTrainInfo.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDetailInfo.doShow(operate, this.selected);
} else {
this.$refs.noticeInfo.doShow();
}
});
},
//
createTrainNo() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Train.createTrainNo.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainCreateNumber.doShow(operate, this.selected);
}
});
},
//
deleteTrainNo() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Train.deleteTrainNo.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDeleteNumber.doShow(operate, this.selected);
}
});
},
//
editTrainNo() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Train.editTrainNo.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainEditNumber.doShow(operate, this.selected);
}
});
},
//
moveTrainNo() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Train.moveTrainNo.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainMoveNumber.doShow(operate, this.selected);
}
});
},
handlerApplyAmcMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'AM_C' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplySmcMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'SM_C' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplyAmiMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'AM_I' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplySmiMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'SM_I' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handlerApplyRmMode() {
const group = this.$route.query.group;
const param = {
commandType: 'Change_Preselection_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: { preselectionMode: 'RM' }
};
commitTrainSend(group, param).then(({ valid, operate }) => {
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.collocation, this.selected, true);
}
});
},
//
turnDirection() {
commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.groupNumber }, 3).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handleTurnDirection() {
const group = this.$route.query.group;
const param = {
commandType: 'Turn_Direction',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleDepartTrain() {
const group = this.$route.query.group;
const param = {
commandType: 'Depart_Train',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate}) => {
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
handleParkingTrain() {
commitOperate(menuOperate.Train.driverStop, {groupNumber:this.selected.groupNumber}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.trainStop.doShow(operate, this.selected);
}
});
},
modifyTripNumber() {
commitOperate(menuOperate.Train.updateTrip, {groupNumber:this.selected.groupNumber}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.updateTrip.doShow(operate, this.selected.tripNumber);
}
});
},
removeTripNumber() {
commitOperate(menuOperate.Train.removeTrip, {groupNumber:this.selected.groupNumber}, 3).then(({valid, operate})=>{
// if (valid) {}
}).catch((error)=> {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
}
}
};
</script>

View File

@ -448,7 +448,7 @@ export default {
CTC_ZONE_RELEASE_STATION_RUN_PLAN:{value:'CTC_ZONE_RELEASE_STATION_RUN_PLAN', label: '调度台发布车站行车计划'},
CTC_QUERY_DISPATCH_COMMAND:{value:'CTC_QUERY_DISPATCH_COMMAND', label: '调度台命令查询'},
CTC_SEND_DISPATCH_COMMAND:{value:'CTC_SEND_DISPATCH_COMMAND', label: '调度台命令发送'},
CTC_SEND_DISPATCH_COMMAND:{value:'CTC_SEND_DISPATCH_COMMAND', label: '调度台命令下达'},
CTC_SIGN_DISPATCH_COMMAND:{value:'CTC_SIGN_DISPATCH_COMMAND', label: '调度台命令签收'},
CTC_READ_DISPATCH_COMMAND:{value:'CTC_READ_DISPATCH_COMMAND', label: '调度台命令已读'}

View File

@ -3,7 +3,8 @@ export const State2SimulationMap = {
'01': 'Local', // 现地工作站
'02': 'Center', // 中心调度工作站
'09':'Depot_IL', // 车辆段工作站
'10': 'Local'
'10': 'Local',
'04': 'Local'
};
export const State2ControlMap = {
@ -64,7 +65,8 @@ export const deviceFaultType = {
Train: [
{label: '通信异常', value: 'COMMUNICATION_ABNORMAL'},
{label: '驾驶故障', value: 'DRIVE_FAULT'},
{label: '突然EB', value: 'SUDDEN_EB' }
{label: '突然EB', value: 'SUDDEN_EB' },
{label: '列车脱线', value: 'OFF_LINE' }
],
Power:[
{label: '供电故障', value: 'FAULT'}

View File

@ -3437,6 +3437,12 @@ export const OperationEvent = {
operation: '70w',
domId: '_Tips-Train-driverStop-Menu'
}
},
turnDirection: {
menu: {
operation: '70x',
domId: '_Tips-Train-turnDirection-Menu'
}
}
},

View File

@ -205,7 +205,8 @@ export default {
this.currentInfo = obj;
if (!this.getSignInfo(obj.receiverInfos).receivedTime) {
const data = {
commandId: obj.id
commandId: obj.id,
title: obj.title
};
sendCommandNew(this.group, 'CTC_READ_DISPATCH_COMMAND', data).then((res) => {
console.log(res, '---res');
@ -241,7 +242,7 @@ export default {
},
signCmd(status) {
if (!this.commandId) { return; }
const signInfo = { commandId: this.commandId, signedBy: this.getActiveUser.memberId, signedStatus: status };
const signInfo = { commandId: this.commandId, signedBy: this.getActiveUser.memberId, signedStatus: status, title: this.currentInfo.title };
const data = {
signInfo: signInfo
};
@ -290,7 +291,7 @@ export default {
},
searchCmd() {
this.cmdTableData = [];
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND').then((res) => {
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND', {}).then((res) => {
console.log(res, '---res');
if (res.code == 200) {
this.cmdTableData = res.data;

View File

@ -823,7 +823,7 @@ export default {
},
searchCmd() {
return new Promise((resolve, reject) => {
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND').then((res) => {
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND', {}).then((res) => {
console.log(res, '---res----');
this.seachData = res.data;
resolve();

View File

@ -190,7 +190,8 @@ export default {
this.signedId = activeUser.memberId;
}
},
doShow() {
async doShow() {
await this.searchCmd(); // cmdManage
this.getSenderName();
this.getSignedData();
this.dialogShow = true;
@ -223,7 +224,8 @@ export default {
hasReadCmd() {
if (!this.commandId) { return; }
const data = {
commandId: this.commandId
commandId: this.commandId,
title: this.signedData.title
};
sendCommandNew(this.group, 'CTC_READ_DISPATCH_COMMAND', data).then((res) => {
console.log(res, '---res');
@ -233,7 +235,7 @@ export default {
},
signCmd(status) {
if (!this.commandId) { return; }
const signInfo = { commandId: this.commandId, signedBy: this.signedId, signedStatus: status };
const signInfo = { commandId: this.commandId, signedBy: this.signedId, signedStatus: status, title: this.signedData.title };
const data = {
signInfo: signInfo
};
@ -244,6 +246,16 @@ export default {
}).catch(error => {
this.$messageBox('查询调度命令失败:' + error.message);
});
},
searchCmd() {
return new Promise((resolve, reject) => {
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND', {}).then((res) => {
console.log(res, '---res----');
resolve();
}).catch(error => {
reject(error.message);
});
});
}
}

View File

@ -901,10 +901,10 @@ export default {
//
stopRecording() {
this.audioPlay = true;
clearInterval(this.inter);
this.seconds = 0;
const that = this;
this.recorders.stopRecording(function(blobURL) {
clearInterval(that.inter);
that.seconds = 0;
const blob = that.recorders.getBlob();
const fd = new FormData();
fd.append('file', blob);

View File

@ -0,0 +1,86 @@
<template>
<el-dialog v-dialogDrag :title="title" :visible.sync="show" width="550px" :before-close="doClose">
<el-form ref="form" label-width="120px" :model="formModel" :rules="rules">
<el-form-item :label="$t('display.setTime.systemTime')" prop="time">
<el-time-picker
v-model="formModel.time"
:picker-options="pickerOptions"
:placeholder="$t('display.setTime.anyTime')"
/>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="show = false">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" :loading="status" @click="handleSure">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { modifySystemTime } from '@/api/simulation';
import { prefixIntrger } from '@/utils/date';
//
export default {
data() {
return {
show: false,
formModel: {
time: new Date()
},
maxNumber: 1,
pickerOptions: { selectableRange: '00:00:00 - 23:59:59' },
status: false
};
},
computed: {
title() {
return '修改系统时间';
},
group() {
return this.$route.query.group;
},
rules() {
return {
time: [
{ required: true, message: this.$t('display.setTime.selectSystemTime'), trigger: 'change' }
]
};
}
},
methods: {
doShow() {
// this.formModel.time = new Date(this.$store.state.training.initTime || null);
this.show = true;
},
doClose() {
this.status = false;
this.show = false;
},
formatTime(time) {
const hh = prefixIntrger(time.getHours(), 2);
const mm = prefixIntrger(time.getMinutes(), 2);
const ss = prefixIntrger(time.getSeconds(), 2);
return `${hh}:${mm}:${ss}`;
},
handleSure() {
this.$refs.form.validate((valid) => {
if (valid) {
this.status = true;
const model = {
time: this.formatTime(this.formModel.time)
};
modifySystemTime(model, this.group).then(resp => {
this.status = false;
this.$message.success('修改系统时间成功!');
}).catch(() => {
this.status = false;
this.$messageBox('修改系统时间失败,请稍后再试');
});
this.doClose();
}
});
}
}
};
</script>

View File

@ -29,6 +29,9 @@
<template v-if="isScriptRun">
<el-button type="danger" size="small" @click="handleQuitQuest">退出剧本</el-button>
</template>
<template v-if="$route.query.lineCode == '16'">
<el-button type="primary" size="small" @click="modifySystemTime">修改系统时间</el-button>
</template>
<template v-else-if="!projectDevice">
<el-button v-if="project !== 'srsandbox' && $route.query.lineCode !== '16' " type="success" :disabled="isDisable" size="small" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
<!-- isDisable&& -->
@ -51,6 +54,7 @@
/>
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
<modify-time v-if="$route.query.lineCode == '16'" ref="modifySysTime" />
</div>
</template>
@ -58,6 +62,7 @@
<!-- 单人仿真 -->
<script>
import SetTime from './demon/setTime';
import ModifyTime from './demon/modifyTime';
import DemonMenu from './demonMenu';
import DemonChat from './demonChat';
import { Notification } from 'element-ui';
@ -80,6 +85,7 @@ export default {
name: 'MenuDemon',
components: {
SetTime,
ModifyTime,
DemonChat,
MenuSchema,
DemonMenu,
@ -306,6 +312,10 @@ export default {
this.$messageBox(this.$t('display.demon.exitTaskFail'));
});
},
//
modifySystemTime() {
this.$refs.modifySysTime.doShow();
},
//
async selectQuest({row, id, mapLocation, roleName}) {
try {

View File

@ -1,6 +1,7 @@
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import store from '@/store/index';
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
import { transfiniteList, trainTypeList } from '@/scripts/ConstDic';
// 操作
export const operateEnum = {
Set_Fault:{
@ -271,11 +272,187 @@ export const operateEnum = {
}
]
}
},
CTC: {
function: getCTCDevicename,
CTC_READ_DISPATCH_COMMAND: {
isList:true,
name:'读取调度命令',
params:[
{
code:'title',
name:'命令标题'
}
]
},
CTC_SIGN_DISPATCH_COMMAND: {
code:'signInfo',
name:'签收调度命令',
isList:true,
params:[
{
code:'title',
name:'命令标题'
},
{
code:'signedBy',
name:'签收人',
function: getUserNameById
},
{
code:'signedStatus',
name:'签收状态',
result:[
{data:'SIGNED', name:'签收', judge:'='},
{data:'REFUSE', name:'拒签', judge:'='}
]
}
]
},
CTC_SEND_DISPATCH_COMMAND: {
code:'command',
name:'发送调度命令',
isList:true,
params:[
{
code:'title',
name:'命令标题'
},
{
code:'number',
name:'命令号'
},
{
code:'transferNumber',
name:'中转识别号'
},
{
code:'sendTime',
name:'发令时间'
},
{
code:'senderName',
name:'发令人'
},
{
code:'companyOfSender',
name:'发令单位'
},
{
code:'authorizationTime',
name:'授权时间'
},
{
code:'authorizationStatus',
name:'授权状态'
},
{
code:'finalizationTime',
name:'定稿时间'
},
{
code:'reviewerId',
name:'审核人',
function: getUserNameById
},
{
code:'author',
name:'拟令人',
function: getUserNameById
},
{
code:'type',
name:'命令分类',
result:[
{data:'NORMAL', name:'正常调度命令', judge:'='}
]
},
{
code:'content',
name:'命令正文'
},
{
code:'receiverIds',
name:'受令单位',
function: getStationNamList
}
]
}
}
};
export const ctcOperateEnum = {
// 调度台操作
export const ctcZoneMap = {
CTC_ZONE_SAVE_RUN_PLAN:{
name:'添加行车计划',
isList:true,
objName:'planParam',
params:[
{
code:'stationCode',
name:'车站',
function:getStationNameById
},
{
code:'trainType',
name:'列车类型',
result:trainTypeList
},
{
code:'runType',
name:'运行类型',
result:[
{code:'FAST_PASSENGER_TRAIN', name:'快速旅客列车'}
]
},
{
code:'arriveTripNumber',
name:'到达车次'
},
{
code:'arriveDirectionCode',
name:'接车口'
},
{
code:'arriveSectionCode',
name:'接车股道'
},
{
code:'arrivePlanTime',
name:'到达时间'
},
{
code:'startRunPlan',
name:' 始发'
},
{
code:'transfinite',
name:' 超限',
result:transfiniteList
}
//
]
// planParam: Object
// arriveDirectionCode: "Station32295_SF"
// arrivePlanTime: "2022-07-27 17:12"
// arriveSectionCode: "T97"
// arriveTripNumber: "2056"
// departDirectionCode: ""
// departPlanTime: ""
// departSectionCode: ""
// departTripNumber: ""
// electrical: true
// endRunPlan: true
// entryOutDiscordant: false
// passenger: true
// runType: "FAST_PASSENGER_TRAIN"
// startRunPlan: false
// stationCode: "Station32295"
// trackDiscordant: true
// trainType: "LOCAL_EXPRESS_PASSENGER_TRAIN"
// transfinite: "NO"
}
};
// 转换函数
@ -307,25 +484,71 @@ export function covertOperate(operationType, operationParamMap) {
});
return tip;
} else if (operationType.includes('CTC')) {
const tip = '请打开';
// ctcOperateEnum
// 车务终端,找到
return tip;
// 总辅助按钮
// CTC_ASSIST_PRESS_MAIN_ASSIST
// labelEnum:model.labelEnum,
// stationCode:model.stationCode,
// pressDown:model.pressDown ? 0 : 1 // 1按下、0弹起
// CTC_ASSIST_PRESS_RECEIVE_ASSIST
// labelEnum;
// stationCode;
// CTC_ASSIST_PRESS_DELIVER_ASSIST
// CTC_ASSIST_PRESS_BLOCK
// CTC_ASSIST_PRESS_RESTORE
// CTC_ASSIST_PRESS_ACCIDENT
// CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION
} else if (operationType.includes('CTC_ZONE')) {
let tip = '请点击运行图';
// let operateName = null;
// Object.keys(CMD).forEach(key => {
// Object.values(CMD[key]).forEach(el => {
// if (el.value == operationType) {
// operateName = el;
// return;
// }
// });
// });
// tip += ',执行【' + operateName.label + '】操作';
let operationParam = operationParamMap;
const paramInfo = ctcZoneMap[operationType];
tip += ',执行【' + paramInfo.name + '】操作';
if (paramInfo.objName) {
operationParam = operationParamMap[paramInfo.objName];
}
if (paramInfo.isList) {
tip += ',参数:【';
paramInfo.params.forEach(param=>{
if (param.result) {
param.result.forEach(result=>{
if (result.code == operationParam[param.code]) {
tip += param.name + '为' + result.name + '';
}
});
} else if (param.function) {
tip += param.name + '为' + covertFunction(param.function, operationParam[param.code]) + '';
} else {
tip += param.name + '为' + operationParam[param.code] + '';
}
});
tip += '】';
}
debugger;
// operationParamMap[]
// if (paramInfo) {
// if (paramInfo.isDevice) {
// if (paramInfo.isList) {
// paramName += '【' + paramInfo.name + ' ';
// const deviceList = operationParamMap[paramInfo.code];
// deviceList.forEach((device, index)=>{
// paramName += covertFunction(paramInfo.function, device);
// if (index != deviceList.length - 1) {
// paramName += '';
// }
// });
// paramName += '】';
// } else {
// operationParamMap[]
return tip;
// ctcZoneMap[operationType]
// 调度台添加行车计划
// CTC_ZONE_SAVE_TRACK_SECTION:{value:'CTC_ZONE_SAVE_TRACK_SECTION', label: '调度台行车计划修改股道'},
// CTC_ZONE_SAVE_TRIP_NUMBER:{value:'CTC_ZONE_SAVE_TRIP_NUMBER', label: '调度台行车计划修改车次'},
// CTC_ZONE_SAVE_PLAN_TIME:{value:'CTC_ZONE_SAVE_PLAN_TIME', label: '调度台行车计划修改时间'},
// CTC_ZONE_SAVE_DIRECTION:{value:'CTC_ZONE_SAVE_DIRECTION', label: '调度台行车计划修改出入口'},
// CTC_ZONE_SAVE_STATION:{value:'CTC_ZONE_SAVE_STATION', label: '调度台行车计划修改到发车站'},
// CTC_ZONE_SAVE_RUN_PLAN:{value:'CTC_ZONE_SAVE_RUN_PLAN', label: '调度台添加行车计划'},
// CTC_ZONE_DELETE_RUN_PLAN:{value:'CTC_ZONE_DELETE_RUN_PLAN', label: '调度台删除行车计划'},
// CTC_ZONE_RELEASE_ALL_RUN_PLAN:{value:'CTC_ZONE_RELEASE_ALL_RUN_PLAN', label: '调度台发布所有行车计划'},
// CTC_ZONE_RELEASE_STATION_RUN_PLAN:{value:'CTC_ZONE_RELEASE_STATION_RUN_PLAN', label: '调度台发布车站行车计划'},
} else {
let device = operationType.split('_')[0];
if (device == 'CM') {
@ -403,6 +626,25 @@ function covertDeviceName(deviceInfo, deviceType) {
return deviceName;
}
function getCTCDevicename(operationType) {
let deviceName = '';
if (operationType == 'CTC_QUERY_DISPATCH_COMMAND') {
const roles = store.state.training.roles;
if (roles == 'DISPATCHER') {
deviceName = '调度命令';
} else {
deviceName = '车务终端 --> 调度命令';
}
} else if (operationType == 'CTC_READ_DISPATCH_COMMAND') {
deviceName = '车务终端 --> 调度命令';
} else if (operationType == 'CTC_SIGN_DISPATCH_COMMAND') {
deviceName = '车务终端 --> 调度命令';
} else if (operationType == 'CTC_SEND_DISPATCH_COMMAND') {
deviceName = '调度命令';
}
return deviceName;
}
function covertOperation(deviceType, operationParamMap, operationType) {
let deviceName = '【';
let paramName = '';
@ -425,10 +667,12 @@ function covertOperation(deviceType, operationParamMap, operationType) {
// } else {
// }
deviceName += '】';
} else if (operateEnum[deviceType].type) {
deviceName += operateEnum[deviceType].type + '】';
deviceName += operateEnum[deviceType].type;
} else if (operateEnum[deviceType].function) {
deviceName += covertFunction(operateEnum[deviceType].function, operationType);
}
deviceName += '】';
const paramInfo = operateEnum[deviceType][operationType];
if (paramInfo) {
if (paramInfo.isDevice) {
@ -453,7 +697,11 @@ function covertOperation(deviceType, operationParamMap, operationType) {
paramName += '【';
params.forEach((param, index)=>{
paramName += ' ' + param.name;
const data = operationParamMap[param.code];
let opMap = operationParamMap;
if (paramInfo.code) {
opMap = operationParamMap[paramInfo.code];
}
const data = opMap[param.code];
if (param.result) {
param.result.forEach(result=>{
switch (result.judge) {
@ -502,6 +750,18 @@ function covertFunction(func, device) {
return func(device);
}
function getUserNameById(id) {
let name = '';
const userList = store.state.training.simulationUserList;
const user = userList.find(item=>{
return item.memberId == id;
});
if (user) {
name = user.nickName;
}
return name;
}
function getRouteNameById(routeId) {
const routeList = store.state.map.routeList;
const route = routeList.find(route=>{
@ -514,6 +774,16 @@ function getStationNameById(stationId) {
const station = store.getters['map/getDeviceByCode'](stationId) || {};
return station.name;
}
function getStationNamList(list) {
const nameList = [];
list.sort().forEach(stationId => {
const station = store.getters['map/getDeviceByCode'](stationId) || {};
if (station.name) {
nameList.push(station.name);
}
});
return nameList.join(',');
}
function getStationResultById(stationResult) {
const station = store.getters['map/getDeviceByCode'](stationResult.stationCode) || {};
let param = '不同意';

View File

@ -2,13 +2,14 @@
<div class="main" :style="{width: canvasWidth+'px'}">
<div v-show="panelShow" :panelShow="panelShow">
<transition name="el-zoom-in-bottom">
<map-system-draft ref="mapCanvas" @back="back" />
<map-system-draft v-show="userRole != 'DISPATCHER'" ref="mapCanvas" @back="back" />
</transition>
<script-button-group
ref="scriptButtonGroup"
:offset="offset"
:text-status-height="textStatusHeight"
:group="group"
:user-role.sync="userRole"
@viewScriptRoles="viewScriptRoles"
@viewRunPlan="viewRunPlan"
@loadRunPlan="loadRunPlan"
@ -19,7 +20,12 @@
@setTreeData="setTreeData"
@changeScriptMode="changeScriptMode"
@setMapLocation="setMapLocation"
@changeShowMap="changeShowMap"
@quitQuest="quitQuest"
/>
<div v-if="lineCode === '16'" v-show="userRole === 'DISPATCHER' && !showMap">
<dispatcher-station ref="dispatcherStation" @changeShowMap="changeShowMap" />
</div>
<script-preview-chat ref="chatbox" :group="group" :user-role="userRole" :offset="offset" />
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
</div>
@ -49,6 +55,7 @@ import { loadDraftScriptNew } from '@/api/designPlatform';
import Vue from 'vue';
import { ScriptMode } from '@/scripts/ConstDic';
import ConstConfig from '@/scripts/ConstConfig';
import DispatcherStation from '@/views/newMap/jointTrainingNew/dispatcherStation.vue';
export default {
name: 'DisplayDraft',
@ -60,6 +67,7 @@ export default {
FaultChoose,
MenuSystemTime,
SelectRole,
DispatcherStation,
ScriptButtonGroup
},
data() {
@ -73,6 +81,7 @@ export default {
mapLocation:{},
showStation: '',
group: '',
lineCode: '',
prdTypeMap: {
'01': '01', // =>
'02': '02', // =>
@ -80,9 +89,12 @@ export default {
'05': '' // => null
},
userRole:'',
showMap: false,
isDrive: this.prdType == '04',
treeData:[],
memberList:[],
centralizedstationList: [],
centralizedStationMap: {},
scriptMode: ScriptMode.TEACH
};
},
@ -117,6 +129,11 @@ export default {
this.showStation = code;
}
},
'$store.state.map.map': function (map) {
if (map) {
this.setCentralizedstationList(map); //
}
},
'$store.state.training.prdType':function(val) {
this.setPosition();
// this.setMode();
@ -129,8 +146,12 @@ export default {
},
created() {
this.group = this.$route.query.group || '';
this.lineCode = this.$route.query.lineCode;
},
methods: {
changeShowMap(flag) {
this.showMap = flag;
},
back() {
this.$refs.scriptButtonGroup.back();
},
@ -159,20 +180,24 @@ export default {
}
});
let prdType;
let type;
if (role.type == '行值') {
prdType = '01';
type = 'STATION_SUPERVISOR';
this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
this.$store.dispatch('training/setRoleDeviceCode', role.deviceCode);
} else if (role.type == '行调') {
prdType = '02';
type = 'DISPATCHER';
this.$store.dispatch('training/setRoles', 'DISPATCHER');
this.$store.dispatch('scriptRecord/updateRole', 'DISPATCHER' + ':' + role.id);
} else if (role.type == '司机') {
prdType = '04';
type = 'DRIVER';
this.$store.dispatch('training/setRoles', 'DRIVER');
this.$store.dispatch('scriptRecord/updateRole', 'DRIVER' + ':' + role.id);
} else if (role.type == '通号') {
prdType = '';
type = 'MAINTAINER';
this.$store.dispatch('training/setRoles', 'MAINTAINER');
const routeData = this.$router.resolve({
path:'/jlmap3d/maintainer',
query:{
@ -184,12 +209,64 @@ export default {
}
});
window.open(routeData.href);
this.$store.dispatch('training/setRoles', 'MAINTAINER');
this.$store.dispatch('scriptRecord/updateRole', 'MAINTAINER' + ':' + role.id);
} else if (role.type == '车辆段信号楼') {
prdType = '05';
type = 'DEPOT_DISPATCHER';
this.$store.dispatch('training/setRoles', 'DEPOT_DISPATCHER');
} else if (role.type == '上级部门') {
prdType = '';
type = 'PARENT_DEPARTMENT';
this.$store.dispatch('training/setRoles', 'PARENT_DEPARTMENT');
} else if (role.type == '电力调度') {
prdType = '';
type = 'ELECTRIC_DISPATCHER';
this.$store.dispatch('training/setRoles', 'ELECTRIC_DISPATCHER');
} else if (role.type == '停车场信号楼') {
prdType = '';
type = 'PARKING_LOT_SIGNAL_BUILDING';
this.$store.dispatch('training/setRoles', 'PARKING_LOT_SIGNAL_BUILDING');
} else if (role.type == '车站助理') {
prdType = '';
type = 'STATION_ASSISTANT';
this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT');
} else if (role.type == '车站站长') {
prdType = '';
type = 'STATION_MASTER';
this.$store.dispatch('training/setRoles', 'STATION_MASTER');
} else if (role.type == '车站信号员') {
prdType = '01';
type = 'STATION_SIGNALER';
this.$store.dispatch('training/setRoles', 'STATION_SIGNALER');
} else if (role.type == '车站客运员') {
prdType = '';
type = 'STATION_PASSENGER';
this.$store.dispatch('training/setRoles', 'STATION_PASSENGER');
} else if (role.type == '车站扳道员') {
prdType = '01';
type = 'STATION_SWITCH_MAN';
this.$store.dispatch('training/setRoles', 'STATION_SWITCH_MAN');
} else if (role.type == '车站引导员') {
prdType = '';
type = 'STATION_FACILITATOR';
this.$store.dispatch('training/setRoles', 'STATION_FACILITATOR');
} else if (role.type == '车站工务工') {
prdType = '';
type = 'STATION_WORKER';
this.$store.dispatch('training/setRoles', 'STATION_WORKER');
} else if (role.type == '设备管理员') {
prdType = '';
type = 'DEVICE_MANAGER';
this.$store.dispatch('training/setRoles', 'DEVICE_MANAGER');
} else {
prdType = '';
}
this.switchMode(prdType);
this.$store.dispatch('training/setPrdType', prdType);
this.$store.dispatch('scriptRecord/updateRole', type + ':' + role.id);
if (role.type == '行值' || role.type == '车站信号员' || role.type == '车站扳道员') {
this.setShowStation(role.deviceCode);
}
this.memberData.map(member=>{
if (member.id == role.id) {
member.userId = this.$store.state.user.id;
@ -274,6 +351,38 @@ export default {
}
this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation);
this.$store.dispatch('map/setShowCentralizedStationNum');
},
quitQuest() {
this.userRole = '';
this.setShowStation('');
},
setShowStation(stationCode) {
const showStation = this.centralizedStationMap[stationCode];
const list = [];
const mapDevice = this.$store.state.map.mapDevice;
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.$jlmap.updateShowStation(list, showStation);
this.$nextTick(()=>{
this.$jlmap.setCenter(showStation);
});
},
setCentralizedstationList(map) {
this.centralizedstationList = [];
(map.stationList || []).forEach(item => {
if (item.centralized) {
this.centralizedstationList.push({value: item.code, name: item.name});
this.centralizedStationMap[item.code] = item.code;
item.chargeStationCodeList && item.chargeStationCodeList.length && item.chargeStationCodeList.forEach(ele => {
this.centralizedStationMap[ele] = item.code;
});
}
});
console.log(this.centralizedStationMap, '----this.centralizedStationMap--');
// if (this.centralizedstationList.length && !this.showStation) {
// this.showStation = this.centralizedstationList[0].value;
// }
}
}
};
@ -285,6 +394,7 @@ export default {
width: 100%;
height: 100%;
overflow: hidden;
background: #000000;
-moz-user-select: none;
-o-user-select: none;

View File

@ -17,9 +17,21 @@
</div>
<!-- 右上角按钮列表 -->
<div class="schema" :style="{top: offset+'px'}">
<el-select v-model="speed" style="width: 100px;" size="small" @change="speedChange">
<el-option
v-for="item in speedList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<template v-if="!dataError">
<el-button-group>
<el-button size="small" :disabled="viewDisabled || isscriptRun" type="success" @click="viewScriptRoles">{{ $t('display.schema.selectRoles') }}</el-button>
<el-button v-if="userRole=== 'STATION_SUPERVISOR'&&$route.query.lineCode ==='16'" size="small" @click="goCtc">车务终端</el-button>
<el-button v-if="$route.query.lineCode ==='16'&&$store.state.training.prdType === '01'" size="small" @click="showTrainTicket">路票</el-button>
<el-button v-if="$route.query.lineCode === '16'&&$store.state.training.prdType ==='01'" size="small" @click="showRegisterBook">簿册</el-button>
<el-button v-if="showDispatcherStation && userRole === 'DISPATCHER'" size="small" @click="changeShowMap">调度台</el-button>
<!-- 运行图加载 -->
<el-button v-if="running" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
<el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
@ -40,6 +52,8 @@
:driver-show="isDriver"
:all-style="'top:'+(offset+textStatusHeight)+'px'"
/>
<train-ticket ref="trainTicket" />
<register-book ref="registerBook" />
</div>
</template>
<script>
@ -58,10 +72,16 @@ import ConstConfig from '@/scripts/ConstConfig';
import { loadRunPlanData } from '@/utils/loaddata';
import Cookies from 'js-cookie';
import { Notification } from 'element-ui';
import { getToken } from '@/utils/auth';
import TrainTicket from '@/views/newMap/trainTicket/index.vue';
import RegisterBook from '@/views/newMap/registerBook/index.vue';
import { timesSpeedPlayback } from '@/api/rtSimulation';
export default {
name:'ScriptButtonGroup',
components:{
DemonMenu
DemonMenu,
TrainTicket,
RegisterBook
},
props:{
offset: {
@ -72,6 +92,10 @@ export default {
type: String,
required: true
},
userRole: {
type: String,
required: true
},
textStatusHeight: {
type: Number,
default() {
@ -88,6 +112,7 @@ export default {
activeTrainList:[],
isscriptRun:false, //
scriptMode: ScriptMode.TEACH,
speed: 1,
planRunning:false
};
},
@ -110,11 +135,37 @@ export default {
isStation() {
return this.$store.state.training.prdType == '01';
},
showDispatcherStation() {
return this.$route.query.lineCode === '16' && this.$store.state.training.prdType === '02';
},
scriptModeList() {
return ScriptMode;
},
isAdmin() {
return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05');
},
mapId() {
return this.$route.query.mapId;
},
speedList() {
return this.isAdmin ? [
{ value: 1, label: '1倍速' },
{ value: 2, label: '2倍速' },
{ value: 3, label: '3倍速' },
{ value: 4, label: '4倍速' },
{ value: 5, label: '5倍速' },
{ value: 6, label: '6倍速' },
{ value: 7, label: '7倍速' },
{ value: 8, label: '8倍速' },
{ value: 9, label: '9倍速' },
{ value: 10, label: '10倍速' }
] : [
{ value: 1, label: '1倍速' },
{ value: 2, label: '2倍速' },
{ value: 3, label: '3倍速' },
{ value: 4, label: '4倍速' },
{ value: 5, label: '5倍速' }
];
}
},
watch:{
@ -130,6 +181,9 @@ export default {
},
'$store.state.runPlan.loadRunPlanCount': function () {
this.viewDisabled = false;
},
'$store.state.socket.simulationSpeed': function (val) {
this.speed = val;
}
},
async mounted() {
@ -149,6 +203,41 @@ export default {
this.$store.dispatch('map/resetActiveTrainList', true);
},
methods:{
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,
joint: true,
ctc: true,
try: this.$route.query.try || 0,
token:getToken(),
noPreLogout: true
}
});
window.open(routeData.href, '_blank');
},
showTrainTicket() {
this.$refs.trainTicket.doShow();
},
showRegisterBook() {
this.$refs.registerBook.doShow();
},
changeShowMap() {
this.$emit('changeShowMap', false);
},
speedChange(val) {
timesSpeedPlayback(this.$route.query.group, val).then(resp => {
this.$message.success(`设置${val}倍速成功!`);
}).catch(e => {
this.$message.error('设置倍速失败!');
});
},
//
async initLoadData() {
this.changeScriptMode(this.scriptMode);
@ -405,6 +494,7 @@ export default {
this.$store.dispatch('training/setRoles', '');
this.$store.dispatch('training/setPrdType', '');
this.$emit('clearAllData');
this.$emit('quitQuest');
// if (resp.data.planRunning) {
// this.$store.dispatch('training/start');// 仿
// } else {
@ -469,6 +559,7 @@ export default {
.trainingButton{
position: absolute;
left: 5px;
z-index: 1;
}
.display-draft{
position: absolute;

View File

@ -151,7 +151,7 @@ export default {
const memberType = ['STATION_SUPERVISOR', 'DISPATCHER', 'DRIVER', 'MAINTAINER', 'DEPOT_DISPATCHER', 'PARENT_DEPARTMENT',
'ELECTRIC_DISPATCHER', 'PARKING_LOT_SIGNAL_BUILDING', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
'STATION_PASSENGER', 'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER'];
const prdTypeList = ['01', '02', '04', '', '05', '', '', '', '', '', '01', '', '', '', '', ''];
const prdTypeList = ['01', '02', '04', '', '05', '', '', '', '', '', '01', '', '01', '', '', ''];
const index = memberType.indexOf(member.type);
let prdType;
if (index >= 0) {

View File

@ -37,12 +37,16 @@
<el-button v-if="isAdministrator && !datie" 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 v-if="$route.query.lineCode == '16'">
<el-button type="primary" size="small" @click="modifySystemTime">修改系统时间</el-button>
</template>
</template>
<el-button type="primary" :loading="backLoading" size="small" @click="back">退出</el-button>
</el-button-group>
</div>
<qr-code ref="qrCode" />
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
<modify-time v-if="$route.query.lineCode == '16'" ref="modifySysTime" />
<equipment ref="equipment" />
<contect-us ref="contectUs" />
</div>
@ -54,6 +58,7 @@ import StatusIcon from '@/views/components/StatusIcon/statusIcon';
import ChatBox from '../chatView/chatBox';
import Equipment from '@/views/newMap/displayNew/demon/equipment';
import SetTime from '@/views/newMap/displayNew/demon/setTime';
import ModifyTime from '@/views/newMap/displayNew/demon/modifyTime';
import { ranAsPlan, exitRunPlan, clearSimulation } from '@/api/simulation';
import { exitFullscreen } from '@/utils/screen';
import { getSimulationQrcode } from '@/api/jointSimulation';
@ -71,6 +76,7 @@ export default {
ChatBox,
QrCode,
SetTime,
ModifyTime,
Equipment,
ContectUs,
StatusIcon
@ -285,6 +291,10 @@ export default {
});
}
},
//
modifySystemTime() {
this.$refs.modifySysTime.doShow();
},
// Admin Instructor Dispatcher Attendant Audience Driver MAINTAINER
addrolesList(list) {
list.forEach(item => {

View File

@ -141,6 +141,13 @@
@click="hover('btnCode')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<!-- 是否调车进路 -->
<el-form-item label="是否调车进路:" prop="shutting">
<el-radio-group v-model="addModel.shutting">
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div class="bigDraft">
<el-button-group class="bigDraftBtn">
@ -209,6 +216,7 @@ export default {
code:'',
name:'',
multiRoute:false,
shutting:false,
startSignalCode:'',
signalAspect:1,
startSectionCode:'',

View File

@ -87,7 +87,18 @@ export default {
{ value: 'ACCIDENT', label: '事故按钮' },
{ value: 'CHANGE_DIRECTION', label: '改方按钮' },
{ value: 'RECOVERY', label: '复原按钮' },
{ value: 'OCCLUSION', label: '闭塞按钮' }
{ value: 'OCCLUSION', label: '闭塞按钮' },
{ value: 'LOCATE', label: '总定位按钮' },
{ value: 'REVERSE', label: '总反位按钮' },
{ value: 'HUMAN_RELEASE_ROUTE', label: '总人解按钮' },
{ value: 'CANCEL', label: '总取消按钮' },
{ value: 'GUIDELOCK', label: '引导总锁按钮' },
{ value: 'SECTION_FAULT_UNLOCK', label: '区故解按钮' },
{ value: 'MONOLOCK', label: '单锁按钮' },
{ value: 'UNLOCK', label: '单解按钮' },
{ value: 'BLOCK', label: '单封按钮' },
{ value: 'UNBLOCK', label: '解封按钮' },
],
centralizedStationList: [], //
directionList: [
@ -314,7 +325,7 @@ export default {
return this.editModel.type === 'FLEXIBLE'
},
isLinkDirection() {
return ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION'].includes(
return ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION', 'GUIDELOCK'].includes(
this.editModel.type
)
}

View File

@ -20,7 +20,7 @@
/>
</el-select>
</el-form-item>
<el-form-item v-if="formModel.type === 'STATION_SUPERVISOR'" label="值班车站:" prop="deviceCode">
<el-form-item v-if="stationRoleList.includes(formModel.type)" label="值班车站:" prop="deviceCode">
<el-select v-model="formModel.deviceCode" placeholder="请选择" size="small">
<el-option
v-for="item in filterStationList"
@ -60,6 +60,17 @@ export default {
name:'',
deviceCode: ''
},
stationRoleList:[
'STATION_SUPERVISOR',
'STATION_ASSISTANT',
'STATION_MASTER',
'STATION_SIGNALER',
'STATION_PASSENGER',
'STATION_SWITCH_MAN',
'STATION_FACILITATOR',
'STATION_WORKER',
'DEVICE_MANAGER'
],
filterStationList: [],
rules: {
type: [
@ -103,7 +114,8 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
this.lodaing = true;
if (this.formModel.type !== 'STATION_SUPERVISOR') { delete this.formModel.deviceCode; }
// this.formModel.type !== 'STATION_SUPERVISOR'
if (!this.stationRoleList.includes(this.formModel.type)) { delete this.formModel.deviceCode; }
addSimulationMember(this.formModel, this.$route.query.group).then((res) => {
this.$message.success('添加仿真角色成员成功!');
this.$emit('addScriptMember', res.data);

View File

@ -97,6 +97,7 @@ export default {
switchMode(member) {
this.loading = true;
changeScriptRole(this.group, member.id).then(res=>{
if (member.type == '行值') { this.$store.dispatch('training/setPrdType', '01'); }
this.$emit('changeMode', member);
}).catch(()=>{
this.loading = false;

View File

@ -568,7 +568,7 @@ export default {
role.type = 'STATION_PASSENGER';
this.$store.dispatch('training/setRoles', 'STATION_PASSENGER');
} else if (role.type == '车站扳道员') {
prdType = '';
prdType = '01';
role.type = 'STATION_SWITCH_MAN';
this.$store.dispatch('training/setRoles', 'STATION_SWITCH_MAN');
} else if (role.type == '车站引导员') {

View File

@ -117,7 +117,8 @@ export default {
'standTbStrategyIsInvalid',
'updateTripPlanByServiceNumber',
'railway',
'SFUCanOnlyApplyForFaultLockSection'
'SFUCanOnlyApplyForFaultLockSection',
'signalBolckOptReflectSignal'
],
selectList: ['runMode', 'singleApproachLockCancelRoute'],
generalConfig: [
@ -168,7 +169,8 @@ export default {
'standTbStrategyIsInvalid',
'updateTripPlanByServiceNumber',
'railway',
'SFUCanOnlyApplyForFaultLockSection'
'SFUCanOnlyApplyForFaultLockSection',
'signalBolckOptReflectSignal'
],
rangeList: ['noParkingSM', 'parkingSM'],
speedList: ['rmAtpSpeed', 'urmAtpSpeed'],
@ -225,7 +227,8 @@ export default {
standTbStrategyIsInvalid: '站台折返策略不生效',
updateTripPlanByServiceNumber: '根据服务号更新车次计划',
railway: '大铁线路',
SFUCanOnlyApplyForFaultLockSection: '区故解只能应用于故障锁闭区段'
SFUCanOnlyApplyForFaultLockSection: '区故解只能应用于故障锁闭区段',
signalBolckOptReflectSignal:'对信号机封锁操作,是否影响信号显示'
}
};
},