Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test_ls
This commit is contained in:
commit
b9cd660a7e
@ -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) {
|
export function ranAsPlan(data, group) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -196,6 +196,7 @@ class SkinCode extends defaultStyle {
|
|||||||
defaultText: 0
|
defaultText: 0
|
||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
|
notBlock:true, // 封锁不设置颜色
|
||||||
bgShow: false, // 是否被选中
|
bgShow: false, // 是否被选中
|
||||||
guidName: 'singleRY', // 成都三号线引导类型
|
guidName: 'singleRY', // 成都三号线引导类型
|
||||||
borderVariable: false, // 信号灯边框可变
|
borderVariable: false, // 信号灯边框可变
|
||||||
|
@ -196,6 +196,7 @@ class SkinCode extends defaultStyle {
|
|||||||
defaultText: 0
|
defaultText: 0
|
||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
|
notBlock:true, // 封锁不设置颜色
|
||||||
bgShow: false, // 是否被选中
|
bgShow: false, // 是否被选中
|
||||||
guidName: 'singleRY', // 成都三号线引导类型
|
guidName: 'singleRY', // 成都三号线引导类型
|
||||||
borderVariable: false, // 信号灯边框可变
|
borderVariable: false, // 信号灯边框可变
|
||||||
@ -256,9 +257,33 @@ class SkinCode extends defaultStyle {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this[deviceType.SignalButton] = {
|
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] = {
|
this[deviceType.Power] = {
|
||||||
noElectricStrokeColor:'#808080', // 无电颜色
|
noElectricStrokeColor:'#808080', // 无电颜色
|
||||||
|
@ -98,12 +98,13 @@ class SkinCode extends defaultStyle {
|
|||||||
fontWeight: 'bold', // 信号机名称字体粗细
|
fontWeight: 'bold', // 信号机名称字体粗细
|
||||||
defaultColor: 'rgb(192,192,192)', // 信号灯字体默认色
|
defaultColor: 'rgb(192,192,192)', // 信号灯字体默认色
|
||||||
// '#FFFFFF'
|
// '#FFFFFF'
|
||||||
blockColor: '#FFFFFF', // 信号灯字体锁定颜色
|
blockColor: 'rgb(192,192,192)', // 信号灯字体锁定颜色
|
||||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||||
},
|
},
|
||||||
remainTimeColor: '#F00',
|
remainTimeColor: '#F00',
|
||||||
dtTextNearSignalOffset:{x:35, y:5}, // 人工解锁延时时间坐标靠近信号机名称
|
dtTextNearSignalOffset:{x:35, y:5}, // 人工解锁延时时间坐标靠近信号机名称
|
||||||
lamp: {
|
lamp: {
|
||||||
|
notBlock:true, // 封锁不设置颜色
|
||||||
bgShow: false, // 是否被选中
|
bgShow: false, // 是否被选中
|
||||||
guidName: 'singleRY', // 成都三号线引导类型
|
guidName: 'singleRY', // 成都三号线引导类型
|
||||||
borderVariable: false, // 信号灯边框可变
|
borderVariable: false, // 信号灯边框可变
|
||||||
|
@ -541,6 +541,7 @@ class SkinCode extends defaultStyle {
|
|||||||
distance: 5 // 灯跟文字距离
|
distance: 5 // 灯跟文字距离
|
||||||
},
|
},
|
||||||
lamp: {
|
lamp: {
|
||||||
|
square: false, // 方形
|
||||||
radiusR: 6, // 控制灯大小
|
radiusR: 6, // 控制灯大小
|
||||||
controlColor: '#000000', // 控制灯颜色
|
controlColor: '#000000', // 控制灯颜色
|
||||||
offColor: '#ff0000',
|
offColor: '#ff0000',
|
||||||
|
@ -45,12 +45,13 @@ export default class SaidLamp extends Group {
|
|||||||
this.control = new EControl({
|
this.control = new EControl({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
arc: {
|
control: {
|
||||||
shape: {
|
shape: {
|
||||||
cx: this.computedPosition.x,
|
cx: this.computedPosition.x,
|
||||||
cy: this.computedPosition.y,
|
cy: this.computedPosition.y,
|
||||||
r: this.deviceStyle.lamp.radiusR
|
r: this.deviceStyle.lamp.radiusR
|
||||||
},
|
},
|
||||||
|
isSquare: this.deviceStyle.lamp.square,
|
||||||
subType: 'Control',
|
subType: 'Control',
|
||||||
lineWidth: this.deviceStyle.lamp.lineWidth || 0,
|
lineWidth: this.deviceStyle.lamp.lineWidth || 0,
|
||||||
fill: this.deviceStyle.lamp.controlColor,
|
fill: this.deviceStyle.lamp.controlColor,
|
||||||
@ -282,7 +283,6 @@ export default class SaidLamp extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -745,7 +745,9 @@ class Signal extends Group {
|
|||||||
}
|
}
|
||||||
// 封锁
|
// 封锁
|
||||||
block() {
|
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) { // 设置底座颜色
|
if (this.style.Signal.post.blockColor) { // 设置底座颜色
|
||||||
this.sigPost.setColor(this.style.Signal.post.blockColor);
|
this.sigPost.setColor(this.style.Signal.post.blockColor);
|
||||||
}
|
}
|
||||||
|
@ -1,338 +1,312 @@
|
|||||||
import Group from 'zrender/src/container/Group';
|
import Group from 'zrender/src/container/Group'
|
||||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
import Rect from 'zrender/src/graphic/shape/Rect'
|
||||||
import Line from 'zrender/src/graphic/shape/Line';
|
import Line from 'zrender/src/graphic/shape/Line'
|
||||||
import Text from 'zrender/src/graphic/Text';
|
import Text from 'zrender/src/graphic/Text'
|
||||||
import Arc from 'zrender/src/graphic/shape/Arc';
|
import Arc from 'zrender/src/graphic/shape/Arc'
|
||||||
import Circle from 'zrender/src/graphic/shape/Circle';
|
import Circle from 'zrender/src/graphic/shape/Circle'
|
||||||
import store from '@/store/index';
|
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 {
|
export default class SignalButton extends Group {
|
||||||
constructor(model, {style}) {
|
constructor(model, { style }) {
|
||||||
super();
|
super()
|
||||||
this._code = model.code;
|
this._code = model.code
|
||||||
this._type = model._type;
|
this._type = model._type
|
||||||
this.zlevel = model.zlevel;
|
this.zlevel = model.zlevel
|
||||||
const pictureDevice = store.getters['map/getPictureDeviceByCode'](model.code);
|
const pictureDevice = store.getters['map/getPictureDeviceByCode'](model.code)
|
||||||
if (pictureDevice) {
|
if (pictureDevice) {
|
||||||
this.computedPosition = pictureDevice.position;
|
this.computedPosition = pictureDevice.position
|
||||||
} else {
|
} else {
|
||||||
this.computedPosition = model.position;
|
this.computedPosition = model.position
|
||||||
}
|
|
||||||
this.z = 0;
|
|
||||||
this.model = model;
|
|
||||||
this.style = style;
|
|
||||||
// Line
|
|
||||||
this.create();
|
|
||||||
this.setState(model);
|
|
||||||
}
|
}
|
||||||
|
this.z = 0
|
||||||
|
this.model = model
|
||||||
|
this.style = style
|
||||||
|
// Line
|
||||||
|
this.create()
|
||||||
|
this.setState(model)
|
||||||
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
const model = this.model;
|
const model = this.model
|
||||||
const computedPosition = this.computedPosition;
|
const computedPosition = this.computedPosition
|
||||||
const fillColor = this.getTypeColor();
|
const fillColor = this.getTypeColor()
|
||||||
// const queryList = window.location.search.substring(1).split('&');
|
if (this.style.SignalButton && this.style.SignalButton.shape === 'roundWithDock' && typeList.includes(model.type)) {
|
||||||
// const queryCtc = queryList.find(item => {
|
const circle1 = new Circle({
|
||||||
// return item.includes('ctc');
|
zlevel: this.zlevel,
|
||||||
// });
|
z: this.z + 2,
|
||||||
// const ctcArcList = ['OCCLUSION', 'RECOVERY', 'CHANGE_DIRECTION', 'ACCIDENT', 'DEPART_ASSIST', 'PICK_ASSIST', 'ASSIST'];
|
shape: {
|
||||||
const typeList = [];
|
cx: computedPosition.x + 7,
|
||||||
// debugger;
|
cy: computedPosition.y + 7,
|
||||||
// console.log(model.type);
|
r: 7
|
||||||
// if (queryCtc && ctcArcList.includes(model.type)) {
|
},
|
||||||
// // debugger;
|
style: {
|
||||||
// this.arcShape = new Arc({
|
stroke: '#69666E',
|
||||||
// zlevel: this.zlevel,
|
lineWidth: 1,
|
||||||
// z: this.z,
|
fill: fillColor
|
||||||
// shape: {
|
}
|
||||||
// cx: computedPosition.x + 7,
|
})
|
||||||
// cy: computedPosition.y + 7,
|
const circle2 = new Circle({
|
||||||
// r: 7
|
zlevel: this.zlevel,
|
||||||
// },
|
z: this.z + 1,
|
||||||
// style: {
|
shape: {
|
||||||
// stroke: '#69666E',
|
cx: computedPosition.x + 7,
|
||||||
// lineWidth: 1,
|
cy: computedPosition.y + 9,
|
||||||
// fill: fillColor
|
r: 8
|
||||||
// }
|
},
|
||||||
// });
|
style: {
|
||||||
// this.add(this.arcShape);
|
fill: '#000'
|
||||||
// } else
|
}
|
||||||
if (this.style.SignalButton &&
|
})
|
||||||
this.style.SignalButton.shape === 'roundWithDock' &&
|
const circle3 = new Circle({
|
||||||
typeList.includes(model.type)) {
|
zlevel: this.zlevel,
|
||||||
const circle1 = new Circle({
|
z: this.z,
|
||||||
zlevel: this.zlevel,
|
shape: {
|
||||||
z: this.z + 2,
|
cx: computedPosition.x + 7,
|
||||||
shape: {
|
cy: computedPosition.y + 9,
|
||||||
cx: computedPosition.x + 7,
|
r: 9
|
||||||
cy: computedPosition.y + 7,
|
},
|
||||||
r: 7
|
style: {
|
||||||
},
|
fill: '#eee'
|
||||||
style: {
|
}
|
||||||
stroke: '#69666E',
|
})
|
||||||
lineWidth: 1,
|
this.arcShape = circle1
|
||||||
fill: fillColor
|
this.arcShapeDock1 = circle2
|
||||||
}
|
this.arcShapeDock2 = circle3
|
||||||
});
|
this.add(circle1)
|
||||||
const circle2 = new Circle({
|
.add(circle2)
|
||||||
zlevel: this.zlevel,
|
.add(circle3)
|
||||||
z: this.z + 1,
|
} else {
|
||||||
shape: {
|
this.rectButton = new Rect({
|
||||||
cx: computedPosition.x + 7,
|
zlevel: this.zlevel,
|
||||||
cy: computedPosition.y + 9,
|
z: this.z,
|
||||||
r: 8
|
shape: {
|
||||||
},
|
x: computedPosition.x,
|
||||||
style: {
|
y: computedPosition.y,
|
||||||
fill: '#000'
|
width: 14,
|
||||||
}
|
height: 14
|
||||||
});
|
},
|
||||||
const circle3 = new Circle({
|
style: {
|
||||||
zlevel: this.zlevel,
|
lineDash: null,
|
||||||
z: this.z,
|
stroke: '#69666E',
|
||||||
shape: {
|
lineWidth: 1,
|
||||||
cx: computedPosition.x + 7,
|
fill: fillColor
|
||||||
cy: computedPosition.y + 9,
|
}
|
||||||
r: 9
|
})
|
||||||
},
|
this.add(this.rectButton)
|
||||||
style: {
|
}
|
||||||
fill: '#eee'
|
this.leftLine = new Line({
|
||||||
}
|
zlevel: this.zlevel,
|
||||||
});
|
z: this.z + 1,
|
||||||
this.arcShape = circle1;
|
shape: {
|
||||||
this.add(circle1).add(circle2).add(circle3);
|
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 {
|
} else {
|
||||||
this.rectButton = new Rect({
|
this.rectButton.setStyle({ fill: this.getTypeColor() })
|
||||||
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.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() {
|
// let
|
||||||
this.rectButton && this.rectButton.animateStyle(true)
|
// { value: 'PICK', label: '接车按钮' },
|
||||||
.when(0, { fill: '#000' })
|
// { value: 'SHUNT_TERMINAL', label: '调车终端按钮' },
|
||||||
.when(1000, { fill: this.getTypeColor() })
|
if (!store.getters['map/checkDeviceShow'](this._code)) {
|
||||||
.when(2000, { fill: '#000' })
|
this.buttonText && this.buttonText.hide()
|
||||||
.start();
|
this.rectButton && this.rectButton.hide()
|
||||||
}
|
this.leftLine && this.leftLine.hide()
|
||||||
stopAnimation() {
|
this.rightLine && this.rightLine.hide()
|
||||||
this.rectButton && this.rectButton.stopAnimation(true);
|
this.arcShape && this.arcShape.hide()
|
||||||
// this.arcFlash && this.arcFlash.stopAnimation(false);
|
this.arcShapeDock1 && this.arcShapeDock1.hide()
|
||||||
}
|
this.arcShapeDock2 && this.arcShapeDock2.hide()
|
||||||
getTypeColor() {
|
} else {
|
||||||
let color = '';
|
if (model.hasSelected) {
|
||||||
const list = ['ASSIST', 'ACCIDENT', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION'];
|
this.startAnimate()
|
||||||
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() {
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
getAnchorPoint() {}
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,6 @@ class ESwDot extends Group {
|
|||||||
this.add(this.dot)
|
this.add(this.dot)
|
||||||
}
|
}
|
||||||
setColor(color) {
|
setColor(color) {
|
||||||
console.log(this.dot)
|
|
||||||
console.log(color)
|
|
||||||
this.dot.setStyle({ fill: color })
|
this.dot.setStyle({ fill: color })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -481,15 +481,27 @@ export default class Switch extends Group {
|
|||||||
.start();
|
.start();
|
||||||
}
|
}
|
||||||
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||||
setSwitchFault(fault) {
|
setSwitchFault(model) {
|
||||||
|
const { pos, fault, /* 单锁 */singleLock, /* 封锁 */blockade } = model
|
||||||
const faultList = ['SPLIT', 'SQUEEZE', 'NORMAL_SPLIT', 'REVERSE_SPLIT', 'SPLIT_1'];
|
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) {
|
||||||
if (this.model.switchFaultCode && fault && faultList.includes(fault) ) {
|
|
||||||
const switchFault = this.mapDevice[this.model.switchFaultCode];
|
const switchFault = this.mapDevice[this.model.switchFaultCode];
|
||||||
switchFault.instance.setControlColor('#F00', true);
|
if (this.style.SwitchFault.lamp.switchState) {
|
||||||
} else if (this.model.switchFaultCode) {
|
console.log(fault)
|
||||||
const switchFault = this.mapDevice[this.model.switchFaultCode];
|
console.log(pos)
|
||||||
switchFault.instance.setControlColor(this.style.backgroundColor, false);
|
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
|
// stopAnimation
|
||||||
this.shapeModelB.stopAnimation(false);
|
this.shapeModelB.stopAnimation(false);
|
||||||
@ -803,7 +815,8 @@ export default class Switch extends Group {
|
|||||||
this.setAshShow();
|
this.setAshShow();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.setSwitchFault(model.fault);
|
this.setSwitchFault(model);
|
||||||
|
console.log(model)
|
||||||
|
|
||||||
// model.pos == 'NO' || model.pos == 'EX';
|
// model.pos == 'NO' || model.pos == 'EX';
|
||||||
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||||
|
@ -13,23 +13,40 @@ export default class EControl extends Group {
|
|||||||
this.z = model.z;
|
this.z = model.z;
|
||||||
this.style = model.style;
|
this.style = model.style;
|
||||||
this.textStyle = model.text;
|
this.textStyle = model.text;
|
||||||
this.arcStyle = model.arc;
|
this.controlStyle = model.control;
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
this.control = new Arc({
|
this.control = this.controlStyle.isSquare ? new Rect({
|
||||||
_subType: this.arcStyle.subType,
|
_subType: this.controlStyle.subType,
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
shape: this.arcStyle.shape,
|
shape: {
|
||||||
style: {
|
width: this.controlStyle.shape.r,
|
||||||
lineWidth: this.arcStyle.lineWidth,
|
height: this.controlStyle.shape.r,
|
||||||
fill: this.arcStyle.fill,
|
x: this.controlStyle.shape.cx - this.controlStyle.shape.r / 2,
|
||||||
stroke: this.arcStyle.stroke
|
y: this.controlStyle.shape.cy - this.controlStyle.shape.r / 2,
|
||||||
},
|
},
|
||||||
onmouseover: this.arcStyle.mouseover,
|
style: {
|
||||||
onmouseout: this.arcStyle.mouseout
|
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({
|
this.text = new Text({
|
||||||
_subType: 'Text',
|
_subType: 'Text',
|
||||||
@ -63,7 +80,7 @@ export default class EControl extends Group {
|
|||||||
height: arcRect.height + 4
|
height: arcRect.height + 4
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
lineDash: this.arcStyle.lineDash || this.style.arcBorderStyle.lineDash,
|
lineDash: this.controlStyle.lineDash || this.style.arcBorderStyle.lineDash,
|
||||||
stroke: this.style.arcBorderStyle.stroke,
|
stroke: this.style.arcBorderStyle.stroke,
|
||||||
fill: this.style.arcBorderStyle.fill
|
fill: this.style.arcBorderStyle.fill
|
||||||
}
|
}
|
||||||
@ -106,15 +123,15 @@ export default class EControl extends Group {
|
|||||||
setControlFlashing(color) {
|
setControlFlashing(color) {
|
||||||
if (color) {
|
if (color) {
|
||||||
this.control.animateStyle(true)
|
this.control.animateStyle(true)
|
||||||
.when(0, { fill: this.arcStyle.fill })
|
.when(0, { fill: this.controlStyle.fill })
|
||||||
.when(1000, { stroke: color })
|
.when(1000, { stroke: color })
|
||||||
.when(2000, { fill: this.arcStyle.fill })
|
.when(2000, { fill: this.controlStyle.fill })
|
||||||
.start();
|
.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
recover() {
|
recover() {
|
||||||
this.control.stopAnimation(false);
|
this.control.stopAnimation(false);
|
||||||
this.control.setStyle('fill', this.arcStyle.fill);
|
this.control.setStyle('fill', this.controlStyle.fill);
|
||||||
}
|
}
|
||||||
setControlStroke(color, lineWidth) {
|
setControlStroke(color, lineWidth) {
|
||||||
this.control.setStyle('lineWidth', lineWidth);
|
this.control.setStyle('lineWidth', lineWidth);
|
||||||
|
@ -530,6 +530,11 @@ export const menuOperate = {
|
|||||||
driverStop: {
|
driverStop: {
|
||||||
operation: OperationEvent.Train.driverStop.menu.operation,
|
operation: OperationEvent.Train.driverStop.menu.operation,
|
||||||
cmdType: CMD.Driver.CMD_DRIVER_STOP
|
cmdType: CMD.Driver.CMD_DRIVER_STOP
|
||||||
|
},
|
||||||
|
// 换端
|
||||||
|
turnDirection:{
|
||||||
|
operation: OperationEvent.Train.turnDirection.menu.operation,
|
||||||
|
cmdType: CMD.Driver.CMD_DRIVER_CHANGE_HEAD
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
CTC: {
|
CTC: {
|
||||||
|
@ -173,7 +173,8 @@ export default {
|
|||||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
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];
|
this.menu = [...this.menuForce, ...this.menuDirective];
|
||||||
} else {
|
} else {
|
||||||
this.menu = [...this.menuForce];
|
this.menu = [...this.menuForce];
|
||||||
|
@ -71,24 +71,24 @@
|
|||||||
<center><b>道岔解封</b></center>
|
<center><b>道岔解封</b></center>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<!-- <button :id="Signal.signalTurnOn.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalTurnOn.menuButton.operation, ['Signal'])">-->
|
<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">-->
|
<span style="color: black">
|
||||||
<!-- <center><b>点灯</b></center>-->
|
<center><b>点灯</b></center>
|
||||||
<!-- </span>-->
|
</span>
|
||||||
<!-- </button>-->
|
</button>
|
||||||
<!-- <button :id="Signal.signalTurnOff.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalTurnOff.menuButton.operation, ['SignalButton'])">-->
|
<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">-->
|
<span style="color:#800000">
|
||||||
<!-- <center><b>灭灯</b></center>-->
|
<center><b>灭灯</b></center>
|
||||||
<!-- </span>-->
|
</span>
|
||||||
<!-- </button>-->
|
</button>
|
||||||
<button :id="Station.stationMasterLock.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor: sGuideMasterLock? guideColorDown: guideColorUp}" @click="guideLockLeftButtonDown()">
|
<button :id="Station.stationMasterLock.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor: sGuideMasterLock? guideColorDown: guideColorUp}" @click="guideLockLeftButtonDown()">
|
||||||
<span style="color: #800000">
|
<span style="color: #800000">
|
||||||
<center><b>S引导总锁</b></center>
|
<center><b>S引导总锁</b></center>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button :id="Station.powerUnLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="powerOnUnlock()">
|
<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>
|
<center><b>上电解锁</b></center>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
@ -99,8 +99,8 @@
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button :id="Section.defectiveShunting.button.domId" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown(Section.defectiveShunting.button.operation, ['Section'])">
|
<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>
|
<center><b>分路不良</b></center>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -74,6 +74,11 @@ export default {
|
|||||||
handler: this.unlock,
|
handler: this.unlock,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '道岔钩锁',
|
||||||
|
handler: this.hookLock,
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '封锁/解封',
|
label: '封锁/解封',
|
||||||
handle: ''
|
handle: ''
|
||||||
@ -205,7 +210,7 @@ export default {
|
|||||||
} else { this.menu.forEach(item => { item.disabled = false; }); }
|
} else { this.menu.forEach(item => { item.disabled = false; }); }
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
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 = [{
|
const menuHook = [{
|
||||||
label: '道岔钩锁',
|
label: '道岔钩锁',
|
||||||
handler: this.hookLock
|
handler: this.hookLock
|
||||||
|
@ -85,6 +85,11 @@ export default {
|
|||||||
label: '删车次号',
|
label: '删车次号',
|
||||||
handler: this.removeTripNumber,
|
handler: this.removeTripNumber,
|
||||||
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
|
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '换端',
|
||||||
|
handler: this.turnDirection,
|
||||||
|
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
Center: [
|
Center: [
|
||||||
@ -254,7 +259,7 @@ export default {
|
|||||||
} else { this.menu.forEach(item => { item.disabled = false; }); }
|
} else { this.menu.forEach(item => { item.disabled = false; }); }
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
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];
|
this.menu = [...this.menuForce, ...this.menuDirective];
|
||||||
} else {
|
} else {
|
||||||
this.menu = [...this.menuForce];
|
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() {
|
handleTurnDirection() {
|
||||||
const group = this.$route.query.group;
|
const group = this.$route.query.group;
|
||||||
|
@ -723,12 +723,17 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handelSwitchOperate(model) {
|
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 = {
|
const operate = {
|
||||||
over: true,
|
over: true,
|
||||||
code: model.code,
|
code: model.code,
|
||||||
operation: this.$store.state.menuOperation.buttonOperation,
|
operation: this.$store.state.menuOperation.buttonOperation,
|
||||||
cmdType: this.cmdType,
|
cmdType: this.cmdType,
|
||||||
param: { switchCode: model.code }
|
param: { switchCode: code }
|
||||||
}
|
}
|
||||||
this.sendCommand(operate)
|
this.sendCommand(operate)
|
||||||
},
|
},
|
||||||
@ -837,6 +842,15 @@ export default {
|
|||||||
this.Switch.block.button.operation,
|
this.Switch.block.button.operation,
|
||||||
this.Switch.unblock.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') {
|
if ((this.guideLockLeftFlag || this.guideLockRightFlag) && model._type === 'SignalButton' && model.type === 'GUIDE') {
|
||||||
this.handleGuideLock(model)
|
this.handleGuideLock(model)
|
||||||
} else if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
} else if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
||||||
@ -862,6 +876,30 @@ export default {
|
|||||||
} else if (model._type === 'SignalButton' && signalButtonList.includes(model.type)) {
|
} else if (model._type === 'SignalButton' && signalButtonList.includes(model.type)) {
|
||||||
// 改方操作 总辅助操作 接辅助操作 发辅助操作
|
// 改方操作 总辅助操作 接辅助操作 发辅助操作
|
||||||
this.assistOperateOrChange(model)
|
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 (
|
} else if (
|
||||||
(model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode)) ||
|
(model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode)) ||
|
||||||
(model._type === 'Signal' && !model.blockade)
|
(model._type === 'Signal' && !model.blockade)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<switch-hook-lock ref="switchHookLock" pop-class="chengdou-03__systerm" />
|
<switch-hook-lock ref="switchHookLock" pop-class="chengdou-03__systerm" />
|
||||||
<set-fault ref="setFault" pop-class="datie-02__systerm" />
|
<set-fault ref="setFault" pop-class="datie-02__systerm" />
|
||||||
<draw-select ref="drawSelect" />
|
<draw-select ref="drawSelect" />
|
||||||
<route-cancel ref="routeCancel" />
|
<route-cancel ref="routeCancel" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ export default {
|
|||||||
SetFault,
|
SetFault,
|
||||||
SwitchHookLock,
|
SwitchHookLock,
|
||||||
DrawSelect,
|
DrawSelect,
|
||||||
RouteCancel
|
RouteCancel
|
||||||
},
|
},
|
||||||
mixins: [
|
mixins: [
|
||||||
CancelMouseState
|
CancelMouseState
|
||||||
@ -54,72 +54,77 @@ export default {
|
|||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
Local: [
|
Local: [
|
||||||
{
|
{
|
||||||
label: '定操',
|
label: '定操',
|
||||||
handler: this.locate,
|
handler: this.locate,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '反操',
|
label: '反操',
|
||||||
handler: this.reverse,
|
handler: this.reverse,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '单锁',
|
label: '单锁',
|
||||||
handler: this.lock,
|
handler: this.lock,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '单解',
|
label: '单解',
|
||||||
handler: this.unlock,
|
handler: this.unlock,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '封锁',
|
label: '封锁',
|
||||||
handle: this.block,
|
handle: this.block,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '解封',
|
label: '解封',
|
||||||
handle: this.unblock,
|
handle: this.unblock,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '区故解',
|
label: '道岔钩锁',
|
||||||
handle: ''
|
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: ''
|
label: '接触网定位无电',
|
||||||
},
|
handle: ''
|
||||||
{
|
},
|
||||||
label: '添加调机号',
|
{
|
||||||
handle: ''
|
label: '接触网反位无电',
|
||||||
},
|
handle: ''
|
||||||
{
|
},
|
||||||
label: '删除调机号',
|
{
|
||||||
handle: ''
|
label: '添加调机号',
|
||||||
},
|
handle: ''
|
||||||
{
|
},
|
||||||
label: '修改调机号',
|
{
|
||||||
handle: ''
|
label: '删除调机号',
|
||||||
}
|
handle: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '修改调机号',
|
||||||
|
handle: ''
|
||||||
|
}
|
||||||
],
|
],
|
||||||
Center: [
|
Center: [
|
||||||
// {
|
// {
|
||||||
@ -193,7 +198,7 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
'$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);
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
} else {
|
} else {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -207,7 +212,7 @@ export default {
|
|||||||
this.menu = this.menuNormal.Local;
|
this.menu = this.menuNormal.Local;
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
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 = [{
|
const menuHook = [{
|
||||||
label: '道岔钩锁',
|
label: '道岔钩锁',
|
||||||
handler: this.hookLock
|
handler: this.hookLock
|
||||||
@ -270,7 +275,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 道岔封锁
|
// 道岔封锁
|
||||||
block() {
|
block() {
|
||||||
debugger
|
debugger;
|
||||||
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$refs.switchControl.doShow(operate, this.selected);
|
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})=>{
|
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
// 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})=>{
|
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
this.$refs.routeCancel.doShow(operate, this.selected);
|
this.$refs.routeCancel.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -82,6 +82,11 @@ export default {
|
|||||||
label: '删车次号',
|
label: '删车次号',
|
||||||
handler: this.removeTripNumber,
|
handler: this.removeTripNumber,
|
||||||
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
|
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '换端',
|
||||||
|
handler: this.turnDirection,
|
||||||
|
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
Center: [
|
Center: [
|
||||||
@ -244,7 +249,8 @@ export default {
|
|||||||
console.log(this.menu, '================');
|
console.log(this.menu, '================');
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
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];
|
this.menu = [...this.menuForce, ...this.menuDirective];
|
||||||
} else {
|
} else {
|
||||||
this.menu = [...this.menuForce];
|
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() {
|
handleTurnDirection() {
|
||||||
const group = this.$route.query.group;
|
const group = this.$route.query.group;
|
||||||
|
332
src/jmapNew/theme/datie_tky/menus/dialog/trainControl.vue
Normal file
332
src/jmapNew/theme/datie_tky/menus/dialog/trainControl.vue
Normal 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>
|
181
src/jmapNew/theme/datie_tky/menus/dialog/trainCreateNumber.vue
Normal file
181
src/jmapNew/theme/datie_tky/menus/dialog/trainCreateNumber.vue
Normal 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>
|
176
src/jmapNew/theme/datie_tky/menus/dialog/trainDeleteNumber.vue
Normal file
176
src/jmapNew/theme/datie_tky/menus/dialog/trainDeleteNumber.vue
Normal 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>
|
@ -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>
|
378
src/jmapNew/theme/datie_tky/menus/dialog/trainDetailInfo.vue
Normal file
378
src/jmapNew/theme/datie_tky/menus/dialog/trainDetailInfo.vue
Normal 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>
|
174
src/jmapNew/theme/datie_tky/menus/dialog/trainEditNumber.vue
Normal file
174
src/jmapNew/theme/datie_tky/menus/dialog/trainEditNumber.vue
Normal 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>
|
193
src/jmapNew/theme/datie_tky/menus/dialog/trainMoveNumber.vue
Normal file
193
src/jmapNew/theme/datie_tky/menus/dialog/trainMoveNumber.vue
Normal 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>
|
155
src/jmapNew/theme/datie_tky/menus/dialog/updateTrip.vue
Normal file
155
src/jmapNew/theme/datie_tky/menus/dialog/updateTrip.vue
Normal 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>
|
@ -7,8 +7,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
// OperateMode
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
@ -89,6 +88,11 @@ export default {
|
|||||||
label: '区段故障解锁',
|
label: '区段故障解锁',
|
||||||
handler: this.fault,
|
handler: this.fault,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '道岔钩锁',
|
||||||
|
handler: this.hookLock,
|
||||||
|
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
Center: [
|
Center: [
|
||||||
@ -196,17 +200,17 @@ export default {
|
|||||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||||
this.menu = this.menuNormal.Local;
|
this.menu = this.menuNormal.Local;
|
||||||
// 故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
// if (this.operatemode === OperateMode.FAULT) {
|
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 = [{
|
const menuHook = [{
|
||||||
// label: '道岔钩锁',
|
label: '道岔钩锁',
|
||||||
// handler: this.hookLock
|
handler: this.hookLock
|
||||||
// }];
|
}];
|
||||||
// this.menu = [...this.menuForce, ...menuHook];
|
this.menu = [...this.menuForce, ...menuHook];
|
||||||
// } else {
|
} else {
|
||||||
// this.menu = this.menuForce;
|
this.menu = this.menuForce;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
638
src/jmapNew/theme/datie_tky/menus/menuTrain.vue
Normal file
638
src/jmapNew/theme/datie_tky/menus/menuTrain.vue
Normal 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>
|
@ -448,7 +448,7 @@ export default {
|
|||||||
CTC_ZONE_RELEASE_STATION_RUN_PLAN:{value:'CTC_ZONE_RELEASE_STATION_RUN_PLAN', label: '调度台发布车站行车计划'},
|
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_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_SIGN_DISPATCH_COMMAND:{value:'CTC_SIGN_DISPATCH_COMMAND', label: '调度台命令签收'},
|
||||||
CTC_READ_DISPATCH_COMMAND:{value:'CTC_READ_DISPATCH_COMMAND', label: '调度台命令已读'}
|
CTC_READ_DISPATCH_COMMAND:{value:'CTC_READ_DISPATCH_COMMAND', label: '调度台命令已读'}
|
||||||
|
|
||||||
|
@ -3,7 +3,8 @@ export const State2SimulationMap = {
|
|||||||
'01': 'Local', // 现地工作站
|
'01': 'Local', // 现地工作站
|
||||||
'02': 'Center', // 中心调度工作站
|
'02': 'Center', // 中心调度工作站
|
||||||
'09':'Depot_IL', // 车辆段工作站
|
'09':'Depot_IL', // 车辆段工作站
|
||||||
'10': 'Local'
|
'10': 'Local',
|
||||||
|
'04': 'Local'
|
||||||
};
|
};
|
||||||
|
|
||||||
export const State2ControlMap = {
|
export const State2ControlMap = {
|
||||||
@ -64,7 +65,8 @@ export const deviceFaultType = {
|
|||||||
Train: [
|
Train: [
|
||||||
{label: '通信异常', value: 'COMMUNICATION_ABNORMAL'},
|
{label: '通信异常', value: 'COMMUNICATION_ABNORMAL'},
|
||||||
{label: '驾驶故障', value: 'DRIVE_FAULT'},
|
{label: '驾驶故障', value: 'DRIVE_FAULT'},
|
||||||
{label: '突然EB', value: 'SUDDEN_EB' }
|
{label: '突然EB', value: 'SUDDEN_EB' },
|
||||||
|
{label: '列车脱线', value: 'OFF_LINE' }
|
||||||
],
|
],
|
||||||
Power:[
|
Power:[
|
||||||
{label: '供电故障', value: 'FAULT'}
|
{label: '供电故障', value: 'FAULT'}
|
||||||
|
@ -3437,6 +3437,12 @@ export const OperationEvent = {
|
|||||||
operation: '70w',
|
operation: '70w',
|
||||||
domId: '_Tips-Train-driverStop-Menu'
|
domId: '_Tips-Train-driverStop-Menu'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
turnDirection: {
|
||||||
|
menu: {
|
||||||
|
operation: '70x',
|
||||||
|
domId: '_Tips-Train-turnDirection-Menu'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -205,7 +205,8 @@ export default {
|
|||||||
this.currentInfo = obj;
|
this.currentInfo = obj;
|
||||||
if (!this.getSignInfo(obj.receiverInfos).receivedTime) {
|
if (!this.getSignInfo(obj.receiverInfos).receivedTime) {
|
||||||
const data = {
|
const data = {
|
||||||
commandId: obj.id
|
commandId: obj.id,
|
||||||
|
title: obj.title
|
||||||
};
|
};
|
||||||
sendCommandNew(this.group, 'CTC_READ_DISPATCH_COMMAND', data).then((res) => {
|
sendCommandNew(this.group, 'CTC_READ_DISPATCH_COMMAND', data).then((res) => {
|
||||||
console.log(res, '---res');
|
console.log(res, '---res');
|
||||||
@ -241,7 +242,7 @@ export default {
|
|||||||
},
|
},
|
||||||
signCmd(status) {
|
signCmd(status) {
|
||||||
if (!this.commandId) { return; }
|
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 = {
|
const data = {
|
||||||
signInfo: signInfo
|
signInfo: signInfo
|
||||||
};
|
};
|
||||||
@ -290,7 +291,7 @@ export default {
|
|||||||
},
|
},
|
||||||
searchCmd() {
|
searchCmd() {
|
||||||
this.cmdTableData = [];
|
this.cmdTableData = [];
|
||||||
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND').then((res) => {
|
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND', {}).then((res) => {
|
||||||
console.log(res, '---res');
|
console.log(res, '---res');
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.cmdTableData = res.data;
|
this.cmdTableData = res.data;
|
||||||
|
@ -823,7 +823,7 @@ export default {
|
|||||||
},
|
},
|
||||||
searchCmd() {
|
searchCmd() {
|
||||||
return new Promise((resolve, reject) => {
|
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----');
|
console.log(res, '---res----');
|
||||||
this.seachData = res.data;
|
this.seachData = res.data;
|
||||||
resolve();
|
resolve();
|
||||||
|
@ -190,7 +190,8 @@ export default {
|
|||||||
this.signedId = activeUser.memberId;
|
this.signedId = activeUser.memberId;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow() {
|
async doShow() {
|
||||||
|
await this.searchCmd(); // 补齐剧本指令,同cmdManage
|
||||||
this.getSenderName();
|
this.getSenderName();
|
||||||
this.getSignedData();
|
this.getSignedData();
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
@ -223,7 +224,8 @@ export default {
|
|||||||
hasReadCmd() {
|
hasReadCmd() {
|
||||||
if (!this.commandId) { return; }
|
if (!this.commandId) { return; }
|
||||||
const data = {
|
const data = {
|
||||||
commandId: this.commandId
|
commandId: this.commandId,
|
||||||
|
title: this.signedData.title
|
||||||
};
|
};
|
||||||
sendCommandNew(this.group, 'CTC_READ_DISPATCH_COMMAND', data).then((res) => {
|
sendCommandNew(this.group, 'CTC_READ_DISPATCH_COMMAND', data).then((res) => {
|
||||||
console.log(res, '---res');
|
console.log(res, '---res');
|
||||||
@ -233,7 +235,7 @@ export default {
|
|||||||
},
|
},
|
||||||
signCmd(status) {
|
signCmd(status) {
|
||||||
if (!this.commandId) { return; }
|
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 = {
|
const data = {
|
||||||
signInfo: signInfo
|
signInfo: signInfo
|
||||||
};
|
};
|
||||||
@ -244,6 +246,16 @@ export default {
|
|||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox('查询调度命令失败:' + error.message);
|
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);
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -901,10 +901,10 @@ export default {
|
|||||||
// 停止录制 发送语音
|
// 停止录制 发送语音
|
||||||
stopRecording() {
|
stopRecording() {
|
||||||
this.audioPlay = true;
|
this.audioPlay = true;
|
||||||
|
clearInterval(this.inter);
|
||||||
|
this.seconds = 0;
|
||||||
const that = this;
|
const that = this;
|
||||||
this.recorders.stopRecording(function(blobURL) {
|
this.recorders.stopRecording(function(blobURL) {
|
||||||
clearInterval(that.inter);
|
|
||||||
that.seconds = 0;
|
|
||||||
const blob = that.recorders.getBlob();
|
const blob = that.recorders.getBlob();
|
||||||
const fd = new FormData();
|
const fd = new FormData();
|
||||||
fd.append('file', blob);
|
fd.append('file', blob);
|
||||||
|
86
src/views/newMap/displayNew/demon/modifyTime.vue
Normal file
86
src/views/newMap/displayNew/demon/modifyTime.vue
Normal 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>
|
@ -29,6 +29,9 @@
|
|||||||
<template v-if="isScriptRun">
|
<template v-if="isScriptRun">
|
||||||
<el-button type="danger" size="small" @click="handleQuitQuest">退出剧本</el-button>
|
<el-button type="danger" size="small" @click="handleQuitQuest">退出剧本</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="$route.query.lineCode == '16'">
|
||||||
|
<el-button type="primary" size="small" @click="modifySystemTime">修改系统时间</el-button>
|
||||||
|
</template>
|
||||||
<template v-else-if="!projectDevice">
|
<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>
|
<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&& -->
|
<!-- isDisable&& -->
|
||||||
@ -51,6 +54,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||||
|
<modify-time v-if="$route.query.lineCode == '16'" ref="modifySysTime" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@ -58,6 +62,7 @@
|
|||||||
<!-- 单人仿真 -->
|
<!-- 单人仿真 -->
|
||||||
<script>
|
<script>
|
||||||
import SetTime from './demon/setTime';
|
import SetTime from './demon/setTime';
|
||||||
|
import ModifyTime from './demon/modifyTime';
|
||||||
import DemonMenu from './demonMenu';
|
import DemonMenu from './demonMenu';
|
||||||
import DemonChat from './demonChat';
|
import DemonChat from './demonChat';
|
||||||
import { Notification } from 'element-ui';
|
import { Notification } from 'element-ui';
|
||||||
@ -80,6 +85,7 @@ export default {
|
|||||||
name: 'MenuDemon',
|
name: 'MenuDemon',
|
||||||
components: {
|
components: {
|
||||||
SetTime,
|
SetTime,
|
||||||
|
ModifyTime,
|
||||||
DemonChat,
|
DemonChat,
|
||||||
MenuSchema,
|
MenuSchema,
|
||||||
DemonMenu,
|
DemonMenu,
|
||||||
@ -306,6 +312,10 @@ export default {
|
|||||||
this.$messageBox(this.$t('display.demon.exitTaskFail'));
|
this.$messageBox(this.$t('display.demon.exitTaskFail'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 修改系统时间
|
||||||
|
modifySystemTime() {
|
||||||
|
this.$refs.modifySysTime.doShow();
|
||||||
|
},
|
||||||
// 选择脚本
|
// 选择脚本
|
||||||
async selectQuest({row, id, mapLocation, roleName}) {
|
async selectQuest({row, id, mapLocation, roleName}) {
|
||||||
try {
|
try {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import store from '@/store/index';
|
import store from '@/store/index';
|
||||||
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
|
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
|
||||||
|
import { transfiniteList, trainTypeList } from '@/scripts/ConstDic';
|
||||||
// 操作
|
// 操作
|
||||||
export const operateEnum = {
|
export const operateEnum = {
|
||||||
Set_Fault:{
|
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;
|
return tip;
|
||||||
|
|
||||||
} else if (operationType.includes('CTC')) {
|
} else if (operationType.includes('CTC_ZONE')) {
|
||||||
const tip = '请打开';
|
let tip = '请点击运行图';
|
||||||
// ctcOperateEnum
|
// let operateName = null;
|
||||||
// 车务终端,找到
|
// Object.keys(CMD).forEach(key => {
|
||||||
return tip;
|
// Object.values(CMD[key]).forEach(el => {
|
||||||
// 总辅助按钮
|
// if (el.value == operationType) {
|
||||||
// CTC_ASSIST_PRESS_MAIN_ASSIST
|
// operateName = el;
|
||||||
// labelEnum:model.labelEnum,
|
// return;
|
||||||
// stationCode:model.stationCode,
|
// }
|
||||||
// pressDown:model.pressDown ? 0 : 1 // 1按下、0弹起
|
// });
|
||||||
// CTC_ASSIST_PRESS_RECEIVE_ASSIST
|
// });
|
||||||
// labelEnum;
|
// tip += ',执行【' + operateName.label + '】操作';
|
||||||
// stationCode;
|
let operationParam = operationParamMap;
|
||||||
// CTC_ASSIST_PRESS_DELIVER_ASSIST
|
const paramInfo = ctcZoneMap[operationType];
|
||||||
// CTC_ASSIST_PRESS_BLOCK
|
tip += ',执行【' + paramInfo.name + '】操作';
|
||||||
// CTC_ASSIST_PRESS_RESTORE
|
if (paramInfo.objName) {
|
||||||
// CTC_ASSIST_PRESS_ACCIDENT
|
operationParam = operationParamMap[paramInfo.objName];
|
||||||
// CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION
|
}
|
||||||
|
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 {
|
} else {
|
||||||
let device = operationType.split('_')[0];
|
let device = operationType.split('_')[0];
|
||||||
if (device == 'CM') {
|
if (device == 'CM') {
|
||||||
@ -403,6 +626,25 @@ function covertDeviceName(deviceInfo, deviceType) {
|
|||||||
return deviceName;
|
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) {
|
function covertOperation(deviceType, operationParamMap, operationType) {
|
||||||
let deviceName = '【';
|
let deviceName = '【';
|
||||||
let paramName = '';
|
let paramName = '';
|
||||||
@ -425,10 +667,12 @@ function covertOperation(deviceType, operationParamMap, operationType) {
|
|||||||
// } else {
|
// } else {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
deviceName += '】';
|
|
||||||
} else if (operateEnum[deviceType].type) {
|
} 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];
|
const paramInfo = operateEnum[deviceType][operationType];
|
||||||
if (paramInfo) {
|
if (paramInfo) {
|
||||||
if (paramInfo.isDevice) {
|
if (paramInfo.isDevice) {
|
||||||
@ -453,7 +697,11 @@ function covertOperation(deviceType, operationParamMap, operationType) {
|
|||||||
paramName += '【';
|
paramName += '【';
|
||||||
params.forEach((param, index)=>{
|
params.forEach((param, index)=>{
|
||||||
paramName += ' ' + param.name;
|
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) {
|
if (param.result) {
|
||||||
param.result.forEach(result=>{
|
param.result.forEach(result=>{
|
||||||
switch (result.judge) {
|
switch (result.judge) {
|
||||||
@ -502,6 +750,18 @@ function covertFunction(func, device) {
|
|||||||
return 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) {
|
function getRouteNameById(routeId) {
|
||||||
const routeList = store.state.map.routeList;
|
const routeList = store.state.map.routeList;
|
||||||
const route = routeList.find(route=>{
|
const route = routeList.find(route=>{
|
||||||
@ -514,6 +774,16 @@ function getStationNameById(stationId) {
|
|||||||
const station = store.getters['map/getDeviceByCode'](stationId) || {};
|
const station = store.getters['map/getDeviceByCode'](stationId) || {};
|
||||||
return station.name;
|
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) {
|
function getStationResultById(stationResult) {
|
||||||
const station = store.getters['map/getDeviceByCode'](stationResult.stationCode) || {};
|
const station = store.getters['map/getDeviceByCode'](stationResult.stationCode) || {};
|
||||||
let param = '不同意';
|
let param = '不同意';
|
||||||
|
@ -2,13 +2,14 @@
|
|||||||
<div class="main" :style="{width: canvasWidth+'px'}">
|
<div class="main" :style="{width: canvasWidth+'px'}">
|
||||||
<div v-show="panelShow" :panelShow="panelShow">
|
<div v-show="panelShow" :panelShow="panelShow">
|
||||||
<transition name="el-zoom-in-bottom">
|
<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>
|
</transition>
|
||||||
<script-button-group
|
<script-button-group
|
||||||
ref="scriptButtonGroup"
|
ref="scriptButtonGroup"
|
||||||
:offset="offset"
|
:offset="offset"
|
||||||
:text-status-height="textStatusHeight"
|
:text-status-height="textStatusHeight"
|
||||||
:group="group"
|
:group="group"
|
||||||
|
:user-role.sync="userRole"
|
||||||
@viewScriptRoles="viewScriptRoles"
|
@viewScriptRoles="viewScriptRoles"
|
||||||
@viewRunPlan="viewRunPlan"
|
@viewRunPlan="viewRunPlan"
|
||||||
@loadRunPlan="loadRunPlan"
|
@loadRunPlan="loadRunPlan"
|
||||||
@ -19,7 +20,12 @@
|
|||||||
@setTreeData="setTreeData"
|
@setTreeData="setTreeData"
|
||||||
@changeScriptMode="changeScriptMode"
|
@changeScriptMode="changeScriptMode"
|
||||||
@setMapLocation="setMapLocation"
|
@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" />
|
<script-preview-chat ref="chatbox" :group="group" :user-role="userRole" :offset="offset" />
|
||||||
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
|
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
|
||||||
</div>
|
</div>
|
||||||
@ -49,6 +55,7 @@ import { loadDraftScriptNew } from '@/api/designPlatform';
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { ScriptMode } from '@/scripts/ConstDic';
|
import { ScriptMode } from '@/scripts/ConstDic';
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
|
import DispatcherStation from '@/views/newMap/jointTrainingNew/dispatcherStation.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DisplayDraft',
|
name: 'DisplayDraft',
|
||||||
@ -60,6 +67,7 @@ export default {
|
|||||||
FaultChoose,
|
FaultChoose,
|
||||||
MenuSystemTime,
|
MenuSystemTime,
|
||||||
SelectRole,
|
SelectRole,
|
||||||
|
DispatcherStation,
|
||||||
ScriptButtonGroup
|
ScriptButtonGroup
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -73,6 +81,7 @@ export default {
|
|||||||
mapLocation:{},
|
mapLocation:{},
|
||||||
showStation: '',
|
showStation: '',
|
||||||
group: '',
|
group: '',
|
||||||
|
lineCode: '',
|
||||||
prdTypeMap: {
|
prdTypeMap: {
|
||||||
'01': '01', // 现地 => 现地
|
'01': '01', // 现地 => 现地
|
||||||
'02': '02', // 行调 => 行调
|
'02': '02', // 行调 => 行调
|
||||||
@ -80,9 +89,12 @@ export default {
|
|||||||
'05': '' // 派班 => null
|
'05': '' // 派班 => null
|
||||||
},
|
},
|
||||||
userRole:'',
|
userRole:'',
|
||||||
|
showMap: false,
|
||||||
isDrive: this.prdType == '04',
|
isDrive: this.prdType == '04',
|
||||||
treeData:[],
|
treeData:[],
|
||||||
memberList:[],
|
memberList:[],
|
||||||
|
centralizedstationList: [],
|
||||||
|
centralizedStationMap: {},
|
||||||
scriptMode: ScriptMode.TEACH
|
scriptMode: ScriptMode.TEACH
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -117,6 +129,11 @@ export default {
|
|||||||
this.showStation = code;
|
this.showStation = code;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
'$store.state.map.map': function (map) {
|
||||||
|
if (map) {
|
||||||
|
this.setCentralizedstationList(map); // 获取集中站列表
|
||||||
|
}
|
||||||
|
},
|
||||||
'$store.state.training.prdType':function(val) {
|
'$store.state.training.prdType':function(val) {
|
||||||
this.setPosition();
|
this.setPosition();
|
||||||
// this.setMode();
|
// this.setMode();
|
||||||
@ -129,8 +146,12 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.group = this.$route.query.group || '';
|
this.group = this.$route.query.group || '';
|
||||||
|
this.lineCode = this.$route.query.lineCode;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
changeShowMap(flag) {
|
||||||
|
this.showMap = flag;
|
||||||
|
},
|
||||||
back() {
|
back() {
|
||||||
this.$refs.scriptButtonGroup.back();
|
this.$refs.scriptButtonGroup.back();
|
||||||
},
|
},
|
||||||
@ -159,20 +180,24 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
let prdType;
|
let prdType;
|
||||||
|
let type;
|
||||||
if (role.type == '行值') {
|
if (role.type == '行值') {
|
||||||
prdType = '01';
|
prdType = '01';
|
||||||
|
type = 'STATION_SUPERVISOR';
|
||||||
this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
|
this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
|
||||||
this.$store.dispatch('training/setRoleDeviceCode', role.deviceCode);
|
this.$store.dispatch('training/setRoleDeviceCode', role.deviceCode);
|
||||||
} else if (role.type == '行调') {
|
} else if (role.type == '行调') {
|
||||||
prdType = '02';
|
prdType = '02';
|
||||||
|
type = 'DISPATCHER';
|
||||||
this.$store.dispatch('training/setRoles', 'DISPATCHER');
|
this.$store.dispatch('training/setRoles', 'DISPATCHER');
|
||||||
this.$store.dispatch('scriptRecord/updateRole', 'DISPATCHER' + ':' + role.id);
|
|
||||||
} else if (role.type == '司机') {
|
} else if (role.type == '司机') {
|
||||||
prdType = '04';
|
prdType = '04';
|
||||||
|
type = 'DRIVER';
|
||||||
this.$store.dispatch('training/setRoles', 'DRIVER');
|
this.$store.dispatch('training/setRoles', 'DRIVER');
|
||||||
this.$store.dispatch('scriptRecord/updateRole', 'DRIVER' + ':' + role.id);
|
|
||||||
} else if (role.type == '通号') {
|
} else if (role.type == '通号') {
|
||||||
prdType = '';
|
prdType = '';
|
||||||
|
type = 'MAINTAINER';
|
||||||
|
this.$store.dispatch('training/setRoles', 'MAINTAINER');
|
||||||
const routeData = this.$router.resolve({
|
const routeData = this.$router.resolve({
|
||||||
path:'/jlmap3d/maintainer',
|
path:'/jlmap3d/maintainer',
|
||||||
query:{
|
query:{
|
||||||
@ -184,12 +209,64 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.open(routeData.href);
|
window.open(routeData.href);
|
||||||
this.$store.dispatch('training/setRoles', 'MAINTAINER');
|
} else if (role.type == '车辆段信号楼') {
|
||||||
this.$store.dispatch('scriptRecord/updateRole', 'MAINTAINER' + ':' + role.id);
|
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 {
|
} else {
|
||||||
prdType = '';
|
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=>{
|
this.memberData.map(member=>{
|
||||||
if (member.id == role.id) {
|
if (member.id == role.id) {
|
||||||
member.userId = this.$store.state.user.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/setShowCentralizedStationCode', this.showStation);
|
||||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
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%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
background: #000000;
|
||||||
|
|
||||||
-moz-user-select: none;
|
-moz-user-select: none;
|
||||||
-o-user-select: none;
|
-o-user-select: none;
|
||||||
|
@ -17,9 +17,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 右上角按钮列表 -->
|
<!-- 右上角按钮列表 -->
|
||||||
<div class="schema" :style="{top: offset+'px'}">
|
<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">
|
<template v-if="!dataError">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button size="small" :disabled="viewDisabled || isscriptRun" type="success" @click="viewScriptRoles">{{ $t('display.schema.selectRoles') }}</el-button>
|
<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" :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>
|
<el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||||
@ -40,6 +52,8 @@
|
|||||||
:driver-show="isDriver"
|
:driver-show="isDriver"
|
||||||
:all-style="'top:'+(offset+textStatusHeight)+'px'"
|
:all-style="'top:'+(offset+textStatusHeight)+'px'"
|
||||||
/>
|
/>
|
||||||
|
<train-ticket ref="trainTicket" />
|
||||||
|
<register-book ref="registerBook" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -58,10 +72,16 @@ import ConstConfig from '@/scripts/ConstConfig';
|
|||||||
import { loadRunPlanData } from '@/utils/loaddata';
|
import { loadRunPlanData } from '@/utils/loaddata';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import { Notification } from 'element-ui';
|
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 {
|
export default {
|
||||||
name:'ScriptButtonGroup',
|
name:'ScriptButtonGroup',
|
||||||
components:{
|
components:{
|
||||||
DemonMenu
|
DemonMenu,
|
||||||
|
TrainTicket,
|
||||||
|
RegisterBook
|
||||||
},
|
},
|
||||||
props:{
|
props:{
|
||||||
offset: {
|
offset: {
|
||||||
@ -72,6 +92,10 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
userRole: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
textStatusHeight: {
|
textStatusHeight: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default() {
|
default() {
|
||||||
@ -88,6 +112,7 @@ export default {
|
|||||||
activeTrainList:[],
|
activeTrainList:[],
|
||||||
isscriptRun:false, // 剧本是否正在加载
|
isscriptRun:false, // 剧本是否正在加载
|
||||||
scriptMode: ScriptMode.TEACH,
|
scriptMode: ScriptMode.TEACH,
|
||||||
|
speed: 1,
|
||||||
planRunning:false
|
planRunning:false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -110,11 +135,37 @@ export default {
|
|||||||
isStation() {
|
isStation() {
|
||||||
return this.$store.state.training.prdType == '01';
|
return this.$store.state.training.prdType == '01';
|
||||||
},
|
},
|
||||||
|
showDispatcherStation() {
|
||||||
|
return this.$route.query.lineCode === '16' && this.$store.state.training.prdType === '02';
|
||||||
|
},
|
||||||
scriptModeList() {
|
scriptModeList() {
|
||||||
return ScriptMode;
|
return ScriptMode;
|
||||||
},
|
},
|
||||||
|
isAdmin() {
|
||||||
|
return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05');
|
||||||
|
},
|
||||||
mapId() {
|
mapId() {
|
||||||
return this.$route.query.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:{
|
watch:{
|
||||||
@ -130,6 +181,9 @@ export default {
|
|||||||
},
|
},
|
||||||
'$store.state.runPlan.loadRunPlanCount': function () {
|
'$store.state.runPlan.loadRunPlanCount': function () {
|
||||||
this.viewDisabled = false;
|
this.viewDisabled = false;
|
||||||
|
},
|
||||||
|
'$store.state.socket.simulationSpeed': function (val) {
|
||||||
|
this.speed = val;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
@ -149,6 +203,41 @@ export default {
|
|||||||
this.$store.dispatch('map/resetActiveTrainList', true);
|
this.$store.dispatch('map/resetActiveTrainList', true);
|
||||||
},
|
},
|
||||||
methods:{
|
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() {
|
async initLoadData() {
|
||||||
this.changeScriptMode(this.scriptMode);
|
this.changeScriptMode(this.scriptMode);
|
||||||
@ -405,6 +494,7 @@ export default {
|
|||||||
this.$store.dispatch('training/setRoles', '');
|
this.$store.dispatch('training/setRoles', '');
|
||||||
this.$store.dispatch('training/setPrdType', '');
|
this.$store.dispatch('training/setPrdType', '');
|
||||||
this.$emit('clearAllData');
|
this.$emit('clearAllData');
|
||||||
|
this.$emit('quitQuest');
|
||||||
// if (resp.data.planRunning) {
|
// if (resp.data.planRunning) {
|
||||||
// this.$store.dispatch('training/start');// 仿真开始按计划行车
|
// this.$store.dispatch('training/start');// 仿真开始按计划行车
|
||||||
// } else {
|
// } else {
|
||||||
@ -469,6 +559,7 @@ export default {
|
|||||||
.trainingButton{
|
.trainingButton{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 5px;
|
left: 5px;
|
||||||
|
z-index: 1;
|
||||||
}
|
}
|
||||||
.display-draft{
|
.display-draft{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -151,7 +151,7 @@ export default {
|
|||||||
const memberType = ['STATION_SUPERVISOR', 'DISPATCHER', 'DRIVER', 'MAINTAINER', 'DEPOT_DISPATCHER', 'PARENT_DEPARTMENT',
|
const memberType = ['STATION_SUPERVISOR', 'DISPATCHER', 'DRIVER', 'MAINTAINER', 'DEPOT_DISPATCHER', 'PARENT_DEPARTMENT',
|
||||||
'ELECTRIC_DISPATCHER', 'PARKING_LOT_SIGNAL_BUILDING', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
|
'ELECTRIC_DISPATCHER', 'PARKING_LOT_SIGNAL_BUILDING', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
|
||||||
'STATION_PASSENGER', 'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER'];
|
'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);
|
const index = memberType.indexOf(member.type);
|
||||||
let prdType;
|
let prdType;
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
|
@ -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 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>
|
<el-button type="danger" size="small" @click="end">{{ $t('joinTraining.initialize') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="$route.query.lineCode == '16'">
|
||||||
|
<el-button type="primary" size="small" @click="modifySystemTime">修改系统时间</el-button>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<el-button type="primary" :loading="backLoading" size="small" @click="back">退出</el-button>
|
<el-button type="primary" :loading="backLoading" size="small" @click="back">退出</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<qr-code ref="qrCode" />
|
<qr-code ref="qrCode" />
|
||||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||||
|
<modify-time v-if="$route.query.lineCode == '16'" ref="modifySysTime" />
|
||||||
<equipment ref="equipment" />
|
<equipment ref="equipment" />
|
||||||
<contect-us ref="contectUs" />
|
<contect-us ref="contectUs" />
|
||||||
</div>
|
</div>
|
||||||
@ -54,6 +58,7 @@ import StatusIcon from '@/views/components/StatusIcon/statusIcon';
|
|||||||
import ChatBox from '../chatView/chatBox';
|
import ChatBox from '../chatView/chatBox';
|
||||||
import Equipment from '@/views/newMap/displayNew/demon/equipment';
|
import Equipment from '@/views/newMap/displayNew/demon/equipment';
|
||||||
import SetTime from '@/views/newMap/displayNew/demon/setTime';
|
import SetTime from '@/views/newMap/displayNew/demon/setTime';
|
||||||
|
import ModifyTime from '@/views/newMap/displayNew/demon/modifyTime';
|
||||||
import { ranAsPlan, exitRunPlan, clearSimulation } from '@/api/simulation';
|
import { ranAsPlan, exitRunPlan, clearSimulation } from '@/api/simulation';
|
||||||
import { exitFullscreen } from '@/utils/screen';
|
import { exitFullscreen } from '@/utils/screen';
|
||||||
import { getSimulationQrcode } from '@/api/jointSimulation';
|
import { getSimulationQrcode } from '@/api/jointSimulation';
|
||||||
@ -71,6 +76,7 @@ export default {
|
|||||||
ChatBox,
|
ChatBox,
|
||||||
QrCode,
|
QrCode,
|
||||||
SetTime,
|
SetTime,
|
||||||
|
ModifyTime,
|
||||||
Equipment,
|
Equipment,
|
||||||
ContectUs,
|
ContectUs,
|
||||||
StatusIcon
|
StatusIcon
|
||||||
@ -285,6 +291,10 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 修改系统时间
|
||||||
|
modifySystemTime() {
|
||||||
|
this.$refs.modifySysTime.doShow();
|
||||||
|
},
|
||||||
// 设置用户角色 Admin 管理员 Instructor 教员 Dispatcher 行调 Attendant 车站 Audience 观众 Driver 司机 MAINTAINER 通号
|
// 设置用户角色 Admin 管理员 Instructor 教员 Dispatcher 行调 Attendant 车站 Audience 观众 Driver 司机 MAINTAINER 通号
|
||||||
addrolesList(list) {
|
addrolesList(list) {
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
|
@ -141,6 +141,13 @@
|
|||||||
@click="hover('btnCode')"
|
@click="hover('btnCode')"
|
||||||
>{{ $t('map.activate') }}</el-button>
|
>{{ $t('map.activate') }}</el-button>
|
||||||
</el-form-item>
|
</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>
|
</el-form>
|
||||||
<div class="bigDraft">
|
<div class="bigDraft">
|
||||||
<el-button-group class="bigDraftBtn">
|
<el-button-group class="bigDraftBtn">
|
||||||
@ -209,6 +216,7 @@ export default {
|
|||||||
code:'',
|
code:'',
|
||||||
name:'',
|
name:'',
|
||||||
multiRoute:false,
|
multiRoute:false,
|
||||||
|
shutting:false,
|
||||||
startSignalCode:'',
|
startSignalCode:'',
|
||||||
signalAspect:1,
|
signalAspect:1,
|
||||||
startSectionCode:'',
|
startSectionCode:'',
|
||||||
|
@ -87,7 +87,18 @@ export default {
|
|||||||
{ value: 'ACCIDENT', label: '事故按钮' },
|
{ value: 'ACCIDENT', label: '事故按钮' },
|
||||||
{ value: 'CHANGE_DIRECTION', label: '改方按钮' },
|
{ value: 'CHANGE_DIRECTION', label: '改方按钮' },
|
||||||
{ value: 'RECOVERY', 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: [], // 设备集中站列表
|
centralizedStationList: [], // 设备集中站列表
|
||||||
directionList: [
|
directionList: [
|
||||||
@ -314,7 +325,7 @@ export default {
|
|||||||
return this.editModel.type === 'FLEXIBLE'
|
return this.editModel.type === 'FLEXIBLE'
|
||||||
},
|
},
|
||||||
isLinkDirection() {
|
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
|
this.editModel.type
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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-select v-model="formModel.deviceCode" placeholder="请选择" size="small">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in filterStationList"
|
v-for="item in filterStationList"
|
||||||
@ -60,6 +60,17 @@ export default {
|
|||||||
name:'',
|
name:'',
|
||||||
deviceCode: ''
|
deviceCode: ''
|
||||||
},
|
},
|
||||||
|
stationRoleList:[
|
||||||
|
'STATION_SUPERVISOR',
|
||||||
|
'STATION_ASSISTANT',
|
||||||
|
'STATION_MASTER',
|
||||||
|
'STATION_SIGNALER',
|
||||||
|
'STATION_PASSENGER',
|
||||||
|
'STATION_SWITCH_MAN',
|
||||||
|
'STATION_FACILITATOR',
|
||||||
|
'STATION_WORKER',
|
||||||
|
'DEVICE_MANAGER'
|
||||||
|
],
|
||||||
filterStationList: [],
|
filterStationList: [],
|
||||||
rules: {
|
rules: {
|
||||||
type: [
|
type: [
|
||||||
@ -103,7 +114,8 @@ export default {
|
|||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.lodaing = true;
|
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) => {
|
addSimulationMember(this.formModel, this.$route.query.group).then((res) => {
|
||||||
this.$message.success('添加仿真角色成员成功!');
|
this.$message.success('添加仿真角色成员成功!');
|
||||||
this.$emit('addScriptMember', res.data);
|
this.$emit('addScriptMember', res.data);
|
||||||
|
@ -97,6 +97,7 @@ export default {
|
|||||||
switchMode(member) {
|
switchMode(member) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
changeScriptRole(this.group, member.id).then(res=>{
|
changeScriptRole(this.group, member.id).then(res=>{
|
||||||
|
if (member.type == '行值') { this.$store.dispatch('training/setPrdType', '01'); }
|
||||||
this.$emit('changeMode', member);
|
this.$emit('changeMode', member);
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -568,7 +568,7 @@ export default {
|
|||||||
role.type = 'STATION_PASSENGER';
|
role.type = 'STATION_PASSENGER';
|
||||||
this.$store.dispatch('training/setRoles', 'STATION_PASSENGER');
|
this.$store.dispatch('training/setRoles', 'STATION_PASSENGER');
|
||||||
} else if (role.type == '车站扳道员') {
|
} else if (role.type == '车站扳道员') {
|
||||||
prdType = '';
|
prdType = '01';
|
||||||
role.type = 'STATION_SWITCH_MAN';
|
role.type = 'STATION_SWITCH_MAN';
|
||||||
this.$store.dispatch('training/setRoles', 'STATION_SWITCH_MAN');
|
this.$store.dispatch('training/setRoles', 'STATION_SWITCH_MAN');
|
||||||
} else if (role.type == '车站引导员') {
|
} else if (role.type == '车站引导员') {
|
||||||
|
@ -117,7 +117,8 @@ export default {
|
|||||||
'standTbStrategyIsInvalid',
|
'standTbStrategyIsInvalid',
|
||||||
'updateTripPlanByServiceNumber',
|
'updateTripPlanByServiceNumber',
|
||||||
'railway',
|
'railway',
|
||||||
'SFUCanOnlyApplyForFaultLockSection'
|
'SFUCanOnlyApplyForFaultLockSection',
|
||||||
|
'signalBolckOptReflectSignal'
|
||||||
],
|
],
|
||||||
selectList: ['runMode', 'singleApproachLockCancelRoute'],
|
selectList: ['runMode', 'singleApproachLockCancelRoute'],
|
||||||
generalConfig: [
|
generalConfig: [
|
||||||
@ -168,7 +169,8 @@ export default {
|
|||||||
'standTbStrategyIsInvalid',
|
'standTbStrategyIsInvalid',
|
||||||
'updateTripPlanByServiceNumber',
|
'updateTripPlanByServiceNumber',
|
||||||
'railway',
|
'railway',
|
||||||
'SFUCanOnlyApplyForFaultLockSection'
|
'SFUCanOnlyApplyForFaultLockSection',
|
||||||
|
'signalBolckOptReflectSignal'
|
||||||
],
|
],
|
||||||
rangeList: ['noParkingSM', 'parkingSM'],
|
rangeList: ['noParkingSM', 'parkingSM'],
|
||||||
speedList: ['rmAtpSpeed', 'urmAtpSpeed'],
|
speedList: ['rmAtpSpeed', 'urmAtpSpeed'],
|
||||||
@ -225,7 +227,8 @@ export default {
|
|||||||
standTbStrategyIsInvalid: '站台折返策略不生效',
|
standTbStrategyIsInvalid: '站台折返策略不生效',
|
||||||
updateTripPlanByServiceNumber: '根据服务号更新车次计划',
|
updateTripPlanByServiceNumber: '根据服务号更新车次计划',
|
||||||
railway: '大铁线路',
|
railway: '大铁线路',
|
||||||
SFUCanOnlyApplyForFaultLockSection: '区故解只能应用于故障锁闭区段'
|
SFUCanOnlyApplyForFaultLockSection: '区故解只能应用于故障锁闭区段',
|
||||||
|
signalBolckOptReflectSignal:'对信号机封锁操作,是否影响信号显示'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user