Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
94504d03aa
@ -261,7 +261,9 @@ class SkinCode extends defaultStyle {
|
|||||||
this[deviceType.SignalButton] = {
|
this[deviceType.SignalButton] = {
|
||||||
shape: 'roundWithDock',
|
shape: 'roundWithDock',
|
||||||
fillColor: '#808080',
|
fillColor: '#808080',
|
||||||
showName: true
|
showName: true,
|
||||||
|
selectColor: '#0000ff',
|
||||||
|
flashingColor: '#ffff00'
|
||||||
};
|
};
|
||||||
this[deviceType.SwitchFault] = {
|
this[deviceType.SwitchFault] = {
|
||||||
displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||||
|
@ -647,7 +647,6 @@ class Signal extends Group {
|
|||||||
}
|
}
|
||||||
this.sigPost.setHorColor(this.style.Signal.post.openHorColor);
|
this.sigPost.setHorColor(this.style.Signal.post.openHorColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/* 侧向开放 */
|
/* 侧向开放 */
|
||||||
openLateral(logicLight) {
|
openLateral(logicLight) {
|
||||||
@ -726,6 +725,14 @@ class Signal extends Group {
|
|||||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
|
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
|
||||||
this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.greenColor);
|
this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.greenColor);
|
||||||
}
|
}
|
||||||
|
redFlash() {
|
||||||
|
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||||
|
this.lamps[0].setAnimationStart(this.style.Signal.lamp.redColor);
|
||||||
|
}
|
||||||
|
blueFlash() {
|
||||||
|
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||||
|
this.lamps[0].setAnimationStart(this.style.Signal.lamp.blueColor);
|
||||||
|
}
|
||||||
lampWhite() {
|
lampWhite() {
|
||||||
if (this.lamps.length === 1) {
|
if (this.lamps.length === 1) {
|
||||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.whiteColor);
|
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.whiteColor);
|
||||||
@ -1086,6 +1093,14 @@ class Signal extends Group {
|
|||||||
this.greenYellow();
|
this.greenYellow();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 'RF': {
|
||||||
|
this.redFlash();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'BF': {
|
||||||
|
this.blueFlash();
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
this.close(model.logicLight); // 信号关闭
|
this.close(model.logicLight); // 信号关闭
|
||||||
break;
|
break;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
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 = [
|
const typeList = [
|
||||||
'PICK_ASSIST',
|
'PICK_ASSIST',
|
||||||
'DEPART_ASSIST',
|
'DEPART_ASSIST',
|
||||||
@ -20,33 +20,33 @@ const typeList = [
|
|||||||
'BLOCK',
|
'BLOCK',
|
||||||
'UNBLOCK',
|
'UNBLOCK',
|
||||||
'CHANGE_DIRECTION'
|
'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.z = 0;
|
||||||
this.model = model
|
this.model = model;
|
||||||
this.style = style
|
this.style = style;
|
||||||
this.pressed = false
|
this.pressed = false;
|
||||||
// Line
|
// Line
|
||||||
this.create()
|
this.create();
|
||||||
this.setState(model)
|
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();
|
||||||
if (this.style.SignalButton && this.style.SignalButton.shape === 'roundWithDock' && typeList.includes(model.type)) {
|
if (this.style.SignalButton && this.style.SignalButton.shape === 'roundWithDock' && typeList.includes(model.type)) {
|
||||||
const circle1 = new Circle({
|
const circle1 = new Circle({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
@ -61,7 +61,7 @@ export default class SignalButton extends Group {
|
|||||||
lineWidth: 1,
|
lineWidth: 1,
|
||||||
fill: fillColor
|
fill: fillColor
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
const circle2 = new Circle({
|
const circle2 = new Circle({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z + 1,
|
z: this.z + 1,
|
||||||
@ -73,7 +73,7 @@ export default class SignalButton extends Group {
|
|||||||
style: {
|
style: {
|
||||||
fill: '#000'
|
fill: '#000'
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
const circle3 = new Circle({
|
const circle3 = new Circle({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
@ -85,13 +85,13 @@ export default class SignalButton extends Group {
|
|||||||
style: {
|
style: {
|
||||||
fill: '#eee'
|
fill: '#eee'
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
this.arcShape = circle1
|
this.arcShape = circle1;
|
||||||
this.arcShapeDock1 = circle2
|
this.arcShapeDock1 = circle2;
|
||||||
this.arcShapeDock2 = circle3
|
this.arcShapeDock2 = circle3;
|
||||||
this.add(circle1)
|
this.add(circle1)
|
||||||
.add(circle2)
|
.add(circle2)
|
||||||
.add(circle3)
|
.add(circle3);
|
||||||
} else {
|
} else {
|
||||||
this.rectButton = new Rect({
|
this.rectButton = new Rect({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
@ -108,11 +108,11 @@ export default class SignalButton extends Group {
|
|||||||
lineWidth: 1,
|
lineWidth: 1,
|
||||||
fill: fillColor
|
fill: fillColor
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
if (this.style.SignalButton && this.style.SignalButton.strokeColor){
|
if (this.style.SignalButton && this.style.SignalButton.strokeColor){
|
||||||
this.rectButton.setStyle("stroke",this.style.SignalButton.strokeColor)
|
this.rectButton.setStyle("stroke",this.style.SignalButton.strokeColor)
|
||||||
}
|
}
|
||||||
this.add(this.rectButton)
|
this.add(this.rectButton);
|
||||||
}
|
}
|
||||||
this.leftLine = new Line({
|
this.leftLine = new Line({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
@ -127,9 +127,9 @@ export default class SignalButton extends Group {
|
|||||||
lineWidth: 2,
|
lineWidth: 2,
|
||||||
stroke: '#ff0000'
|
stroke: '#ff0000'
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
this.add(this.leftLine)
|
this.add(this.leftLine);
|
||||||
this.leftLine.hide()
|
this.leftLine.hide();
|
||||||
this.rightLine = new Line({
|
this.rightLine = new Line({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z + 1,
|
z: this.z + 1,
|
||||||
@ -143,9 +143,9 @@ export default class SignalButton extends Group {
|
|||||||
lineWidth: 2,
|
lineWidth: 2,
|
||||||
stroke: '#ff0000'
|
stroke: '#ff0000'
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
this.add(this.rightLine)
|
this.add(this.rightLine);
|
||||||
this.rightLine.hide()
|
this.rightLine.hide();
|
||||||
this.leftBoard = new Line({
|
this.leftBoard = new Line({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z + 1,
|
z: this.z + 1,
|
||||||
@ -159,9 +159,9 @@ export default class SignalButton extends Group {
|
|||||||
lineWidth: 2,
|
lineWidth: 2,
|
||||||
stroke: '#FFFFFF'
|
stroke: '#FFFFFF'
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
this.add(this.leftBoard)
|
this.add(this.leftBoard);
|
||||||
this.leftBoard.hide()
|
this.leftBoard.hide();
|
||||||
this.topBoard = new Line({
|
this.topBoard = new Line({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z + 1,
|
z: this.z + 1,
|
||||||
@ -175,9 +175,9 @@ export default class SignalButton extends Group {
|
|||||||
lineWidth: 2,
|
lineWidth: 2,
|
||||||
stroke: '#FFFFFF'
|
stroke: '#FFFFFF'
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
this.add(this.topBoard)
|
this.add(this.topBoard);
|
||||||
this.topBoard.hide()
|
this.topBoard.hide();
|
||||||
this.rightBoard = new Line({
|
this.rightBoard = new Line({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z + 1,
|
z: this.z + 1,
|
||||||
@ -191,9 +191,9 @@ export default class SignalButton extends Group {
|
|||||||
lineWidth: 2,
|
lineWidth: 2,
|
||||||
stroke: '#A0A0A0'
|
stroke: '#A0A0A0'
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
this.add(this.rightBoard)
|
this.add(this.rightBoard);
|
||||||
this.rightBoard.hide()
|
this.rightBoard.hide();
|
||||||
this.bottomBoard = new Line({
|
this.bottomBoard = new Line({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z + 1,
|
z: this.z + 1,
|
||||||
@ -207,10 +207,10 @@ export default class SignalButton extends Group {
|
|||||||
lineWidth: 2,
|
lineWidth: 2,
|
||||||
stroke: '#A0A0A0'
|
stroke: '#A0A0A0'
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
this.add(this.bottomBoard)
|
this.add(this.bottomBoard);
|
||||||
this.bottomBoard.hide()
|
this.bottomBoard.hide();
|
||||||
const hasTextList = ['PASS', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION']
|
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)) {
|
if (hasTextList.includes(model.type) || (this.style.SignalButton && this.style.SignalButton.showName)) {
|
||||||
this.buttonText = new Text({
|
this.buttonText = new Text({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
@ -226,120 +226,124 @@ export default class SignalButton extends Group {
|
|||||||
textAlign: 'middle',
|
textAlign: 'middle',
|
||||||
textVerticalAlign: 'top'
|
textVerticalAlign: 'top'
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
this.add(this.buttonText)
|
this.add(this.buttonText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startAnimate() {
|
startAnimate(color) {
|
||||||
this.rectButton &&
|
this.rectButton &&
|
||||||
this.rectButton
|
this.rectButton
|
||||||
.animateStyle(true)
|
.animateStyle(true)
|
||||||
.when(0, { fill: '#000' })
|
.when(0, { fill: '#000' })
|
||||||
.when(1000, { fill: this.getTypeColor() })
|
.when(1000, { fill: color })
|
||||||
.when(2000, { fill: '#000' })
|
.when(2000, { fill: '#000' })
|
||||||
.start()
|
.start();
|
||||||
}
|
}
|
||||||
stopAnimation() {
|
stopAnimation() {
|
||||||
this.rectButton && this.rectButton.stopAnimation(true)
|
this.rectButton && this.rectButton.stopAnimation(true);
|
||||||
// this.arcFlash && this.arcFlash.stopAnimation(false);
|
// this.arcFlash && this.arcFlash.stopAnimation(false);
|
||||||
}
|
}
|
||||||
getTypeColor() {
|
getTypeColor() {
|
||||||
if (this.style.SignalButton && this.style.SignalButton.fillColor && typeList.includes(this.model.type)) {
|
if (this.style.SignalButton && this.style.SignalButton.fillColor && typeList.includes(this.model.type)) {
|
||||||
return this.style.SignalButton.fillColor
|
return this.style.SignalButton.fillColor;
|
||||||
}
|
}
|
||||||
let color = ''
|
let color = '';
|
||||||
const list = ['ASSIST', 'ACCIDENT', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION']
|
const list = ['ASSIST', 'ACCIDENT', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION'];
|
||||||
if (this.model.type === 'FLEXIBLE' || this.model.type === 'SHUNT_TERMINAL') {
|
if (this.model.type === 'FLEXIBLE' || this.model.type === 'SHUNT_TERMINAL') {
|
||||||
color = '#808080'
|
color = '#808080';
|
||||||
} else if (this.model.type === 'GUIDE') {
|
} else if (this.model.type === 'GUIDE') {
|
||||||
if (this.style.SignalButton && this.style.SignalButton.guideColor){
|
if (this.style.SignalButton && this.style.SignalButton.guideColor){
|
||||||
color = this.style.SignalButton.guideColor;
|
color = this.style.SignalButton.guideColor;
|
||||||
}else{
|
}else{
|
||||||
color = '#5050E1';
|
color = '#5050E1';
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (list.includes(this.model.type)) {
|
} else if (list.includes(this.model.type)) {
|
||||||
color = '#ccc'
|
color = '#ccc';
|
||||||
} else {
|
} else {
|
||||||
if (this.style.SignalButton && this.style.SignalButton.trainColor){
|
if (this.style.SignalButton && this.style.SignalButton.trainColor){
|
||||||
color = this.style.SignalButton.trainColor;
|
color = this.style.SignalButton.trainColor;
|
||||||
}else{
|
}else{
|
||||||
color = '#008000';
|
color = '#008000';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return color
|
return color;
|
||||||
} //
|
} //
|
||||||
recover() {
|
recover() {
|
||||||
this.stopAnimation()
|
this.stopAnimation();
|
||||||
this.rectButton && this.rectButton.setStyle({ fill: this.getTypeColor() })
|
this.rectButton && this.rectButton.setStyle({ fill: this.getTypeColor() });
|
||||||
this.arcShape && this.arcShape.setStyle({ fill: this.getTypeColor() })
|
this.arcShape && this.arcShape.setStyle({ fill: this.getTypeColor() });
|
||||||
this.rightLine && this.rightLine.hide()
|
this.rightLine && this.rightLine.hide();
|
||||||
this.leftLine && this.leftLine.hide()
|
this.leftLine && this.leftLine.hide();
|
||||||
this.rectButton && this.rectButton.show()
|
this.rectButton && this.rectButton.show();
|
||||||
this.arcShape && this.arcShape.show()
|
this.arcShape && this.arcShape.show();
|
||||||
this.arcShapeDock1 && this.arcShapeDock1.show()
|
this.arcShapeDock1 && this.arcShapeDock1.show();
|
||||||
this.arcShapeDock2 && this.arcShapeDock2.show()
|
this.arcShapeDock2 && this.arcShapeDock2.show();
|
||||||
this.buttonText && this.buttonText.show()
|
this.buttonText && this.buttonText.show();
|
||||||
this.leftBoard && this.leftBoard.hide()
|
this.leftBoard && this.leftBoard.hide();
|
||||||
this.rightBoard && this.rightBoard.hide()
|
this.rightBoard && this.rightBoard.hide();
|
||||||
this.topBoard && this.topBoard.hide()
|
this.topBoard && this.topBoard.hide();
|
||||||
this.bottomBoard && this.bottomBoard.hide()
|
this.bottomBoard && this.bottomBoard.hide();
|
||||||
}
|
}
|
||||||
blockShow() {
|
blockShow() {
|
||||||
this.rightLine && this.rightLine.show()
|
this.rightLine && this.rightLine.show();
|
||||||
this.leftLine && this.leftLine.show()
|
this.leftLine && this.leftLine.show();
|
||||||
}
|
}
|
||||||
setState(model) {
|
setState(model) {
|
||||||
this.recover()
|
this.recover();
|
||||||
// { value: 'ASSIST', label: '总辅助按钮' },
|
// { value: 'ASSIST', label: '总辅助按钮' },
|
||||||
// { value: 'PICK_ASSIST', label: '接辅助按钮' },
|
// { value: 'PICK_ASSIST', label: '接辅助按钮' },
|
||||||
// { value: 'DEPART_ASSIST', label: '发辅助按钮' },
|
// { value: 'DEPART_ASSIST', label: '发辅助按钮' },
|
||||||
const list = ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION']
|
const list = ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION'];
|
||||||
if (list.includes(model.type)) {
|
if (list.includes(model.type)) {
|
||||||
if (this.rectButton) {
|
if (this.rectButton) {
|
||||||
if (model.pressDown) {
|
if (model.pressDown) {
|
||||||
this.rectButton.setStyle({ fill: '#FFFF00' })
|
this.rectButton.setStyle({ fill: '#FFFF00' });
|
||||||
} else {
|
} else {
|
||||||
this.rectButton.setStyle({ fill: this.getTypeColor() })
|
this.rectButton.setStyle({ fill: this.getTypeColor() });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// { value: 'PICK', label: '接车按钮' },
|
// { value: 'PICK', label: '接车按钮' },
|
||||||
// { value: 'SHUNT_TERMINAL', label: '调车终端按钮' },
|
// { value: 'SHUNT_TERMINAL', label: '调车终端按钮' },
|
||||||
if (!store.getters['map/checkDeviceShow'](this._code)) {
|
if (!store.getters['map/checkDeviceShow'](this._code)) {
|
||||||
this.buttonText && this.buttonText.hide()
|
this.buttonText && this.buttonText.hide();
|
||||||
this.rectButton && this.rectButton.hide()
|
this.rectButton && this.rectButton.hide();
|
||||||
this.leftLine && this.leftLine.hide()
|
this.leftLine && this.leftLine.hide();
|
||||||
this.rightLine && this.rightLine.hide()
|
this.rightLine && this.rightLine.hide();
|
||||||
this.arcShape && this.arcShape.hide()
|
this.arcShape && this.arcShape.hide();
|
||||||
this.arcShapeDock1 && this.arcShapeDock1.hide()
|
this.arcShapeDock1 && this.arcShapeDock1.hide();
|
||||||
this.arcShapeDock2 && this.arcShapeDock2.hide()
|
this.arcShapeDock2 && this.arcShapeDock2.hide();
|
||||||
} else {
|
} else {
|
||||||
if (model.hasSelected) {
|
if (model.hasSelected) {
|
||||||
this.startAnimate()
|
if (this.style.SignalButton && this.style.SignalButton.selectColor) {
|
||||||
|
this.rectButton && this.rectButton.setStyle({fill:this.style.SignalButton.selectColor});
|
||||||
|
} else {
|
||||||
|
this.startAnimate(this.getTypeColor());
|
||||||
|
}
|
||||||
|
} else if (model.toSelected) {
|
||||||
|
this.startAnimate(this.style.SignalButton.flashingColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pressDown(flg, color) {
|
pressDown(flg, color) {
|
||||||
if (this.pressed === flg) return
|
if (this.pressed === flg) return;
|
||||||
if (this.arcShapeDock1) {
|
if (this.arcShapeDock1) {
|
||||||
if (flg) {
|
if (flg) {
|
||||||
this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy + 2 }, z: this.z + 2, zlevel: this.zlevel })
|
this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy + 2 }, z: this.z + 2, zlevel: this.zlevel });
|
||||||
if (color) {
|
if (color) {
|
||||||
this.arcShape
|
this.arcShape
|
||||||
.animateStyle(true)
|
.animateStyle(true)
|
||||||
.when(0, { fill: '#69666E' })
|
.when(0, { fill: '#69666E' })
|
||||||
.when(1000, { fill: color })
|
.when(1000, { fill: color })
|
||||||
.when(2000, { fill: '#69666E' })
|
.when(2000, { fill: '#69666E' })
|
||||||
.start()
|
.start();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy - 2 }, z: this.z + 2, zlevel: this.zlevel })
|
this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy - 2 }, z: this.z + 2, zlevel: this.zlevel });
|
||||||
this.arcShape.stopAnimation(true)
|
this.arcShape.stopAnimation(true);
|
||||||
this.recover()
|
this.recover();
|
||||||
}
|
}
|
||||||
this.pressed = flg
|
this.pressed = flg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getAnchorPoint() {}
|
getAnchorPoint() {}
|
||||||
|
@ -230,10 +230,10 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuDirective: [
|
menuDirective: [
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '确认运行至前方站',
|
||||||
handler: this.nextStation
|
// handler: this.nextStation
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '越引导信号行驶',
|
// label: '越引导信号行驶',
|
||||||
// handler: this.handleOverFuideSignal
|
// handler: this.handleOverFuideSignal
|
||||||
|
@ -143,10 +143,10 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuDirective: [
|
menuDirective: [
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '确认运行至前方站',
|
||||||
handler: this.nextStation
|
// handler: this.nextStation
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '越引导信号行驶',
|
// label: '越引导信号行驶',
|
||||||
// handler: this.handleOverFuideSignal
|
// handler: this.handleOverFuideSignal
|
||||||
|
@ -126,10 +126,10 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuDirective: [
|
menuDirective: [
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '确认运行至前方站',
|
||||||
handler: this.nextStation
|
// handler: this.nextStation
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '越引导信号行驶',
|
// label: '越引导信号行驶',
|
||||||
// handler: this.handleOverFuideSignal
|
// handler: this.handleOverFuideSignal
|
||||||
|
@ -23,11 +23,13 @@
|
|||||||
<i class="el-icon-warning" />
|
<i class="el-icon-warning" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="through" label="">
|
<el-form-item prop="through" label="方式:">
|
||||||
<el-radio-group v-model="formModel.through">
|
<el-radio-group v-model="formModel.through">
|
||||||
<el-radio :label="1">越红灯行驶</el-radio>
|
<el-radio :label="1">越红灯行驶</el-radio><br>
|
||||||
<el-radio :label="2">越引导行驶</el-radio>
|
<el-radio style="margin-top: 10px" :label="2">越引导行驶</el-radio><br>
|
||||||
<el-radio :label="0">无</el-radio>
|
<el-radio style="margin-top: 10px" :label="3">运行至前方车站</el-radio><br>
|
||||||
|
<el-radio style="margin-top: 10px" :label="4">进路闭塞法行车</el-radio><br>
|
||||||
|
<el-radio style="margin-top: 10px" :label="0">无</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="targetDeviceCode" label="目的地:">
|
<el-form-item prop="targetDeviceCode" label="目的地:">
|
||||||
|
@ -123,14 +123,14 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuDirective: [
|
menuDirective: [
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '确认运行至前方站',
|
||||||
handler: this.nextStation
|
// handler: this.nextStation
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '进路闭塞法行车',
|
// label: '进路闭塞法行车',
|
||||||
handler: this.routeBlockRun
|
// handler: this.routeBlockRun
|
||||||
}
|
// }
|
||||||
// {
|
// {
|
||||||
// label: '越引导信号行驶',
|
// label: '越引导信号行驶',
|
||||||
// handler: this.handleOverFuideSignal
|
// handler: this.handleOverFuideSignal
|
||||||
|
@ -185,14 +185,14 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '确认运行至前方站',
|
||||||
handler: this.nextStation
|
// handler: this.nextStation
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '进路闭塞法行车',
|
// label: '进路闭塞法行车',
|
||||||
handler: this.routeBlockRun
|
// handler: this.routeBlockRun
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '越引导信号行驶',
|
// label: '越引导信号行驶',
|
||||||
// handler: this.handleOverFuideSignal
|
// handler: this.handleOverFuideSignal
|
||||||
|
@ -182,14 +182,14 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '确认运行至前方站',
|
||||||
handler: this.nextStation
|
// handler: this.nextStation
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '进路闭塞法行车',
|
// label: '进路闭塞法行车',
|
||||||
handler: this.routeBlockRun
|
// handler: this.routeBlockRun
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '越引导信号行驶',
|
// label: '越引导信号行驶',
|
||||||
// handler: this.handleOverFuideSignal
|
// handler: this.handleOverFuideSignal
|
||||||
|
@ -352,16 +352,24 @@ export default {
|
|||||||
if (this.timeNode && val - this.timeNode >= 15) {
|
if (this.timeNode && val - this.timeNode >= 15) {
|
||||||
this.clearOperate();
|
this.clearOperate();
|
||||||
}
|
}
|
||||||
|
const routeDeviceList = [];
|
||||||
|
this.routeList.forEach(item => {
|
||||||
|
if (item && item.btnCodeList && item.btnCodeList.length && this.deviceList && this.deviceList.length && item.btnCodeList[0] === this.deviceList[0].code) {
|
||||||
|
routeDeviceList.push(this.$store.getters['map/getDeviceByCode'](item.btnCodeList[1]));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const updateList = [];
|
||||||
|
if (this.deviceList && this.deviceList.length) {
|
||||||
|
updateList.push({code: this.deviceList[0].code, _type: this.deviceList[0]._type, hasSelected: 0});
|
||||||
|
}
|
||||||
|
routeDeviceList.forEach(item => {
|
||||||
|
updateList.push({ code: item.code, _type: item._type, toSelected: 0 });
|
||||||
|
});
|
||||||
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15) {
|
if (this.deviceTimeNode && val - this.deviceTimeNode >= 15) {
|
||||||
if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'SignalButton') {
|
if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'SignalButton') {
|
||||||
this.$store.dispatch('training/updateMapState', [{ code: this.deviceList[0].code, _type: 'SignalButton', hasSelected: 0 }]);
|
this.$store.dispatch('training/updateMapState', updateList);
|
||||||
} else if (
|
} else if (this.deviceList && this.deviceList.length && this.deviceList[0]._type === 'Signal' && this.deviceList[0].type === 'SHUNTING') {
|
||||||
this.deviceList &&
|
this.$store.dispatch('training/updateMapState', updateList);
|
||||||
this.deviceList.length &&
|
|
||||||
this.deviceList[0]._type === 'Signal' &&
|
|
||||||
this.deviceList[0].type === 'SHUNTING'
|
|
||||||
) {
|
|
||||||
this.$store.dispatch('training/updateMapState', [{ code: this.deviceList[0].code, _type: 'Signal', hasSelected: 0 }]);
|
|
||||||
}
|
}
|
||||||
this.deviceList = [];
|
this.deviceList = [];
|
||||||
}
|
}
|
||||||
@ -620,7 +628,17 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
// 仅信号按钮调车信号机有状态
|
// 仅信号按钮调车信号机有状态
|
||||||
if (deviceList[0]._type === 'SignalButton' || (deviceList[0]._type === 'Signal' && deviceList[0].type === 'SHUNTING')) {
|
if (deviceList[0]._type === 'SignalButton' || (deviceList[0]._type === 'Signal' && deviceList[0].type === 'SHUNTING')) {
|
||||||
this.$store.dispatch('training/updateMapState', [{ code: deviceList[0].code, _type: deviceList[0]._type, hasSelected: 1 }]);
|
const routeDeviceList = [];
|
||||||
|
this.routeList.forEach(item => {
|
||||||
|
if (item && item.btnCodeList && item.btnCodeList.length && this.deviceList && this.deviceList.length && item.btnCodeList[0] === deviceList[0].code) {
|
||||||
|
routeDeviceList.push(this.$store.getters['map/getDeviceByCode'](item.btnCodeList[1]));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const updateList = [{ code: deviceList[0].code, _type: deviceList[0]._type, hasSelected: 1 }];
|
||||||
|
routeDeviceList.forEach(item => {
|
||||||
|
updateList.push({ code: item.code, _type: item._type, toSelected: 1 });
|
||||||
|
});
|
||||||
|
this.$store.dispatch('training/updateMapState', updateList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -715,7 +733,7 @@ export default {
|
|||||||
val: model.code,
|
val: model.code,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
|
||||||
};
|
};
|
||||||
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code);
|
// const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code);
|
||||||
if (model._type === 'SignalButton' && model.type === 'PICK') {
|
if (model._type === 'SignalButton' && model.type === 'PICK') {
|
||||||
operate.param = { signalCode: model.signalCode };
|
operate.param = { signalCode: model.signalCode };
|
||||||
this.sendCommand(operate);
|
this.sendCommand(operate);
|
||||||
@ -942,18 +960,26 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clearOperate() {
|
clearOperate() { // 清除操作
|
||||||
// 清除操作
|
|
||||||
this.deviceList &&
|
|
||||||
this.deviceList.length &&
|
|
||||||
this.$store.dispatch('training/updateMapState', [
|
|
||||||
{ code: this.deviceList[0].code, _type: this.deviceList[0]._type, hasSelected: 0 }
|
|
||||||
]);
|
|
||||||
this.deviceList = [];
|
this.deviceList = [];
|
||||||
Handler.clear(); // 清空操作组
|
Handler.clear(); // 清空操作组
|
||||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||||
// this.pressedSignalButton && this.pressedSignalButton.instance.pressDown(false)
|
},
|
||||||
// this.pressedSignalButton = null
|
clearSignalButton() { // 清除信号按钮前端状态
|
||||||
|
const routeDeviceList = [];
|
||||||
|
this.routeList.forEach(item => {
|
||||||
|
if (item && item.btnCodeList && item.btnCodeList.length && this.deviceList && this.deviceList.length && item.btnCodeList[0] === this.deviceList[0].code) {
|
||||||
|
routeDeviceList.push(this.$store.getters['map/getDeviceByCode'](item.btnCodeList[1]));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const updateList = [];
|
||||||
|
if (this.deviceList && this.deviceList.length) {
|
||||||
|
updateList.push({code: this.deviceList[0].code, _type: this.deviceList[0]._type, hasSelected: 0});
|
||||||
|
}
|
||||||
|
routeDeviceList.forEach(item => {
|
||||||
|
updateList.push({ code: item.code, _type: item._type, toSelected: 0 });
|
||||||
|
});
|
||||||
|
this.deviceList && this.deviceList.length && this.$store.dispatch('training/updateMapState', updateList);
|
||||||
},
|
},
|
||||||
assistOperateOrChange(model) {
|
assistOperateOrChange(model) {
|
||||||
// mode.type==
|
// mode.type==
|
||||||
|
@ -182,14 +182,14 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '确认运行至前方站',
|
||||||
handler: this.nextStation
|
// handler: this.nextStation
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '进路闭塞法行车',
|
// label: '进路闭塞法行车',
|
||||||
handler: this.routeBlockRun
|
// handler: this.routeBlockRun
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '越引导信号行驶',
|
// label: '越引导信号行驶',
|
||||||
// handler: this.handleOverFuideSignal
|
// handler: this.handleOverFuideSignal
|
||||||
|
@ -185,14 +185,14 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '确认运行至前方站',
|
||||||
handler: this.nextStation
|
// handler: this.nextStation
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '进路闭塞法行车',
|
// label: '进路闭塞法行车',
|
||||||
handler: this.routeBlockRun
|
// handler: this.routeBlockRun
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '越引导信号行驶',
|
// label: '越引导信号行驶',
|
||||||
// handler: this.handleOverFuideSignal
|
// handler: this.handleOverFuideSignal
|
||||||
|
@ -134,10 +134,10 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuDirective: [
|
menuDirective: [
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '确认运行至前方站',
|
||||||
handler: this.nextStation
|
// handler: this.nextStation
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '越引导信号行驶',
|
// label: '越引导信号行驶',
|
||||||
// handler: this.handleOverFuideSignal
|
// handler: this.handleOverFuideSignal
|
||||||
|
@ -108,10 +108,10 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuDirective: [
|
menuDirective: [
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '确认运行至前方站',
|
||||||
handler: this.nextStation
|
// handler: this.nextStation
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '越引导信号行驶',
|
// label: '越引导信号行驶',
|
||||||
// handler: this.handleOverFuideSignal
|
// handler: this.handleOverFuideSignal
|
||||||
|
@ -75,10 +75,10 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuDirective: [
|
menuDirective: [
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '确认运行至前方站',
|
||||||
handler: this.nextStation
|
// handler: this.nextStation
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '越引导信号行驶',
|
// label: '越引导信号行驶',
|
||||||
// handler: this.handleOverFuideSignal
|
// handler: this.handleOverFuideSignal
|
||||||
|
@ -75,10 +75,10 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuDirective: [
|
menuDirective: [
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '确认运行至前方站',
|
||||||
handler: this.nextStation
|
// handler: this.nextStation
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '越引导信号行驶',
|
// label: '越引导信号行驶',
|
||||||
// handler: this.handleOverFuideSignal
|
// handler: this.handleOverFuideSignal
|
||||||
|
@ -214,10 +214,10 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuDirective: [
|
menuDirective: [
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '确认运行至前方站',
|
||||||
handler: this.nextStation
|
// handler: this.nextStation
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '越引导信号行驶',
|
// label: '越引导信号行驶',
|
||||||
// handler: this.handleOverFuideSignal
|
// handler: this.handleOverFuideSignal
|
||||||
|
@ -215,10 +215,10 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuDirective: [
|
menuDirective: [
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '确认运行至前方站',
|
||||||
handler: this.nextStation
|
// handler: this.nextStation
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '越引导信号行驶',
|
// label: '越引导信号行驶',
|
||||||
// handler: this.handleOverFuideSignal
|
// handler: this.handleOverFuideSignal
|
||||||
|
@ -229,10 +229,10 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuDirective: [
|
menuDirective: [
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '确认运行至前方站',
|
||||||
handler: this.nextStation
|
// handler: this.nextStation
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '限速指令',
|
// label: '限速指令',
|
||||||
// handler: this.handleSpeedLimit
|
// handler: this.handleSpeedLimit
|
||||||
|
@ -159,10 +159,10 @@ export default {
|
|||||||
label: '转NRM模式',
|
label: '转NRM模式',
|
||||||
handler: this.handlerApplyNrmMode
|
handler: this.handlerApplyNrmMode
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '确认运行至前方站',
|
||||||
handler: this.nextStation
|
// handler: this.nextStation
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '越引导信号行驶',
|
// label: '越引导信号行驶',
|
||||||
// handler: this.handleOverFuideSignal
|
// handler: this.handleOverFuideSignal
|
||||||
@ -302,7 +302,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
handlerApplyNrmMode() {
|
handlerApplyNrmMode() {
|
||||||
commitOperate(menuOperate.Driver.applyNrm, { groupNumber: this.selected.code }, 0).then(({ valid, operate }) => {
|
commitOperate(menuOperate.Driver.applyNrm, { groupNumber: this.selected.code }, 3).then(({ valid, operate }) => {
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
|
@ -237,10 +237,10 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuDirective: [
|
menuDirective: [
|
||||||
{
|
// {
|
||||||
label: '确认运行至前方站',
|
// label: '确认运行至前方站',
|
||||||
handler: this.nextStation
|
// handler: this.nextStation
|
||||||
},
|
// },
|
||||||
// {
|
// {
|
||||||
// label: '越引导信号行驶',
|
// label: '越引导信号行驶',
|
||||||
// handler: this.handleOverFuideSignal
|
// handler: this.handleOverFuideSignal
|
||||||
|
@ -233,6 +233,12 @@ export default {
|
|||||||
this.cancelBigScreenMode();
|
this.cancelBigScreenMode();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
'$store.state.map.mapDataLoadedCount':function(val) {
|
||||||
|
const roleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT'];
|
||||||
|
if (roleList.includes(this.$store.state.training.roles)) {
|
||||||
|
this.stationRoleShow(this.showStation);
|
||||||
|
}
|
||||||
|
},
|
||||||
'$store.state.map.mapViewLoadedCount': function () { // 地图视图加载完成标识
|
'$store.state.map.mapViewLoadedCount': function () { // 地图视图加载完成标识
|
||||||
this.mapViewLoadedOver = true;
|
this.mapViewLoadedOver = true;
|
||||||
this.showSelectStation && this.setShowStation(this.showStation);
|
this.showSelectStation && this.setShowStation(this.showStation);
|
||||||
@ -420,7 +426,6 @@ export default {
|
|||||||
// 仿真系统
|
// 仿真系统
|
||||||
async initLoadDemonData() {
|
async initLoadDemonData() {
|
||||||
if (this.lineCode) {
|
if (this.lineCode) {
|
||||||
// 01 现地 02 行调 '' 观众
|
|
||||||
let resp = {data: {}};
|
let resp = {data: {}};
|
||||||
resp = await this.getUserRole();
|
resp = await this.getUserRole();
|
||||||
if (resp && resp.code == 200) {
|
if (resp && resp.code == 200) {
|
||||||
@ -434,31 +439,8 @@ export default {
|
|||||||
handleDialogShow(type) {
|
handleDialogShow(type) {
|
||||||
this.$refs[type].doShow();
|
this.$refs[type].doShow();
|
||||||
},
|
},
|
||||||
// 设置prdType和role
|
stationRoleShow(deviceCode) {
|
||||||
setSimulationPrdType(deviceCode) {
|
|
||||||
// Dispatcher 行调 STATION_SUPERVISOR 车站 Audience 观众 Driver 司机 MAINTAINER 通号
|
|
||||||
this.showStation = '';
|
|
||||||
const pictureLineCodeList = ['16'];
|
const pictureLineCodeList = ['16'];
|
||||||
let tempData;
|
|
||||||
let dataZoom;
|
|
||||||
switch (this.userRole) {
|
|
||||||
case 'DISPATCHER':
|
|
||||||
this.$store.dispatch('training/setPrdType', '02');
|
|
||||||
this.$store.dispatch('training/setRoles', 'DISPATCHER');
|
|
||||||
this.hideIbp();
|
|
||||||
this.drivingShow = false;
|
|
||||||
// this.changePrdType('02');
|
|
||||||
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
|
||||||
this.mapViewLoadedOver && this.setShowStation('');
|
|
||||||
this.jl3dmaintainershow = false;
|
|
||||||
break;
|
|
||||||
case 'STATION_SUPERVISOR':
|
|
||||||
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
|
|
||||||
this.$store.dispatch('training/setPrdType', '01');
|
|
||||||
this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
|
|
||||||
this.$refs.menuSchema.chiShowStation = deviceCode;
|
|
||||||
this.showStation = deviceCode;
|
|
||||||
// this.changePrdType('01');
|
|
||||||
if (this.lineCode === '14') {
|
if (this.lineCode === '14') {
|
||||||
const list = [];
|
const list = [];
|
||||||
const mapDevice = this.$store.state.map.mapDevice;
|
const mapDevice = this.$store.state.map.mapDevice;
|
||||||
@ -491,6 +473,32 @@ export default {
|
|||||||
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
||||||
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
|
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 设置prdType和role
|
||||||
|
setSimulationPrdType(deviceCode) {
|
||||||
|
// Dispatcher 行调 STATION_SUPERVISOR 车站 Audience 观众 Driver 司机 MAINTAINER 通号
|
||||||
|
this.showStation = '';
|
||||||
|
let tempData;
|
||||||
|
let dataZoom;
|
||||||
|
switch (this.userRole) {
|
||||||
|
case 'DISPATCHER':
|
||||||
|
this.$store.dispatch('training/setPrdType', '02');
|
||||||
|
this.$store.dispatch('training/setRoles', 'DISPATCHER');
|
||||||
|
this.hideIbp();
|
||||||
|
this.drivingShow = false;
|
||||||
|
// this.changePrdType('02');
|
||||||
|
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
||||||
|
this.mapViewLoadedOver && this.setShowStation('');
|
||||||
|
this.jl3dmaintainershow = false;
|
||||||
|
break;
|
||||||
|
case 'STATION_SUPERVISOR':
|
||||||
|
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
|
||||||
|
this.$store.dispatch('training/setPrdType', '01');
|
||||||
|
this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
|
||||||
|
this.$refs.menuSchema.chiShowStation = deviceCode;
|
||||||
|
this.showStation = deviceCode;
|
||||||
|
// this.changePrdType('01');
|
||||||
|
this.stationRoleShow(deviceCode);
|
||||||
this.jl3dmaintainershow = false;
|
this.jl3dmaintainershow = false;
|
||||||
this.drivingShow = false;
|
this.drivingShow = false;
|
||||||
break;
|
break;
|
||||||
@ -500,17 +508,7 @@ export default {
|
|||||||
this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT');
|
this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT');
|
||||||
this.$refs.menuSchema.chiShowStation = deviceCode;
|
this.$refs.menuSchema.chiShowStation = deviceCode;
|
||||||
this.showStation = deviceCode;
|
this.showStation = deviceCode;
|
||||||
if (this.lineCode === '14') {
|
this.stationRoleShow(deviceCode);
|
||||||
const list = [];
|
|
||||||
const mapDevice = this.$store.state.map.mapDevice;
|
|
||||||
this.$jlmap.setMap(this.$store.state.map.map, this.$store.state.map.mapDevice, {routeDate: this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData});
|
|
||||||
for (const key in mapDevice) {
|
|
||||||
list.push(mapDevice[key]);
|
|
||||||
}
|
|
||||||
this.$jlmap.updateShowMode(list, '02');
|
|
||||||
}
|
|
||||||
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
|
|
||||||
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
|
|
||||||
this.jl3dmaintainershow = false;
|
this.jl3dmaintainershow = false;
|
||||||
this.drivingShow = false;
|
this.drivingShow = false;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user