Merge remote-tracking branch 'origin/test'

# Conflicts:
#	src/jmapNew/theme/datie_02/menus/menuButton.vue
This commit is contained in:
joylink_zhangsai 2022-08-04 21:08:53 +08:00
commit 76de50fc6a
122 changed files with 8313 additions and 1755 deletions

View File

@ -89,10 +89,12 @@ export default {
} }
}); });
this.$nextTick(() => { this.$nextTick(() => {
this.subscribe();
openIndexedDB(); openIndexedDB();
}); });
}, },
beforeDestroy() {
this.$store.dispatch('subscribe_un', {});
},
methods: { methods: {
resizeHandler() { resizeHandler() {
this.$store.dispatch('app/resize', { width: this._clientWidth, height: this._clientHeight }); this.$store.dispatch('app/resize', { width: this._clientWidth, height: this._clientHeight });
@ -110,14 +112,6 @@ export default {
this.$store.dispatch('socket/setSimulationInvite'); this.$store.dispatch('socket/setSimulationInvite');
this.$store.dispatch('socket/setRoomInvite'); this.$store.dispatch('socket/setRoomInvite');
} }
},
subscribe() {
const token = getToken();
const path = window.location.pathname;
if (token && this.$route.path != '/404' && !path.endsWith('login')) {
const header = { group: '', 'X-Token': token };
this.$store.dispatch('subscribe', {header, type: getSessionStorage('project')});
}
} }
} }
}; };

View File

@ -56,7 +56,7 @@ export function deleteAllMap() {
return request({ return request({
url: `/api/mapBuild/delete/all`, url: `/api/mapBuild/delete/all`,
method: 'delete' method: 'delete'
}) });
} }
/** 保存草稿地图*/ /** 保存草稿地图*/
@ -659,6 +659,15 @@ export function deleteBigRoute(mapId, code) {
}); });
} }
// 大铁地图进路修改接口
export function editBigRoute(data, mapId, code ) {
return request({
url: `/api/draftMap/${mapId}/route/${code}`,
method: 'put',
data
});
}
// 草稿地图修改检查配置接口 // 草稿地图修改检查配置接口
export function checkConfig(mapId, data) { export function checkConfig(mapId, data) {
return request({ return request({

View File

@ -284,6 +284,15 @@ export function getEveryDayRunPlanNew(group) {
}); });
} }
/** 大铁线路 修改系统时间 */
export function modifySystemTime(data, group) {
return request({
url: `simulation/${group}/modifySystemTime`,
method: 'PUT',
data: data
});
}
/** 新版地图按计划行车 */ /** 新版地图按计划行车 */
export function ranAsPlan(data, group) { export function ranAsPlan(data, group) {
return request({ return request({
@ -513,3 +522,10 @@ export function queryIscsResourcesByGroup(group, params) {
params params
}); });
} }
/** 获取机器人驾驶参数 */
export function getRobotDrivingParam(simulationId, groupNumber) {
return request({
url: `/simulation/${simulationId}/driveParam/${groupNumber}`,
method: 'get'
});
}

View File

@ -493,6 +493,7 @@ export default {
endSectionCodeColon: 'Terminal stop:', endSectionCodeColon: 'Terminal stop:',
routePreview: 'In the preview', routePreview: 'In the preview',
routeEdit: 'Route edit',
accessType: 'Access property type', accessType: 'Access property type',
automaticAccessType: 'Automatic access type', automaticAccessType: 'Automatic access type',
nearSectionCode: 'Close to segment name', nearSectionCode: 'Close to segment name',

View File

@ -435,6 +435,7 @@ export default {
endSectionCodeColon: '终端停车点:', endSectionCodeColon: '终端停车点:',
routePreview: '进路预览', routePreview: '进路预览',
routeEdit: '进路编辑',
accessType: '是否折返进路', accessType: '是否折返进路',
nearSectionCode: '接近区段名称', nearSectionCode: '接近区段名称',
continueProtectSwitchData: '延续保护道岔', continueProtectSwitchData: '延续保护道岔',

View File

@ -89,7 +89,7 @@ class SkinCode extends defaultStyle {
unCommunicationOccupiedColor: '#FF0000', // 区段非通讯车占用颜色 (红色) unCommunicationOccupiedColor: '#FF0000', // 区段非通讯车占用颜色 (红色)
routeLockColor: '#FFFFFF', // 区段进路锁定颜色 (白色) routeLockColor: '#FFFFFF', // 区段进路锁定颜色 (白色)
faultLockColor: '#006400', // 区段故障锁定颜色 faultLockColor: '#00FF00', // 区段故障锁定颜色
undefinedColor: '#0071C1', // 区段未定义颜色 undefinedColor: '#0071C1', // 区段未定义颜色
blockColor: '#00FF00', // 区段封锁颜色 blockColor: '#00FF00', // 区段封锁颜色
@ -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, // 信号灯边框可变

File diff suppressed because it is too large Load Diff

View File

@ -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', // 无电颜色

View File

@ -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, // 信号灯边框可变

View File

@ -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',

View File

@ -85,15 +85,20 @@ class Jlmap {
} }
reloadStyle(lineCode) { reloadStyle(lineCode) {
if (this.lineCode !== lineCode) { if (this.lineCode !== lineCode) {
this.handleModelData(this.lineCode, lineCode); this.reloadModelData(this.lineCode, lineCode);
} }
this.lineCode = lineCode; this.lineCode = lineCode;
this.style = selectLineCode(lineCode); this.style = selectLineCode(lineCode);
this.$zr.dom.style.backgroundColor = this.style.backgroundColor || '#000'; this.$zr.dom.style.backgroundColor = this.style.backgroundColor || '#000';
} }
// 处理私有属性 // 处理私有属性
handleModelData(oldLineCode, lineCode) { reloadModelData(oldLineCode, lineCode) {
const propConvert = lineCode ? Vue.prototype.$theme.loadPropConvert(lineCode) : null;
const oldPropConvert = oldLineCode ? Vue.prototype.$theme.loadPropConvert(oldLineCode) : null;
for (const deviceCode in this.mapDevice) {
oldPropConvert.deletePrivateProps(this.mapDevice[deviceCode]);
propConvert.initPrivateProps(this.mapDevice[deviceCode]);
}
} }
loadDefaultState() { // 加载默认状态 loadDefaultState() { // 加载默认状态
const defaultStateDict = {}; const defaultStateDict = {};

View File

@ -23,7 +23,7 @@ export default class Resource extends Group {
this.create(); this.create();
} }
create() { create() { // 58
const model = this.model; const model = this.model;
this.image = new Image({ this.image = new Image({
zlevel: this.zlevel, zlevel: this.zlevel,

View File

@ -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 {
} }
} }
} }
} }
} }
} }

View File

@ -596,6 +596,7 @@ class Signal extends Group {
if (this.count == 2) { // 双灯 if (this.count == 2) { // 双灯
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor); this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor);
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor); this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor);
this.lamps[1] && this.style.Signal.lamp.darkColor && this.lamps[1].setBorderColor(this.style.Signal.lamp.darkColor);
} else if (this.count == 1) { // 单灯 } else if (this.count == 1) { // 单灯
if (this.model.useType == '05' && this.lamps[0]) { // 调车信号机 if (this.model.useType == '05' && this.lamps[0]) { // 调车信号机
this.lamps[0].setColor(this.style.Signal.lamp.blueColor); this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
@ -721,6 +722,10 @@ class Signal extends Group {
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.whiteColor); this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.whiteColor);
this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.redColor); this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.redColor);
} }
greenYellow() {
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
this.lamps[1] && this.lamps[1].setColor(this.style.Signal.lamp.greenColor);
}
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);
@ -744,7 +749,9 @@ class Signal extends Group {
} }
// 封锁 // 封锁
block() { block() {
if (!this.style.Signal.lamp.notBlock) { // 大铁线路 对信号机封锁操作,不影响信号显示 其他线路正常
this.lamps[0].setColor(this.style.Signal.lamp.redColor); 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);
} }
@ -992,7 +999,6 @@ class Signal extends Group {
} else if (this.style.Signal.lamp.faultType == 'light') { } else if (this.style.Signal.lamp.faultType == 'light') {
this.lamps && this.lamps[0] && this.lamps[0].setAnimationEnd(); this.lamps && this.lamps[0] && this.lamps[0].setAnimationEnd();
} }
this.insideTriangle && this.insideTriangle.setStyle({fill: this.style.Signal.insideTriangle.startSignalColor, stroke: this.style.Signal.insideTriangle.strokeColor}); this.insideTriangle && this.insideTriangle.setStyle({fill: this.style.Signal.insideTriangle.startSignalColor, stroke: this.style.Signal.insideTriangle.strokeColor});
this.insideTriangle && this.insideTriangle.hide(); this.insideTriangle && this.insideTriangle.hide();
this.sigPost && this.sigPost.removeTerminalOptional(); this.sigPost && this.sigPost.removeTerminalOptional();
@ -1076,6 +1082,10 @@ class Signal extends Group {
this.redWhite(); this.redWhite();
break; break;
} }
case 'GY': {
this.greenYellow();
break;
}
default: { default: {
this.close(model.logicLight); // 信号关闭 this.close(model.logicLight); // 信号关闭
break; break;
@ -1163,7 +1173,7 @@ class Signal extends Group {
// 灯颜色状态显示 // 灯颜色状态显示
exec(SignalAspectMap[model.signalAspect], this.lamps, this.style); exec(SignalAspectMap[model.signalAspect], this.lamps, this.style);
// 灯是否点灯显示 // 灯是否点灯显示
this.lamps.forEach(lamp => { lamp.setStop(model.signalLight); }); // this.lamps.forEach(lamp => { lamp.setStop(model.signalLight); });
} }
if (model.hasSelected) { if (model.hasSelected) {
this.sigName && this.sigName.setAnimationStart(this.style.Signal.text.defaultColor); this.sigName && this.sigName.setAnimationStart(this.style.Signal.text.defaultColor);

View File

@ -1,64 +1,53 @@
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.z = 0
this.model = model; this.model = model
this.style = style; this.style = style
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()
// 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 => {
// return item.includes('ctc');
// });
// const ctcArcList = ['OCCLUSION', 'RECOVERY', 'CHANGE_DIRECTION', 'ACCIDENT', 'DEPART_ASSIST', 'PICK_ASSIST', 'ASSIST'];
const typeList = [];
// debugger;
// console.log(model.type);
// if (queryCtc && ctcArcList.includes(model.type)) {
// // debugger;
// this.arcShape = new Arc({
// zlevel: this.zlevel,
// z: this.z,
// shape: {
// cx: computedPosition.x + 7,
// cy: computedPosition.y + 7,
// r: 7
// },
// style: {
// stroke: '#69666E',
// lineWidth: 1,
// fill: fillColor
// }
// });
// this.add(this.arcShape);
// } else
if (this.style.SignalButton &&
this.style.SignalButton.shape === 'roundWithDock' &&
typeList.includes(model.type)) {
const circle1 = new Circle({ const circle1 = new Circle({
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z + 2, z: this.z + 2,
@ -72,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,
@ -84,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,
@ -96,9 +85,13 @@ export default class SignalButton extends Group {
style: { style: {
fill: '#eee' fill: '#eee'
} }
}); })
this.arcShape = circle1; this.arcShape = circle1
this.add(circle1).add(circle2).add(circle3); this.arcShapeDock1 = circle2
this.arcShapeDock2 = circle3
this.add(circle1)
.add(circle2)
.add(circle3)
} else { } else {
this.rectButton = new Rect({ this.rectButton = new Rect({
zlevel: this.zlevel, zlevel: this.zlevel,
@ -115,8 +108,8 @@ export default class SignalButton extends Group {
lineWidth: 1, lineWidth: 1,
fill: fillColor fill: fillColor
} }
}); })
this.add(this.rectButton); this.add(this.rectButton)
} }
this.leftLine = new Line({ this.leftLine = new Line({
zlevel: this.zlevel, zlevel: this.zlevel,
@ -131,9 +124,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,
@ -147,9 +140,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,
@ -163,9 +156,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,
@ -179,9 +172,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,
@ -195,9 +188,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,
@ -211,11 +204,11 @@ 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)) { 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,
z: this.z, z: this.z,
@ -230,109 +223,111 @@ export default class SignalButton extends Group {
textAlign: 'middle', textAlign: 'middle',
textVerticalAlign: 'top' textVerticalAlign: 'top'
} }
}); })
this.add(this.buttonText); 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() { startAnimate() {
this.rectButton && this.rectButton.animateStyle(true) this.rectButton &&
this.rectButton
.animateStyle(true)
.when(0, { fill: '#000' }) .when(0, { fill: '#000' })
.when(1000, { fill: this.getTypeColor() }) .when(1000, { fill: this.getTypeColor() })
.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() {
let color = ''; if (this.style.SignalButton && this.style.SignalButton.fillColor && typeList.includes(this.model.type)) {
const list = ['ASSIST', 'ACCIDENT', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION']; return this.style.SignalButton.fillColor
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; 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() { 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.buttonText && this.buttonText.show(); this.arcShapeDock1 && this.arcShapeDock1.show()
this.leftBoard && this.leftBoard.hide(); this.arcShapeDock2 && this.arcShapeDock2.show()
this.rightBoard && this.rightBoard.hide(); this.buttonText && this.buttonText.show()
this.topBoard && this.topBoard.hide(); this.leftBoard && this.leftBoard.hide()
this.bottomBoard && this.bottomBoard.hide(); this.rightBoard && this.rightBoard.hide()
this.topBoard && this.topBoard.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' })
// 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 { } else {
this.rectButton.setStyle({ fill:this.getTypeColor() }); this.rectButton.setStyle({ fill: this.getTypeColor() })
// this.arcFlash.stopAnimation(false);
// this.arcFlash.hide();
} }
} }
} }
// let
// { 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.arcShapeDock2 && this.arcShapeDock2.hide()
} else { } else {
if (model.hasSelected) { if (model.hasSelected) {
this.startAnimate(); this.startAnimate()
} }
} }
} }
getAnchorPoint() { pressDown(flg, color) {
if (this.pressed === flg) return
if (this.arcShapeDock1) {
if (flg) {
this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy + 2 }, z: this.z + 2, zlevel: this.zlevel })
if (color) {
this.arcShape
.animateStyle(true)
.when(0, { fill: '#69666E' })
.when(1000, { fill: color })
.when(2000, { fill: '#69666E' })
.start()
}
} else {
this.arcShape.attr({ shape: { cy: this.arcShape.shape.cy - 2 }, z: this.z + 2, zlevel: this.zlevel })
this.arcShape.stopAnimation(true)
this.recover()
}
this.pressed = flg
} }
} }
getAnchorPoint() {}
}

View File

@ -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 })
} }
} }

View File

@ -481,16 +481,26 @@ 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];
if (this.style.SwitchFault.lamp.switchState) {
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); switchFault.instance.setControlColor('#F00', true);
} else if (this.model.switchFaultCode) { } else {
const switchFault = this.mapDevice[this.model.switchFaultCode];
switchFault.instance.setControlColor(this.style.backgroundColor, false); switchFault.instance.setControlColor(this.style.backgroundColor, false);
} }
}
}
// stopAnimation // stopAnimation
this.shapeModelB.stopAnimation(false); this.shapeModelB.stopAnimation(false);
this.shapeModelC.stopAnimation(false); this.shapeModelC.stopAnimation(false);
@ -803,7 +813,7 @@ export default class Switch extends Group {
this.setAshShow(); this.setAshShow();
} }
} else { } else {
this.setSwitchFault(model.fault); this.setSwitchFault(model);
// model.pos == 'NO' || model.pos == 'EX'; // model.pos == 'NO' || model.pos == 'EX';
// N-定位 R-反位 NO-无(失表) EX-挤叉 // N-定位 R-反位 NO-无(失表) EX-挤叉

View File

@ -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);

View File

@ -246,16 +246,16 @@ export default {
label: '开关门', label: '开关门',
handler: this.handleOpenOrCloseDoor handler: this.handleOpenOrCloseDoor
}, },
{ // {
label: '限速指令', // label: '',
handler: this.handleSpeedLimit // handler: this.handleSpeedLimit
}, // },
{ {
label: '换端', label: '换端',
handler: this.handleTurnDirection handler: this.handleTurnDirection
}, },
{ {
label: '驾驶', label: '驾驶',
handler: this.handleDriveTo handler: this.handleDriveTo
}, },
{ {
@ -450,7 +450,7 @@ export default {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },
// //
handleDriveTo() { handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {

View File

@ -43,9 +43,9 @@ class Model {
initPublicProps(model) { initPublicProps(model) {
if (model) { if (model) {
var modelInitial = this.public[model._type]; const modelInitial = this.public[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -56,9 +56,9 @@ class Model {
initPrivateProps(model) { initPrivateProps(model) {
if (model) { if (model) {
var modelInitial = this.private[model._type]; const modelInitial = this.private[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -66,6 +66,16 @@ class Model {
return model; return model;
} }
deletePrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
delete model[prop];
}
}
}
}
} }
export default new Model(); export default new Model();

View File

@ -159,16 +159,16 @@ export default {
label: '开关门', label: '开关门',
handler: this.handleOpenOrCloseDoor handler: this.handleOpenOrCloseDoor
}, },
{ // {
label: '限速指令', // label: '',
handler: this.handleSpeedLimit // handler: this.handleSpeedLimit
}, // },
{ {
label: '换端', label: '换端',
handler: this.handleTurnDirection handler: this.handleTurnDirection
}, },
{ {
label: '驾驶', label: '驾驶',
handler: this.handleDriveTo handler: this.handleDriveTo
}, },
{ {
@ -346,7 +346,7 @@ export default {
handleSpeedLimit() { // handleSpeedLimit() { //
this.$refs.speedLimit.doShow(this.selected); this.$refs.speedLimit.doShow(this.selected);
}, },
// //
handleDriveTo() { handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {

View File

@ -46,9 +46,9 @@ class Model {
initPublicProps(model) { initPublicProps(model) {
if (model) { if (model) {
var modelInitial = this.public[model._type]; const modelInitial = this.public[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -59,9 +59,9 @@ class Model {
initPrivateProps(model) { initPrivateProps(model) {
if (model) { if (model) {
var modelInitial = this.private[model._type]; const modelInitial = this.private[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -69,6 +69,16 @@ class Model {
return model; return model;
} }
deletePrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
delete model[prop];
}
}
}
}
} }
export default new Model(); export default new Model();

View File

@ -142,16 +142,16 @@ export default {
label: '开关门', label: '开关门',
handler: this.handleOpenOrCloseDoor handler: this.handleOpenOrCloseDoor
}, },
{ // {
label: '限速指令', // label: '',
handler: this.handleSpeedLimit // handler: this.handleSpeedLimit
}, // },
{ {
label: '换端', label: '换端',
handler: this.handleTurnDirection handler: this.handleTurnDirection
}, },
{ {
label: '驾驶', label: '驾驶',
handler: this.handleDriveTo handler: this.handleDriveTo
}, },
{ {
@ -317,7 +317,7 @@ export default {
handleSpeedLimit() { // handleSpeedLimit() { //
this.$refs.speedLimit.doShow(this.selected); this.$refs.speedLimit.doShow(this.selected);
}, },
// //
handleDriveTo() { handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {

View File

@ -43,9 +43,9 @@ class Model {
initPublicProps(model) { initPublicProps(model) {
if (model) { if (model) {
var modelInitial = this.public[model._type]; const modelInitial = this.public[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -56,9 +56,9 @@ class Model {
initPrivateProps(model) { initPrivateProps(model) {
if (model) { if (model) {
var modelInitial = this.private[model._type]; const modelInitial = this.private[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -66,6 +66,16 @@ class Model {
return model; return model;
} }
deletePrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
delete model[prop];
}
}
}
}
} }
export default new Model(); export default new Model();

View File

@ -16,6 +16,20 @@
<el-row> <el-row>
<el-form ref="form" :model="formModel" :rules="rules"> <el-form ref="form" :model="formModel" :rules="rules">
<el-col :span="24"> <el-col :span="24">
<el-form-item prop="speedLimit" label="限速:">
<el-input v-model="formModel.speedLimit" style="width: 115px;margin-right: 10px;" size="small" />
<span>km/h</span>
<el-tooltip style="margin-left: 10px;" effect="dark" content="值为5-65之间不填为取消限速" placement="top-start">
<i class="el-icon-warning" />
</el-tooltip>
</el-form-item>
<el-form-item prop="through" label="">
<el-radio-group v-model="formModel.through">
<el-radio :label="1">越红灯行驶</el-radio>
<el-radio :label="2">越引导行驶</el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="targetDeviceCode" label="目的地:"> <el-form-item prop="targetDeviceCode" label="目的地:">
<el-select ref="faultSelect1" v-model="formModel.targetDeviceCode" filterable size="small" style="height: 32px;line-height: 32px;" placeholder="请选择"> <el-select ref="faultSelect1" v-model="formModel.targetDeviceCode" filterable size="small" style="height: 32px;line-height: 32px;" placeholder="请选择">
<el-option <el-option
@ -85,6 +99,7 @@ import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config'; import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
import { menuOperate } from '@/jmapNew/theme/components/utils/menuOperate'; import { menuOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { getRobotDrivingParam } from '@/api/simulation';
export default { export default {
name: 'SwitchControl', name: 'SwitchControl',
@ -109,6 +124,8 @@ export default {
faultList: [], faultList: [],
form: { faultType: ''}, form: { faultType: ''},
formModel: { formModel: {
speedLimit: '',
through: 0,
targetDeviceCode: '' targetDeviceCode: ''
}, },
groupNumber: '', groupNumber: '',
@ -146,7 +163,7 @@ export default {
} else if (this.operation == OperationEvent.MixinCommand.cancelStoppage.menu.operation) { } else if (this.operation == OperationEvent.MixinCommand.cancelStoppage.menu.operation) {
return '取消故障'; return '取消故障';
} else if (this.operation == OperationEvent.MixinCommand.collocation.menu.operation) { } else if (this.operation == OperationEvent.MixinCommand.collocation.menu.operation) {
return '驾驶'; return '驾驶';
} }
return ''; return '';
} }
@ -203,7 +220,8 @@ export default {
]; ];
} else if (selected._type === 'Section' && this.popClass === 'datie-02__systerm') { } else if (selected._type === 'Section' && this.popClass === 'datie-02__systerm') {
this.faultList = [ this.faultList = [
{label: '电路故障', value: 'FAULT'} {label: '电路故障', value: 'FAULT'},
{label: '故障锁闭', value: 'FAULT_LOCK'}
// {label: '', value: 'CBTC_OCCUPIED_FAULT'} // {label: '', value: 'CBTC_OCCUPIED_FAULT'}
]; ];
} else if (selected._type === 'Switch' && this.popClass === 'haerbin-01__systerm') { } else if (selected._type === 'Switch' && this.popClass === 'haerbin-01__systerm') {
@ -220,7 +238,7 @@ export default {
{label: '失表', value: 'SPLIT'}, {label: '失表', value: 'SPLIT'},
{label: '定位失表', value: 'NORMAL_SPLIT'}, {label: '定位失表', value: 'NORMAL_SPLIT'},
{label: '反位失表', value: 'REVERSE_SPLIT'}, {label: '反位失表', value: 'REVERSE_SPLIT'},
// {label: '', value: 'SQUEEZE'}, {label: '挤岔', value: 'SQUEEZE'},
// {label: '', value: 'CBTC_OCCUPIED_FAULT'}, // {label: '', value: 'CBTC_OCCUPIED_FAULT'},
{label: '电路故障', value: 'AXLE_FAULT'} {label: '电路故障', value: 'AXLE_FAULT'}
]; ];
@ -277,6 +295,11 @@ export default {
if (judge) { if (judge) {
this.judge = judge; this.judge = judge;
this.groupNumber = selected.groupNumber; this.groupNumber = selected.groupNumber;
getRobotDrivingParam(this.$route.query.group, this.groupNumber).then(resp => {
this.formModel.speedLimit = resp.data.speedLimit ? resp.data.speedLimit : '';
this.formModel.through = resp.data.through;
this.formModel.targetDeviceCode = resp.data.targetDeviceCode ? resp.data.targetDeviceCode : '';
});
} }
} }
if (selected._type) { if (selected._type) {
@ -344,8 +367,12 @@ export default {
cmdType: menuOperate.Common.collocation.cmdType, cmdType: menuOperate.Common.collocation.cmdType,
param: { param: {
groupNumber: this.groupNumber, groupNumber: this.groupNumber,
param: {
speedLimit: this.formModel.speedLimit,
through: this.formModel.through,
targetDeviceCode: this.formModel.targetDeviceCode targetDeviceCode: this.formModel.targetDeviceCode
} }
}
}; };
this.sendCommand(setp); this.sendCommand(setp);
}, },

View File

@ -45,7 +45,7 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; // import { commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
import {menuOperate, commitOperate} from '../../utils/menuOperate'; import {menuOperate, commitOperate} from '../../utils/menuOperate';
export default { export default {
name: 'SwitchHookLock', name: 'SwitchHookLock',
@ -125,8 +125,8 @@ export default {
}, },
commit() { commit() {
this.loading = true; this.loading = true;
if (this.operation) { // if (this.operation) {
commitOperate(menuOperate.Switch.hookLock, {normal: this.normal}, 2).then(({valid})=>{ commitOperate(menuOperate.Switch.hookLock, {normal: this.normal, switchCode: this.selected.code}, 2).then(({valid})=>{
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -137,25 +137,25 @@ export default {
console.error(error); console.error(error);
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
} else { // } else {
const group = this.$route.query.group; // const group = this.$route.query.group;
const param = { // const param = {
commandType: 'Switch_Hook_Lock', // commandType: 'Switch_Hook_Lock',
// Switch_Hook_Lock // // Switch_Hook_Lock
targetMemberId: this.targetMemberId, // targetMemberId: this.targetMemberId,
params: { // params: {
switchCode: this.selected.code, // switchCode: this.selected.code,
normal: this.normal // normal: this.normal
} // }
}; // };
commitTrainSend(group, param).then(({valid, operate})=>{ // commitTrainSend(group, param).then(({valid, operate})=>{
this.doClose(); // this.doClose();
}).catch((error) => { // }).catch((error) => {
console.error(error); // console.error(error);
this.$refs.noticeInfo.doShow(); // this.$refs.noticeInfo.doShow();
this.doClose(); // this.doClose();
}); // });
} // }
} }
} }

View File

@ -15,7 +15,7 @@
<div style="width: 96%;"> <div style="width: 96%;">
<el-form-item label="限速值:" label-width="95px" prop="speedLimit"> <el-form-item label="限速值:" label-width="95px" prop="speedLimit">
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<el-input v-model="addModel.speedLimit" style="width: 130px;margin-right: 10px;" size="small" /> <el-input v-model="addModel.speedLimit" style="width: 115px;margin-right: 10px;" size="small" />
<span>km/h</span> <span>km/h</span>
<el-tooltip style="margin-left: 10px;" effect="dark" content="值为5-65之间-1为取消限速" placement="top-start"> <el-tooltip style="margin-left: 10px;" effect="dark" content="值为5-65之间-1为取消限速" placement="top-start">
<i class="el-icon-warning" /> <i class="el-icon-warning" />
@ -135,7 +135,7 @@ export default {
}; };
commitTrainSend(group, param).then(({valid, operate})=>{ commitTrainSend(group, param).then(({valid, operate})=>{
this.doClose(); this.doClose();
}).catch((error) => { }).catch(() => {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
this.doClose(); this.doClose();
}); });

View File

@ -0,0 +1,133 @@
<template>
<el-dialog
v-dialogDrag
:class="popClass"
class="stand-stop-time"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="80px" :model="addModel" @submit.native.prevent>
<div style="width: 96%;">
<el-form-item label="是否EB:" label-width="95px" prop="speedLimit">
<div style="display: flex;align-items: center;">
<el-checkbox v-model="addModel.eb" />
</div>
</el-form-item>
</div>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button @click="doClose"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" :pop-class="popClass" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import NoticeInfo from '../childDialog/noticeInfo';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'TrainAddPlan',
components: {
NoticeInfo
},
props: {
popClass: {
type: String,
default() {
return '';
}
}
},
data() {
return {
selected: {},
addModel: {
eb: false //
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('training', [
'memberList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '输入限速值';
}
},
watch:{
'$store.state.map.keyboardEnterCount': function (val) {
if (this.dialogShow && this.popClass === 'ningbo-01__systerm') {
this.commit();
}
}
},
mounted() {
},
methods: {
doShow(operate, selected) {
this.selected = selected;
this.groupNumber = selected.groupNumber;
this.addModel = { eb:false };
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$root.$emit('dialogClose', this.selected);
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
console.log(this.groupNumber, '----------');
commitOperate(menuOperate.Train.driverStop, {groupNumber:this.groupNumber, eb: this.addModel.eb}, 3)
.then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
})
.catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
}
}
};
</script>
<style scoped>
.foshan-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -526,6 +526,15 @@ export const menuOperate = {
// 删车次号 (大铁线路 车组号) // 删车次号 (大铁线路 车组号)
operation: OperationEvent.Train.removeTrip.menu.operation, operation: OperationEvent.Train.removeTrip.menu.operation,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
},
driverStop: {
operation: OperationEvent.Train.driverStop.menu.operation,
cmdType: CMD.Driver.CMD_DRIVER_STOP
},
// 换端
turnDirection:{
operation: OperationEvent.Train.turnDirection.menu.operation,
cmdType: CMD.Driver.CMD_DRIVER_CHANGE_HEAD
} }
}, },
CTC: { CTC: {

View File

@ -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];

View File

@ -43,22 +43,21 @@ class Model {
initPublicProps(model) { initPublicProps(model) {
if (model) { if (model) {
var modelInitial = this.public[model._type]; const modelInitial = this.public[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
} }
return model; return model;
} }
initPrivateProps(model) { initPrivateProps(model) {
if (model) { if (model) {
var modelInitial = this.private[model._type]; const modelInitial = this.private[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -66,6 +65,17 @@ class Model {
return model; return model;
} }
deletePrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
delete model[prop];
}
}
}
}
} }
export default new Model(); export default new Model();

View File

@ -110,7 +110,6 @@ export default {
window.document.oncontextmenu = function () { window.document.oncontextmenu = function () {
return false; return false;
}; };
console.log(this.mapData, '---------------');
if (this.mapData && this.mapData.skinVO) { if (this.mapData && this.mapData.skinVO) {
const parser = parserFactory(ParserType.Graph.value); const parser = parserFactory(ParserType.Graph.value);
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig()); this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());

View File

@ -141,6 +141,7 @@ export default {
}, },
doShow(selected, type) { doShow(selected, type) {
// this.$root.$emit('dialogOpen', selected); // this.$root.$emit('dialogOpen', selected);
if (!this.mapData) { this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map)); }
this.selected = selected; this.selected = selected;
this.type = type; this.type = type;
this.dialogShow = true; this.dialogShow = true;
@ -152,7 +153,6 @@ export default {
loadData() { loadData() {
this.beforeSwitchList = []; this.beforeSwitchList = [];
this.beforeSectionList = []; this.beforeSectionList = [];
if (this.mapData) {
this.$refs.map.loadData(this.mapData); this.$refs.map.loadData(this.mapData);
setTimeout(() => { setTimeout(() => {
if (this.type === 'rec') { if (this.type === 'rec') {
@ -161,8 +161,6 @@ export default {
this.clickEvent(this.selected.departureRouteCode); this.clickEvent(this.selected.departureRouteCode);
} }
}, 100); }, 100);
}
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;

View File

@ -33,7 +33,7 @@
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">与中心通信正常</div> <div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">与中心通信正常</div>
</div> </div>
</div> </div>
<div v-if="$store.state.training.prdType == '01'&& !isCtc" style="width: 1405px;position: fixed;height: 30px;background: #808080;z-index: 9;bottom: 0;left: 0;display: flex;"> <div v-if="$store.state.training.prdType == '01'&& !isCtc" style="width: 1560px;position: fixed;height: 30px;background: #808080;z-index: 9;bottom: 0;left: 0;display: flex;">
<div style="width: 60%;height: 30px;line-height: 30px;text-align: center;">提示信息窗</div> <div style="width: 60%;height: 30px;line-height: 30px;text-align: center;">提示信息窗</div>
<div style="width: 40%;height: 30px;line-height: 30px;text-align: center;border-left: 2px #ccc solid;">{{ '操控A:主机' + ' ' + dateString + ' ' + time }}</div> <div style="width: 40%;height: 30px;line-height: 30px;text-align: center;border-left: 2px #ccc solid;">{{ '操控A:主机' + ' ' + dateString + ' ' + time }}</div>
</div> </div>

View File

@ -71,24 +71,24 @@
<center><b>道岔解封</b></center> <center><b>道岔解封</b></center>
</span> </span>
</button> </button>
<!--<button :id="Signal.signalLight.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalLight.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.signalDestroy.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalDestroy.menuButton.operation, ['Signal'])">--> <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="Command.cancel.clearMbm.domId" :disabled="true" class="button_box" style="cursor: not-allowed;" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Command.cancel.clearMbm.operation)"> <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: #808080"> <span style="color:#800000">
<center><b>上电解锁</b></center> <center><b>上电解锁</b></center>
</span> </span>
</button> </button>
@ -98,9 +98,9 @@
<center><b>辅助菜单</b></center> <center><b>辅助菜单</b></center>
</span> </span>
</button> </button>
<button :disabled="true" style="cursor: not-allowed;" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown()"> <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: #808080"> <span style="color:#800000 ">
<center><b>分路不良</b></center> <center><b>分路不良</b></center>
</span> </span>
</button> </button>
@ -117,6 +117,7 @@
<!--</button>--> <!--</button>-->
<password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" /> <password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" /> <notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<defective-shunting ref="defectiveShunting" />
</div> </div>
</template> </template>
@ -125,6 +126,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import Handler from '@/scripts/cmdPlugin/Handler'; import Handler from '@/scripts/cmdPlugin/Handler';
import PasswordBox from './dialog/childDialog/passwordInputBox.vue'; import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
import DefectiveShunting from './dialog/defectiveShunting.vue';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
@ -135,6 +137,7 @@ export default {
name: 'MapButtonMenu', name: 'MapButtonMenu',
components: { components: {
PasswordBox, PasswordBox,
DefectiveShunting,
NoticeInfo NoticeInfo
}, },
props: { props: {
@ -240,6 +243,10 @@ export default {
return CMD.Signal.CMD_SIGNAL_SET_ROUTE; return CMD.Signal.CMD_SIGNAL_SET_ROUTE;
case this.Signal.guide.button.operation: // case this.Signal.guide.button.operation: //
return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE; return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
case this.Signal.signalTurnOn.menuButton.operation:
return CMD.Signal.CMD_SIGNAL_TURN_ON;
case this.Signal.signalTurnOff.menuButton.operation:
return CMD.Signal.CMD_SIGNAL_TURN_OFF;
} }
return ''; return '';
} }
@ -276,7 +283,7 @@ export default {
const station = this.$store.getters['map/getDeviceByCode'](val); const station = this.$store.getters['map/getDeviceByCode'](val);
this.$store.getters['map/checkStationGuideMaster'](station.code, station.sGuideMasterLock, station.xGuideMasterLock); this.$store.getters['map/checkStationGuideMaster'](station.code, station.sGuideMasterLock, station.xGuideMasterLock);
} }
}, }
}, },
beforeDestroy() { beforeDestroy() {
this.routeDataMap = null; this.routeDataMap = null;
@ -326,6 +333,7 @@ export default {
if (dom) { if (dom) {
dom.disabled = false; dom.disabled = false;
dom.style.backgroundColor = this.buttonUpColor; dom.style.backgroundColor = this.buttonUpColor;
this.$refs.password.doClose();
} }
} }
if (val) { if (val) {
@ -338,6 +346,33 @@ export default {
} }
} }
}, },
// 线
powerOnUnlock() {
const operate = {
over:true,
operation:this.Station.powerUnLock.button.operation,
cmdType:CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
code:this.$store.state.map.showCentralizedStationCode,
param:{stationCode: this.$store.state.map.showCentralizedStationCode}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.clearOperate();
} else {
this.$refs.noticeInfo.doShow();
}
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
handelDefectiveShunting(model) {
// CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING;
const {switchSection, code, shuntingTypeList} = model;
this.clearOperate();
this.$refs.defectiveShunting.doShow({switchSection, code, shuntingTypeList});
},
// S // S
guideLockLeftButtonDown() { guideLockLeftButtonDown() {
const operate = { const operate = {
@ -377,7 +412,8 @@ export default {
operation: operation operation: operation
}; };
// //
const operationList = [this.Signal.humanTrainRoute.button.operation, this.Section.fault.button.operation]; const operationList = [this.Signal.humanTrainRoute.button.operation, this.Section.fault.button.operation, this.Section.defectiveShunting.button.operation,
this.Signal.signalTurnOff.menuButton.operation];
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.operation = operation; this.operation = operation;
@ -527,7 +563,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);
@ -625,6 +661,28 @@ export default {
this.sendCommand(operate); this.sendCommand(operate);
} }
}, },
handleSignalTurnOn(model) {
const operate = {
over: true,
code: model.code,
operation: this.$store.state.menuOperation.buttonOperation,
cmdType: CMD.Signal.CMD_SIGNAL_TURN_ON,
param: {signalCode: model.code}
};
this.sendCommand(operate);
},
handleSignalTurnOff(model) {
if (model.type === 'PICK') {
const operate = {
over: true,
code: model.code,
operation: this.$store.state.menuOperation.buttonOperation,
cmdType: CMD.Signal.CMD_SIGNAL_TURN_OFF,
param: {signalCode: model.signalCode}
};
this.sendCommand(operate);
}
},
// CHANGE_DIRECTION // CHANGE_DIRECTION
selectedChange() { selectedChange() {
// //
@ -654,6 +712,12 @@ export default {
this.handelSignalBlockOrUnblock(model); this.handelSignalBlockOrUnblock(model);
} else if (buttonOperation === this.Section.fault.button.operation) { } else if (buttonOperation === this.Section.fault.button.operation) {
this.handelFaultSection(model); this.handelFaultSection(model);
} else if (buttonOperation === this.Section.defectiveShunting.button.operation) {
this.handelDefectiveShunting(model);
} else if (buttonOperation === this.Signal.signalTurnOn.menuButton.operation) {
this.handleSignalTurnOn(model);
} else if (buttonOperation === this.Signal.signalTurnOff.menuButton.operation) {
this.handleSignalTurnOff(model);
} else { } else {
this.clearOperate(); this.clearOperate();
} }

View File

@ -86,9 +86,15 @@ export default {
}, },
{ {
label: '封锁/解封', label: '封锁/解封',
handler: '', handler: this.lockOrUnlock
cmdType: '' // cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
}, },
// {
// label: '',
// handler: '',
// cmdType: ''
// },
{ {
label: '总人解', label: '总人解',
handler: this.humanTrainRoute, handler: this.humanTrainRoute,
@ -312,14 +318,14 @@ export default {
}); });
}, },
lockOrUnlock() { lockOrUnlock() {
if (this.selected.lock) { if (this.selected.blockade) {
commitOperate(menuOperate.Signal.lock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => { commitOperate(menuOperate.Signal.unlock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) { if (valid) {
this.$refs.routeControl.doShow(operate, this.selected); this.$refs.routeControl.doShow(operate, this.selected);
} }
}); });
} else { } else {
commitOperate(menuOperate.Signal.unlock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => { commitOperate(menuOperate.Signal.lock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) { if (valid) {
this.$refs.routeControl.doShow(operate, this.selected); this.$refs.routeControl.doShow(operate, this.selected);
} }

View File

@ -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

View File

@ -9,6 +9,8 @@
<train-delete-number ref="trainDeleteNumber" /> <train-delete-number ref="trainDeleteNumber" />
<train-detail-info ref="trainDetailInfo" /> <train-detail-info ref="trainDetailInfo" />
<set-fault ref="setFault" pop-class="chengdou-03__systerm" /> <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" /> --> <!-- <train-set-plan ref="trainSetPlan" /> -->
<update-trip ref="updateTrip" /> <update-trip ref="updateTrip" />
</div> </div>
@ -33,6 +35,8 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; 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 { export default {
name: 'MenuTrain', name: 'MenuTrain',
@ -46,7 +50,9 @@ export default {
TrainDeleteNumber, TrainDeleteNumber,
TrainDetailInfo, TrainDetailInfo,
SetFault, SetFault,
UpdateTrip UpdateTrip,
SpeedLimit,
TrainStop
// TrainSetPlan // TrainSetPlan
}, },
mixins: [ mixins: [
@ -79,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: [
@ -191,9 +202,13 @@ export default {
handler: this.handleOverEedLight handler: this.handleOverEedLight
}, },
// { // {
// label: '', // label: '',
// handler: this.handleDriveTo // handler: this.handleSpeedLimit
// }, // },
{
label: '驾驶',
handler: this.handleDriveTo
},
{ {
label: '换端', label: '换端',
handler: this.handleTurnDirection handler: this.handleTurnDirection
@ -244,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];
@ -312,6 +327,9 @@ export default {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },
handleSpeedLimit() { //
this.$refs.speedLimit.doShow(this.selected);
},
// //
limitSpeed() { limitSpeed() {
const operate = { const operate = {
@ -539,7 +557,7 @@ export default {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },
// //
handleDriveTo() { handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
@ -547,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;
@ -575,18 +604,11 @@ export default {
}); });
}, },
handleParkingTrain() { handleParkingTrain() {
const group = this.$route.query.group; commitOperate(menuOperate.Train.driverStop, {groupNumber:this.selected.groupNumber}, 0).then(({valid, operate})=>{
const param = { if (valid) {
commandType: 'Parking_Train', this.$refs.trainStop.doShow(operate, this.selected);
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();
}); });
}, },
modifyTripNumber() { modifyTripNumber() {
commitOperate(menuOperate.Train.updateTrip, {groupNumber:this.selected.groupNumber}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Train.updateTrip, {groupNumber:this.selected.groupNumber}, 0).then(({valid, operate})=>{
@ -597,8 +619,7 @@ export default {
}, },
removeTripNumber() { removeTripNumber() {
commitOperate(menuOperate.Train.removeTrip, {groupNumber:this.selected.groupNumber}, 3).then(({valid, operate})=>{ commitOperate(menuOperate.Train.removeTrip, {groupNumber:this.selected.groupNumber}, 3).then(({valid, operate})=>{
if (valid) { // if (valid) {}
}
}).catch((error)=> { }).catch((error)=> {
console.error(error); console.error(error);
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();

View File

@ -43,9 +43,9 @@ class Model {
initPublicProps(model) { initPublicProps(model) {
if (model) { if (model) {
var modelInitial = this.public[model._type]; const modelInitial = this.public[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -56,9 +56,9 @@ class Model {
initPrivateProps(model) { initPrivateProps(model) {
if (model) { if (model) {
var modelInitial = this.private[model._type]; const modelInitial = this.private[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -66,6 +66,17 @@ class Model {
return model; return model;
} }
deletePrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
delete model[prop];
}
}
}
}
} }
export default new Model(); export default new Model();

View File

@ -110,7 +110,6 @@ export default {
window.document.oncontextmenu = function () { window.document.oncontextmenu = function () {
return false; return false;
}; };
console.log(this.mapData, '---------------');
if (this.mapData && this.mapData.skinVO) { if (this.mapData && this.mapData.skinVO) {
const parser = parserFactory(ParserType.Graph.value); const parser = parserFactory(ParserType.Graph.value);
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig()); this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());

View File

@ -225,15 +225,15 @@ export default {
components: { components: {
PasswordBox, PasswordBox,
DefectiveShunting, DefectiveShunting,
NoticeInfo NoticeInfo,
}, },
props: { props: {
selected: { selected: {
type: Object, type: Object,
default: () => { default: () => {
return null return null
} },
} },
}, },
data() { data() {
return { return {
@ -264,8 +264,9 @@ export default {
buttonName: true, buttonName: true,
signalName: true, signalName: true,
switchName: true, switchName: true,
sectionName: true sectionName: true,
} },
pressedSignalButton: null,
} }
}, },
computed: { computed: {
@ -331,7 +332,7 @@ export default {
return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
} }
return '' return ''
} },
}, },
watch: { watch: {
'$store.state.menuOperation.buttonOperation': function(val, old) { '$store.state.menuOperation.buttonOperation': function(val, old) {
@ -370,7 +371,7 @@ export default {
const station = this.$store.getters['map/getDeviceByCode'](val) const station = this.$store.getters['map/getDeviceByCode'](val)
this.$store.getters['map/checkStationGuideMaster'](station.code, station.sGuideMasterLock, station.xGuideMasterLock) this.$store.getters['map/checkStationGuideMaster'](station.code, station.sGuideMasterLock, station.xGuideMasterLock)
} }
} },
}, },
beforeDestroy() { beforeDestroy() {
this.routeDataMap = null this.routeDataMap = null
@ -385,12 +386,12 @@ export default {
over: true, over: true,
operation: data.operation, operation: data.operation,
cmdType: data.nextCmdType, cmdType: data.nextCmdType,
param: data.param param: data.param,
} }
} else { } else {
operate = { operate = {
operationPre: data.operation, operationPre: data.operation,
operation: data.operateNext operation: data.operateNext,
} }
} }
this.trainingOperation(operate) this.trainingOperation(operate)
@ -477,7 +478,7 @@ export default {
operation: this.Station.powerUnLock.button.operation, operation: this.Station.powerUnLock.button.operation,
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK, cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
code: this.$store.state.map.showCentralizedStationCode, code: this.$store.state.map.showCentralizedStationCode,
param: { stationCode: this.$store.state.map.showCentralizedStationCode } param: { stationCode: this.$store.state.map.showCentralizedStationCode },
} }
this.$store this.$store
.dispatch('training/nextNew', operate) .dispatch('training/nextNew', operate)
@ -503,7 +504,7 @@ export default {
// S // S
guideLockLeftButtonDown() { guideLockLeftButtonDown() {
const operate = { const operate = {
operation: this.Station.stationMasterLock.leftButton.operation operation: this.Station.stationMasterLock.leftButton.operation,
} }
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -519,7 +520,7 @@ export default {
// X // X
guideLockRightButtonDown() { guideLockRightButtonDown() {
const operate = { const operate = {
operation: this.Station.stationMasterLock.rightButton.operation operation: this.Station.stationMasterLock.rightButton.operation,
} }
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -532,17 +533,18 @@ export default {
} }
}) })
}, },
buttonDown(operation, commandTypeList) { buttonDown(operation, commandTypeList, color) {
this.clearOperate() this.clearOperate()
this.pressedSignalButton && this.pressedSignalButton.instance.pressDown(true, color)
if (operation != this.Command.cancel.clearMbm.operation) { if (operation != this.Command.cancel.clearMbm.operation) {
const operate = { const operate = {
operation: operation operation: operation,
} }
// //
const operationList = [ const operationList = [
this.Signal.humanTrainRoute.button.operation, this.Signal.humanTrainRoute.button.operation,
this.Section.fault.button.operation, this.Section.fault.button.operation,
this.Section.defectiveShunting.button.operation this.Section.defectiveShunting.button.operation,
] ]
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -563,7 +565,7 @@ export default {
// //
const operate = { const operate = {
start: true, start: true,
operation: operation operation: operation,
} }
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -595,7 +597,7 @@ export default {
// OR // OR
arrangementRouteOperation(deviceList) { arrangementRouteOperation(deviceList) {
const operate = { const operate = {
operation: this.Signal.arrangementRoute.button.operation operation: this.Signal.arrangementRoute.button.operation,
} }
if (!this.routeDataMap) { if (!this.routeDataMap) {
this.handleRouteDataMap() this.handleRouteDataMap()
@ -672,8 +674,8 @@ export default {
operation: this.$store.state.menuOperation.buttonOperation, operation: this.$store.state.menuOperation.buttonOperation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
param: { param: {
signalCode: model._type === 'Signal' ? model.code : model.signalCode signalCode: model._type === 'Signal' ? model.code : model.signalCode,
} },
} }
this.$store this.$store
.dispatch('training/nextNew', operate) .dispatch('training/nextNew', operate)
@ -693,7 +695,7 @@ export default {
code: model.code, code: model.code,
operation: this.Signal.guide.button.operation, operation: this.Signal.guide.button.operation,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
param: { signalCode: model.signalCode } param: { signalCode: model.signalCode },
} }
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode) const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode)
// 15s // 15s
@ -711,7 +713,7 @@ export default {
code: model.code, code: model.code,
operation: this.$store.state.menuOperation.buttonOperation, operation: this.$store.state.menuOperation.buttonOperation,
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') {
@ -723,12 +725,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)
}, },
@ -765,7 +772,7 @@ export default {
code: model.code, code: model.code,
operation: buttonOperation, operation: buttonOperation,
cmdType: '', cmdType: '',
param: {} param: {},
} }
if (model._type === 'Signal' && !this.checkHasTrainButton(model)) { if (model._type === 'Signal' && !this.checkHasTrainButton(model)) {
if (buttonOperation === this.Signal.lock.button.operation) { if (buttonOperation === this.Signal.lock.button.operation) {
@ -794,7 +801,7 @@ export default {
code: model.code, code: model.code,
operation: this.guideLockRightFlag ? this.Switch.guideLock.rightButton : this.Switch.guideLock.leftButton, operation: this.guideLockRightFlag ? this.Switch.guideLock.rightButton : this.Switch.guideLock.leftButton,
nextCmdType: CMD.Switch.CMD_SWITCH_MASTER_LOCK, nextCmdType: CMD.Switch.CMD_SWITCH_MASTER_LOCK,
param: { signalCode: model.signalCode } param: { signalCode: model.signalCode },
} }
// 15s // 15s
if (signal.guideTime) { if (signal.guideTime) {
@ -812,7 +819,7 @@ export default {
code: model.code, code: model.code,
operation: this.$store.state.menuOperation.buttonOperation, operation: this.$store.state.menuOperation.buttonOperation,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
param: { sectionCode: model.code } param: { sectionCode: model.code },
} }
this.sendCommand(operate) this.sendCommand(operate)
} }
@ -821,6 +828,10 @@ export default {
selectedChange() { selectedChange() {
// //
const model = this.selected // const model = this.selected //
if (this.pressedSignalButton /* && this.pressedSignalButton.code === model.code */) {
this.pressedSignalButton.instance.pressDown(false)
this.pressedSignalButton = null
}
if ( if (
(this.$store.state.training.prdType != '01' && this.$store.state.training.prdType != '10') || (this.$store.state.training.prdType != '01' && this.$store.state.training.prdType != '10') ||
this.selected._event !== MouseEvent.Left || this.selected._event !== MouseEvent.Left ||
@ -835,7 +846,18 @@ export default {
this.Switch.locate.button.operation, this.Switch.locate.button.operation,
this.Switch.reverse.button.operation, this.Switch.reverse.button.operation,
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', //
'CANCEL', //
'HUMAN_RELEASE_ROUTE', //
] ]
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)
@ -862,6 +884,39 @@ 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)) {
this.pressedSignalButton = model
const { lamp } = model.instance.style.SwitchFault
//
if (model.type === 'LOCATE') {
this.buttonDown(this.Switch.locate.button.operation, ['Switch', 'SwitchFault'], lamp.controlColor)
} else if (model.type === 'REVERSE') {
this.buttonDown(this.Switch.reverse.button.operation, ['Switch', 'SwitchFault'], lamp.reverseColor)
} else if (model.type === 'MONOLOCK') {
this.buttonDown(this.Switch.lock.button.operation, ['Switch', 'SwitchFault'], lamp.lockColor)
} else if (model.type === 'UNLOCK') {
this.buttonDown(this.Switch.unlock.button.operation, ['Switch', 'SwitchFault'], lamp.controlColor)
} else if (model.type === 'BLOCK') {
this.buttonDown(this.Switch.block.button.operation, ['Switch', 'SwitchFault'], lamp.blockColor)
} else if (model.type === 'UNBLOCK') {
this.buttonDown(this.Switch.unblock.button.operation, ['Switch', 'SwitchFault'], lamp.controlColor)
} else if (model.type === 'SECTION_FAULT_UNLOCK') {
//
this.buttonDown(this.Section.fault.button.operation, ['Section'], lamp.faultColor)
} else if (model.type === 'CANCEL') {
//
this.buttonDown(this.MixinCommand.totalCancel.button.operation, ['Signal', 'SignalButton'])
} else if (model.type === 'HUMAN_RELEASE_ROUTE') {
//
this.buttonDown(this.Signal.humanTrainRoute.button.operation, ['Signal', 'SignalButton'])
}
} 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)
@ -892,11 +947,13 @@ export default {
this.deviceList && this.deviceList &&
this.deviceList.length && this.deviceList.length &&
this.$store.dispatch('training/updateMapState', [ this.$store.dispatch('training/updateMapState', [
{ code: this.deviceList[0].code, _type: this.deviceList[0]._type, hasSelected: 0 } { 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
}, },
assistOperateOrChange(model) { assistOperateOrChange(model) {
// mode.type== // mode.type==
@ -908,8 +965,8 @@ export default {
param: { param: {
labelEnum: model.labelEnum, labelEnum: model.labelEnum,
stationCode: model.stationCode, stationCode: model.stationCode,
pressDown: model.pressDown ? 0 : 1 // 10 pressDown: model.pressDown ? 0 : 1, // 10
} },
}, },
// //
CHANGE_DIRECTION: { CHANGE_DIRECTION: {
@ -918,8 +975,8 @@ export default {
param: { param: {
labelEnum: model.labelEnum, labelEnum: model.labelEnum,
stationCode: model.stationCode, stationCode: model.stationCode,
pressDown: model.pressDown ? 0 : 1 // 10 pressDown: model.pressDown ? 0 : 1, // 10
} },
}, },
// //
PICK_ASSIST: { PICK_ASSIST: {
@ -928,8 +985,8 @@ export default {
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_RECEIVE_ASSIST, nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_RECEIVE_ASSIST,
param: { param: {
labelEnum: model.labelEnum, labelEnum: model.labelEnum,
stationCode: model.stationCode stationCode: model.stationCode,
} },
}, },
// //
DEPART_ASSIST: { DEPART_ASSIST: {
@ -937,8 +994,8 @@ export default {
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_DELIVER_ASSIST, nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_DELIVER_ASSIST,
param: { param: {
labelEnum: model.labelEnum, labelEnum: model.labelEnum,
stationCode: model.stationCode stationCode: model.stationCode,
} },
}, },
// //
ACCIDENT: { ACCIDENT: {
@ -946,9 +1003,9 @@ export default {
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_ACCIDENT, nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_ACCIDENT,
param: { param: {
labelEnum: model.labelEnum, labelEnum: model.labelEnum,
stationCode: model.stationCode stationCode: model.stationCode,
} },
} },
} }
const noPasswordModelTypeMap = { const noPasswordModelTypeMap = {
// //
@ -957,8 +1014,8 @@ export default {
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_BLOCK, nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_BLOCK,
param: { param: {
labelEnum: model.labelEnum, labelEnum: model.labelEnum,
stationCode: model.stationCode stationCode: model.stationCode,
} },
}, },
// //
RECOVERY: { RECOVERY: {
@ -966,9 +1023,9 @@ export default {
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_RESTORE, nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_RESTORE,
param: { param: {
labelEnum: model.labelEnum, labelEnum: model.labelEnum,
stationCode: model.stationCode stationCode: model.stationCode,
} },
} },
} }
if (noPasswordModelTypeMap[model.type]) { if (noPasswordModelTypeMap[model.type]) {
const operate = { const operate = {
@ -976,7 +1033,7 @@ export default {
operation: noPasswordModelTypeMap[model.type].operation, operation: noPasswordModelTypeMap[model.type].operation,
code: model.code, code: model.code,
param: noPasswordModelTypeMap[model.type].param, param: noPasswordModelTypeMap[model.type].param,
cmdType: noPasswordModelTypeMap[model.type].nextCmdType cmdType: noPasswordModelTypeMap[model.type].nextCmdType,
} }
this.$store this.$store
.dispatch('training/nextNew', operate) .dispatch('training/nextNew', operate)
@ -995,7 +1052,7 @@ export default {
const operate = { const operate = {
operation: modelTypeMap[model.type].operation, operation: modelTypeMap[model.type].operation,
code: model.code, code: model.code,
param: modelTypeMap[model.type].param param: modelTypeMap[model.type].param,
} }
this.$store this.$store
.dispatch('training/nextNew', operate) .dispatch('training/nextNew', operate)
@ -1028,8 +1085,8 @@ export default {
// console.error(error); // console.error(error);
// this.$refs.noticeInfo.doShow(); // this.$refs.noticeInfo.doShow();
// }); // });
} },
} },
} }
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -84,6 +84,11 @@ export default {
handle: this.unblock, handle: this.unblock,
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
}, },
{
label: '道岔钩锁',
handler: this.hookLock,
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK
},
{ {
label: '区故解', label: '区故解',
handle: '' handle: ''
@ -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);

View File

@ -11,6 +11,7 @@
<set-fault ref="setFault" pop-class="chengdou-03__systerm" /> <set-fault ref="setFault" pop-class="chengdou-03__systerm" />
<!-- <train-set-plan ref="trainSetPlan" /> --> <!-- <train-set-plan ref="trainSetPlan" /> -->
<update-trip ref="updateTrip" /> <update-trip ref="updateTrip" />
<train-stop ref="trainStop" pop-class="chengdou-03__systerm" />
</div> </div>
</template> </template>
@ -33,6 +34,7 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
import TrainStop from '@/jmapNew/theme/components/menus/dialog/trainStop';
export default { export default {
name: 'MenuTrain', name: 'MenuTrain',
@ -46,7 +48,8 @@ export default {
TrainDeleteNumber, TrainDeleteNumber,
TrainDetailInfo, TrainDetailInfo,
SetFault, SetFault,
UpdateTrip UpdateTrip,
TrainStop
// TrainSetPlan // TrainSetPlan
}, },
mixins: [ mixins: [
@ -79,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: [
@ -191,7 +199,7 @@ export default {
handler: this.handleOverEedLight handler: this.handleOverEedLight
}, },
// { // {
// label: '', // label: '',
// handler: this.handleDriveTo // handler: this.handleDriveTo
// }, // },
{ {
@ -241,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];
@ -536,7 +545,7 @@ export default {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },
// //
handleDriveTo() { handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
@ -544,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;
@ -572,18 +592,11 @@ export default {
}); });
}, },
handleParkingTrain() { handleParkingTrain() {
const group = this.$route.query.group; commitOperate(menuOperate.Train.driverStop, {groupNumber:this.selected.groupNumber}, 0).then(({valid, operate})=>{
const param = { if (valid) {
commandType: 'Parking_Train', this.$refs.trainStop.doShow(operate, this.selected);
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();
}); });
}, },
modifyTripNumber() { modifyTripNumber() {
commitOperate(menuOperate.Train.updateTrip, {groupNumber:this.selected.groupNumber}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Train.updateTrip, {groupNumber:this.selected.groupNumber}, 0).then(({valid, operate})=>{

View File

@ -43,9 +43,9 @@ class Model {
initPublicProps(model) { initPublicProps(model) {
if (model) { if (model) {
var modelInitial = this.public[model._type]; const modelInitial = this.public[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -56,9 +56,9 @@ class Model {
initPrivateProps(model) { initPrivateProps(model) {
if (model) { if (model) {
var modelInitial = this.private[model._type]; const modelInitial = this.private[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -66,6 +66,17 @@ class Model {
return model; return model;
} }
deletePrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
delete model[prop];
}
}
}
}
} }
export default new Model(); export default new Model();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -7,8 +7,7 @@
</template> </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;
// } }
// } }
} }
} }

View File

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

View File

@ -43,9 +43,9 @@ class Model {
initPublicProps(model) { initPublicProps(model) {
if (model) { if (model) {
var modelInitial = this.public[model._type]; const modelInitial = this.public[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -56,9 +56,9 @@ class Model {
initPrivateProps(model) { initPrivateProps(model) {
if (model) { if (model) {
var modelInitial = this.private[model._type]; const modelInitial = this.private[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -66,6 +66,17 @@ class Model {
return model; return model;
} }
deletePrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
delete model[prop];
}
}
}
}
} }
export default new Model(); export default new Model();

View File

@ -150,16 +150,16 @@ export default {
label: '开关门', label: '开关门',
handler: this.handleOpenOrCloseDoor handler: this.handleOpenOrCloseDoor
}, },
{ // {
label: '限速指令', // label: '',
handler: this.handleSpeedLimit // handler: this.handleSpeedLimit
}, // },
{ {
label: '换端', label: '换端',
handler: this.handleTurnDirection handler: this.handleTurnDirection
}, },
{ {
label: '驾驶', label: '驾驶',
handler: this.handleDriveTo handler: this.handleDriveTo
}, },
{ {
@ -330,7 +330,7 @@ export default {
handleSpeedLimit() { // handleSpeedLimit() { //
this.$refs.speedLimit.doShow(this.selected); this.$refs.speedLimit.doShow(this.selected);
}, },
// //
handleDriveTo() { handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {

View File

@ -45,9 +45,9 @@ class Model {
initPublicProps(model) { initPublicProps(model) {
if (model) { if (model) {
var modelInitial = this.public[model._type]; const modelInitial = this.public[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -58,9 +58,9 @@ class Model {
initPrivateProps(model) { initPrivateProps(model) {
if (model) { if (model) {
var modelInitial = this.private[model._type]; const modelInitial = this.private[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -68,6 +68,17 @@ class Model {
return model; return model;
} }
deletePrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
delete model[prop];
}
}
}
}
} }
export default new Model(); export default new Model();

View File

@ -124,16 +124,16 @@ export default {
label: '开关门', label: '开关门',
handler: this.handleOpenOrCloseDoor handler: this.handleOpenOrCloseDoor
}, },
{ // {
label: '限速指令', // label: '',
handler: this.handleSpeedLimit // handler: this.handleSpeedLimit
}, // },
{ {
label: '换端', label: '换端',
handler: this.handleTurnDirection handler: this.handleTurnDirection
}, },
{ {
label: '驾驶', label: '驾驶',
handler: this.handleDriveTo handler: this.handleDriveTo
}, },
{ {
@ -325,7 +325,7 @@ export default {
handleSpeedLimit() { // handleSpeedLimit() { //
this.$refs.speedLimit.doShow(this.selected); this.$refs.speedLimit.doShow(this.selected);
}, },
// //
handleDriveTo() { handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {

View File

@ -45,9 +45,9 @@ class Model {
initPublicProps(model) { initPublicProps(model) {
if (model) { if (model) {
var modelInitial = this.public[model._type]; const modelInitial = this.public[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -58,9 +58,9 @@ class Model {
initPrivateProps(model) { initPrivateProps(model) {
if (model) { if (model) {
var modelInitial = this.private[model._type]; const modelInitial = this.private[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -68,6 +68,17 @@ class Model {
return model; return model;
} }
deletePrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
delete model[prop];
}
}
}
}
} }
export default new Model(); export default new Model();

View File

@ -91,16 +91,16 @@ export default {
label: '开关门', label: '开关门',
handler: this.handleOpenOrCloseDoor handler: this.handleOpenOrCloseDoor
}, },
{ // {
label: '限速指令', // label: '',
handler: this.handleSpeedLimit // handler: this.handleSpeedLimit
}, // },
{ {
label: '换端', label: '换端',
handler: this.handleTurnDirection handler: this.handleTurnDirection
}, },
{ {
label: '驾驶', label: '驾驶',
handler: this.handleDriveTo handler: this.handleDriveTo
}, },
{ {
@ -295,7 +295,7 @@ export default {
handleSpeedLimit() { // handleSpeedLimit() { //
this.$refs.speedLimit.doShow(this.selected); this.$refs.speedLimit.doShow(this.selected);
}, },
// //
handleDriveTo() { handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {

View File

@ -44,9 +44,9 @@ class Model {
initPublicProps(model) { initPublicProps(model) {
if (model) { if (model) {
var modelInitial = this.public[model._type]; const modelInitial = this.public[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -57,9 +57,9 @@ class Model {
initPrivateProps(model) { initPrivateProps(model) {
if (model) { if (model) {
var modelInitial = this.private[model._type]; const modelInitial = this.private[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -67,6 +67,17 @@ class Model {
return model; return model;
} }
deletePrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
delete model[prop];
}
}
}
}
} }
export default new Model(); export default new Model();

View File

@ -91,16 +91,16 @@ export default {
label: '开关门', label: '开关门',
handler: this.handleOpenOrCloseDoor handler: this.handleOpenOrCloseDoor
}, },
{ // {
label: '限速指令', // label: '',
handler: this.handleSpeedLimit // handler: this.handleSpeedLimit
}, // },
{ {
label: '换端', label: '换端',
handler: this.handleTurnDirection handler: this.handleTurnDirection
}, },
{ {
label: '驾驶', label: '驾驶',
handler: this.handleDriveTo handler: this.handleDriveTo
}, },
{ {
@ -294,7 +294,7 @@ export default {
handleSpeedLimit() { // handleSpeedLimit() { //
this.$refs.speedLimit.doShow(this.selected); this.$refs.speedLimit.doShow(this.selected);
}, },
// //
handleDriveTo() { handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {

View File

@ -44,9 +44,9 @@ class Model {
initPublicProps(model) { initPublicProps(model) {
if (model) { if (model) {
var modelInitial = this.public[model._type]; const modelInitial = this.public[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -57,9 +57,9 @@ class Model {
initPrivateProps(model) { initPrivateProps(model) {
if (model) { if (model) {
var modelInitial = this.private[model._type]; const modelInitial = this.private[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -67,6 +67,17 @@ class Model {
return model; return model;
} }
deletePrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
delete model[prop];
}
}
}
}
} }
export default new Model(); export default new Model();

View File

@ -230,16 +230,16 @@ export default {
label: '开关门', label: '开关门',
handler: this.handleOpenOrCloseDoor handler: this.handleOpenOrCloseDoor
}, },
{ // {
label: '限速指令', // label: '',
handler: this.handleSpeedLimit // handler: this.handleSpeedLimit
}, // },
{ {
label: '换端', label: '换端',
handler: this.handleTurnDirection handler: this.handleTurnDirection
}, },
{ {
label: '驾驶', label: '驾驶',
handler: this.handleDriveTo handler: this.handleDriveTo
}, },
{ {
@ -406,7 +406,7 @@ export default {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },
// //
handleDriveTo() { handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {

View File

@ -54,9 +54,9 @@ class Model {
initPublicProps(model) { initPublicProps(model) {
if (model) { if (model) {
var modelInitial = this.public[model._type]; const modelInitial = this.public[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -67,9 +67,9 @@ class Model {
initPrivateProps(model) { initPrivateProps(model) {
if (model) { if (model) {
var modelInitial = this.private[model._type]; const modelInitial = this.private[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -77,6 +77,17 @@ class Model {
return model; return model;
} }
deletePrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
delete model[prop];
}
}
}
}
} }
export default new Model(); export default new Model();

View File

@ -231,16 +231,16 @@ export default {
label: '开关门', label: '开关门',
handler: this.handleOpenOrCloseDoor handler: this.handleOpenOrCloseDoor
}, },
{ // {
label: '限速指令', // label: '',
handler: this.handleSpeedLimit // handler: this.handleSpeedLimit
}, // },
{ {
label: '换端', label: '换端',
handler: this.handleTurnDirection handler: this.handleTurnDirection
}, },
{ {
label: '驾驶', label: '驾驶',
handler: this.handleDriveTo handler: this.handleDriveTo
}, },
{ {
@ -406,7 +406,7 @@ export default {
handleSpeedLimit() { // handleSpeedLimit() { //
this.$refs.speedLimit.doShow(this.selected); this.$refs.speedLimit.doShow(this.selected);
}, },
// //
handleDriveTo() { handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {

View File

@ -54,9 +54,9 @@ class Model {
initPublicProps(model) { initPublicProps(model) {
if (model) { if (model) {
var modelInitial = this.public[model._type]; const modelInitial = this.public[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -67,9 +67,9 @@ class Model {
initPrivateProps(model) { initPrivateProps(model) {
if (model) { if (model) {
var modelInitial = this.private[model._type]; const modelInitial = this.private[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -77,6 +77,17 @@ class Model {
return model; return model;
} }
deletePrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
delete model[prop];
}
}
}
}
} }
export default new Model(); export default new Model();

View File

@ -233,10 +233,10 @@ export default {
label: '确认运行至前方站', label: '确认运行至前方站',
handler: this.nextStation handler: this.nextStation
}, },
{ // {
label: '限速指令', // label: '',
handler: this.handleSpeedLimit // handler: this.handleSpeedLimit
}, // },
{ {
label: '越引导信号行驶', label: '越引导信号行驶',
handler: this.handleOverFuideSignal handler: this.handleOverFuideSignal
@ -254,7 +254,7 @@ export default {
handler: this.handleTurnDirection handler: this.handleTurnDirection
}, },
{ {
label: '驾驶', label: '驾驶',
handler: this.handleDriveTo handler: this.handleDriveTo
}, },
{ {
@ -519,7 +519,7 @@ export default {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },
// //
handleDriveTo() { handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {

View File

@ -54,9 +54,9 @@ class Model {
initPublicProps(model) { initPublicProps(model) {
if (model) { if (model) {
var modelInitial = this.public[model._type]; const modelInitial = this.public[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -67,9 +67,9 @@ class Model {
initPrivateProps(model) { initPrivateProps(model) {
if (model) { if (model) {
var modelInitial = this.private[model._type]; const modelInitial = this.private[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -77,6 +77,16 @@ class Model {
return model; return model;
} }
deletePrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
delete model[prop];
}
}
}
}
} }
export default new Model(); export default new Model();

View File

@ -175,16 +175,16 @@ export default {
label: '开关门', label: '开关门',
handler: this.handleOpenOrCloseDoor handler: this.handleOpenOrCloseDoor
}, },
{ // {
label: '限速指令', // label: '',
handler: this.handleSpeedLimit // handler: this.handleSpeedLimit
}, // },
{ {
label: '换端', label: '换端',
handler: this.handleTurnDirection handler: this.handleTurnDirection
}, },
{ {
label: '驾驶', label: '驾驶',
handler: this.handleDriveTo handler: this.handleDriveTo
}, },
{ {
@ -464,7 +464,7 @@ export default {
handleSpeedLimit() { // handleSpeedLimit() { //
this.$refs.speedLimit.doShow(this.selected); this.$refs.speedLimit.doShow(this.selected);
}, },
// //
handleDriveTo() { handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {

View File

@ -45,9 +45,9 @@ class Model {
initPublicProps(model) { initPublicProps(model) {
if (model) { if (model) {
var modelInitial = this.public[model._type]; const modelInitial = this.public[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -58,9 +58,9 @@ class Model {
initPrivateProps(model) { initPrivateProps(model) {
if (model) { if (model) {
var modelInitial = this.private[model._type]; const modelInitial = this.private[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
@ -68,6 +68,16 @@ class Model {
return model; return model;
} }
deletePrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
delete model[prop];
}
}
}
}
} }
export default new Model(); export default new Model();

View File

@ -253,16 +253,16 @@ export default {
label: '开关门', label: '开关门',
handler: this.handleOpenOrCloseDoor handler: this.handleOpenOrCloseDoor
}, },
{ // {
label: '限速指令', // label: '',
handler: this.handleSpeedLimit // handler: this.handleSpeedLimit
}, // },
{ {
label: '换端', label: '换端',
handler: this.handleTurnDirection handler: this.handleTurnDirection
}, },
{ {
label: '驾驶', label: '驾驶',
handler: this.handleDriveTo handler: this.handleDriveTo
}, },
{ {
@ -436,7 +436,7 @@ export default {
handleSpeedLimit() { // handleSpeedLimit() { //
this.$refs.speedLimit.doShow(this.selected); this.$refs.speedLimit.doShow(this.selected);
}, },
// //
handleDriveTo() { handleDriveTo() {
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { if (valid) {

View File

@ -48,29 +48,38 @@ class Model {
initPublicProps(model) { initPublicProps(model) {
if (model) { if (model) {
var modelInitial = this.public[model._type]; const modelInitial = this.public[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
} }
return model; return model;
} }
initPrivateProps(model) { initPrivateProps(model) {
if (model) { if (model) {
var modelInitial = this.private[model._type]; const modelInitial = this.private[model._type];
if (modelInitial) { if (modelInitial) {
for (var prop in modelInitial) { for (const prop in modelInitial) {
model[prop] = modelInitial[prop]; model[prop] = modelInitial[prop];
} }
} }
} }
return model; return model;
} }
deletePrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
delete model[prop];
}
}
}
}
} }
export default new Model(); export default new Model();

View File

@ -67,7 +67,14 @@ function handleRoute(to, next, loginPath) {
} }
} }
} }
function subscribe() {
const token = getToken();
const path = window.location.pathname;
if (token && path != '/404' && !path.endsWith('login')) {
const header = { group: '', 'X-Token': token };
store.dispatch('subscribe', {header, type: getSessionStorage('project')});
}
}
router.beforeEach( async (to, from, next) => { router.beforeEach( async (to, from, next) => {
if (to.query.thirdJump) { if (to.query.thirdJump) {
setToken(to.query.key); setToken(to.query.key);
@ -99,6 +106,7 @@ router.beforeEach( async (to, from, next) => {
store.dispatch('setResourcesUrl', urlData.VOICE_API); store.dispatch('setResourcesUrl', urlData.VOICE_API);
store.dispatch('setUploadUrl', urlData.UPLOAD_API); store.dispatch('setUploadUrl', urlData.UPLOAD_API);
store.dispatch('setBaseSite', urlData.BASE_SITE); store.dispatch('setBaseSite', urlData.BASE_SITE);
subscribe();
} catch (e) { } catch (e) {
const urlData = handlerUrl(); const urlData = handlerUrl();
store.dispatch('setBaseUrl', urlData.BASE_API); store.dispatch('setBaseUrl', urlData.BASE_API);

View File

@ -74,7 +74,16 @@ export default {
{label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '}, {label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '},
{label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent department'}, {label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent department'},
{label: '停车场信号楼', value: 'PARKING_LOT_SIGNAL_BUILDING', enLabel: 'Parking Signal Building'}, {label: '停车场信号楼', value: 'PARKING_LOT_SIGNAL_BUILDING', enLabel: 'Parking Signal Building'},
{label: '车站助理', value: 'STATION_ASSISTANT', enLabel: 'StationAssistant'} {label: '车站助理', value: 'STATION_ASSISTANT', enLabel: 'StationAssistant'},
{label: '车站站长', value: 'STATION_MASTER', enLabel: 'StationMaster'},
{label: '车站信号员', value: 'STATION_SIGNALER', enLabel: 'StationSignaler'},
{label: '车站客运员', value: 'STATION_PASSENGER', enLabel: 'StationPassenger'},
{label: '车站扳道员', value: 'STATION_SWITCH_MAN', enLabel: 'StationSwitchMan'},
{label: '车站引导员', value: 'STATION_FACILITATOR', enLabel: 'StationFacilitator'},
{label: '车站工务工', value: 'STATION_WORKER', enLabel: 'StationWorker'},
{label: '设备管理员', value: 'DEVICE_MANAGER', enLabel: 'DeviceManager'},
{label: '车务段段长', value: 'TRAIN_MASTER', enLabel: 'Train_Master'}
], ],
releaseReview: [ releaseReview: [

View File

@ -168,7 +168,16 @@ export const SimulationType = {
STATION_SUPERVISOR: '车站值班员', STATION_SUPERVISOR: '车站值班员',
DRIVER: '司机', DRIVER: '司机',
MAINTAINER: '通号', MAINTAINER: '通号',
STATION_ASSISTANT: '车站助理' STATION_ASSISTANT: '车站助理',
STATION_MASTER:'车站站长',
STATION_SIGNALER:'车站信号员',
STATION_PASSENGER:'车站客运员',
STATION_SWITCH_MAN:'车站扳道员',
STATION_FACILITATOR:'车站引导员',
STATION_WORKER:'车站工务工',
DEVICE_MANAGER:'设备管理员',
TRAIN_MASTER:'车务段段长 '
}; };
export const UrlConfig = { export const UrlConfig = {
displayNew: '/displayNew', displayNew: '/displayNew',

View File

@ -335,6 +335,29 @@ export const loginInfo = {
navigationMarginLeft: '140px', navigationMarginLeft: '140px',
systemType: '011' systemType: '011'
}, },
// HYD_RAILWAY
hydrailway: {
title: '大铁交通综合行车模拟仿真系统V1.0',
loginTitle: '空串',
logoWidth: '140px',
loginPath: '/login?project=hydrailway',
bottomColumn: '哈尔滨盈达科技有限公司 联系电话:0451-87001273',
loginParam: 'HYD_RAILWAY',
navigationLogoWidth: '120px',
navigationMarginLeft: '140px',
systemType: '011'
},
designhydrailway: {
title: '大铁交通设计平台V1.0',
loginTitle: '空串',
logoWidth: '140px',
loginPath: '/login?project=hydrailway',
bottomColumn: '哈尔滨盈达科技有限公司 联系电话:0451-87001273',
loginParam: 'HYD_RAILWAY',
navigationLogoWidth: '120px',
navigationMarginLeft: '140px',
systemType: '011'
},
xadt: { xadt: {
title: '城市轨道交通实训平台', title: '城市轨道交通实训平台',
logoWidth: '60px', logoWidth: '60px',
@ -729,6 +752,8 @@ export const ProjectIcon = {
designheb: FaviconHeb, designheb: FaviconHeb,
hyd: FaviconHeb, hyd: FaviconHeb,
designhyd: FaviconHeb, designhyd: FaviconHeb,
hydrailway: FaviconHeb,
designhydrailway: FaviconHeb,
xadt: FaviconXadt, xadt: FaviconXadt,
designxadt: FaviconXadt, designxadt: FaviconXadt,
jyd: FaviconJyd, jyd: FaviconJyd,
@ -836,34 +861,36 @@ export const ProjectCode = {
unittecsty: 'UNITTEC_STY', unittecsty: 'UNITTEC_STY',
designunittecsty: 'UNITTEC_STY', designunittecsty: 'UNITTEC_STY',
teaching: 'TEACHING', teaching: 'TEACHING',
designteaching: 'TEACHING' designteaching: 'TEACHING',
hydrailway: 'HYD_RAILWAY',
designhydrailway: 'HYD_RAILWAY'
}; };
/** 嵌入第三方平台 导航栏右上角 清空 */ /** 嵌入第三方平台 导航栏右上角 清空 */
export const ThirdLoginList = ['richor', 'designrichor', 'richorygy', 'designrichorygy', 'richorcxjs', 'designrichorcxjs']; export const ThirdLoginList = ['richor', 'designrichor', 'richorygy', 'designrichorygy', 'richorcxjs', 'designrichorcxjs'];
/** 底部栏仅展示公司信息不展示备案号 */ /** 底部栏仅展示公司信息不展示备案号 */
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls',
'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy', 'richor', 'richorlesson3d', 'richorjoint', 'designrichorjoint', 'nologo', 'designnologo', 'richorygy', 'designhls', 'hyd', 'designhyd', 'hydrailway', 'designhydrailway', 'cgy', 'designcgy', 'richor', 'richorlesson3d', 'richorjoint', 'designrichorjoint', 'nologo', 'designnologo', 'richorygy',
'designrichorygy', 'unittecsty', 'designunittecsty', 'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs']; 'designrichorygy', 'unittecsty', 'designunittecsty', 'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs'];
/** 实训设计平台通过项目code获取地图列表的项目 */ /** 实训设计平台通过项目code获取地图列表的项目 */
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'wjls', export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'wjls',
'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy', 'zzww', 'zzwwtest', 'richor', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl', 'designbjd', 'cgy', 'designcgy', 'zzww', 'zzwwtest', 'richor',
'richorlesson3d', 'richorjoint', 'designrichorjoint', 'nologo', 'designnologo', 'srsandbox', 'designsrsandbox', 'designhlsdrts', 'hlsdrts', 'jxgm', 'designjxgm', 'richorlesson3d', 'richorjoint', 'designrichorjoint', 'nologo', 'designnologo', 'srsandbox', 'designsrsandbox', 'designhlsdrts', 'hlsdrts', 'jxgm', 'designjxgm',
'richorygy', 'designrichorygy', 'say', 'designsay', 'unittecsty', 'designunittecsty', 'richorhhcj', 'designrichorhhcj', 'teaching', 'designteaching', 'richorcxjs', 'richorygy', 'designrichorygy', 'say', 'designsay', 'unittecsty', 'designunittecsty', 'richorhhcj', 'designrichorhhcj', 'teaching', 'designteaching', 'richorcxjs',
'designrichorcxjs']; 'designrichorcxjs', 'hydrailway', 'designhydrailway'];
/** 案例展示隐藏的项目 */ /** 案例展示隐藏的项目 */
export const CaseHideProjectList = ['heb', 'designheb', 'cgy', 'designcgy']; export const CaseHideProjectList = ['heb', 'designheb', 'cgy', 'designcgy'];
/** 登录页右下角版本开发基于不展示 */ /** 登录页右下角版本开发基于不展示 */
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'cgy', 'designcgy', 'xadt', export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'hydrailway', 'designhydrailway', 'cgy', 'designcgy', 'xadt',
'designxadt', 'nologo', 'designnologo', 'srsandbox', 'designsrsandbox', 'designhlsdrts', 'hlsdrts', 'jxgm', 'designjxgm', 'xzexam', 'richorygy', 'designrichorygy', 'designxadt', 'nologo', 'designnologo', 'srsandbox', 'designsrsandbox', 'designhlsdrts', 'hlsdrts', 'jxgm', 'designjxgm', 'xzexam', 'richorygy', 'designrichorygy',
'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs']; 'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs'];
/** 登录页右下角主体不展示 */ /** 登录页右下角主体不展示 */
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls',
'designhls', 'hyd', 'designhyd', 'cgy', 'designcgy', 'xadt', 'designxadt', 'richor', 'richorlesson3d', 'richorjoint', 'nologo', 'designnologo', 'designhls', 'hyd', 'designhyd', 'hydrailway', 'designhydrailway', 'cgy', 'designcgy', 'xadt', 'designxadt', 'richor', 'richorlesson3d', 'richorjoint', 'nologo', 'designnologo',
'srsandbox', 'designsrsandbox', 'designhlsdrts', 'hlsdrts', 'jxgm', 'designjxgm', 'xzexam', 'richorygy', 'designrichorygy', 'unittecsty', 'designunittecsty', 'srsandbox', 'designsrsandbox', 'designhlsdrts', 'hlsdrts', 'jxgm', 'designjxgm', 'xzexam', 'richorygy', 'designrichorygy', 'unittecsty', 'designunittecsty',
'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs']; 'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs'];
/** 登录页项目 title 登录输入框上方 大字体 加粗居中 */ /** 登录页项目 title 登录输入框上方 大字体 加粗居中 */
export const ProjectLoginStyleList = ['gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc', export const ProjectLoginStyleList = ['gzb', 'designgzb', 'xty', 'designxty', 'xadt', 'designxadt', 'tky', 'designtky', 'jyd', 'designjyd', 'bxkc', 'designbxkc',
'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'crsc', 'designcrsc', 'hls', 'designhls', 'drts', 'wjls', 'hyd', 'designhyd', 'hydrailway', 'designhydrailway', 'nty', 'designnty', 'bjd', 'designbjd', 'sdy', 'designsdy', 'ntyc', 'designntyc',
'ntyl', 'designntyl', 'cgy', 'designcgy', 'zzww', 'zzwwtest', 'srsandbox', 'designsrsandbox', 'designhlsdrts', 'hlsdrts', 'jxgm', 'designjxgm', 'xzexam', 'ntyl', 'designntyl', 'cgy', 'designcgy', 'zzww', 'zzwwtest', 'srsandbox', 'designsrsandbox', 'designhlsdrts', 'hlsdrts', 'jxgm', 'designjxgm', 'xzexam',
'richorygy', 'designrichorygy', 'say', 'designsay', 'unittecsty', 'designunittecsty', 'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs']; 'richorygy', 'designrichorygy', 'say', 'designsay', 'unittecsty', 'designunittecsty', 'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs'];
/** 登录页 登录输入框无二维码 */ /** 登录页 登录输入框无二维码 */
@ -899,6 +926,8 @@ export const goOtherPlatformMenu = {
designhls: '/login?project=hls', designhls: '/login?project=hls',
hyd: '/design/login?project=hyd', hyd: '/design/login?project=hyd',
designhyd: '/login?project=hyd', designhyd: '/login?project=hyd',
hydrailway: '/design/login?project=hydrailway',
designhydrailway: '/login?project=hydrailway',
nty: '/design/login?project=nty', nty: '/design/login?project=nty',
designnty: '/login?project=nty', designnty: '/login?project=nty',
bjd: '/design/login?project=bjd', bjd: '/design/login?project=bjd',
@ -957,7 +986,8 @@ export const ProjectList = [
{value: 'unittec_sty', label: '众合-陕铁院'}, {value: 'unittec_sty', label: '众合-陕铁院'},
{value: 'richor_hhcj', label: '红河财经'}, {value: 'richor_hhcj', label: '红河财经'},
{value: 'teaching', label: '教学通用'}, {value: 'teaching', label: '教学通用'},
{value: 'richor_cxjs', label: '长兴技校'} {value: 'richor_cxjs', label: '长兴技校'},
{value: 'hyd_railway', label: '哈盈达大铁'}
]; ];
/** 本地项目打包 */ /** 本地项目打包 */
export const localPackageProject = { export const localPackageProject = {

View File

@ -91,7 +91,8 @@ export default {
CMD_DRIVER_PRESELECTION_MODE_UP:{value:'Driver_Preselection_Mode_Up', label:'列车预选模式升'}, CMD_DRIVER_PRESELECTION_MODE_UP:{value:'Driver_Preselection_Mode_Up', label:'列车预选模式升'},
CMD_DRIVER_DOOR_MODE:{value:'Driver_Door_Mode', label:'列车门模式'}, CMD_DRIVER_DOOR_MODE:{value:'Driver_Door_Mode', label:'列车门模式'},
CMD_DRIVER_DOOR_SELECTION:{value:'Driver_Door_Selection', label:'列车门选择'}, CMD_DRIVER_DOOR_SELECTION:{value:'Driver_Door_Selection', label:'列车门选择'},
CMD_DRIVER_CONFIRM:{value:'Driver_Confirm', label:'确认'} CMD_DRIVER_CONFIRM:{value:'Driver_Confirm', label:'确认'},
CMD_DRIVER_STOP:{value: 'Driver_Stop', label: '停车'}
}, },
// 信号机操作 // 信号机操作
@ -139,7 +140,11 @@ export default {
/** 设置保护 */ /** 设置保护 */
CMD_SIGNAL_SET_OVERLAP : {value: 'Signal_Set_Overlap', label: '设置保护'}, CMD_SIGNAL_SET_OVERLAP : {value: 'Signal_Set_Overlap', label: '设置保护'},
/** 冲突进路办理 */ /** 冲突进路办理 */
CMD_SIGNAL_CONFLICT_ROUTE_SET_CONFIRM:{value: 'Signal_Conflict_Route_Set_Confirm', label: '冲突进路办理'} CMD_SIGNAL_CONFLICT_ROUTE_SET_CONFIRM:{value: 'Signal_Conflict_Route_Set_Confirm', label: '冲突进路办理'},
/** 信号机点灯 */
CMD_SIGNAL_TURN_ON: {value: 'Signal_Turn_On', label: '信号机点灯'},
/** 信号机灭灯 */
CMD_SIGNAL_TURN_OFF: {value: 'Signal_Turn_Off', label: '信号机灭灯'}
}, },
// 物理区段操作 // 物理区段操作
@ -391,25 +396,27 @@ export default {
CTC_CANCEL_DEPARTURE_NOTICE: {value: 'CTC_CANCEL_DEPARTURE_NOTICE', label: '取消发预'}, CTC_CANCEL_DEPARTURE_NOTICE: {value: 'CTC_CANCEL_DEPARTURE_NOTICE', label: '取消发预'},
CTC_FINISH_DEPARTURE: {value: 'CTC_FINISH_DEPARTURE', label: '完成发点'}, CTC_FINISH_DEPARTURE: {value: 'CTC_FINISH_DEPARTURE', label: '完成发点'},
CTC_CANCEL_DEPARTURE: {value: 'CTC_CANCEL_DEPARTURE', label: '取消发点'}, CTC_CANCEL_DEPARTURE: {value: 'CTC_CANCEL_DEPARTURE', label: '取消发点'},
CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION:{value:'ASSIST_PRESS_DOWN_TURN_DIRECTION', label:'改方'},
CTC_AUTO_TRIGGER: {value: 'CTC_AUTO_TRIGGER', label: '自动触发'}, CTC_AUTO_TRIGGER: {value: 'CTC_AUTO_TRIGGER', label: '自动触发'},
CTC_ASSIST_PRESS_MAIN_ASSIST:{value: 'ASSIST_PRESS_MAIN_ASSIST', label: '总辅助'}, CTC_ASSIST_PRESS_MAIN_ASSIST:{value: 'ASSIST_PRESS_MAIN_ASSIST', label: '总辅助'},
CTC_ASSIST_PRESS_RECEIVE_ASSIST:{value: 'ASSIST_PRESS_RECEIVE_ASSIST', label: '接辅助'}, CTC_ASSIST_PRESS_RECEIVE_ASSIST:{value: 'ASSIST_PRESS_RECEIVE_ASSIST', label: '接辅助'},
CTC_ASSIST_PRESS_DELIVER_ASSIST:{value: 'ASSIST_PRESS_DELIVER_ASSIST', label: '发辅助'}, CTC_ASSIST_PRESS_DELIVER_ASSIST:{value: 'ASSIST_PRESS_DELIVER_ASSIST', label: '发辅助'},
CTC_ASSIST_PRESS_BLOCK:{value: 'ASSIST_PRESS_BLOCK', label: '阻塞'}, CTC_ASSIST_PRESS_BLOCK:{value: 'ASSIST_PRESS_BLOCK', label: '阻塞'},
CTC_ASSIST_PRESS_RESTORE:{value: 'ASSIST_PRESS_RESTORE', label: '复原'}, CTC_ASSIST_PRESS_RESTORE:{value: 'ASSIST_PRESS_RESTORE', label: '复原'},
CTC_ASSIST_PRESS_ACCIDENT:{value: 'ASSIST_PRESS_ACCIDENT', label: '事故'}, CTC_ASSIST_PRESS_ACCIDENT:{value: 'ASSIST_PRESS_ACCIDENT', label: '事故'},
CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION:{value:'ASSIST_PRESS_DOWN_TURN_DIRECTION', label:'改方'},
// CTC_BATCH_MODIFY_RUN_PLAN:{value: 'CTC_BATCH_MODIFY_RUN_PLAN', label: '批量修改股道'}, // CTC_BATCH_MODIFY_RUN_PLAN:{value: 'CTC_BATCH_MODIFY_RUN_PLAN', label: '批量修改股道'},
CTC_MODIFY_SECTION:{value: 'CTC_MODIFY_SECTION', label: '修改股道'}, CTC_MODIFY_SECTION:{value: 'CTC_MODIFY_SECTION', label: '修改股道'},
CTC_STATION_SEND_OUT_RUN_PLAN:{value: 'CTC_STATION_SEND_OUT_RUN_PLAN', label: '车站发送计划'}, CTC_STATION_SEND_OUT_RUN_PLAN:{value: 'CTC_STATION_SEND_OUT_RUN_PLAN', label: '车站发送计划'},
CTC_CANCEL_TWINKLE:{value: 'CTC_CANCEL_TWINKLE', label: '车站取消红闪'}, CTC_CANCEL_TWINKLE:{value: 'CTC_CANCEL_TWINKLE', label: '车站取消红闪'},
// CTC_REMOVE_RUN_PLAN:{value: 'CTC_REMOVE_RUN_PLAN', label: '移除行车日志'}, // CTC_REMOVE_RUN_PLAN:{value: 'CTC_REMOVE_RUN_PLAN', label: '移除行车日志'},
CTC_MODIFY_ADJACENT_STATION:{value: 'CTC_MODIFY_ADJACENT_STATION', label: '修改邻站信息'}, CTC_MODIFY_ADJACENT_STATION:{value: 'CTC_MODIFY_ADJACENT_STATION', label: '修改邻站信息'},
CTC_MODIFY_TRIP_NUMBER:{value: 'CTC_MODIFY_TRIP_NUMBER', label: '修改车次号(大铁CTC)'}, CTC_MODIFY_TRIP_NUMBER:{value: 'CTC_MODIFY_TRIP_NUMBER', label: '修改车次号(大铁CTC)'},
CTC_SEND_NOTICE:{value: 'CTC_SEND_NOTICE', label: '发送发车预告'}, CTC_SEND_NOTICE:{value: 'CTC_SEND_NOTICE', label: '发送发车预告'},
CTC_AGREE_NOTICE:{value: 'CTC_AGREE_NOTICE', label: '同意发车预告'}, CTC_AGREE_NOTICE:{value: 'CTC_AGREE_NOTICE', label: '同意发车预告'},
CTC_LOG_CANCEL_ARRIVE:{value: 'CTC_LOG_CANCEL_ARRIVE', label: '取消到达'}, CTC_LOG_CANCEL_ARRIVE:{value: 'CTC_LOG_CANCEL_ARRIVE', label: '取消到达'},
CTC_LOG_CANCEL_DEPARTURE:{value: 'CTC_LOG_CANCEL_DEPARTURE', label: '取消出发'}, CTC_LOG_CANCEL_DEPARTURE:{value: 'CTC_LOG_CANCEL_DEPARTURE', label: '取消出发'},
CTC_LOG_CANCEL_BLOCK:{value: 'CTC_LOG_CANCEL_BLOCK', label: '取消闭塞'}, CTC_LOG_CANCEL_BLOCK:{value: 'CTC_LOG_CANCEL_BLOCK', label: '取消闭塞'},
@ -428,17 +435,22 @@ export default {
CTC_RELEASE_RUN_PLAN_TO_SIMULATION:{value: 'CTC_RELEASE_RUN_PLAN_TO_SIMULATION', label: '运行计划发布至CTC'}, CTC_RELEASE_RUN_PLAN_TO_SIMULATION:{value: 'CTC_RELEASE_RUN_PLAN_TO_SIMULATION', label: '运行计划发布至CTC'},
CTC_SET_ROUTE:{value: 'CTC_SET_ROUTE', label: 'CTC办理进路'}, CTC_SET_ROUTE:{value: 'CTC_SET_ROUTE', label: 'CTC办理进路'},
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: '调度台发布车站行车计划'},
CTC_STATION_SIGN_RUN_PLAN:{value:'CTC_STATION_SIGN_RUN_PLAN', label: '车站签收阶段计划'}, CTC_STATION_SIGN_RUN_PLAN:{value:'CTC_STATION_SIGN_RUN_PLAN', label: '车站签收阶段计划'},
CTC_ZONE_SAVE_TRACK_SECTION:{value:'CTC_ZONE_SAVE_TRACK_SECTION', label: '调度台行车计划修改股道'}, 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_TRIP_NUMBER:{value:'CTC_ZONE_SAVE_TRIP_NUMBER', label: '调度台行车计划修改车次'},
CTC_ZONE_SAVE_PLAN_TIME:{value:'CTC_ZONE_SAVE_PLAN_TIME', 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_DIRECTION:{value:'CTC_ZONE_SAVE_DIRECTION', label: '调度台行车计划修改出入口'},
CTC_ZONE_SAVE_STATION:{value:'CTC_ZONE_SAVE_STATION', 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: '调度台发布车站行车计划'},
CTC_QUERY_DISPATCH_COMMAND:{value:'CTC_QUERY_DISPATCH_COMMAND', label: '调度台命令查询'},
CTC_SEND_DISPATCH_COMMAND:{value:'CTC_SEND_DISPATCH_COMMAND', label: '调度台命令下达'},
CTC_SIGN_DISPATCH_COMMAND:{value:'CTC_SIGN_DISPATCH_COMMAND', label: '调度台命令签收'},
CTC_READ_DISPATCH_COMMAND:{value:'CTC_READ_DISPATCH_COMMAND', label: '调度台命令已读'}
}, },
RAIL: { RAIL: {

View File

@ -46,7 +46,7 @@ class CommandHandle {
// }, // },
Train_Trust: { Train_Trust: {
operate: 'Train_Trust', operate: 'Train_Trust',
paramList:[{name: 'groupNumber'}, {name: 'targetDeviceCode'}], paramList:[{name: 'groupNumber'}, {name: 'param'}],
simulationRole: 'Center', simulationRole: 'Center',
controlMode: ['OperateCenterControl'], controlMode: ['OperateCenterControl'],
conditionList: [] conditionList: []
@ -73,6 +73,10 @@ class CommandHandle {
Train_Calculate_Interval: { Train_Calculate_Interval: {
operate: 'Train_Calculate_Interval', operate: 'Train_Calculate_Interval',
paramList: [{name: 'calculateParam'}] paramList: [{name: 'calculateParam'}]
},
Driver_Stop: {
operate: 'Driver_Stop',
paramList: [{name: 'groupNumber'}, {name: 'eb'}]
} }
} }
}; };

View File

@ -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'}

View File

@ -1774,17 +1774,17 @@ export const OperationEvent = {
} }
}, },
// 点灯 (大铁) // 点灯 (大铁)
signalLight: { signalTurnOn: {
menuButton: { menuButton: {
operation: '3231', operation: '3231',
domId: '_Tips-Signal-signalLight-MenuButton{BOTTOM}' domId: '_Tips-Signal-signalTurnOn-MenuButton{BOTTOM}'
} }
}, },
// 灭灯 (大铁) // 灭灯 (大铁)
signalDestroy: { signalTurnOff: {
menuButton: { menuButton: {
operation: '3232', operation: '3232',
domId: '_Tips-Signal-signalDestroy-MenuButton{BOTTOM}' domId: '_Tips-Signal-signalTurnOff-MenuButton{BOTTOM}'
} }
} }
}, },
@ -3431,6 +3431,18 @@ export const OperationEvent = {
operation: '70v', operation: '70v',
domId: '_Tips-Train-removeTrip-Menu' domId: '_Tips-Train-removeTrip-Menu'
} }
},
driverStop: {
menu: {
operation: '70w',
domId: '_Tips-Train-driverStop-Menu'
}
},
turnDirection: {
menu: {
operation: '70x',
domId: '_Tips-Train-turnDirection-Menu'
}
} }
}, },

View File

@ -39,6 +39,7 @@ const training = {
memberList: [], // 综合仿真成员列表 memberList: [], // 综合仿真成员列表
memberData: {}, // 综合仿真成员列表 memberData: {}, // 综合仿真成员列表
simulationUserList: [], // 综合仿真用户列表 simulationUserList: [], // 综合仿真用户列表
userRole: '', // 本人仿真成员角色
orignalUserRoleId:'', // 设置旧的角色的id orignalUserRoleId:'', // 设置旧的角色的id
scriptQuitCount: 0, // 主动退出剧本 scriptQuitCount: 0, // 主动退出剧本
scriptOperationType: '', // 剧本操作类型 scriptOperationType: '', // 剧本操作类型
@ -297,6 +298,9 @@ const training = {
/** 运行线 (宁波三号线) */ /** 运行线 (宁波三号线) */
setRunPathSelected: (state, runPathList) => { setRunPathSelected: (state, runPathList) => {
state.runPathList = runPathList; state.runPathList = runPathList;
},
setUserRole: (state, userRole) => {
state.userRole = userRole;
} }
}, },
@ -655,6 +659,9 @@ const training = {
/** 运行线 (宁波三号线) */ /** 运行线 (宁波三号线) */
setRunPathSelected: ({ commit }, runPathList) => { setRunPathSelected: ({ commit }, runPathList) => {
commit('setRunPathSelected', runPathList); commit('setRunPathSelected', runPathList);
},
setUserRole: ({ commit }, userRole) => {
commit('setUserRole', userRole);
} }
} }
}; };

View File

@ -54,7 +54,7 @@ export function creatSubscribe(topic, header) {
} }
Vue.prototype.$stomp.subscribe(topic, callback, header); Vue.prototype.$stomp.subscribe(topic, callback, header);
} catch (error) { } catch (error) {
console.error('websocket订阅失败'); console.error('websocket订阅失败', error, topic, header);
} }
} }
// 回调函数 // 回调函数

View File

@ -181,7 +181,7 @@ export default {
}, },
beforeDestroy() {}, beforeDestroy() {},
mounted() { mounted() {
this.searchCmd(); // this.searchCmd();
}, },
methods:{ methods:{
tableRowClassName({row, rowIndex}) { tableRowClassName({row, rowIndex}) {
@ -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;

View File

@ -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();

View File

@ -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);
});
});
} }
} }

View File

@ -16,7 +16,9 @@
<!-- v-model="scope.row.id" --> <!-- v-model="scope.row.id" -->
<el-checkbox v-if="isModify" v-model="checkBoxActionList[scope.row.id].status" :disabled="checkBoxActionList[scope.row.id].disabled" class="checkBoxAction" @change="((val)=>{changeSelectActionId(val, scope.row.id, scope.$index)})" /> <el-checkbox v-if="isModify" v-model="checkBoxActionList[scope.row.id].status" :disabled="checkBoxActionList[scope.row.id].disabled" class="checkBoxAction" @change="((val)=>{changeSelectActionId(val, scope.row.id, scope.$index)})" />
<el-radio v-if="isOperate" v-model="radioBoxAction" :label="scope.row.id" name="operateAction" class="checkBoxAction" @change="((val)=>{changeSelectRadioActionId(val, scope.row.id, scope.$index)})">{{ '' }}</el-radio> <el-radio v-if="isOperate" v-model="radioBoxAction" :label="scope.row.id" name="operateAction" class="checkBoxAction" @change="((val)=>{changeSelectRadioActionId(val, scope.row.id, scope.$index)})">{{ '' }}</el-radio>
<div v-if="dialogVisible">{{ covert(scope.row) }}</div> <div v-if="dialogVisible">{{ scope.row.remarkName }}</div>
<!-- covert(scope.row) -->
<!-- -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="语音识别关键词列表" width="350"> <el-table-column label="语音识别关键词列表" width="350">
@ -265,6 +267,37 @@ export default {
watch: { watch: {
'$store.state.map.mapDataLoadedCount': function (val) { '$store.state.map.mapDataLoadedCount': function (val) {
this.parseMember(); this.parseMember();
getCompetitionPracticalSceneById(this.formModel.id).then(response=>{
const commandEvaluationRuleVOs = {};
if (response.data.commandEvaluationRuleVOs) {
response.data.commandEvaluationRuleVOs.forEach(data=>{
commandEvaluationRuleVOs[data.actionId] = data;
// commandEvaluationRuleVOs[data.actionId].inputVisible = false;
});
}
const stepVOs = {};
if (response.data.stepVOs) {
response.data.stepVOs.forEach(data=>{
stepVOs[data.startActionId] = data;
const dataIndex = this.tempActionList.findIndex((value, index, arr)=>{ return value.id == data.startActionId; });
const dataIndex1 = this.tempActionList.findIndex((value, index, arr)=>{ return value.id == data.endActionId; });
this.startArray.push(dataIndex);
this.endArray.push(dataIndex1);
});
}
// action.remarkName = this.covert(action);
this.tempActionList.forEach(action=>{
action.remarkName = this.covert(action);
});
this.actionList = [...this.tempActionList];
this.commandEvaluationRuleVOs = commandEvaluationRuleVOs;
if (response.data.operationStatisticVO) {
this.formModel.operationStatisticVO = response.data.operationStatisticVO;
} else {
this.formModel.operationStatisticVO = {score:0, itemVOS:[]};
}
this.stepVOs = stepVOs;
});
} }
}, },
methods:{ methods:{
@ -279,37 +312,13 @@ export default {
this.formModel.disposalProcesses = row.disposalProcesses; this.formModel.disposalProcesses = row.disposalProcesses;
this.formModel.operationScore = row.operationScore; this.formModel.operationScore = row.operationScore;
this.formModel.scriptId = row.scriptId; this.formModel.scriptId = row.scriptId;
this.actionList = [];
this.tempActionList = [];
getScriptByIdNew(row.scriptId).then(res=>{ getScriptByIdNew(row.scriptId).then(res=>{
this.actionList = res.data.actionList.filter(action=>{ this.tempActionList = res.data.actionList.filter(action=>{
return action.type != 'Exit_Conversation' && action.type != 'Accept_Conversation_Invitation'; return action.type != 'Exit_Conversation' && action.type != 'Accept_Conversation_Invitation';
}); });
this.jsonData = res; this.jsonData = res;
getCompetitionPracticalSceneById(row.id).then(response=>{
const commandEvaluationRuleVOs = {};
if (response.data.commandEvaluationRuleVOs) {
response.data.commandEvaluationRuleVOs.forEach(data=>{
commandEvaluationRuleVOs[data.actionId] = data;
// commandEvaluationRuleVOs[data.actionId].inputVisible = false;
});
}
const stepVOs = {};
if (response.data.stepVOs) {
response.data.stepVOs.forEach(data=>{
stepVOs[data.startActionId] = data;
const dataIndex = this.actionList.findIndex((value, index, arr)=>{ return value.id == data.startActionId; });
const dataIndex1 = this.actionList.findIndex((value, index, arr)=>{ return value.id == data.endActionId; });
this.startArray.push(dataIndex);
this.endArray.push(dataIndex1);
});
}
this.commandEvaluationRuleVOs = commandEvaluationRuleVOs;
if (response.data.operationStatisticVO) {
this.formModel.operationStatisticVO = response.data.operationStatisticVO;
} else {
this.formModel.operationStatisticVO = {score:0, itemVOS:[]};
}
this.stepVOs = stepVOs;
});
// //
loadMapDataById(res.data.mapId, 'parse'); loadMapDataById(res.data.mapId, 'parse');
}); });
@ -360,6 +369,7 @@ export default {
this.$store.dispatch('map/mapClear'); this.$store.dispatch('map/mapClear');
}, },
covert(element) { covert(element) {
// console.log(JSON.stringify(element), '8888888---666666');
const member = this.memberList[element.memberId]; const member = this.memberList[element.memberId];
let resultData = ''; let resultData = '';
if (element.type == 'Accept_Conversation_Invitation') { if (element.type == 'Accept_Conversation_Invitation') {

View File

@ -388,6 +388,15 @@ export default {
const maintainerList = {}; const maintainerList = {};
const parentDepartmentList = {}; const parentDepartmentList = {};
const parkingLotSignalBuilding = {}; const parkingLotSignalBuilding = {};
const stationAssistant = {};
const stationMaster = {};
const stationSignaler = {};
const stationPassenger = {};
const stationSwitchMan = {};
const stationFacilitator = {};
const stationWorker = {};
const deviceManager = {};
const trainMaster = {};
val.forEach(item => { val.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode); const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
this.memberData[item.id]['active'] = false; this.memberData[item.id]['active'] = false;
@ -436,6 +445,53 @@ export default {
this.memberData[item.id].labelName = '停车场信号楼' + (item.name || ''); this.memberData[item.id].labelName = '停车场信号楼' + (item.name || '');
parkingLotSignalBuilding[item.id] = this.memberData[item.id]; parkingLotSignalBuilding[item.id] = this.memberData[item.id];
break; break;
case 'STATION_ASSISTANT':
this.memberData[item.id].label = '车站助理-' + device.name + (item.name || '');
this.memberData[item.id].labelName = '车站助理-' + device.name + ( item.name || '');
stationAssistant[item.id] = this.memberData[item.id];
break;
case 'STATION_MASTER':
this.memberData[item.id].label = '车站站长-' + device.name + (item.name || '');
this.memberData[item.id].labelName = '车站站长-' + device.name + (item.name || '');
stationMaster[item.id] = this.memberData[item.id];
break;
case 'STATION_SIGNALER':
this.memberData[item.id].label = '车站信号员-' + device.name + (item.name || '');
this.memberData[item.id].labelName = '车站信号员-' + device.name + (item.name || '');
stationSignaler[item.id] = this.memberData[item.id];
break;
case 'STATION_PASSENGER':
this.memberData[item.id].label = '车站客运员-' + device.name + (item.name || '');
this.memberData[item.id].labelName = '车站客运员-' + device.name + (item.name || '');
stationPassenger[item.id] = this.memberData[item.id];
break;
case 'STATION_SWITCH_MAN':
this.memberData[item.id].label = '车站扳道员-' + device.name + (item.name || '');
this.memberData[item.id].labelName = '车站扳道员-' + device.name + (item.name || '');
stationSwitchMan[item.id] = this.memberData[item.id];
break;
case 'STATION_FACILITATOR':
this.memberData[item.id].label = '车站引导员-' + device.name + (item.name || '');
this.memberData[item.id].labelName = '车站引导员-' + device.name + (item.name || '');
stationFacilitator[item.id] = this.memberData[item.id];
break;
case 'STATION_WORKER':
this.memberData[item.id].label = '车站工务工-' + device.name + (item.name || '');
this.memberData[item.id].labelName = '车站工务工-' + device.name + (item.name || '');
stationWorker[item.id] = this.memberData[item.id];
break;
case 'DEVICE_MANAGER':
this.memberData[item.id].label = '设备管理员-' + device.name + (item.name || '');
this.memberData[item.id].labelName = '设备管理员-' + device.name + (item.name || '');
deviceManager[item.id] = this.memberData[item.id];
break;
case 'TRAIN_MASTER':
// + device.name
// + device.name
this.memberData[item.id].label = '车务段段长-' + (item.name || '');
this.memberData[item.id].labelName = '车务段段长-' + (item.name || '');
trainMaster[item.id] = this.memberData[item.id];
break;
} }
}); });
// { label: '', value: 'allConcentrateStation', active: false, sign: 'DEVICE_STATION' }, // { label: '', value: 'allConcentrateStation', active: false, sign: 'DEVICE_STATION' },
@ -474,6 +530,7 @@ export default {
type: 'role', type: 'role',
children: parentDepartmentList children: parentDepartmentList
}, { }, {
label: '电力调度', label: '电力调度',
id: 'electricDispatcher', id: 'electricDispatcher',
type: 'role', type: 'role',
@ -483,7 +540,62 @@ export default {
id: 'parkingLotSignalBuilding', id: 'parkingLotSignalBuilding',
type: 'role', type: 'role',
children: parkingLotSignalBuilding children: parkingLotSignalBuilding
}]; },
{
label: '车站助理',
id: 'stationAssistant',
type: 'role',
children: stationAssistant
},
{
label: '车站站长',
id: 'stationMaster',
type: 'role',
children: stationMaster
},
{
label: '车站信号员',
id: 'stationSignaler',
type: 'role',
children: stationSignaler
},
{
label: '车站客运员',
id: 'stationPassenger',
type: 'role',
children: stationPassenger
},
{
label: '车站扳道员',
id: 'stationSwitchMan',
type: 'role',
children: stationSwitchMan
},
{
label: '车站引导员',
id: 'stationFacilitator',
type: 'role',
children: stationFacilitator
},
{
label: '车站工务工',
id: 'stationWorker',
type: 'role',
children: stationWorker
},
{
label: '设备管理员',
id: 'deviceManager',
type: 'role',
children: deviceManager
},
{
label: '车务段段长',
id: 'trainMaster',
type: 'role',
children: trainMaster
}
];
this.initCommonMemberList(); this.initCommonMemberList();
this.filterNode(); this.filterNode();
// this.$nextTick(() => { // this.$nextTick(() => {
@ -515,6 +627,21 @@ export default {
} }
}); });
} }
if (this.myMemberId == val.memberId) {
this.connectSuccess = true;
document.querySelector('#teleName').classList.remove('flash');
document.querySelector('#teleRing').pause();
this.treeData.forEach(data => {
if (data.children) {
const member = data.children[val.creatorId];
if (member) {
member.active = true;
member.isConnect = true;
member.isInviting = false;
}
}
});
}
}, },
'$store.state.scriptRecord.audioPlay':function(val) { '$store.state.scriptRecord.audioPlay':function(val) {
this.audioPlay = val; this.audioPlay = val;
@ -804,10 +931,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);
@ -1016,6 +1143,15 @@ export default {
const temMaintainerList = []; const temMaintainerList = [];
const temDriverList = []; const temDriverList = [];
const temDepotDispatcherList = []; const temDepotDispatcherList = [];
const temStationAssistList = [];
const temStationMasterList = [];
const temStationSignalerList = [];
const temStationPassengerList = [];
const temStationSwitchManList = [];
const temStationFacilitatorList = [];
const temStationWorkerList = [];
const temDeviceManagerList = [];
const temTrainMasterList = [];
this.$store.state.training.memberList.forEach(item =>{ this.$store.state.training.memberList.forEach(item =>{
switch (item.type) { switch (item.type) {
case 'DISPATCHER': case 'DISPATCHER':
@ -1033,9 +1169,38 @@ export default {
case 'DEPOT_DISPATCHER': case 'DEPOT_DISPATCHER':
temDepotDispatcherList.push({memberId: item.id, connect:true }); temDepotDispatcherList.push({memberId: item.id, connect:true });
break; break;
case 'STATION_ASSISTANT':
temStationAssistList.push({memberId: item.id, connect:true });
break;
case 'STATION_MASTER':
temStationMasterList.push({memberId: item.id, connect:true });
break;
case 'STATION_SIGNALER':
temStationSignalerList.push({memberId: item.id, connect:true });
break;
case 'STATION_PASSENGER':
temStationPassengerList.push({memberId: item.id, connect:true });
break;
case 'STATION_SWITCH_MAN':
temStationSwitchManList.push({memberId: item.id, connect:true });
break;
case 'STATION_FACILITATOR':
temStationFacilitatorList.push({memberId: item.id, connect:true });
break;
case 'STATION_WORKER':
temStationWorkerList.push({memberId: item.id, connect:true });
break;
case 'DEVICE_MANAGER':
temDeviceManagerList.push({memberId: item.id, connect:true });
break;
case 'TRAIN_MASTER':
temTrainMasterList.push({memberId: item.id, connect:true });
break;
} }
}); });
this.commonMemberList = [...temDispatcherList, ...temStationSupervisorList, ...temMaintainerList, ...temDriverList, ...temDepotDispatcherList]; this.commonMemberList = [...temDispatcherList, ...temStationSupervisorList, ...temMaintainerList, ...temDriverList, ...temDepotDispatcherList,
...temStationAssistList, ...temStationMasterList, ...temStationSignalerList, ...temStationPassengerList, ...temStationSwitchManList,
...temStationFacilitatorList, ...temStationWorkerList, ...temDeviceManagerList, ...temTrainMasterList];
if (this.userRole == 'AUDIENCE' || this.commonConversation) { if (this.userRole == 'AUDIENCE' || this.commonConversation) {
this.conversitionMemberList = []; this.conversitionMemberList = [];
this.messageList = [...this.commonMessageList]; this.messageList = [...this.commonMessageList];

View File

@ -15,7 +15,7 @@ export function covertMemberData (activeTrainList, resp) {
lastData = JSON.parse(lastData); lastData = JSON.parse(lastData);
const lastMemberList = []; const lastMemberList = [];
// const electricDispatcherList = []; // const electricDispatcherList = [];
const deviceListData = [[], [], [], [], [], [], [], []]; const deviceListData = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []];
const driverList = []; const driverList = [];
lastData.forEach((member, index)=>{ lastData.forEach((member, index)=>{
if (member.userId && member.userId == store.state.user.id) { if (member.userId && member.userId == store.state.user.id) {
@ -37,7 +37,7 @@ export function covertMemberData (activeTrainList, resp) {
member.label = member.type + name + userName; member.label = member.type + name + userName;
member.normalName = member.type + name; member.normalName = member.type + name;
} }
const deviceType = ['行调', '通号', '行值', '司机', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼']; const deviceType = ['行调', '通号', '行值', '司机', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员', '车务段段长 '];
const deviceTypeIndex = deviceType.indexOf(member.type); const deviceTypeIndex = deviceType.indexOf(member.type);
if (deviceTypeIndex >= 0) { if (deviceTypeIndex >= 0) {
if (deviceTypeIndex == 3) { if (deviceTypeIndex == 3) {

View File

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

View File

@ -5,7 +5,7 @@
<el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`"> <el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`">
<!-- 地图错误判断 --> <!-- 地图错误判断 -->
<!-- 设备视图 --> <!-- 设备视图 -->
<el-button v-if="jl3dmodelShow && !isContest && project !== 'bjd' && project !== 'teaching'" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button> <el-button v-if="jl3dmodelShow && !isContest && project !== 'bjd' && $route.query.lineCode !== '16' && project !== 'teaching'" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
<!-- 三维视图/数字沙盘 --> <!-- 三维视图/数字沙盘 -->
<el-button v-if="jl3dnameShow && !isContest && project !== 'bjd' && $route.query.lineCode !== '16' && project !== 'teaching'" size="small" @click="jumpjlmap3d">{{ jl3dname }}</el-button> <el-button v-if="jl3dnameShow && !isContest && project !== 'bjd' && $route.query.lineCode !== '16' && project !== 'teaching'" size="small" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
<!-- cctv视图 --> <!-- cctv视图 -->

View File

@ -193,6 +193,88 @@ export default {
} }
case 'PARKING_LOT_SIGNAL_BUILDING': { case 'PARKING_LOT_SIGNAL_BUILDING': {
member.label = '停车场信号楼' + (member.name ? member.name : ''); member.label = '停车场信号楼' + (member.name ? member.name : '');
break;
}
case 'STATION_ASSISTANT': {
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
if (device) {
member.label = '车站助理-' + device.name + (member.name ? member.name : '');
member.deviceName = device.name;
}
// member.label = '' + (member.name ? member.name : '');
break;
}
case 'STATION_MASTER': {
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
if (device) {
member.label = '车站站长-' + device.name + (member.name ? member.name : '');
member.deviceName = device.name;
}
// member.label = '' + (member.name ? member.name : '');
break;
}
case 'STATION_SIGNALER': {
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
if (device) {
member.label = '车站信号员-' + device.name + (member.name ? member.name : '');
member.deviceName = device.name;
}
// member.label = '' + (member.name ? member.name : '');
break;
}
case 'STATION_PASSENGER': {
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
if (device) {
member.label = '车站客运员-' + device.name + (member.name ? member.name : '');
member.deviceName = device.name;
}
// member.label = '' + (member.name ? member.name : '');
break;
}
case 'STATION_SWITCH_MAN': {
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
if (device) {
member.label = '车站扳道员-' + device.name + (member.name ? member.name : '');
member.deviceName = device.name;
}
// member.label = '' + (member.name ? member.name : '');
break;
}
case 'STATION_FACILITATOR': {
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
if (device) {
member.label = '车站引导员-' + device.name + (member.name ? member.name : '');
member.deviceName = device.name;
}
// member.label = '' + (member.name ? member.name : '');
break;
}
case 'STATION_WORKER': {
// member.label = '' + (member.name ? member.name : '');
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
if (device) {
member.label = '车站工务工-' + device.name + (member.name ? member.name : '');
member.deviceName = device.name;
}
break;
}
case 'DEVICE_MANAGER': {
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
if (device) {
member.label = '设备管理员-' + device.name + (member.name ? member.name : '');
member.deviceName = device.name;
}
// member.label = '' + (member.name ? member.name : '');
break;
}
case 'TRAIN_MASTER': {
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
if (device) {
// + device.name
member.label = '车务段段长-' + (member.name ? member.name : '');
member.deviceName = device.name;
}
break;
} }
} }
}); });

View File

@ -1,17 +1,21 @@
<template> <template>
<div class="main" :style="{width: canvasWidth+'px',height:'100%',position:'absolute',overflow:'hidden'}"> <div class="main" :style="{width: canvasWidth+'px'}">
<template> <template>
<transition name="el-zoom-in-bottom"> <transition name="el-zoom-in-bottom">
<map-system-draft ref="mapCanvas" @back="back" /> <map-system-draft v-show="!specialDispatch" ref="mapCanvas" @back="back" />
</transition> </transition>
<menu-demon v-if="isDemon" ref="menuDemon" :offset="offset" :offset-bottom="offsetBottom" :data-error="dataError" :text-status-height="textStatusHeight" @start="start" @end="end" /> <menu-demon v-if="isDemon" ref="menuDemon" :offset="offset" :offset-bottom="offsetBottom" :data-error="dataError" :text-status-height="textStatusHeight" @start="start" @end="end" />
<menu-lesson v-if="isLesson" ref="lessonMenu" :offset="offset" :data-error="dataError" :offset-bottom="offsetBottom" :tip-bottom="tipBottom" /> <menu-lesson v-if="isLesson" ref="lessonMenu" :offset="offset" :data-error="dataError" :offset-bottom="offsetBottom" :tip-bottom="tipBottom" />
<menu-exam v-if="isExam" ref="menuExam" :offset="offset" :data-error="dataError" :offset-bottom="offsetBottom" /> <menu-exam v-if="isExam" ref="menuExam" :offset="offset" :data-error="dataError" :offset-bottom="offsetBottom" />
<menu-script v-if="isScript" ref="menuScript" :offset-bottom="offsetBottom" :offset="offset" :text-status-height="textStatusHeight" :data-error="dataError" @start="start" @end="end" /> <menu-script v-if="isScript" ref="menuScript" :offset-bottom="offsetBottom" :offset="offset" :text-status-height="textStatusHeight" :data-error="dataError" @start="start" @end="end" @changeShowMap="changeShowMap" />
<menu-dispather-contest v-if="isContest" ref="menuDispatherContest" :offset="offset" :offset-bottom="offsetBottom" :data-error="dataError" :text-status-height="textStatusHeight" @start="start" @end="end" /> <menu-dispather-contest v-if="isContest" ref="menuDispatherContest" :offset="offset" :offset-bottom="offsetBottom" :data-error="dataError" :text-status-height="textStatusHeight" @start="start" @end="end" />
<div v-if="lineCode === '16'" v-show="prdType === '02'&& !showMap" style="position:absolute;width: 100%;top:0;left:0;">
<!-- && (isScript || isDemon) -->
<dispatcher-station ref="dispatcherStation" @changeShowMap="changeShowMap" />
</div>
</template> </template>
<menu-train-list v-if="isDemon||isContest||isScript" /> <menu-train-list v-if="isDemon||isContest||isScript" />
<menu-system-time v-if="$route.query.lineCode !== '16'" ref="menuSystemTime" :offset="offset" :group="group" /> <menu-system-time v-if="lineCode !== '16'" ref="menuSystemTime" :offset="offset" :group="group" />
</div> </div>
</template> </template>
<script> <script>
@ -29,6 +33,7 @@ import MenuTrainList from '@/views/newMap/displayNew/menuTrainList';
import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime'; import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
import { clearSimulation, getSimulationInfoNew, ranAsPlan, exitRunPlan } from '@/api/simulation'; import { clearSimulation, getSimulationInfoNew, ranAsPlan, exitRunPlan } from '@/api/simulation';
import { loadMapDataById } from '@/utils/loaddata'; import { loadMapDataById } from '@/utils/loaddata';
import DispatcherStation from '../jointTrainingNew/dispatcherStation';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
export default { export default {
@ -41,7 +46,8 @@ export default {
MenuSystemTime, MenuSystemTime,
MenuTrainList, MenuTrainList,
MenuDispatherContest, MenuDispatherContest,
MenuScript MenuScript,
DispatcherStation
}, },
data() { data() {
return { return {
@ -51,7 +57,8 @@ export default {
textStatusHeight: 0, textStatusHeight: 0,
planRunning:false, planRunning:false,
dataError: false, dataError: false,
group:'' group:'',
showMap: false
}; };
}, },
computed:{ computed:{
@ -87,6 +94,15 @@ export default {
}, },
height() { height() {
return this.$store.state.app.height; return this.$store.state.app.height;
},
prdType() {
return this.$store.state.training.prdType;
},
lineCode() {
return this.$route.query.lineCode;
},
specialDispatch() {
return (this.lineCode === '14' && this.$store.state.training.prdType === '02') || (this.lineCode === '16' && this.$store.state.training.prdType === '02' && !this.showMap);
} }
}, },
watch:{ watch:{
@ -125,6 +141,7 @@ export default {
beforeDestroy() { beforeDestroy() {
clearSimulation(this.group); clearSimulation(this.group);
this.$store.dispatch('training/setSimulationUserList', []); this.$store.dispatch('training/setSimulationUserList', []);
this.$store.dispatch('training/setUserRole', '');
this.$store.dispatch('training/reset'); this.$store.dispatch('training/reset');
// this.$store.dispatch('map/mapClear'); // this.$store.dispatch('map/mapClear');
}, },
@ -201,7 +218,6 @@ export default {
this.group = this.$route.query.group; this.group = this.$route.query.group;
this.$store.dispatch('training/reset'); this.$store.dispatch('training/reset');
this.loadSimulationInfo(); this.loadSimulationInfo();
this.loadMapData();
}, },
// 仿group仿 // 仿group仿
async loadSimulationInfo() { async loadSimulationInfo() {
@ -221,6 +237,10 @@ export default {
if (resp.data.planRunning) { if (resp.data.planRunning) {
this.$store.commit('training/start'); this.$store.commit('training/start');
} }
if (this.isScript) {
this.$store.dispatch('training/setPrdType', '02');
}
this.loadMapData();
} else { } else {
this.$messageBox('此地图数据正在维护中,无法运行!'); this.$messageBox('此地图数据正在维护中,无法运行!');
} }
@ -321,7 +341,20 @@ export default {
}).catch(() => { }).catch(() => {
this.$messageBox(this.$t('display.demon.endSimulationFail')); this.$messageBox(this.$t('display.demon.endSimulationFail'));
}); });
},
changeShowMap(flag) {
this.showMap = flag;
} }
} }
}; };
</script> </script>
<style scoped lang="scss" rel="stylesheep/scss">
.main {
display: block;
width: 100% !important;
height: 100%;
overflow: hidden;
position: relative;
background: #000000;
}
</style>

View File

@ -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 {

View File

@ -1,5 +1,5 @@
<template> <template>
<div> <div style="height:100%;">
<div class="schema" :style="{top: offset+'px'}"> <div class="schema" :style="{top: offset+'px'}">
<select-station v-show="!$route.query.joint" v-if="isShowSelectStation && !isScript" ref="selectStation" :style-css="'width: 100px;'" /> <select-station v-show="!$route.query.joint" v-if="isShowSelectStation && !isScript" ref="selectStation" :style-css="'width: 100px;'" />
<el-select v-model="speed" style="width: 100px;" size="small" @change="speedChange"> <el-select v-model="speed" style="width: 100px;" size="small" @change="speedChange">
@ -12,9 +12,12 @@
</el-select> </el-select>
<template v-if="!dataError"> <template v-if="!dataError">
<el-button-group v-if="project !== 'bjd'"> <el-button-group v-if="project !== 'bjd'">
<el-button v-if="$route.query.lineCode === '16'&&!isCtc && project !== 'teaching'" size="small" @click="goCtc">车务终端</el-button> <el-button v-if="$route.query.lineCode === '16'&&!isCtc && project !== 'teaching'&&isLocalStation" size="small" @click="goCtc">车务终端</el-button>
<el-button v-if="$route.query.lineCode ==='16'&&isLocalStation" size="small" @click="showTrainTicket">路票</el-button>
<el-button v-if="$route.query.lineCode === '16'&&isLocalStation" size="small" @click="showRegisterBook">簿册</el-button>
<!-- <el-button v-if="$route.query.lineCode === '16'&&!isCtc" size="small" @click="goRpManage">管理终端</el-button> --> <!-- <el-button v-if="$route.query.lineCode === '16'&&!isCtc" size="small" @click="goRpManage">管理终端</el-button> -->
<!-- <el-button v-if="$route.query.lineCode === '16'&&!isCtc" size="small" @click="goDsManage">调度台</el-button> --> <!-- <el-button v-if="$route.query.lineCode === '16'&&!isCtc" size="small" @click="goDsManage">调度台</el-button> -->
<el-button v-if="showDispatcherStation" size="small" @click="changeShowMap">调度台</el-button>
<el-button v-if="isLocalStation && $route.query.lineCode!='08' && $route.query.lineCode!='16' && project !== 'teaching'" size="small" @click="goIbp">IBP盘</el-button> <el-button v-if="isLocalStation && $route.query.lineCode!='08' && $route.query.lineCode!='16' && project !== 'teaching'" size="small" @click="goIbp">IBP盘</el-button>
<el-button v-if="isScheduling && isDepot && project !== 'teaching'" size="small" type="primary" @click="runPlanEditShow">运行图编辑</el-button> <el-button v-if="isScheduling && isDepot && project !== 'teaching'" size="small" type="primary" @click="runPlanEditShow">运行图编辑</el-button>
<!-- 加载剧本 --> <!-- 加载剧本 -->
@ -37,6 +40,8 @@
<!-- 加载剧本列表弹窗 --> <!-- 加载剧本列表弹窗 -->
<add-quest ref="addQuest" @selectQuest="selectQuest" /> <add-quest ref="addQuest" @selectQuest="selectQuest" />
<line-board ref="lineBoard" /> <line-board ref="lineBoard" />
<train-ticket ref="trainTicket" />
<register-book ref="registerBook" />
<!-- <run-plan-edit v-if="isScheduling && isDepot" ref="runPlanEdit" /> --> <!-- <run-plan-edit v-if="isScheduling && isDepot" ref="runPlanEdit" /> -->
</div> </div>
</template> </template>
@ -56,6 +61,8 @@ import { getIbpInfoByStation } from '@/api/ibp';
import { loadRunPlanData } from '@/utils/loaddata'; import { loadRunPlanData } from '@/utils/loaddata';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import { timesSpeedPlayback } from '@/api/rtSimulation'; import { timesSpeedPlayback } from '@/api/rtSimulation';
import TrainTicket from '../trainTicket/index';
import RegisterBook from '../registerBook/index';
// //
export default { export default {
@ -67,7 +74,9 @@ export default {
AddQuest, AddQuest,
// RunPlanEdit, // RunPlanEdit,
SelectStation, SelectStation,
LineBoard LineBoard,
TrainTicket,
RegisterBook
}, },
props: { props: {
offset: { offset: {
@ -89,7 +98,9 @@ export default {
swch: '02', swch: '02',
isScriptCommand:false, isScriptCommand:false,
faultMode: false, faultMode: false,
speed: 1 speed: 1,
centralizedstationList: [],
centralizedStationMap: {}
// firstLoad: true // firstLoad: true
}; };
}, },
@ -130,12 +141,18 @@ export default {
isDepot() { isDepot() {
return this.$route.query.type === 'DEPOT'; return this.$route.query.type === 'DEPOT';
}, },
showDispatcherStation() {
return this.$route.query.lineCode === '16' && this.$store.state.training.prdType === '02';
},
isContest() { isContest() {
return this.project.includes('drts'); return this.project.includes('drts');
}, },
isAdmin() { isAdmin() {
return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05'); return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05');
}, },
userId() {
return this.$store.state.user ? this.$store.state.user.id : '';
},
speedList() { speedList() {
return this.isAdmin ? [ return this.isAdmin ? [
{ value: 1, label: '1倍速' }, { value: 1, label: '1倍速' },
@ -189,6 +206,21 @@ export default {
}, },
'$store.state.socket.simulationSpeed': function (val) { '$store.state.socket.simulationSpeed': function (val) {
this.speed = val; this.speed = val;
},
'$store.state.map.map': function (map) {
if (map) {
this.setCentralizedstationList(map); //
}
},
'$store.state.training.simulationUserList': function(list) {
if (list && list.length && this.$route.query.lineCode == '16' && this.isCtc && !this.$route.query.joint) {
this.checkRoleInit(list);
}
},
'$store.state.socket.simulationRoleList':function(list) {
if (list && list.length && this.$route.query.lineCode == '16' && this.isCtc && !this.$route.query.joint) {
this.checkRoleChange(list);
}
} }
}, },
mounted() { mounted() {
@ -220,24 +252,119 @@ export default {
showLineBoard() { showLineBoard() {
this.$refs.lineBoard.doShow(); this.$refs.lineBoard.doShow();
}, },
changeShowMap() {
this.$emit('changeShowMap', false);
},
goCtc() { goCtc() {
// const routeData = this.$router.resolve({
// path:'/displayNew/demon',
// query:{
// lineCode:this.$route.query.lineCode,
// group: this.$route.query.group,
// prdType: this.$store.state.training.prdType,
// mapId:this.$route.query.mapId,
// project: this.project,
// newApi: this.$route.query.newApi,
// ctc: true,
// try: this.$route.query.try,
// token:getToken(),
// noPreLogout: true
// }
// });
const routeData = this.$router.resolve({ const routeData = this.$router.resolve({
path:'/displayNew/demon', path:'/displayNew/demon',
query:{ query:{
lineCode:this.$route.query.lineCode, lineCode:this.$route.query.lineCode,
group: this.$route.query.group, group: this.$route.query.group,
prdType: this.$route.query.prdType, prdType: '01',
mapId:this.$route.query.mapId, mapId:this.$route.query.mapId,
project: this.project, project: this.project,
newApi: this.$route.query.newApi, newApi: false,
// joint: true,
ctc: true, ctc: true,
try: this.$route.query.try, try: this.$route.query.try || 0,
token:getToken(), token:getToken(),
noPreLogout: true noPreLogout: true
} }
}); });
window.open(routeData.href, '_blank'); window.open(routeData.href, '_blank');
}, },
showTrainTicket() {
const stationSupervisorList = [];
for (const memberId in this.$store.state.training.memberData) {
const item = this.$store.state.training.memberData[memberId];
if (item.type === 'STATION_SUPERVISOR') {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
const memberData = { labelName: '值班员-' + device.name + (item.name ? `-${item.name }` : ''), id:item.id, userId:item.userId };
stationSupervisorList.push(memberData);
}
}
EventBus.$emit('trainTicketMember', stationSupervisorList);
this.$refs.trainTicket.doShow();
},
showRegisterBook() {
this.$refs.registerBook.doShow();
},
checkRoleInit(data) {
const stationRoleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
'STATION_PASSENGER', 'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER'];
// 'TRAIN_MASTER'
data.forEach(item => {
if ((item.admin && item.online) && item.userId == this.userId && stationRoleList.includes(item.type)) {
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
this.deviceCode = item.deviceCode;
this.setShowStation(item.deviceCode);
this.$store.dispatch('training/setPrdType', '01');
}
});
},
checkRoleChange(data) {
const stationRoleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
'STATION_PASSENGER', 'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER'];
// 'TRAIN_MASTER'
data.forEach(item => {
if ((item.messageType === 'PLAY_CHANGE' || item.messageType === 'ONLINE' ) && item.userId == this.userId && stationRoleList.includes(item.type)) {
// this.userRole = item.type || 'AUDIENCE';
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
this.$store.dispatch('training/setUserRole', item.type);
this.deviceCode = item.deviceCode;
// this.setShowStation(item.deviceCode);
this.setShowStation(item.deviceCode);
this.$store.dispatch('training/setPrdType', '01');
// this.setSimulationPrdType(this.centralizedStationMap[item.deviceCode]);
// this.$nextTick(() => {
// if (item.deviceCode && this.$store.state.training.prdType !== '09') { this.setCenter(item.deviceCode); }
// });
}
});
},
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;
});
}
});
// if (this.centralizedstationList.length && !this.showStation) {
// this.showStation = this.centralizedstationList[0].value;
// }
},
// goRpManage() { // goRpManage() {
// const routeData = this.$router.resolve({ // const routeData = this.$router.resolve({
// path:'/bigTrainRunplanManage', // path:'/bigTrainRunplanManage',

View File

@ -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:{
@ -155,7 +156,42 @@ export const operateEnum = {
}, },
Station:{ Station:{
code:'stationCode', code:'stationCode',
type:'车站' type:'车站',
// 总辅助
ASSIST_PRESS_MAIN_ASSIST:{
isList:true,
params:[
{
code:'labelEnum',
name:'区间'
},
{
code:'pressDown',
name:'按钮',
result:[
{data:1, name:'按下', judge:'='},
{data:0, name:'弹起', judge:'='}
]
}
]
},
// 接辅助
ASSIST_PRESS_RECEIVE_ASSIST:{
code:'labelEnum',
name:'区间为'
},
// 发辅助
ASSIST_PRESS_DELIVER_ASSIST:{
code:'labelEnum',
name:'区间为'
}
// param:{
// labelEnum:model.labelEnum,
// stationCode:model.stationCode
// }
// labelEnum:model.labelEnum,
// stationCode:model.stationCode,
// pressDown:model.pressDown ? 0 : 1 // 1按下、0弹起
}, },
Driver:{ Driver:{
code:'groupNumber', code:'groupNumber',
@ -236,11 +272,381 @@ export const operateEnum = {
} }
] ]
} }
},
CTCZONE:{
function: getCTCDevicename,
CTC_ZONE_SAVE_RUN_PLAN:{
code:'planParam',
name:'添加行车计划',
isList:true,
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:'arrivePlanTime',
name:'到达时间'
},
{
code:'startRunPlan',
name:' 始发'
},
{
code:'transfinite',
name:' 超限',
result:transfiniteList
} }
]
},
CTC_ZONE_SAVE_TRACK_SECTION:{
name:'行车计划修改股道',
isList:true,
params:[
{
code:'stationCode',
name:'车站为',
function:getStationNameById
},
{
code:'runPlanCode',
name:'运行计划编码'
},
{
code:'sectionCode',
name:'股道',
function:getDeviceNameById
},
{
code:'model',
name:'接发类型',
result:[
{code:'R', name:'接车'},
{code:'D', name:'发车'}
]
}
]
},
CTC_ZONE_SAVE_PLAN_TIME:{
name:'行车计划修改时间',
isList:true,
params:[
{
code:'stationCode',
name:'车站为',
function:getStationNameById
},
{
code:'runPlanCode',
name:'运行计划编码'
},
{
code:'planTime',
name:'时间'
},
{
code:'model',
name:'接发类型',
result:[
{code:'R', name:'接车'},
{code:'D', name:'发车'}
]
}
]
}
},
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
}
]
},
CTC_SEND_NOTICE:{
isList:true,
name:'发送发车预告',
params:[
{
code:'stationCode',
name:'车站为',
function:getStationNameById
},
{
code:'runPlanCode',
name:'车次号',
function:getTripNumberByCode
}
]
},
CTC_AGREE_NOTICE:{
isList:true,
name:'同意发车预告',
params:[
{
code:'stationCode',
name:'车站为',
function:getStationNameById
},
{
code:'runPlanCode',
name:'车次号',
function:getTripNumberByCode
// 运行计划编码
}
]
}
},
RAIL:{
function: getRAILDevicename,
RAIL_QUERY_REGISTER:{
name:'查询行车簿册',
isList:true,
params:[
{
code:'stationCode',
name:'车站为',
function:getStationNameById
}
]
},
RAIL_FILL_IN_REGISTER:{
name:'填写行车簿册',
isList:true,
params:[
{
code:'stationCode',
name:'车站为',
function:getStationNameById
},
{
code:'line',
name:'单条记录',
function:getRecordByLine
}
]
},
RAIL_FILL_IN_TICKET:{
name:'填写票据'
},
RAIL_QUERY_TICKET:{
name:'查询票据',
isList:true,
params:[
{
code:'stationCode',
name:'车站为',
function:getStationNameById
}
]
},
RAIL_GIVE_TICKET_TO:{
name:'给出票据'
}
// CMD_RAIL_FILL_IN_TICKET: {value: 'RAIL_FILL_IN_TICKET', label: '填写票据'},
// CMD_RAIL_QUERY_TICKET: {value: 'RAIL_QUERY_TICKET', label: '查询票据'},
// CMD_RAIL_FILL_IN_REGISTER: {value: 'RAIL_FILL_IN_REGISTER', label: '填写行车簿册'},
// CMD_RAIL_QUERY_REGISTER: {value: 'RAIL_QUERY_REGISTER', label: '查询行车簿册'},
// CMD_RAIL_GIVE_TICKET_TO: {value: 'RAIL_GIVE_TICKET_TO', label: '给出票据'}
}
//
}; };
// // 调度台操作
// 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"
// }
// };
// 转换函数 // 转换函数
export function covertOperate(operationType, operationParamMap) { export function covertOperate(operationType, operationParamMap) {
debugger;
if (operationType == 'Set_Fault' || operationType == 'Cancel_Fault') { if (operationType == 'Set_Fault' || operationType == 'Cancel_Fault') {
let deviceName = ''; let deviceName = '';
const device = store.getters['map/getDeviceByCode'](operationParamMap.code) || {}; const device = store.getters['map/getDeviceByCode'](operationParamMap.code) || {};
@ -250,6 +656,8 @@ export function covertOperate(operationType, operationParamMap) {
} else { } else {
if (device._type == 'Power') { if (device._type == 'Power') {
deviceName = '供电线(' + device.code + ')'; deviceName = '供电线(' + device.code + ')';
} else if (device._type == 'Train') {
deviceName = '列车(' + device.groupNumber + ')';
} else { } else {
deviceName = '' + device.name; deviceName = '' + device.name;
} }
@ -268,7 +676,74 @@ export function covertOperate(operationType, operationParamMap) {
}); });
return tip; return tip;
} else { }
// else if (operationType.includes('CTC_ZONE')) {
// let tip = '请点击运行图';
// // let operateName = null;
// // Object.keys(CMD).forEach(key => {
// // Object.values(CMD[key]).forEach(el => {
// // if (el.value == operationType) {
// // operateName = el;
// // return;
// // }
// // });
// // });
// // tip += ',执行【' + operateName.label + '】操作';
// let operationParam = operationParamMap;
// const paramInfo = ctcZoneMap[operationType];
// tip += ',执行【' + paramInfo.name + '】操作';
// if (paramInfo.objName) {
// operationParam = operationParamMap[paramInfo.objName];
// }
// if (paramInfo.isList) {
// tip += ',参数:【';
// paramInfo.params.forEach(param=>{
// if (param.result) {
// param.result.forEach(result=>{
// if (result.code == operationParam[param.code]) {
// tip += param.name + '为' + result.name + '';
// }
// });
// } else if (param.function) {
// tip += param.name + '为' + covertFunction(param.function, operationParam[param.code]) + '';
// } else {
// tip += param.name + '为' + operationParam[param.code] + '';
// }
// });
// tip += '】';
// }
// debugger;
// // operationParamMap[]
// // if (paramInfo) {
// // if (paramInfo.isDevice) {
// // if (paramInfo.isList) {
// // paramName += '【' + paramInfo.name + ' ';
// // const deviceList = operationParamMap[paramInfo.code];
// // deviceList.forEach((device, index)=>{
// // paramName += covertFunction(paramInfo.function, device);
// // if (index != deviceList.length - 1) {
// // paramName += '';
// // }
// // });
// // paramName += '】';
// // } else {
// // operationParamMap[]
// return tip;
// // ctcZoneMap[operationType]
// // 调度台添加行车计划
// // CTC_ZONE_SAVE_TRACK_SECTION:{value:'CTC_ZONE_SAVE_TRACK_SECTION', label: '调度台行车计划修改股道'},
// // CTC_ZONE_SAVE_TRIP_NUMBER:{value:'CTC_ZONE_SAVE_TRIP_NUMBER', label: '调度台行车计划修改车次'},
// // CTC_ZONE_SAVE_PLAN_TIME:{value:'CTC_ZONE_SAVE_PLAN_TIME', label: '调度台行车计划修改时间'},
// // CTC_ZONE_SAVE_DIRECTION:{value:'CTC_ZONE_SAVE_DIRECTION', label: '调度台行车计划修改出入口'},
// // CTC_ZONE_SAVE_STATION:{value:'CTC_ZONE_SAVE_STATION', label: '调度台行车计划修改到发车站'},
// // CTC_ZONE_SAVE_RUN_PLAN:{value:'CTC_ZONE_SAVE_RUN_PLAN', label: '调度台添加行车计划'},
// // CTC_ZONE_DELETE_RUN_PLAN:{value:'CTC_ZONE_DELETE_RUN_PLAN', label: '调度台删除行车计划'},
// // CTC_ZONE_RELEASE_ALL_RUN_PLAN:{value:'CTC_ZONE_RELEASE_ALL_RUN_PLAN', label: '调度台发布所有行车计划'},
// // CTC_ZONE_RELEASE_STATION_RUN_PLAN:{value:'CTC_ZONE_RELEASE_STATION_RUN_PLAN', label: '调度台发布车站行车计划'},
// }
else {
let device = operationType.split('_')[0]; let device = operationType.split('_')[0];
if (device == 'CM') { if (device == 'CM') {
device = 'ControlConvertMenu'; device = 'ControlConvertMenu';
@ -276,6 +751,12 @@ export function covertOperate(operationType, operationParamMap) {
if (operationType == 'Train_Load_Spare_Train') { if (operationType == 'Train_Load_Spare_Train') {
device = 'Section'; device = 'Section';
} }
if (operationType.includes('ASSIST')) {
device = 'Station';
}
if (operationType.includes('CTC_ZONE')) {
device = 'CTCZONE';
}
const list = ['Train_Update_Type', const list = ['Train_Update_Type',
'Train_Add_Train_Trace', 'Train_Add_Train_Trace',
'Train_Remove_Train_Trace', 'Train_Remove_Train_Trace',
@ -342,6 +823,45 @@ function covertDeviceName(deviceInfo, deviceType) {
return deviceName; return deviceName;
} }
function getCTCDevicename(operationType) {
let deviceName = '';
const stationRPLogList = ['CTC_SEND_NOTICE', 'CTC_MODIFY_SECTION',
'CTC_STATION_SEND_OUT_RUN_PLAN', 'CTC_CANCEL_TWINKLE',
'CTC_MODIFY_TRIP_NUMBER', 'CTC_AGREE_NOTICE',
'CTC_MODIFY_ADJACENT_STATION'];
if (operationType.includes('CTC_ZONE')) {
deviceName = '请点击运行图';
} else if (stationRPLogList.includes(operationType)) {
deviceName = '车务终端 --> 行车日志';
} else 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 getRAILDevicename(operationType) {
let deviceName = '';
const ticketList = ['RAIL_FILL_IN_TICKET', 'RAIL_QUERY_TICKET', 'RAIL_GIVE_TICKET_TO'];
const registerList = ['RAIL_FILL_IN_REGISTER', 'RAIL_QUERY_REGISTER'];
if (ticketList.includes(operationType)) {
deviceName = '车务终端 --> 票据';
} else if (registerList.includes(operationType)) {
deviceName = '车务终端 --> 簿册';
}
return deviceName;
}
function covertOperation(deviceType, operationParamMap, operationType) { function covertOperation(deviceType, operationParamMap, operationType) {
let deviceName = '【'; let deviceName = '【';
let paramName = ''; let paramName = '';
@ -364,10 +884,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) {
@ -387,12 +909,17 @@ function covertOperation(deviceType, operationParamMap, operationType) {
} }
} else { } else {
if (paramInfo.isList) { if (paramInfo.isList) {
// debugger;
const params = paramInfo.params; const params = paramInfo.params;
if (params && params.length > 0) { if (params && params.length > 0) {
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) {
@ -441,6 +968,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=>{
@ -453,6 +992,31 @@ function getStationNameById(stationId) {
const station = store.getters['map/getDeviceByCode'](stationId) || {}; const station = store.getters['map/getDeviceByCode'](stationId) || {};
return station.name; return station.name;
} }
function getDeviceNameById(deviceCode) {
const device = store.getters['map/getDeviceByCode'](deviceCode) || {};
return device.name;
}
function getRecordByLine(line) {
// '{"stationCode":"Station58852","line":{"moonDay":"","hourMinute":"","result":"","noticeTime":{"moonDay":"","hourMinute":"","info":""},"arriveTime":{"moonDay":"","hourMinute":"","info":""},"endTime":{"moonDay":"","hourMinute":"","info":""}}}'
return ',结果为' + line.result;
// JSON.stringify(line);
}
function getTripNumberByCode(code) {
return code.slice(3, code.length || 0);
}
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 = '不同意';

View File

@ -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,68 @@ 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 if (role.type == '车务段段长') {
prdType = '';
type = 'TRAIN_MASTER';
this.$store.dispatch('training/setRoles', 'TRAIN_MASTER');
} 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 +355,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 +398,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;

View File

@ -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="showRegisterBookBtn" 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,41 @@ 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倍速' }
];
},
showRegisterBookBtn() {
const roleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_SIGNALER', 'STATION_SWITCH_MAN', 'STATION_MASTER', 'STATION_WORKER', 'DEVICE_MANAGER'];
return this.$route.query.lineCode === '16' && roleList.includes(this.$store.state.training.userRole);
} }
}, },
watch:{ watch:{
@ -130,6 +185,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 +207,40 @@ 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,
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);
@ -258,7 +350,78 @@ export default {
id: 'parkingLotSignalBuilding', id: 'parkingLotSignalBuilding',
type: 'role', type: 'role',
children: result.deviceListData[7] children: result.deviceListData[7]
}]; },
{
label: '车站助理',
id: 'stationAssistant',
type: 'role',
children: result.deviceListData[8]
},
{
label: '车站站长',
id: 'stationMaster',
type: 'role',
children: result.deviceListData[9]
},
{
label: '车站信号员',
id: 'stationSignaler',
type: 'role',
children: result.deviceListData[10]
},
{
label: '车站客运员',
id: 'stationPassenger',
type: 'role',
children: result.deviceListData[11]
},
{
label: '车站扳道员',
id: 'stationSwitchMan',
type: 'role',
children: result.deviceListData[12]
},
{
label: '车站引导员',
id: 'stationFacilitator',
type: 'role',
children: result.deviceListData[13]
},
{
label: '车站工务工',
id: 'stationWorker',
type: 'role',
children: result.deviceListData[14]
},
{
label: '设备管理员',
id: 'deviceManager',
type: 'role',
children: result.deviceListData[15]
},
{
label: '车务段段长',
id: 'trainMaster',
type: 'role',
children: result.deviceListData[16]
}
];
/**
* 车站助理
*/
// STATION_ASSISTANT,
// STATION_MASTER:'',
// STATION_SIGNALER:'',
// STATION_PASSENGER:'',
// STATION_SWITCH_MAN:'',
// STATION_FACILITATOR:'',
// STATION_WORKER:''
// stationMaster
// stationSignaler
// stationPassenger
// stationSwitchMan
// stationFacilitator
// stationWorker
const lastMemberList = result.lastMemberList; const lastMemberList = result.lastMemberList;
this.$emit('setTreeData', treeData); this.$emit('setTreeData', treeData);
this.$emit('setMemberData', lastMemberList); this.$emit('setMemberData', lastMemberList);
@ -340,6 +503,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 {
@ -404,6 +568,7 @@ export default {
.trainingButton{ .trainingButton{
position: absolute; position: absolute;
left: 5px; left: 5px;
z-index: 1;
} }
.display-draft{ .display-draft{
position: absolute; position: absolute;

View File

@ -1,8 +1,11 @@
<template> <template>
<div> <div style="width:100%;height:100%;">
<div class="display-draft"> <div class="display-draft">
<el-button-group> <el-button-group>
<el-button v-if="!isReplaceBg" type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button> <el-button v-if="!isReplaceBg" type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button>
<template v-if="$route.query.lineCode == '16'">
<el-button type="primary" @click="modifySystemTime">修改系统时间</el-button>
</template>
<el-button v-if="!isScriptCommand||isReplaceBg" type="danger" :disabled="dataError" @click="end">初始化</el-button> <el-button v-if="!isScriptCommand||isReplaceBg" type="danger" :disabled="dataError" @click="end">初始化</el-button>
<el-button v-if="!isScriptCommand||isReplaceBg" type="success" :disabled="isDisable||dataError" @click="selectBeginTime">{{ $t('scriptRecord.drivingByPlan') }}</el-button> <el-button v-if="!isScriptCommand||isReplaceBg" type="success" :disabled="isDisable||dataError" @click="selectBeginTime">{{ $t('scriptRecord.drivingByPlan') }}</el-button>
</el-button-group> </el-button-group>
@ -25,9 +28,11 @@
:offset="offset" :offset="offset"
:data-error="dataError" :data-error="dataError"
:offset-bottom="offsetBottom" :offset-bottom="offsetBottom"
@changeShowMap="changeShowMap"
/> />
<set-time ref="setTime" @ConfirmSelectBeginTime="start" /> <set-time ref="setTime" @ConfirmSelectBeginTime="start" />
<modify-time v-if="$route.query.lineCode == '16'" ref="modifySysTime" />
<tip-script-record-new <tip-script-record-new
ref="tipTaskRecordNew" ref="tipTaskRecordNew"
@ -54,6 +59,7 @@ import MenuSchema from '@/views/newMap/displayNew/menuSchema';
import DemonMenu from '@/views/newMap/displayNew/demonMenu'; import DemonMenu from '@/views/newMap/displayNew/demonMenu';
import TipScriptRecordNew from '@/views/scriptManage/tipScriptRecord'; import TipScriptRecordNew from '@/views/scriptManage/tipScriptRecord';
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 { Notification } from 'element-ui'; import { Notification } from 'element-ui';
import { getSimulationMemberList} from '@/api/simulation'; import { getSimulationMemberList} from '@/api/simulation';
import ChatBox from '@/views/newMap/chatView/chatBox.vue'; import ChatBox from '@/views/newMap/chatView/chatBox.vue';
@ -62,6 +68,7 @@ export default {
name: 'MenuScript', name: 'MenuScript',
components: { components: {
SetTime, SetTime,
ModifyTime,
MenuSchema, MenuSchema,
DemonMenu, DemonMenu,
TipScriptRecordNew, TipScriptRecordNew,
@ -93,7 +100,9 @@ export default {
return { return {
isScriptCommand:false, isScriptCommand:false,
isReplaceBg: false, isReplaceBg: false,
userRole:'' userRole:'',
centralizedstationList: [],
centralizedStationMap: {}
}; };
}, },
@ -118,6 +127,9 @@ export default {
}, },
isDisable() { isDisable() {
return this.$store.state.training.started; return this.$store.state.training.started;
},
userId() {
return this.$store.state.user ? this.$store.state.user.id : '';
} }
}, },
watch: { watch: {
@ -129,6 +141,11 @@ export default {
this.$store.dispatch('map/setShowCentralizedStationNum'); this.$store.dispatch('map/setShowCentralizedStationNum');
}); });
}, },
'$store.state.map.map': function (map) {
if (map) {
this.setCentralizedstationList(map); //
}
},
'$store.state.map.mapViewLoadedCount': function (val) { // '$store.state.map.mapViewLoadedCount': function (val) { //
getSimulationMemberList(this.group).then(resp => { getSimulationMemberList(this.group).then(resp => {
this.$store.dispatch('training/setMemberList', {memberList:resp.data, userId:this.$store.state.user.id}); this.$store.dispatch('training/setMemberList', {memberList:resp.data, userId:this.$store.state.user.id});
@ -137,8 +154,10 @@ export default {
return mem.userId != '' && mem.userId != undefined; return mem.userId != '' && mem.userId != undefined;
}); });
if (member) { if (member) {
const memberType = ['STATION_SUPERVISOR', 'DISPATCHER', 'DRIVER', 'MAINTAINER', 'DEPOT_DISPATCHER', 'PARENT_DEPARTMENT', 'ELECTRIC_DISPATCHER', 'PARKING_LOT_SIGNAL_BUILDING']; const memberType = ['STATION_SUPERVISOR', 'DISPATCHER', 'DRIVER', 'MAINTAINER', 'DEPOT_DISPATCHER', 'PARENT_DEPARTMENT',
const prdTypeList = ['01', '02', '04', '', '05', '', '']; 'ELECTRIC_DISPATCHER', 'PARKING_LOT_SIGNAL_BUILDING', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
'STATION_PASSENGER', 'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', ' TRAIN_MASTER'];
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) {
@ -156,7 +175,18 @@ export default {
}, },
'$store.state.scriptRecord.userRole':function (val) { '$store.state.scriptRecord.userRole':function (val) {
this.userRole = val; this.userRole = val;
},
// '$store.state.training.roleDeviceCode':function (val) {
// if (val) {
// this.setShowStation(val);
// }
// },
'$store.state.socket.simulationRoleList':function(list) {
if (list && list.length && this.$route.query.lineCode == '16') { //
this.checkRoleChange(list);
} }
}
}, },
beforeDestroy() { beforeDestroy() {
// this.clearAutoSave(); // this.clearAutoSave();
@ -174,6 +204,10 @@ export default {
}); });
}, },
methods: { methods: {
//
modifySystemTime() {
this.$refs.modifySysTime.doShow();
},
selectBeginTime() { selectBeginTime() {
this.$refs.setTime.doShow(); this.$refs.setTime.doShow();
}, },
@ -192,6 +226,63 @@ export default {
}, },
setReplace(isRp) { setReplace(isRp) {
this.isReplaceBg = isRp; this.isReplaceBg = isRp;
},
changeShowMap() {
this.$emit('changeShowMap', false);
},
checkRoleChange(data) {
const stationRoleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
'STATION_PASSENGER', 'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER'];
// 'TRAIN_MASTER'
data.forEach(item => {
if ((item.messageType === 'PLAY_CHANGE' || item.messageType === 'ONLINE' ) && item.userId == this.userId && (stationRoleList.includes(item.type) )) {
// this.userRole = item.type || 'AUDIENCE';
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
this.deviceCode = item.deviceCode;
if (item.type == 'STATION_SUPERVISOR' || item.type == 'STATION_SIGNALER') {
this.setShowStation(item.deviceCode);
this.$store.dispatch('training/setPrdType', '01');
} else {
const showStation = this.centralizedStationMap[item.deviceCode];
this.setShowStation('');
this.$jlmap.setCenter(showStation);
}
// this.setSimulationPrdType(this.centralizedStationMap[item.deviceCode]);
// this.$nextTick(() => {
// if (item.deviceCode && this.$store.state.training.prdType !== '09') { this.setCenter(item.deviceCode); }
// });
}
});
},
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;
});
}
});
// if (this.centralizedstationList.length && !this.showStation) {
// this.showStation = this.centralizedstationList[0].value;
// }
} }
} }
}; };

View File

@ -69,6 +69,35 @@ export default {
const member = this.$store.state.training.memberData[val]; const member = this.$store.state.training.memberData[val];
const station = this.$store.getters['map/getDeviceByCode'](member.deviceCode); const station = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
if (station) { if (station) {
const pictureLineCodeList = ['16'];
if (pictureLineCodeList.includes(this.$route.query.lineCode) && this.$store.state.map.map && this.$store.state.map.map.pictureList) {
const picture = this.$store.state.map.map.pictureList.find(picture => picture.stationCode === station.code && picture.type === 'chainStation');
if (picture) {
const mapDevice = this.$store.state.map.mapDevice;
const list = [];
const deviceList = [];
for (const key in mapDevice) {
list.push(mapDevice[key]);
deviceList.push(key);
}
this.$jlmap.updateShowStation(list, '');
this.$store.dispatch('map/setPictureDeviceMap', picture.deviceMap);
this.$jlmap.updatePicture(deviceList);
this.$jlmap.updateTransform(picture.scaling, picture.origin);
} else {
this.jmapShowStation(station);
}
} else {
this.jmapShowStation(station);
}
}
}).catch((err) => {
console.log(err);
this.showMemberId = this.oldShowMemberId;
this.$message.error('调整角色成员失败!');
});
},
jmapShowStation(station) {
this.showStation = station.code; this.showStation = station.code;
const showStationCode = this.stationCentralizedMap[station.code]; const showStationCode = this.stationCentralizedMap[station.code];
const mapDevice = this.$store.state.map.mapDevice; const mapDevice = this.$store.state.map.mapDevice;
@ -79,12 +108,6 @@ export default {
this.$store.dispatch('training/setRoleDeviceCode', station.code); this.$store.dispatch('training/setRoleDeviceCode', station.code);
this.$jlmap.updateShowStation(list, showStationCode || station.code); this.$jlmap.updateShowStation(list, showStationCode || station.code);
this.setCenter(showStationCode); this.setCenter(showStationCode);
}
}).catch((err) => {
console.log(err);
this.showMemberId = this.oldShowMemberId;
this.$message.error('调整角色成员失败!');
});
}, },
setCenter(code) { setCenter(code) {
if (this.$store.state.training.prdType === '09' && this.$store.state.map.map.displayList && this.$store.state.map.map.displayList.length) { if (this.$store.state.training.prdType === '09' && this.$store.state.map.map.displayList && this.$store.state.map.map.displayList.length) {
@ -150,6 +173,7 @@ export default {
list.push(mapDevice[key]); list.push(mapDevice[key]);
} }
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode); this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
this.$store.dispatch('training/setUserRole', item.type);
this.$jlmap.updateShowStation(list, showStationCode || item.deviceCode); this.$jlmap.updateShowStation(list, showStationCode || item.deviceCode);
this.setCenter(showStationCode); this.setCenter(showStationCode);
} }

Some files were not shown because too many files have changed in this diff Show More