Merge remote-tracking branch 'origin/test'
# Conflicts: # src/jmapNew/theme/datie_02/menus/menuButton.vue
This commit is contained in:
commit
76de50fc6a
12
src/App.vue
12
src/App.vue
@ -89,10 +89,12 @@ export default {
|
||||
}
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
this.subscribe();
|
||||
openIndexedDB();
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$store.dispatch('subscribe_un', {});
|
||||
},
|
||||
methods: {
|
||||
resizeHandler() {
|
||||
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/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')});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -56,7 +56,7 @@ export function deleteAllMap() {
|
||||
return request({
|
||||
url: `/api/mapBuild/delete/all`,
|
||||
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) {
|
||||
return request({
|
||||
@ -745,8 +754,8 @@ export function generateDepotCiData(mapId, stationCode) {
|
||||
}
|
||||
// 大铁线路批量生成进路
|
||||
export function generateRoute(mapId) {
|
||||
return request({
|
||||
url: `/api/draftMap/${mapId}/route/railway/generate`,
|
||||
method: 'post'
|
||||
});
|
||||
return request({
|
||||
url: `/api/draftMap/${mapId}/route/railway/generate`,
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
|
@ -284,6 +284,15 @@ export function getEveryDayRunPlanNew(group) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 大铁线路 修改系统时间 */
|
||||
export function modifySystemTime(data, group) {
|
||||
return request({
|
||||
url: `simulation/${group}/modifySystemTime`,
|
||||
method: 'PUT',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/** 新版地图按计划行车 */
|
||||
export function ranAsPlan(data, group) {
|
||||
return request({
|
||||
@ -513,3 +522,10 @@ export function queryIscsResourcesByGroup(group, params) {
|
||||
params
|
||||
});
|
||||
}
|
||||
/** 获取机器人驾驶参数 */
|
||||
export function getRobotDrivingParam(simulationId, groupNumber) {
|
||||
return request({
|
||||
url: `/simulation/${simulationId}/driveParam/${groupNumber}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -493,6 +493,7 @@ export default {
|
||||
endSectionCodeColon: 'Terminal stop:',
|
||||
|
||||
routePreview: 'In the preview',
|
||||
routeEdit: 'Route edit',
|
||||
accessType: 'Access property type',
|
||||
automaticAccessType: 'Automatic access type',
|
||||
nearSectionCode: 'Close to segment name',
|
||||
|
@ -435,6 +435,7 @@ export default {
|
||||
endSectionCodeColon: '终端停车点:',
|
||||
|
||||
routePreview: '进路预览',
|
||||
routeEdit: '进路编辑',
|
||||
accessType: '是否折返进路',
|
||||
nearSectionCode: '接近区段名称',
|
||||
continueProtectSwitchData: '延续保护道岔',
|
||||
|
@ -89,7 +89,7 @@ class SkinCode extends defaultStyle {
|
||||
unCommunicationOccupiedColor: '#FF0000', // 区段非通讯车占用颜色 (红色)
|
||||
|
||||
routeLockColor: '#FFFFFF', // 区段进路锁定颜色 (白色)
|
||||
faultLockColor: '#006400', // 区段故障锁定颜色
|
||||
faultLockColor: '#00FF00', // 区段故障锁定颜色
|
||||
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
blockColor: '#00FF00', // 区段封锁颜色
|
||||
@ -196,6 +196,7 @@ class SkinCode extends defaultStyle {
|
||||
defaultText: 0
|
||||
},
|
||||
lamp: {
|
||||
notBlock:true, // 封锁不设置颜色
|
||||
bgShow: false, // 是否被选中
|
||||
guidName: 'singleRY', // 成都三号线引导类型
|
||||
borderVariable: false, // 信号灯边框可变
|
||||
|
1147
src/jmapNew/config/skinCode/datie_02_1.js
Normal file
1147
src/jmapNew/config/skinCode/datie_02_1.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -196,6 +196,7 @@ class SkinCode extends defaultStyle {
|
||||
defaultText: 0
|
||||
},
|
||||
lamp: {
|
||||
notBlock:true, // 封锁不设置颜色
|
||||
bgShow: false, // 是否被选中
|
||||
guidName: 'singleRY', // 成都三号线引导类型
|
||||
borderVariable: false, // 信号灯边框可变
|
||||
@ -256,9 +257,33 @@ class SkinCode extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.SignalButton] = {
|
||||
shape: 'roundWithDock'
|
||||
shape: 'roundWithDock',
|
||||
fillColor: '#808080',
|
||||
showName: true,
|
||||
}
|
||||
|
||||
this[deviceType.SwitchFault] = {
|
||||
displayCondition: '01', // 显示条件 (01所有模式下显示 02 行调显示 03现地显示)
|
||||
text: {
|
||||
fontSize: 14, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
distance: -50 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
square: true, // 方形
|
||||
radiusR: 20,
|
||||
switchState: true, // 是否用颜色表示道岔状态
|
||||
controlColor: '#00ff00', // 定位颜色
|
||||
reverseColor: '#ffff00', // 反位颜色
|
||||
switchingColor: '#999999', // 转换中颜色
|
||||
faultColor: '#ff0000', // 挤岔颜色
|
||||
blockColor: '#0000ff', // 单封颜色
|
||||
lockColor: '#ff0000', // 单锁颜色
|
||||
lineWidth: 2,
|
||||
strokeColor: '#FFFFFF' // 控制灯描边样式
|
||||
}
|
||||
};
|
||||
|
||||
// 供电线路
|
||||
this[deviceType.Power] = {
|
||||
noElectricStrokeColor:'#808080', // 无电颜色
|
||||
|
@ -98,12 +98,13 @@ class SkinCode extends defaultStyle {
|
||||
fontWeight: 'bold', // 信号机名称字体粗细
|
||||
defaultColor: 'rgb(192,192,192)', // 信号灯字体默认色
|
||||
// '#FFFFFF'
|
||||
blockColor: '#FFFFFF', // 信号灯字体锁定颜色
|
||||
blockColor: 'rgb(192,192,192)', // 信号灯字体锁定颜色
|
||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||
},
|
||||
remainTimeColor: '#F00',
|
||||
dtTextNearSignalOffset:{x:35, y:5}, // 人工解锁延时时间坐标靠近信号机名称
|
||||
lamp: {
|
||||
notBlock:true, // 封锁不设置颜色
|
||||
bgShow: false, // 是否被选中
|
||||
guidName: 'singleRY', // 成都三号线引导类型
|
||||
borderVariable: false, // 信号灯边框可变
|
||||
|
@ -541,6 +541,7 @@ class SkinCode extends defaultStyle {
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
square: false, // 方形
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#000000', // 控制灯颜色
|
||||
offColor: '#ff0000',
|
||||
|
@ -85,15 +85,20 @@ class Jlmap {
|
||||
}
|
||||
reloadStyle(lineCode) {
|
||||
if (this.lineCode !== lineCode) {
|
||||
this.handleModelData(this.lineCode, lineCode);
|
||||
this.reloadModelData(this.lineCode, lineCode);
|
||||
}
|
||||
this.lineCode = lineCode;
|
||||
this.style = selectLineCode(lineCode);
|
||||
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() { // 加载默认状态
|
||||
const defaultStateDict = {};
|
||||
|
@ -23,7 +23,7 @@ export default class Resource extends Group {
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
create() { // 58
|
||||
const model = this.model;
|
||||
this.image = new Image({
|
||||
zlevel: this.zlevel,
|
||||
|
@ -45,12 +45,13 @@ export default class SaidLamp extends Group {
|
||||
this.control = new EControl({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
arc: {
|
||||
control: {
|
||||
shape: {
|
||||
cx: this.computedPosition.x,
|
||||
cy: this.computedPosition.y,
|
||||
r: this.deviceStyle.lamp.radiusR
|
||||
},
|
||||
isSquare: this.deviceStyle.lamp.square,
|
||||
subType: 'Control',
|
||||
lineWidth: this.deviceStyle.lamp.lineWidth || 0,
|
||||
fill: this.deviceStyle.lamp.controlColor,
|
||||
@ -282,7 +283,6 @@ export default class SaidLamp extends Group {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -596,6 +596,7 @@ class Signal extends Group {
|
||||
if (this.count == 2) { // 双灯
|
||||
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.style.Signal.lamp.darkColor && this.lamps[1].setBorderColor(this.style.Signal.lamp.darkColor);
|
||||
} else if (this.count == 1) { // 单灯
|
||||
if (this.model.useType == '05' && this.lamps[0]) { // 调车信号机
|
||||
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[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() {
|
||||
if (this.lamps.length === 1) {
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.whiteColor);
|
||||
@ -744,7 +749,9 @@ class Signal extends Group {
|
||||
}
|
||||
// 封锁
|
||||
block() {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
if (!this.style.Signal.lamp.notBlock) { // 大铁线路 对信号机封锁操作,不影响信号显示 其他线路正常
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
if (this.style.Signal.post.blockColor) { // 设置底座颜色
|
||||
this.sigPost.setColor(this.style.Signal.post.blockColor);
|
||||
}
|
||||
@ -992,7 +999,6 @@ class Signal extends Group {
|
||||
} else if (this.style.Signal.lamp.faultType == 'light') {
|
||||
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.hide();
|
||||
this.sigPost && this.sigPost.removeTerminalOptional();
|
||||
@ -1076,6 +1082,10 @@ class Signal extends Group {
|
||||
this.redWhite();
|
||||
break;
|
||||
}
|
||||
case 'GY': {
|
||||
this.greenYellow();
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
this.close(model.logicLight); // 信号关闭
|
||||
break;
|
||||
@ -1163,7 +1173,7 @@ class Signal extends Group {
|
||||
// 灯颜色状态显示
|
||||
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) {
|
||||
this.sigName && this.sigName.setAnimationStart(this.style.Signal.text.defaultColor);
|
||||
|
@ -1,338 +1,333 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import Line from 'zrender/src/graphic/shape/Line';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Arc from 'zrender/src/graphic/shape/Arc';
|
||||
import Circle from 'zrender/src/graphic/shape/Circle';
|
||||
import store from '@/store/index';
|
||||
import Group from 'zrender/src/container/Group'
|
||||
import Rect from 'zrender/src/graphic/shape/Rect'
|
||||
import Line from 'zrender/src/graphic/shape/Line'
|
||||
import Text from 'zrender/src/graphic/Text'
|
||||
import Arc from 'zrender/src/graphic/shape/Arc'
|
||||
import Circle from 'zrender/src/graphic/shape/Circle'
|
||||
import store from '@/store/index'
|
||||
const typeList = [
|
||||
'PICK_ASSIST',
|
||||
'DEPART_ASSIST',
|
||||
'ASSIST',
|
||||
'GUIDELOCK',
|
||||
'SECTION_FAULT_UNLOCK',
|
||||
'LOCATE',
|
||||
'REVERSE',
|
||||
'CANCEL',
|
||||
'HUMAN_RELEASE_ROUTE',
|
||||
'MONOLOCK',
|
||||
'UNLOCK',
|
||||
'BLOCK',
|
||||
'UNBLOCK',
|
||||
'CHANGE_DIRECTION'
|
||||
]
|
||||
|
||||
export default class SignalButton extends Group {
|
||||
constructor(model, {style}) {
|
||||
super();
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
this.zlevel = model.zlevel;
|
||||
const pictureDevice = store.getters['map/getPictureDeviceByCode'](model.code);
|
||||
if (pictureDevice) {
|
||||
this.computedPosition = pictureDevice.position;
|
||||
} else {
|
||||
this.computedPosition = model.position;
|
||||
}
|
||||
this.z = 0;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
// Line
|
||||
this.create();
|
||||
this.setState(model);
|
||||
constructor(model, { style }) {
|
||||
super()
|
||||
this._code = model.code
|
||||
this._type = model._type
|
||||
this.zlevel = model.zlevel
|
||||
const pictureDevice = store.getters['map/getPictureDeviceByCode'](model.code)
|
||||
if (pictureDevice) {
|
||||
this.computedPosition = pictureDevice.position
|
||||
} else {
|
||||
this.computedPosition = model.position
|
||||
}
|
||||
this.z = 0
|
||||
this.model = model
|
||||
this.style = style
|
||||
this.pressed = false
|
||||
// Line
|
||||
this.create()
|
||||
this.setState(model)
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const computedPosition = this.computedPosition;
|
||||
const fillColor = this.getTypeColor();
|
||||
// const queryList = window.location.search.substring(1).split('&');
|
||||
// const queryCtc = queryList.find(item => {
|
||||
// return item.includes('ctc');
|
||||
// });
|
||||
// const ctcArcList = ['OCCLUSION', 'RECOVERY', 'CHANGE_DIRECTION', 'ACCIDENT', 'DEPART_ASSIST', 'PICK_ASSIST', 'ASSIST'];
|
||||
const typeList = [];
|
||||
// debugger;
|
||||
// console.log(model.type);
|
||||
// if (queryCtc && ctcArcList.includes(model.type)) {
|
||||
// // debugger;
|
||||
// this.arcShape = new Arc({
|
||||
// zlevel: this.zlevel,
|
||||
// z: this.z,
|
||||
// shape: {
|
||||
// cx: computedPosition.x + 7,
|
||||
// cy: computedPosition.y + 7,
|
||||
// r: 7
|
||||
// },
|
||||
// style: {
|
||||
// stroke: '#69666E',
|
||||
// lineWidth: 1,
|
||||
// fill: fillColor
|
||||
// }
|
||||
// });
|
||||
// this.add(this.arcShape);
|
||||
// } else
|
||||
if (this.style.SignalButton &&
|
||||
this.style.SignalButton.shape === 'roundWithDock' &&
|
||||
typeList.includes(model.type)) {
|
||||
const circle1 = new Circle({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 2,
|
||||
shape: {
|
||||
cx: computedPosition.x + 7,
|
||||
cy: computedPosition.y + 7,
|
||||
r: 7
|
||||
},
|
||||
style: {
|
||||
stroke: '#69666E',
|
||||
lineWidth: 1,
|
||||
fill: fillColor
|
||||
}
|
||||
});
|
||||
const circle2 = new Circle({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
cx: computedPosition.x + 7,
|
||||
cy: computedPosition.y + 9,
|
||||
r: 8
|
||||
},
|
||||
style: {
|
||||
fill: '#000'
|
||||
}
|
||||
});
|
||||
const circle3 = new Circle({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
cx: computedPosition.x + 7,
|
||||
cy: computedPosition.y + 9,
|
||||
r: 9
|
||||
},
|
||||
style: {
|
||||
fill: '#eee'
|
||||
}
|
||||
});
|
||||
this.arcShape = circle1;
|
||||
this.add(circle1).add(circle2).add(circle3);
|
||||
create() {
|
||||
const model = this.model
|
||||
const computedPosition = this.computedPosition
|
||||
const fillColor = this.getTypeColor()
|
||||
if (this.style.SignalButton && this.style.SignalButton.shape === 'roundWithDock' && typeList.includes(model.type)) {
|
||||
const circle1 = new Circle({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 2,
|
||||
shape: {
|
||||
cx: computedPosition.x + 7,
|
||||
cy: computedPosition.y + 7,
|
||||
r: 7
|
||||
},
|
||||
style: {
|
||||
stroke: '#69666E',
|
||||
lineWidth: 1,
|
||||
fill: fillColor
|
||||
}
|
||||
})
|
||||
const circle2 = new Circle({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
cx: computedPosition.x + 7,
|
||||
cy: computedPosition.y + 9,
|
||||
r: 8
|
||||
},
|
||||
style: {
|
||||
fill: '#000'
|
||||
}
|
||||
})
|
||||
const circle3 = new Circle({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
cx: computedPosition.x + 7,
|
||||
cy: computedPosition.y + 9,
|
||||
r: 9
|
||||
},
|
||||
style: {
|
||||
fill: '#eee'
|
||||
}
|
||||
})
|
||||
this.arcShape = circle1
|
||||
this.arcShapeDock1 = circle2
|
||||
this.arcShapeDock2 = circle3
|
||||
this.add(circle1)
|
||||
.add(circle2)
|
||||
.add(circle3)
|
||||
} else {
|
||||
this.rectButton = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
x: computedPosition.x,
|
||||
y: computedPosition.y,
|
||||
width: 14,
|
||||
height: 14
|
||||
},
|
||||
style: {
|
||||
lineDash: null,
|
||||
stroke: '#69666E',
|
||||
lineWidth: 1,
|
||||
fill: fillColor
|
||||
}
|
||||
})
|
||||
this.add(this.rectButton)
|
||||
}
|
||||
this.leftLine = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: computedPosition.x + 1,
|
||||
y1: computedPosition.y + 1,
|
||||
x2: computedPosition.x + 13,
|
||||
y2: computedPosition.y + 13
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#ff0000'
|
||||
}
|
||||
})
|
||||
this.add(this.leftLine)
|
||||
this.leftLine.hide()
|
||||
this.rightLine = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: computedPosition.x + 13,
|
||||
y1: computedPosition.y + 1,
|
||||
x2: computedPosition.x + 1,
|
||||
y2: computedPosition.y + 13
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#ff0000'
|
||||
}
|
||||
})
|
||||
this.add(this.rightLine)
|
||||
this.rightLine.hide()
|
||||
this.leftBoard = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: computedPosition.x - 1,
|
||||
y1: computedPosition.y - 1,
|
||||
x2: computedPosition.x - 1,
|
||||
y2: computedPosition.y + 15
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#FFFFFF'
|
||||
}
|
||||
})
|
||||
this.add(this.leftBoard)
|
||||
this.leftBoard.hide()
|
||||
this.topBoard = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: computedPosition.x - 1,
|
||||
y1: computedPosition.y - 1,
|
||||
x2: computedPosition.x + 15,
|
||||
y2: computedPosition.y - 1
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#FFFFFF'
|
||||
}
|
||||
})
|
||||
this.add(this.topBoard)
|
||||
this.topBoard.hide()
|
||||
this.rightBoard = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: computedPosition.x + 15,
|
||||
y1: computedPosition.y - 1,
|
||||
x2: computedPosition.x + 15,
|
||||
y2: computedPosition.y + 15
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#A0A0A0'
|
||||
}
|
||||
})
|
||||
this.add(this.rightBoard)
|
||||
this.rightBoard.hide()
|
||||
this.bottomBoard = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: computedPosition.x - 1,
|
||||
y1: computedPosition.y + 15,
|
||||
x2: computedPosition.x + 15,
|
||||
y2: computedPosition.y + 15
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#A0A0A0'
|
||||
}
|
||||
})
|
||||
this.add(this.bottomBoard)
|
||||
this.bottomBoard.hide()
|
||||
const hasTextList = ['PASS', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION']
|
||||
if (hasTextList.includes(model.type) || (this.style.SignalButton && this.style.SignalButton.showName)) {
|
||||
this.buttonText = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
x: computedPosition.x + model.nameOffset.x,
|
||||
y: computedPosition.y + model.nameOffset.y,
|
||||
fontWeight: '400',
|
||||
fontSize: 10,
|
||||
fontFamily: '',
|
||||
text: model.name,
|
||||
textFill: '#C0C0C0',
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top'
|
||||
}
|
||||
})
|
||||
this.add(this.buttonText)
|
||||
}
|
||||
}
|
||||
startAnimate() {
|
||||
this.rectButton &&
|
||||
this.rectButton
|
||||
.animateStyle(true)
|
||||
.when(0, { fill: '#000' })
|
||||
.when(1000, { fill: this.getTypeColor() })
|
||||
.when(2000, { fill: '#000' })
|
||||
.start()
|
||||
}
|
||||
stopAnimation() {
|
||||
this.rectButton && this.rectButton.stopAnimation(true)
|
||||
// this.arcFlash && this.arcFlash.stopAnimation(false);
|
||||
}
|
||||
getTypeColor() {
|
||||
if (this.style.SignalButton && this.style.SignalButton.fillColor && typeList.includes(this.model.type)) {
|
||||
return this.style.SignalButton.fillColor
|
||||
}
|
||||
let color = ''
|
||||
const list = ['ASSIST', 'ACCIDENT', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION']
|
||||
if (this.model.type === 'FLEXIBLE' || this.model.type === 'SHUNT_TERMINAL') {
|
||||
color = '#808080'
|
||||
} else if (this.model.type === 'GUIDE') {
|
||||
color = '#5050E1'
|
||||
} else if (list.includes(this.model.type)) {
|
||||
color = '#ccc'
|
||||
} else {
|
||||
color = '#008000'
|
||||
}
|
||||
return color
|
||||
} //
|
||||
recover() {
|
||||
this.stopAnimation()
|
||||
this.rectButton && this.rectButton.setStyle({ fill: this.getTypeColor() })
|
||||
this.arcShape && this.arcShape.setStyle({ fill: this.getTypeColor() })
|
||||
this.rightLine && this.rightLine.hide()
|
||||
this.leftLine && this.leftLine.hide()
|
||||
this.rectButton && this.rectButton.show()
|
||||
this.arcShape && this.arcShape.show()
|
||||
this.arcShapeDock1 && this.arcShapeDock1.show()
|
||||
this.arcShapeDock2 && this.arcShapeDock2.show()
|
||||
this.buttonText && this.buttonText.show()
|
||||
this.leftBoard && this.leftBoard.hide()
|
||||
this.rightBoard && this.rightBoard.hide()
|
||||
this.topBoard && this.topBoard.hide()
|
||||
this.bottomBoard && this.bottomBoard.hide()
|
||||
}
|
||||
blockShow() {
|
||||
this.rightLine && this.rightLine.show()
|
||||
this.leftLine && this.leftLine.show()
|
||||
}
|
||||
setState(model) {
|
||||
this.recover()
|
||||
// { value: 'ASSIST', label: '总辅助按钮' },
|
||||
// { value: 'PICK_ASSIST', label: '接辅助按钮' },
|
||||
// { value: 'DEPART_ASSIST', label: '发辅助按钮' },
|
||||
const list = ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION']
|
||||
if (list.includes(model.type)) {
|
||||
if (this.rectButton) {
|
||||
if (model.pressDown) {
|
||||
this.rectButton.setStyle({ fill: '#FFFF00' })
|
||||
} else {
|
||||
this.rectButton = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
x: computedPosition.x,
|
||||
y: computedPosition.y,
|
||||
width: 14,
|
||||
height: 14
|
||||
},
|
||||
style: {
|
||||
lineDash: null,
|
||||
stroke: '#69666E',
|
||||
lineWidth:1,
|
||||
fill: fillColor
|
||||
}
|
||||
});
|
||||
this.add(this.rectButton);
|
||||
this.rectButton.setStyle({ fill: this.getTypeColor() })
|
||||
}
|
||||
this.leftLine = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: computedPosition.x + 1,
|
||||
y1: computedPosition.y + 1,
|
||||
x2: computedPosition.x + 13,
|
||||
y2: computedPosition.y + 13
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#ff0000'
|
||||
}
|
||||
});
|
||||
this.add(this.leftLine);
|
||||
this.leftLine.hide();
|
||||
this.rightLine = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: computedPosition.x + 13,
|
||||
y1: computedPosition.y + 1,
|
||||
x2: computedPosition.x + 1,
|
||||
y2: computedPosition.y + 13
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#ff0000'
|
||||
}
|
||||
});
|
||||
this.add(this.rightLine);
|
||||
this.rightLine.hide();
|
||||
this.leftBoard = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: computedPosition.x - 1,
|
||||
y1: computedPosition.y - 1,
|
||||
x2: computedPosition.x - 1,
|
||||
y2: computedPosition.y + 15
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#FFFFFF'
|
||||
}
|
||||
});
|
||||
this.add(this.leftBoard);
|
||||
this.leftBoard.hide();
|
||||
this.topBoard = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: computedPosition.x - 1,
|
||||
y1: computedPosition.y - 1,
|
||||
x2: computedPosition.x + 15,
|
||||
y2: computedPosition.y - 1
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#FFFFFF'
|
||||
}
|
||||
});
|
||||
this.add(this.topBoard);
|
||||
this.topBoard.hide();
|
||||
this.rightBoard = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: computedPosition.x + 15,
|
||||
y1: computedPosition.y - 1,
|
||||
x2: computedPosition.x + 15,
|
||||
y2: computedPosition.y + 15
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#A0A0A0'
|
||||
}
|
||||
});
|
||||
this.add(this.rightBoard);
|
||||
this.rightBoard.hide();
|
||||
this.bottomBoard = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 1,
|
||||
shape: {
|
||||
x1: computedPosition.x - 1,
|
||||
y1: computedPosition.y + 15,
|
||||
x2: computedPosition.x + 15,
|
||||
y2: computedPosition.y + 15
|
||||
},
|
||||
style: {
|
||||
lineWidth: 2,
|
||||
stroke: '#A0A0A0'
|
||||
}
|
||||
});
|
||||
this.add(this.bottomBoard);
|
||||
this.bottomBoard.hide();
|
||||
const hasTextList = ['PASS', 'ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'ACCIDENT', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION'];
|
||||
if (hasTextList.includes(model.type)) {
|
||||
this.buttonText = new Text({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: {
|
||||
x: computedPosition.x + model.nameOffset.x,
|
||||
y: computedPosition.y + model.nameOffset.y,
|
||||
fontWeight: '400',
|
||||
fontSize: 10,
|
||||
fontFamily: '',
|
||||
text: model.name,
|
||||
textFill: '#C0C0C0',
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top'
|
||||
}
|
||||
});
|
||||
this.add(this.buttonText);
|
||||
}
|
||||
}
|
||||
// { value: 'PICK', label: '接车按钮' },
|
||||
// { value: 'SHUNT_TERMINAL', label: '调车终端按钮' },
|
||||
if (!store.getters['map/checkDeviceShow'](this._code)) {
|
||||
this.buttonText && this.buttonText.hide()
|
||||
this.rectButton && this.rectButton.hide()
|
||||
this.leftLine && this.leftLine.hide()
|
||||
this.rightLine && this.rightLine.hide()
|
||||
this.arcShape && this.arcShape.hide()
|
||||
this.arcShapeDock1 && this.arcShapeDock1.hide()
|
||||
this.arcShapeDock2 && this.arcShapeDock2.hide()
|
||||
} else {
|
||||
if (model.hasSelected) {
|
||||
this.startAnimate()
|
||||
}
|
||||
}
|
||||
}
|
||||
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()
|
||||
}
|
||||
// if (model.type === 'CHANGE_DIRECTION') {
|
||||
// this.arcFlash = new Arc({
|
||||
// _subType: 'change_direction_flash',
|
||||
// zlevel: this.zlevel,
|
||||
// z: this.z,
|
||||
// shape: {
|
||||
// cx: model.position.x + 18 + 7,
|
||||
// cy: model.position.y + 7,
|
||||
// r: 6
|
||||
// },
|
||||
// style: {
|
||||
// lineWidth: 0,
|
||||
// fill: '#ffff00'
|
||||
// }
|
||||
// });
|
||||
// this.add(this.arcFlash);
|
||||
// }
|
||||
}
|
||||
startAnimate() {
|
||||
this.rectButton && this.rectButton.animateStyle(true)
|
||||
.when(0, { fill: '#000' })
|
||||
.when(1000, { fill: this.getTypeColor() })
|
||||
.when(2000, { fill: '#000' })
|
||||
.start();
|
||||
}
|
||||
stopAnimation() {
|
||||
this.rectButton && this.rectButton.stopAnimation(true);
|
||||
// this.arcFlash && this.arcFlash.stopAnimation(false);
|
||||
}
|
||||
getTypeColor() {
|
||||
let color = '';
|
||||
const list = ['ASSIST', 'ACCIDENT', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'RECOVERY', 'OCCLUSION'];
|
||||
if (this.model.type === 'FLEXIBLE' || this.model.type === 'SHUNT_TERMINAL') {
|
||||
color = '#808080';
|
||||
} else if (this.model.type === 'GUIDE') {
|
||||
color = '#5050E1';
|
||||
} else if (list.includes(this.model.type)) {
|
||||
color = '#ccc';
|
||||
} else {
|
||||
color = '#008000';
|
||||
}
|
||||
return color;
|
||||
}//
|
||||
recover() {
|
||||
this.stopAnimation();
|
||||
this.rectButton && this.rectButton.setStyle({ fill:this.getTypeColor() });
|
||||
this.arcShape && this.arcShape.setStyle({ fill:this.getTypeColor() });
|
||||
this.rightLine && this.rightLine.hide();
|
||||
this.leftLine && this.leftLine.hide();
|
||||
this.rectButton && this.rectButton.show();
|
||||
this.arcShape && this.arcShape.show();
|
||||
this.buttonText && this.buttonText.show();
|
||||
this.leftBoard && this.leftBoard.hide();
|
||||
this.rightBoard && this.rightBoard.hide();
|
||||
this.topBoard && this.topBoard.hide();
|
||||
this.bottomBoard && this.bottomBoard.hide();
|
||||
}
|
||||
blockShow() {
|
||||
this.rightLine && this.rightLine.show();
|
||||
this.leftLine && this.leftLine.show();
|
||||
}
|
||||
setState(model) {
|
||||
this.recover();
|
||||
// { value: 'ASSIST', label: '总辅助按钮' },
|
||||
// { value: 'PICK_ASSIST', label: '接辅助按钮' },
|
||||
// { value: 'DEPART_ASSIST', label: '发辅助按钮' },
|
||||
const list = ['ASSIST', 'PICK_ASSIST', 'DEPART_ASSIST', 'CHANGE_DIRECTION', 'ACCIDENT', 'RECOVERY', 'OCCLUSION'];
|
||||
if (list.includes(model.type)) {
|
||||
if (this.rectButton) {
|
||||
if (model.pressDown) {
|
||||
this.rectButton.setStyle({ fill:'#FFFF00' });
|
||||
// this.arcFlash.show();
|
||||
// const style = this.style;
|
||||
// this.arcFlash.animateStyle(true)
|
||||
// .when(0, { fill: style.backgroundColor })
|
||||
// .when(500, { fill: '#FFFF00' })
|
||||
// .when(1000, { fill: style.backgroundColor })
|
||||
// .start();
|
||||
} else {
|
||||
this.rectButton.setStyle({ fill:this.getTypeColor() });
|
||||
// this.arcFlash.stopAnimation(false);
|
||||
// this.arcFlash.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
// let
|
||||
// { value: 'PICK', label: '接车按钮' },
|
||||
// { value: 'SHUNT_TERMINAL', label: '调车终端按钮' },
|
||||
if (!store.getters['map/checkDeviceShow'](this._code)) {
|
||||
this.buttonText && this.buttonText.hide();
|
||||
this.rectButton && this.rectButton.hide();
|
||||
this.leftLine && this.leftLine.hide();
|
||||
this.rightLine && this.rightLine.hide();
|
||||
this.arcShape && this.arcShape.hide();
|
||||
} else {
|
||||
if (model.hasSelected) {
|
||||
this.startAnimate();
|
||||
}
|
||||
}
|
||||
}
|
||||
getAnchorPoint() {
|
||||
} 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() {}
|
||||
}
|
||||
|
@ -26,8 +26,6 @@ class ESwDot extends Group {
|
||||
this.add(this.dot)
|
||||
}
|
||||
setColor(color) {
|
||||
console.log(this.dot)
|
||||
console.log(color)
|
||||
this.dot.setStyle({ fill: color })
|
||||
}
|
||||
}
|
||||
|
@ -481,15 +481,25 @@ export default class Switch extends Group {
|
||||
.start();
|
||||
}
|
||||
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||
setSwitchFault(fault) {
|
||||
setSwitchFault(model) {
|
||||
const { pos, fault, /* 单锁 */singleLock, /* 封锁 */blockade } = model
|
||||
const faultList = ['SPLIT', 'SQUEEZE', 'NORMAL_SPLIT', 'REVERSE_SPLIT', 'SPLIT_1'];
|
||||
// (fault === 'SPLIT' || fault === 'SQUEEZE' || (fault === 'NORMAL_SPLIT' && !reversePosition) || (fault === 'REVERSE_SPLIT' && !normalPosition))
|
||||
if (this.model.switchFaultCode && fault && faultList.includes(fault) ) {
|
||||
if (this.model.switchFaultCode) {
|
||||
const switchFault = this.mapDevice[this.model.switchFaultCode];
|
||||
switchFault.instance.setControlColor('#F00', true);
|
||||
} else if (this.model.switchFaultCode) {
|
||||
const switchFault = this.mapDevice[this.model.switchFaultCode];
|
||||
switchFault.instance.setControlColor(this.style.backgroundColor, false);
|
||||
if (this.style.SwitchFault.lamp.switchState) {
|
||||
if (pos === 'N') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.controlColor)
|
||||
else if (pos === 'R') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.reverseColor)
|
||||
else if (pos === 'NO') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.switchingColor)
|
||||
else if (pos === 'EX') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.faultColor)
|
||||
if (singleLock) switchFault.instance.setControlColor(this.style.SwitchFault.lamp.lockColor)
|
||||
if (blockade === 'EX') switchFault.instance.setControlColor(this.style.SwitchFault.lamp.blockColor)
|
||||
} else {
|
||||
if ( fault && faultList.includes(fault) ) {
|
||||
switchFault.instance.setControlColor('#F00', true);
|
||||
} else {
|
||||
switchFault.instance.setControlColor(this.style.backgroundColor, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
// stopAnimation
|
||||
this.shapeModelB.stopAnimation(false);
|
||||
@ -803,7 +813,7 @@ export default class Switch extends Group {
|
||||
this.setAshShow();
|
||||
}
|
||||
} else {
|
||||
this.setSwitchFault(model.fault);
|
||||
this.setSwitchFault(model);
|
||||
|
||||
// model.pos == 'NO' || model.pos == 'EX';
|
||||
// N-定位 R-反位 NO-无(失表) EX-挤叉
|
||||
|
@ -13,23 +13,40 @@ export default class EControl extends Group {
|
||||
this.z = model.z;
|
||||
this.style = model.style;
|
||||
this.textStyle = model.text;
|
||||
this.arcStyle = model.arc;
|
||||
this.controlStyle = model.control;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
this.control = new Arc({
|
||||
_subType: this.arcStyle.subType,
|
||||
this.control = this.controlStyle.isSquare ? new Rect({
|
||||
_subType: this.controlStyle.subType,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: this.arcStyle.shape,
|
||||
style: {
|
||||
lineWidth: this.arcStyle.lineWidth,
|
||||
fill: this.arcStyle.fill,
|
||||
stroke: this.arcStyle.stroke
|
||||
shape: {
|
||||
width: this.controlStyle.shape.r,
|
||||
height: this.controlStyle.shape.r,
|
||||
x: this.controlStyle.shape.cx - this.controlStyle.shape.r / 2,
|
||||
y: this.controlStyle.shape.cy - this.controlStyle.shape.r / 2,
|
||||
},
|
||||
onmouseover: this.arcStyle.mouseover,
|
||||
onmouseout: this.arcStyle.mouseout
|
||||
style: {
|
||||
lineWidth: this.controlStyle.lineWidth,
|
||||
fill: this.controlStyle.fill,
|
||||
stroke: this.controlStyle.stroke
|
||||
},
|
||||
onmouseover: this.controlStyle.mouseover,
|
||||
onmouseout: this.controlStyle.mouseout
|
||||
}) : new Arc({
|
||||
_subType: this.controlStyle.subType,
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: this.controlStyle.shape,
|
||||
style: {
|
||||
lineWidth: this.controlStyle.lineWidth,
|
||||
fill: this.controlStyle.fill,
|
||||
stroke: this.controlStyle.stroke
|
||||
},
|
||||
onmouseover: this.controlStyle.mouseover,
|
||||
onmouseout: this.controlStyle.mouseout
|
||||
});
|
||||
this.text = new Text({
|
||||
_subType: 'Text',
|
||||
@ -63,7 +80,7 @@ export default class EControl extends Group {
|
||||
height: arcRect.height + 4
|
||||
},
|
||||
style: {
|
||||
lineDash: this.arcStyle.lineDash || this.style.arcBorderStyle.lineDash,
|
||||
lineDash: this.controlStyle.lineDash || this.style.arcBorderStyle.lineDash,
|
||||
stroke: this.style.arcBorderStyle.stroke,
|
||||
fill: this.style.arcBorderStyle.fill
|
||||
}
|
||||
@ -106,15 +123,15 @@ export default class EControl extends Group {
|
||||
setControlFlashing(color) {
|
||||
if (color) {
|
||||
this.control.animateStyle(true)
|
||||
.when(0, { fill: this.arcStyle.fill })
|
||||
.when(0, { fill: this.controlStyle.fill })
|
||||
.when(1000, { stroke: color })
|
||||
.when(2000, { fill: this.arcStyle.fill })
|
||||
.when(2000, { fill: this.controlStyle.fill })
|
||||
.start();
|
||||
}
|
||||
}
|
||||
recover() {
|
||||
this.control.stopAnimation(false);
|
||||
this.control.setStyle('fill', this.arcStyle.fill);
|
||||
this.control.setStyle('fill', this.controlStyle.fill);
|
||||
}
|
||||
setControlStroke(color, lineWidth) {
|
||||
this.control.setStyle('lineWidth', lineWidth);
|
||||
|
@ -246,16 +246,16 @@ export default {
|
||||
label: '开关门',
|
||||
handler: this.handleOpenOrCloseDoor
|
||||
},
|
||||
{
|
||||
label: '限速指令',
|
||||
handler: this.handleSpeedLimit
|
||||
},
|
||||
// {
|
||||
// label: '限速指令',
|
||||
// handler: this.handleSpeedLimit
|
||||
// },
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.handleTurnDirection
|
||||
},
|
||||
{
|
||||
label: '驾驶至',
|
||||
label: '驾驶',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
{
|
||||
@ -450,7 +450,7 @@ export default {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 驾驶至(托管)
|
||||
// 驾驶(托管)
|
||||
handleDriveTo() {
|
||||
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
|
@ -43,9 +43,9 @@ class Model {
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
const modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -56,9 +56,9 @@ class Model {
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
const modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -66,6 +66,16 @@ class 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();
|
||||
|
@ -159,16 +159,16 @@ export default {
|
||||
label: '开关门',
|
||||
handler: this.handleOpenOrCloseDoor
|
||||
},
|
||||
{
|
||||
label: '限速指令',
|
||||
handler: this.handleSpeedLimit
|
||||
},
|
||||
// {
|
||||
// label: '限速指令',
|
||||
// handler: this.handleSpeedLimit
|
||||
// },
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.handleTurnDirection
|
||||
},
|
||||
{
|
||||
label: '驾驶至',
|
||||
label: '驾驶',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
{
|
||||
@ -346,7 +346,7 @@ export default {
|
||||
handleSpeedLimit() { // 限速指令
|
||||
this.$refs.speedLimit.doShow(this.selected);
|
||||
},
|
||||
// 驾驶至(托管)
|
||||
// 驾驶(托管)
|
||||
handleDriveTo() {
|
||||
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
|
@ -46,9 +46,9 @@ class Model {
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
const modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -59,9 +59,9 @@ class Model {
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
const modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -69,6 +69,16 @@ class 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();
|
||||
|
@ -142,16 +142,16 @@ export default {
|
||||
label: '开关门',
|
||||
handler: this.handleOpenOrCloseDoor
|
||||
},
|
||||
{
|
||||
label: '限速指令',
|
||||
handler: this.handleSpeedLimit
|
||||
},
|
||||
// {
|
||||
// label: '限速指令',
|
||||
// handler: this.handleSpeedLimit
|
||||
// },
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.handleTurnDirection
|
||||
},
|
||||
{
|
||||
label: '驾驶至',
|
||||
label: '驾驶',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
{
|
||||
@ -317,7 +317,7 @@ export default {
|
||||
handleSpeedLimit() { // 限速指令
|
||||
this.$refs.speedLimit.doShow(this.selected);
|
||||
},
|
||||
// 驾驶至(托管)
|
||||
// 驾驶(托管)
|
||||
handleDriveTo() {
|
||||
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
|
@ -43,9 +43,9 @@ class Model {
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
const modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -56,9 +56,9 @@ class Model {
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
const modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -66,6 +66,16 @@ class 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();
|
||||
|
@ -16,6 +16,20 @@
|
||||
<el-row>
|
||||
<el-form ref="form" :model="formModel" :rules="rules">
|
||||
<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-select ref="faultSelect1" v-model="formModel.targetDeviceCode" filterable size="small" style="height: 32px;line-height: 32px;" placeholder="请选择">
|
||||
<el-option
|
||||
@ -85,6 +99,7 @@ import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
|
||||
import { menuOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getRobotDrivingParam } from '@/api/simulation';
|
||||
|
||||
export default {
|
||||
name: 'SwitchControl',
|
||||
@ -109,6 +124,8 @@ export default {
|
||||
faultList: [],
|
||||
form: { faultType: ''},
|
||||
formModel: {
|
||||
speedLimit: '',
|
||||
through: 0,
|
||||
targetDeviceCode: ''
|
||||
},
|
||||
groupNumber: '',
|
||||
@ -146,7 +163,7 @@ export default {
|
||||
} else if (this.operation == OperationEvent.MixinCommand.cancelStoppage.menu.operation) {
|
||||
return '取消故障';
|
||||
} else if (this.operation == OperationEvent.MixinCommand.collocation.menu.operation) {
|
||||
return '驾驶至';
|
||||
return '驾驶';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
@ -203,7 +220,8 @@ export default {
|
||||
];
|
||||
} else if (selected._type === 'Section' && this.popClass === 'datie-02__systerm') {
|
||||
this.faultList = [
|
||||
{label: '电路故障', value: 'FAULT'}
|
||||
{label: '电路故障', value: 'FAULT'},
|
||||
{label: '故障锁闭', value: 'FAULT_LOCK'}
|
||||
// {label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'}
|
||||
];
|
||||
} else if (selected._type === 'Switch' && this.popClass === 'haerbin-01__systerm') {
|
||||
@ -220,7 +238,7 @@ export default {
|
||||
{label: '失表', value: 'SPLIT'},
|
||||
{label: '定位失表', value: 'NORMAL_SPLIT'},
|
||||
{label: '反位失表', value: 'REVERSE_SPLIT'},
|
||||
// {label: '挤岔', value: 'SQUEEZE'},
|
||||
{label: '挤岔', value: 'SQUEEZE'},
|
||||
// {label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'},
|
||||
{label: '电路故障', value: 'AXLE_FAULT'}
|
||||
];
|
||||
@ -277,6 +295,11 @@ export default {
|
||||
if (judge) {
|
||||
this.judge = judge;
|
||||
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) {
|
||||
@ -344,7 +367,11 @@ export default {
|
||||
cmdType: menuOperate.Common.collocation.cmdType,
|
||||
param: {
|
||||
groupNumber: this.groupNumber,
|
||||
targetDeviceCode: this.formModel.targetDeviceCode
|
||||
param: {
|
||||
speedLimit: this.formModel.speedLimit,
|
||||
through: this.formModel.through,
|
||||
targetDeviceCode: this.formModel.targetDeviceCode
|
||||
}
|
||||
}
|
||||
};
|
||||
this.sendCommand(setp);
|
||||
|
@ -45,7 +45,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
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';
|
||||
export default {
|
||||
name: 'SwitchHookLock',
|
||||
@ -125,37 +125,37 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
this.loading = true;
|
||||
if (this.operation) {
|
||||
commitOperate(menuOperate.Switch.hookLock, {normal: this.normal}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
// if (this.operation) {
|
||||
commitOperate(menuOperate.Switch.hookLock, {normal: this.normal, switchCode: this.selected.code}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Switch_Hook_Lock',
|
||||
// Switch_Hook_Lock
|
||||
targetMemberId: this.targetMemberId,
|
||||
params: {
|
||||
switchCode: this.selected.code,
|
||||
normal: this.normal
|
||||
}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
// } else {
|
||||
// const group = this.$route.query.group;
|
||||
// const param = {
|
||||
// commandType: 'Switch_Hook_Lock',
|
||||
// // Switch_Hook_Lock
|
||||
// targetMemberId: this.targetMemberId,
|
||||
// params: {
|
||||
// switchCode: this.selected.code,
|
||||
// normal: this.normal
|
||||
// }
|
||||
// };
|
||||
// commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
// this.doClose();
|
||||
// }).catch((error) => {
|
||||
// console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
// this.doClose();
|
||||
// });
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
<div style="width: 96%;">
|
||||
<el-form-item label="限速值:" label-width="95px" prop="speedLimit">
|
||||
<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>
|
||||
<el-tooltip style="margin-left: 10px;" effect="dark" content="值为5-65之间,-1为取消限速" placement="top-start">
|
||||
<i class="el-icon-warning" />
|
||||
@ -135,7 +135,7 @@ export default {
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
this.doClose();
|
||||
});
|
||||
|
133
src/jmapNew/theme/components/menus/dialog/trainStop.vue
Normal file
133
src/jmapNew/theme/components/menus/dialog/trainStop.vue
Normal 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>
|
@ -526,6 +526,15 @@ export const menuOperate = {
|
||||
// 删车次号 (大铁线路 车组号)
|
||||
operation: OperationEvent.Train.removeTrip.menu.operation,
|
||||
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: {
|
||||
|
@ -173,7 +173,8 @@ export default {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
// if (!this.$store.state.scriptRecord.bgSet) {
|
||||
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'DRIVER') {
|
||||
this.menu = [...this.menuForce, ...this.menuDirective];
|
||||
} else {
|
||||
this.menu = [...this.menuForce];
|
||||
|
@ -43,22 +43,21 @@ class Model {
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
const modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
const modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -66,6 +65,17 @@ class 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();
|
||||
|
@ -110,7 +110,6 @@ export default {
|
||||
window.document.oncontextmenu = function () {
|
||||
return false;
|
||||
};
|
||||
console.log(this.mapData, '---------------');
|
||||
if (this.mapData && this.mapData.skinVO) {
|
||||
const parser = parserFactory(ParserType.Graph.value);
|
||||
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
|
||||
|
@ -141,6 +141,7 @@ export default {
|
||||
},
|
||||
doShow(selected, type) {
|
||||
// this.$root.$emit('dialogOpen', selected);
|
||||
if (!this.mapData) { this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map)); }
|
||||
this.selected = selected;
|
||||
this.type = type;
|
||||
this.dialogShow = true;
|
||||
@ -152,17 +153,14 @@ export default {
|
||||
loadData() {
|
||||
this.beforeSwitchList = [];
|
||||
this.beforeSectionList = [];
|
||||
if (this.mapData) {
|
||||
this.$refs.map.loadData(this.mapData);
|
||||
setTimeout(() => {
|
||||
if (this.type === 'rec') {
|
||||
this.clickEvent(this.selected.receivingRouteCode);
|
||||
} else if (this.type === 'dep') {
|
||||
this.clickEvent(this.selected.departureRouteCode);
|
||||
}
|
||||
}, 100);
|
||||
|
||||
}
|
||||
this.$refs.map.loadData(this.mapData);
|
||||
setTimeout(() => {
|
||||
if (this.type === 'rec') {
|
||||
this.clickEvent(this.selected.receivingRouteCode);
|
||||
} else if (this.type === 'dep') {
|
||||
this.clickEvent(this.selected.departureRouteCode);
|
||||
}
|
||||
}, 100);
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
|
@ -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>
|
||||
</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: 40%;height: 30px;line-height: 30px;text-align: center;border-left: 2px #ccc solid;">{{ '操控A:主机' + ' ' + dateString + ' ' + time }}</div>
|
||||
</div>
|
||||
|
@ -71,24 +71,24 @@
|
||||
<center><b>道岔解封</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<!--<button :id="Signal.signalLight.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalLight.menuButton.operation, ['Signal'])">-->
|
||||
<!--<span style="color: black">-->
|
||||
<!--<center><b>点灯</b></center>-->
|
||||
<!--</span>-->
|
||||
<!--</button>-->
|
||||
<!--<button :id="Signal.signalDestroy.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalDestroy.menuButton.operation, ['Signal'])">-->
|
||||
<!--<span style="color:#800000">-->
|
||||
<!--<center><b>灭灯</b></center>-->
|
||||
<!--</span>-->
|
||||
<!--</button>-->
|
||||
<button :id="Signal.signalTurnOn.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalTurnOn.menuButton.operation, ['Signal'])">
|
||||
<span style="color: black">
|
||||
<center><b>点灯</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Signal.signalTurnOff.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalTurnOff.menuButton.operation, ['SignalButton'])">
|
||||
<span style="color:#800000">
|
||||
<center><b>灭灯</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="Station.stationMasterLock.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor: sGuideMasterLock? guideColorDown: guideColorUp}" @click="guideLockLeftButtonDown()">
|
||||
<span style="color: #800000">
|
||||
<center><b>S引导总锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :id="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)">
|
||||
<!--<span style="color: #800000">-->
|
||||
<span style="color: #808080">
|
||||
<button :id="Station.powerUnLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="powerOnUnlock()">
|
||||
<!--<span style="color:black">-->
|
||||
<span style="color:#800000">
|
||||
<center><b>上电解锁</b></center>
|
||||
</span>
|
||||
</button>
|
||||
@ -98,9 +98,9 @@
|
||||
<center><b>辅助菜单</b></center>
|
||||
</span>
|
||||
</button>
|
||||
<button :disabled="true" style="cursor: not-allowed;" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown()">
|
||||
<!--<span style="color: #800000">-->
|
||||
<span style="color: #808080">
|
||||
<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:black">-->
|
||||
<span style="color:#800000 ">
|
||||
<center><b>分路不良</b></center>
|
||||
</span>
|
||||
</button>
|
||||
@ -117,6 +117,7 @@
|
||||
<!--</button>-->
|
||||
<password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<defective-shunting ref="defectiveShunting" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -125,6 +126,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import DefectiveShunting from './dialog/defectiveShunting.vue';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
@ -135,6 +137,7 @@ export default {
|
||||
name: 'MapButtonMenu',
|
||||
components: {
|
||||
PasswordBox,
|
||||
DefectiveShunting,
|
||||
NoticeInfo
|
||||
},
|
||||
props: {
|
||||
@ -206,12 +209,12 @@ export default {
|
||||
Command() {
|
||||
return OperationEvent.Command;
|
||||
},
|
||||
sGuideMasterLock() {
|
||||
return this.$store.state.map.stationSGuideMasterLock;
|
||||
},
|
||||
xGuideMasterLock() {
|
||||
return this.$store.state.map.stationXGuideMasterLock;
|
||||
},
|
||||
sGuideMasterLock() {
|
||||
return this.$store.state.map.stationSGuideMasterLock;
|
||||
},
|
||||
xGuideMasterLock() {
|
||||
return this.$store.state.map.stationXGuideMasterLock;
|
||||
},
|
||||
isShowBtn() {
|
||||
return this.$store.state.training.prdType == '01' || this.$store.state.training.prdType == '10';
|
||||
},
|
||||
@ -240,6 +243,10 @@ export default {
|
||||
return CMD.Signal.CMD_SIGNAL_SET_ROUTE;
|
||||
case this.Signal.guide.button.operation: // 办理引导
|
||||
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 '';
|
||||
}
|
||||
@ -271,12 +278,12 @@ export default {
|
||||
this.deviceList = [];
|
||||
}
|
||||
},
|
||||
'$store.state.map.showCentralizedStationCode': function(val) {
|
||||
if (val){
|
||||
const station = this.$store.getters['map/getDeviceByCode'](val);
|
||||
this.$store.getters['map/checkStationGuideMaster'](station.code, station.sGuideMasterLock, station.xGuideMasterLock);
|
||||
}
|
||||
},
|
||||
'$store.state.map.showCentralizedStationCode': function(val) {
|
||||
if (val) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](val);
|
||||
this.$store.getters['map/checkStationGuideMaster'](station.code, station.sGuideMasterLock, station.xGuideMasterLock);
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.routeDataMap = null;
|
||||
@ -326,6 +333,7 @@ export default {
|
||||
if (dom) {
|
||||
dom.disabled = false;
|
||||
dom.style.backgroundColor = this.buttonUpColor;
|
||||
this.$refs.password.doClose();
|
||||
}
|
||||
}
|
||||
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引导总锁按钮点击
|
||||
guideLockLeftButtonDown() {
|
||||
const operate = {
|
||||
@ -346,7 +381,7 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
// 引导总锁弹出 调用取消引导总锁指令
|
||||
operate.nextCmdType = this.sGuideMasterLock? CMD.Station.CMD_STATION_MASTER_UNLOCK:CMD.Station.CMD_STATION_MASTER_LOCK;
|
||||
operate.nextCmdType = this.sGuideMasterLock ? CMD.Station.CMD_STATION_MASTER_UNLOCK : CMD.Station.CMD_STATION_MASTER_LOCK;
|
||||
operate.param = {throat: 'S', stationCode: this.$store.state.map.showCentralizedStationCode};
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
@ -362,7 +397,7 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
// 引导总锁弹出 调用取消引导总锁指令
|
||||
operate.nextCmdType = this.xGuideMasterLock? CMD.Station.CMD_STATION_MASTER_UNLOCK:CMD.Station.CMD_STATION_MASTER_LOCK;
|
||||
operate.nextCmdType = this.xGuideMasterLock ? CMD.Station.CMD_STATION_MASTER_UNLOCK : CMD.Station.CMD_STATION_MASTER_LOCK;
|
||||
operate.param = {throat: 'X', stationCode: this.$store.state.map.showCentralizedStationCode};
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
@ -377,7 +412,8 @@ export default {
|
||||
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 }) => {
|
||||
if (valid) {
|
||||
this.operation = operation;
|
||||
@ -527,7 +563,7 @@ export default {
|
||||
val: model.code,
|
||||
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') {
|
||||
operate.param = {signalCode: model.signalCode};
|
||||
this.sendCommand(operate);
|
||||
@ -625,6 +661,28 @@ export default {
|
||||
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
|
||||
selectedChange() {
|
||||
// 按钮按下时
|
||||
@ -654,6 +712,12 @@ export default {
|
||||
this.handelSignalBlockOrUnblock(model);
|
||||
} else if (buttonOperation === this.Section.fault.button.operation) {
|
||||
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 {
|
||||
this.clearOperate();
|
||||
}
|
||||
|
@ -86,9 +86,15 @@ export default {
|
||||
},
|
||||
{
|
||||
label: '封锁/解封',
|
||||
handler: '',
|
||||
cmdType: ''
|
||||
handler: this.lockOrUnlock
|
||||
// cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
|
||||
},
|
||||
// {
|
||||
// label: '解封',
|
||||
// handler: '',
|
||||
// cmdType: ''
|
||||
// },
|
||||
{
|
||||
label: '总人解',
|
||||
handler: this.humanTrainRoute,
|
||||
@ -312,14 +318,14 @@ export default {
|
||||
});
|
||||
},
|
||||
lockOrUnlock() {
|
||||
if (this.selected.lock) {
|
||||
commitOperate(menuOperate.Signal.lock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (this.selected.blockade) {
|
||||
commitOperate(menuOperate.Signal.unlock, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
} 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) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
|
@ -74,6 +74,11 @@ export default {
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔钩锁',
|
||||
handler: this.hookLock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK
|
||||
},
|
||||
{
|
||||
label: '封锁/解封',
|
||||
handle: ''
|
||||
@ -205,7 +210,7 @@ export default {
|
||||
} else { this.menu.forEach(item => { item.disabled = false; }); }
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'STATION_SWITCH_MAN') {
|
||||
const menuHook = [{
|
||||
label: '道岔钩锁',
|
||||
handler: this.hookLock
|
||||
|
@ -9,6 +9,8 @@
|
||||
<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>
|
||||
@ -33,6 +35,8 @@ 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',
|
||||
@ -46,7 +50,9 @@ export default {
|
||||
TrainDeleteNumber,
|
||||
TrainDetailInfo,
|
||||
SetFault,
|
||||
UpdateTrip
|
||||
UpdateTrip,
|
||||
SpeedLimit,
|
||||
TrainStop
|
||||
// TrainSetPlan
|
||||
},
|
||||
mixins: [
|
||||
@ -79,6 +85,11 @@ export default {
|
||||
label: '删车次号',
|
||||
handler: this.removeTripNumber,
|
||||
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
|
||||
},
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.turnDirection,
|
||||
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
@ -191,9 +202,13 @@ export default {
|
||||
handler: this.handleOverEedLight
|
||||
},
|
||||
// {
|
||||
// label: '驾驶至',
|
||||
// handler: this.handleDriveTo
|
||||
// label: '限速指令',
|
||||
// handler: this.handleSpeedLimit
|
||||
// },
|
||||
{
|
||||
label: '驾驶',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.handleTurnDirection
|
||||
@ -244,7 +259,7 @@ export default {
|
||||
} else { this.menu.forEach(item => { item.disabled = false; }); }
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'DRIVER') {
|
||||
this.menu = [...this.menuForce, ...this.menuDirective];
|
||||
} else {
|
||||
this.menu = [...this.menuForce];
|
||||
@ -312,6 +327,9 @@ export default {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleSpeedLimit() { // 限速指令
|
||||
this.$refs.speedLimit.doShow(this.selected);
|
||||
},
|
||||
// 限速行驶
|
||||
limitSpeed() {
|
||||
const operate = {
|
||||
@ -539,7 +557,7 @@ export default {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 驾驶至(托管)
|
||||
// 驾驶(托管)
|
||||
handleDriveTo() {
|
||||
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
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() {
|
||||
const group = this.$route.query.group;
|
||||
@ -575,18 +604,11 @@ export default {
|
||||
});
|
||||
},
|
||||
handleParkingTrain() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Parking_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();
|
||||
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})=>{
|
||||
@ -597,8 +619,7 @@ export default {
|
||||
},
|
||||
removeTripNumber() {
|
||||
commitOperate(menuOperate.Train.removeTrip, {groupNumber:this.selected.groupNumber}, 3).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
}
|
||||
// if (valid) {}
|
||||
}).catch((error)=> {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
|
@ -43,9 +43,9 @@ class Model {
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
const modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -56,9 +56,9 @@ class Model {
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
const modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -66,6 +66,17 @@ class 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();
|
||||
|
@ -110,7 +110,6 @@ export default {
|
||||
window.document.oncontextmenu = function () {
|
||||
return false;
|
||||
};
|
||||
console.log(this.mapData, '---------------');
|
||||
if (this.mapData && this.mapData.skinVO) {
|
||||
const parser = parserFactory(ParserType.Graph.value);
|
||||
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
|
||||
|
@ -225,15 +225,15 @@ export default {
|
||||
components: {
|
||||
PasswordBox,
|
||||
DefectiveShunting,
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -264,8 +264,9 @@ export default {
|
||||
buttonName: true,
|
||||
signalName: true,
|
||||
switchName: true,
|
||||
sectionName: true
|
||||
}
|
||||
sectionName: true,
|
||||
},
|
||||
pressedSignalButton: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -331,7 +332,7 @@ export default {
|
||||
return CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
}
|
||||
return ''
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.buttonOperation': function(val, old) {
|
||||
@ -370,7 +371,7 @@ export default {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](val)
|
||||
this.$store.getters['map/checkStationGuideMaster'](station.code, station.sGuideMasterLock, station.xGuideMasterLock)
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.routeDataMap = null
|
||||
@ -385,12 +386,12 @@ export default {
|
||||
over: true,
|
||||
operation: data.operation,
|
||||
cmdType: data.nextCmdType,
|
||||
param: data.param
|
||||
param: data.param,
|
||||
}
|
||||
} else {
|
||||
operate = {
|
||||
operationPre: data.operation,
|
||||
operation: data.operateNext
|
||||
operation: data.operateNext,
|
||||
}
|
||||
}
|
||||
this.trainingOperation(operate)
|
||||
@ -477,7 +478,7 @@ export default {
|
||||
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 }
|
||||
param: { stationCode: this.$store.state.map.showCentralizedStationCode },
|
||||
}
|
||||
this.$store
|
||||
.dispatch('training/nextNew', operate)
|
||||
@ -503,7 +504,7 @@ export default {
|
||||
// S引导总锁按钮点击
|
||||
guideLockLeftButtonDown() {
|
||||
const operate = {
|
||||
operation: this.Station.stationMasterLock.leftButton.operation
|
||||
operation: this.Station.stationMasterLock.leftButton.operation,
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -519,7 +520,7 @@ export default {
|
||||
// X引导总锁按钮点击
|
||||
guideLockRightButtonDown() {
|
||||
const operate = {
|
||||
operation: this.Station.stationMasterLock.rightButton.operation
|
||||
operation: this.Station.stationMasterLock.rightButton.operation,
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -532,17 +533,18 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
buttonDown(operation, commandTypeList) {
|
||||
buttonDown(operation, commandTypeList, color) {
|
||||
this.clearOperate()
|
||||
this.pressedSignalButton && this.pressedSignalButton.instance.pressDown(true, color)
|
||||
if (operation != this.Command.cancel.clearMbm.operation) {
|
||||
const operate = {
|
||||
operation: operation
|
||||
operation: operation,
|
||||
}
|
||||
// 以下 会弹出密码框 (总人解,区故解) 铅封按钮
|
||||
const operationList = [
|
||||
this.Signal.humanTrainRoute.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 }) => {
|
||||
if (valid) {
|
||||
@ -563,7 +565,7 @@ export default {
|
||||
// 清除按钮
|
||||
const operate = {
|
||||
start: true,
|
||||
operation: operation
|
||||
operation: operation,
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
@ -595,7 +597,7 @@ export default {
|
||||
// 排列进路 OR 信号重开操作
|
||||
arrangementRouteOperation(deviceList) {
|
||||
const operate = {
|
||||
operation: this.Signal.arrangementRoute.button.operation
|
||||
operation: this.Signal.arrangementRoute.button.operation,
|
||||
}
|
||||
if (!this.routeDataMap) {
|
||||
this.handleRouteDataMap()
|
||||
@ -672,8 +674,8 @@ export default {
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
|
||||
param: {
|
||||
signalCode: model._type === 'Signal' ? model.code : model.signalCode
|
||||
}
|
||||
signalCode: model._type === 'Signal' ? model.code : model.signalCode,
|
||||
},
|
||||
}
|
||||
this.$store
|
||||
.dispatch('training/nextNew', operate)
|
||||
@ -693,7 +695,7 @@ export default {
|
||||
code: model.code,
|
||||
operation: this.Signal.guide.button.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
|
||||
param: { signalCode: model.signalCode }
|
||||
param: { signalCode: model.signalCode },
|
||||
}
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode)
|
||||
// 信号机引导时间15s以内再次点击引导不需要进行密码输入
|
||||
@ -711,7 +713,7 @@ export default {
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
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)
|
||||
if (model._type === 'SignalButton' && model.type === 'PICK') {
|
||||
@ -723,12 +725,17 @@ export default {
|
||||
}
|
||||
},
|
||||
handelSwitchOperate(model) {
|
||||
let code = ''
|
||||
if (model._type === 'Switch') code = model.code
|
||||
else if (model._type === 'SwitchFault') {
|
||||
code = this.$store.getters['map/getDeviceByCode'](model.switchCode).code
|
||||
}
|
||||
const operate = {
|
||||
over: true,
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: this.cmdType,
|
||||
param: { switchCode: model.code }
|
||||
param: { switchCode: code },
|
||||
}
|
||||
this.sendCommand(operate)
|
||||
},
|
||||
@ -765,7 +772,7 @@ export default {
|
||||
code: model.code,
|
||||
operation: buttonOperation,
|
||||
cmdType: '',
|
||||
param: {}
|
||||
param: {},
|
||||
}
|
||||
if (model._type === 'Signal' && !this.checkHasTrainButton(model)) {
|
||||
if (buttonOperation === this.Signal.lock.button.operation) {
|
||||
@ -794,7 +801,7 @@ export default {
|
||||
code: model.code,
|
||||
operation: this.guideLockRightFlag ? this.Switch.guideLock.rightButton : this.Switch.guideLock.leftButton,
|
||||
nextCmdType: CMD.Switch.CMD_SWITCH_MASTER_LOCK,
|
||||
param: { signalCode: model.signalCode }
|
||||
param: { signalCode: model.signalCode },
|
||||
}
|
||||
// 信号机引导时间15s以内再次点击引导不需要进行密码输入
|
||||
if (signal.guideTime) {
|
||||
@ -812,7 +819,7 @@ export default {
|
||||
code: model.code,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
|
||||
param: { sectionCode: model.code }
|
||||
param: { sectionCode: model.code },
|
||||
}
|
||||
this.sendCommand(operate)
|
||||
}
|
||||
@ -821,6 +828,10 @@ export default {
|
||||
selectedChange() {
|
||||
// 按钮按下时
|
||||
const model = this.selected // 选择设备
|
||||
if (this.pressedSignalButton /* && this.pressedSignalButton.code === model.code */) {
|
||||
this.pressedSignalButton.instance.pressDown(false)
|
||||
this.pressedSignalButton = null
|
||||
}
|
||||
if (
|
||||
(this.$store.state.training.prdType != '01' && this.$store.state.training.prdType != '10') ||
|
||||
this.selected._event !== MouseEvent.Left ||
|
||||
@ -835,7 +846,18 @@ export default {
|
||||
this.Switch.locate.button.operation,
|
||||
this.Switch.reverse.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') {
|
||||
this.handleGuideLock(model)
|
||||
@ -862,6 +884,39 @@ export default {
|
||||
} else if (model._type === 'SignalButton' && signalButtonList.includes(model.type)) {
|
||||
// 改方操作 总辅助操作 接辅助操作 发辅助操作
|
||||
this.assistOperateOrChange(model)
|
||||
} else if (model._type === 'SignalButton' && model.type === 'GUIDELOCK') {
|
||||
// 引导总锁
|
||||
if (model.labelEnum === 'S') {
|
||||
this.guideLockLeftButtonDown()
|
||||
} else if (model.labelEnum === 'X') {
|
||||
this.guideLockRightButtonDown()
|
||||
}
|
||||
} else if (model._type === 'SignalButton' && signalButtonOperation.includes(model.type)) {
|
||||
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 (
|
||||
(model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode)) ||
|
||||
(model._type === 'Signal' && !model.blockade)
|
||||
@ -892,11 +947,13 @@ export default {
|
||||
this.deviceList &&
|
||||
this.deviceList.length &&
|
||||
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 = []
|
||||
Handler.clear() // 清空操作组
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null)
|
||||
// this.pressedSignalButton && this.pressedSignalButton.instance.pressDown(false)
|
||||
// this.pressedSignalButton = null
|
||||
},
|
||||
assistOperateOrChange(model) {
|
||||
// mode.type==
|
||||
@ -908,8 +965,8 @@ export default {
|
||||
param: {
|
||||
labelEnum: model.labelEnum,
|
||||
stationCode: model.stationCode,
|
||||
pressDown: model.pressDown ? 0 : 1 // 1按下、0弹起
|
||||
}
|
||||
pressDown: model.pressDown ? 0 : 1, // 1按下、0弹起
|
||||
},
|
||||
},
|
||||
// 改方
|
||||
CHANGE_DIRECTION: {
|
||||
@ -918,8 +975,8 @@ export default {
|
||||
param: {
|
||||
labelEnum: model.labelEnum,
|
||||
stationCode: model.stationCode,
|
||||
pressDown: model.pressDown ? 0 : 1 // 1按下、0弹起
|
||||
}
|
||||
pressDown: model.pressDown ? 0 : 1, // 1按下、0弹起
|
||||
},
|
||||
},
|
||||
// 接辅助按钮
|
||||
PICK_ASSIST: {
|
||||
@ -928,8 +985,8 @@ export default {
|
||||
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_RECEIVE_ASSIST,
|
||||
param: {
|
||||
labelEnum: model.labelEnum,
|
||||
stationCode: model.stationCode
|
||||
}
|
||||
stationCode: model.stationCode,
|
||||
},
|
||||
},
|
||||
// 发辅助按钮
|
||||
DEPART_ASSIST: {
|
||||
@ -937,8 +994,8 @@ export default {
|
||||
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_DELIVER_ASSIST,
|
||||
param: {
|
||||
labelEnum: model.labelEnum,
|
||||
stationCode: model.stationCode
|
||||
}
|
||||
stationCode: model.stationCode,
|
||||
},
|
||||
},
|
||||
// 事故按钮
|
||||
ACCIDENT: {
|
||||
@ -946,9 +1003,9 @@ export default {
|
||||
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_ACCIDENT,
|
||||
param: {
|
||||
labelEnum: model.labelEnum,
|
||||
stationCode: model.stationCode
|
||||
}
|
||||
}
|
||||
stationCode: model.stationCode,
|
||||
},
|
||||
},
|
||||
}
|
||||
const noPasswordModelTypeMap = {
|
||||
// 闭塞按钮
|
||||
@ -957,8 +1014,8 @@ export default {
|
||||
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_BLOCK,
|
||||
param: {
|
||||
labelEnum: model.labelEnum,
|
||||
stationCode: model.stationCode
|
||||
}
|
||||
stationCode: model.stationCode,
|
||||
},
|
||||
},
|
||||
// 复原按钮
|
||||
RECOVERY: {
|
||||
@ -966,9 +1023,9 @@ export default {
|
||||
nextCmdType: CMD.CTC.CTC_ASSIST_PRESS_RESTORE,
|
||||
param: {
|
||||
labelEnum: model.labelEnum,
|
||||
stationCode: model.stationCode
|
||||
}
|
||||
}
|
||||
stationCode: model.stationCode,
|
||||
},
|
||||
},
|
||||
}
|
||||
if (noPasswordModelTypeMap[model.type]) {
|
||||
const operate = {
|
||||
@ -976,7 +1033,7 @@ export default {
|
||||
operation: noPasswordModelTypeMap[model.type].operation,
|
||||
code: model.code,
|
||||
param: noPasswordModelTypeMap[model.type].param,
|
||||
cmdType: noPasswordModelTypeMap[model.type].nextCmdType
|
||||
cmdType: noPasswordModelTypeMap[model.type].nextCmdType,
|
||||
}
|
||||
this.$store
|
||||
.dispatch('training/nextNew', operate)
|
||||
@ -995,7 +1052,7 @@ export default {
|
||||
const operate = {
|
||||
operation: modelTypeMap[model.type].operation,
|
||||
code: model.code,
|
||||
param: modelTypeMap[model.type].param
|
||||
param: modelTypeMap[model.type].param,
|
||||
}
|
||||
this.$store
|
||||
.dispatch('training/nextNew', operate)
|
||||
@ -1028,8 +1085,8 @@ export default {
|
||||
// console.error(error);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
// });
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<switch-hook-lock ref="switchHookLock" pop-class="chengdou-03__systerm" />
|
||||
<set-fault ref="setFault" pop-class="datie-02__systerm" />
|
||||
<draw-select ref="drawSelect" />
|
||||
<route-cancel ref="routeCancel" />
|
||||
<route-cancel ref="routeCancel" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -36,7 +36,7 @@ export default {
|
||||
SetFault,
|
||||
SwitchHookLock,
|
||||
DrawSelect,
|
||||
RouteCancel
|
||||
RouteCancel
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
@ -54,72 +54,77 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '定操',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
{
|
||||
label: '反操',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
{
|
||||
label: '单锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
{
|
||||
label: '单解',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '封锁',
|
||||
handle: this.block,
|
||||
{
|
||||
label: '定操',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
{
|
||||
label: '反操',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
{
|
||||
label: '单锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
{
|
||||
label: '单解',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '封锁',
|
||||
handle: this.block,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
{
|
||||
label: '解封',
|
||||
handle: this.unblock,
|
||||
{
|
||||
label: '解封',
|
||||
handle: this.unblock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '区故解',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '岔前 分路不良',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '定位 分路不良',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '反位 分路不良',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '接触网定位无电',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '接触网反位无电',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '添加调机号',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '删除调机号',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '修改调机号',
|
||||
handle: ''
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '道岔钩锁',
|
||||
handler: this.hookLock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK
|
||||
},
|
||||
{
|
||||
label: '区故解',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '岔前 分路不良',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '定位 分路不良',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '反位 分路不良',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '接触网定位无电',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '接触网反位无电',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '添加调机号',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '删除调机号',
|
||||
handle: ''
|
||||
},
|
||||
{
|
||||
label: '修改调机号',
|
||||
handle: ''
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
// {
|
||||
@ -193,7 +198,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && (!this.buttonOperation || this.$route.query.ctc)) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && (!this.buttonOperation || this.$route.query.ctc)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
@ -207,7 +212,7 @@ export default {
|
||||
this.menu = this.menuNormal.Local;
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'STATION_SWITCH_MAN') {
|
||||
const menuHook = [{
|
||||
label: '道岔钩锁',
|
||||
handler: this.hookLock
|
||||
@ -270,7 +275,7 @@ export default {
|
||||
},
|
||||
// 道岔封锁
|
||||
block() {
|
||||
debugger
|
||||
debugger;
|
||||
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
@ -306,7 +311,7 @@ export default {
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
this.$refs.routeCancel.doShow(operate, this.selected);
|
||||
this.$refs.routeCancel.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -315,7 +320,7 @@ export default {
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
this.$refs.routeCancel.doShow(operate, this.selected);
|
||||
this.$refs.routeCancel.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -11,6 +11,7 @@
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
<!-- <train-set-plan ref="trainSetPlan" /> -->
|
||||
<update-trip ref="updateTrip" />
|
||||
<train-stop ref="trainStop" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -33,6 +34,7 @@ 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 TrainStop from '@/jmapNew/theme/components/menus/dialog/trainStop';
|
||||
|
||||
export default {
|
||||
name: 'MenuTrain',
|
||||
@ -46,7 +48,8 @@ export default {
|
||||
TrainDeleteNumber,
|
||||
TrainDetailInfo,
|
||||
SetFault,
|
||||
UpdateTrip
|
||||
UpdateTrip,
|
||||
TrainStop
|
||||
// TrainSetPlan
|
||||
},
|
||||
mixins: [
|
||||
@ -79,6 +82,11 @@ export default {
|
||||
label: '删车次号',
|
||||
handler: this.removeTripNumber,
|
||||
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
|
||||
},
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.turnDirection,
|
||||
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
@ -191,7 +199,7 @@ export default {
|
||||
handler: this.handleOverEedLight
|
||||
},
|
||||
// {
|
||||
// label: '驾驶至',
|
||||
// label: '驾驶',
|
||||
// handler: this.handleDriveTo
|
||||
// },
|
||||
{
|
||||
@ -241,7 +249,8 @@ export default {
|
||||
console.log(this.menu, '================');
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
// if (!this.$store.state.scriptRecord.bgSet) {
|
||||
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'DRIVER') {
|
||||
this.menu = [...this.menuForce, ...this.menuDirective];
|
||||
} else {
|
||||
this.menu = [...this.menuForce];
|
||||
@ -536,7 +545,7 @@ export default {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 驾驶至(托管)
|
||||
// 驾驶(托管)
|
||||
handleDriveTo() {
|
||||
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
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() {
|
||||
const group = this.$route.query.group;
|
||||
@ -572,18 +592,11 @@ export default {
|
||||
});
|
||||
},
|
||||
handleParkingTrain() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Parking_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();
|
||||
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})=>{
|
||||
|
@ -43,9 +43,9 @@ class Model {
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
const modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -56,9 +56,9 @@ class Model {
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
const modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -66,6 +66,17 @@ class 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();
|
||||
|
332
src/jmapNew/theme/datie_tky/menus/dialog/trainControl.vue
Normal file
332
src/jmapNew/theme/datie_tky/menus/dialog/trainControl.vue
Normal file
@ -0,0 +1,332 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm train-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item v-if="operation != '70c'" prop="sectionCode">
|
||||
<span slot="label">轨道</span>
|
||||
<el-input v-model="addModel.sectionCode" />
|
||||
</el-form-item>
|
||||
<el-form-item v-else prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车组号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item v-if="operation == '708'" prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber" />
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="operation == '70c'" prop="targetCode">
|
||||
<span slot="label">目的地</span>
|
||||
<el-input v-model="addModel.targetCode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item v-if="operation == '708'" prop="trainCode">
|
||||
<span slot="label">序列号</span>
|
||||
<el-input v-model="addModel.trainCode" />
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="operation == '70c'" prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item v-if="operation == '70c'" prop="trainType">
|
||||
<span slot="label">运行模式</span>
|
||||
<br>
|
||||
<el-radio-group v-model="addModel.runningMode" style="margin-left: 15px;">
|
||||
<el-radio :label="'01'">普通</el-radio>
|
||||
<el-radio :label="'02'">专列</el-radio>
|
||||
<el-radio :label="'03'">不停站直达</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-train ref="confirmTrain" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import ConfirmTrain from './childDialog/confirmTrain';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainControl',
|
||||
components: {
|
||||
ConfirmTrain,
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
sectionCode: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: '',
|
||||
serviceNumber: '',
|
||||
targetCode: '',
|
||||
trainCode: '',
|
||||
runningMode: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
stationName: [
|
||||
{ required: true, message: '请输入车站', trigger: 'blur'}
|
||||
],
|
||||
sectionCode: [
|
||||
{ required: true, message: '请输入轨道', trigger: 'blur'}
|
||||
],
|
||||
trainWindowCode: [
|
||||
{ required: true, message: '请输入车次窗', trigger: 'blur'}
|
||||
],
|
||||
groupNumber: [
|
||||
{ required: true, message: '请选择车组号', trigger: 'change' }
|
||||
],
|
||||
serviceNumber: [
|
||||
{ required: true, message: '请输入服务号', trigger: 'blur'}
|
||||
],
|
||||
targetCode: [
|
||||
{ required: true, message: '请输入目的地号', trigger: 'blur'}
|
||||
],
|
||||
trainCode: [
|
||||
{ required: true, message: '请输入序列号', trigger: 'blur'}
|
||||
],
|
||||
runningMode: [
|
||||
{ required: true, message: '请选择运行模式', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
direction: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
|
||||
/* 设目的地*/
|
||||
return OperationEvent.Train.destinationTrainId.menu.domId;
|
||||
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation) {
|
||||
/* 设计划车*/
|
||||
return OperationEvent.Train.setPlanTrainId.menu.domId;
|
||||
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation) {
|
||||
/* 设人工车*/
|
||||
return OperationEvent.Train.artificialTrainId.menu.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
|
||||
return '设目的地车';
|
||||
} else if ( this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
|
||||
return '设计划车';
|
||||
} else if ( this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
|
||||
return '设人工车';
|
||||
}
|
||||
return '';
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.addModel = {
|
||||
tripNumber: '',
|
||||
groupNumber: '',
|
||||
trainType: '01',
|
||||
serviceNumber: '',
|
||||
targetCode: ''
|
||||
};
|
||||
/** 加载列车数据*/
|
||||
this.loadInitData(this.map);
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation ) {
|
||||
this.destinationTrainId();
|
||||
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
|
||||
this.setPlanTrainId();
|
||||
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
|
||||
this.artificialTrainId();
|
||||
}
|
||||
},
|
||||
// 设目的地车
|
||||
destinationTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Train.destinationTrainId.menu.operation,
|
||||
message: [`设目的地车:成功`],
|
||||
val: ''
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设计划车
|
||||
setPlanTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Train.setPlanTrainId.menu.operation,
|
||||
message: [`设计划车:成功`],
|
||||
val: ''
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设人工车
|
||||
artificialTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Train.artificialTrainId.menu.operation,
|
||||
message: [`设人工车:成功`],
|
||||
val: ''
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
181
src/jmapNew/theme/datie_tky/menus/dialog/trainCreateNumber.vue
Normal file
181
src/jmapNew/theme/datie_tky/menus/dialog/trainCreateNumber.vue
Normal file
@ -0,0 +1,181 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainCreateNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '新建车组号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.createTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
176
src/jmapNew/theme/datie_tky/menus/dialog/trainDeleteNumber.vue
Normal file
176
src/jmapNew/theme/datie_tky/menus/dialog/trainDeleteNumber.vue
Normal file
@ -0,0 +1,176 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable disabled>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainDeleteNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:''
|
||||
},
|
||||
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除车组号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName:'',
|
||||
trainWindowCode: '',
|
||||
groupNumber:''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.deleteTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,378 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane :id="domIdBasicInfo" label="基本信息" name="first">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="groupNumber">
|
||||
<span slot="label">车组号</span>
|
||||
<el-input v-model="addModel.groupNumber" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="type">
|
||||
<span slot="label">服务类型</span>
|
||||
<el-input v-model="addModel.type" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainCode">
|
||||
<span slot="label">序列号</span>
|
||||
<el-input v-model="addModel.trainCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="driverCode">
|
||||
<span slot="label">司机号</span>
|
||||
<el-input v-model="addModel.driverCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="targetCode">
|
||||
<span slot="label">目的地号</span>
|
||||
<el-input v-model="addModel.targetCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="sectionCode">
|
||||
<span slot="label">轨道</span>
|
||||
<el-input v-model="addModel.sectionCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="nextStation">
|
||||
<span slot="label">下一站</span>
|
||||
<el-input v-model="addModel.nextStation" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="targetName">
|
||||
<span slot="label">目的地</span>
|
||||
<el-input v-model="addModel.targetName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="trackingMode">
|
||||
<span slot="label">跟踪模式</span>
|
||||
<el-input v-model="addModel.trackingMode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="runStatus">
|
||||
<span slot="label">运行状态</span>
|
||||
<el-input v-model="addModel.runStatus" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="departureTime">
|
||||
<span slot="label">出发时刻</span>
|
||||
<el-input v-model="addModel.departureTime" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="arrivedTime">
|
||||
<span slot="label">到达时刻</span>
|
||||
<el-input v-model="addModel.arrivedTime" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="planDeviation">
|
||||
<span slot="label">计划偏离</span>
|
||||
<el-input v-model="addModel.planDeviation" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdMarshalInfo" label="编组信息" name="second">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="marshallingNo">
|
||||
<span slot="label">编组号</span>
|
||||
<el-input v-model="addModel.marshallingNo" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="carNo1">
|
||||
<span slot="label">车头号1</span>
|
||||
<el-input v-model="addModel.carNo1" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="carNo2">
|
||||
<span slot="label">车头号2</span>
|
||||
<el-input v-model="addModel.carNo2" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table :data="tableData" style="width: 100%" height="250">
|
||||
<el-table-column prop="carriage" label="车厢" width="80" />
|
||||
<el-table-column prop="carriageNumber" label="车厢号" width="80" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdAtpInfo" label="ATP信息" name="third">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="trainId">
|
||||
<span slot="label">车载ID</span>
|
||||
<el-input v-model="addModel.trainId" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="directionType">
|
||||
<span slot="label">运行方向</span>
|
||||
<el-input v-model="addModel.directionType" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="drivingMode">
|
||||
<span slot="label">驾驶模式</span>
|
||||
<el-input v-model="addModel.drivingMode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="speed">
|
||||
<span slot="label">速度</span>
|
||||
<el-input v-model="addModel.speed" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stopQuasiState">
|
||||
<span slot="label">停准状态</span>
|
||||
<el-input v-model="addModel.stopQuasiState" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="doorStatus">
|
||||
<span slot="label">车门状态</span>
|
||||
<el-input v-model="addModel.doorStatus" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="runLevel">
|
||||
<span slot="label">运行等级</span>
|
||||
<el-input v-model="addModel.runLevel" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="stopState">
|
||||
<span slot="label">停跳状态</span>
|
||||
<el-input v-model="addModel.stopState" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="position">
|
||||
<span slot="label">车头位置</span>
|
||||
<el-input v-model="addModel.position" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="loadingRate">
|
||||
<span slot="label">载重率</span>
|
||||
<el-input v-model="addModel.loadingRate" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdCarAlarm" label="车辆报警" name="fourth" />
|
||||
</el-tabs>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="19">
|
||||
<el-button :id="domIdCancel" @click="cancel">退出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainDetailInfo',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName:'',
|
||||
groupNumber:'',
|
||||
type:'',
|
||||
serviceNumber:'',
|
||||
trainCode:'',
|
||||
driverCode:'',
|
||||
targetCode:'',
|
||||
sectionCode:'',
|
||||
nextStation:'',
|
||||
targetName:'',
|
||||
trackingMode:'',
|
||||
runStatus:'',
|
||||
departureTime:'',
|
||||
arrivedTime:'',
|
||||
planDeviation:'',
|
||||
marshallingNo:'',
|
||||
carNo1:'',
|
||||
carNo2:'',
|
||||
trainId:'',
|
||||
directionType:'',
|
||||
drivingMode:'',
|
||||
speed:'',
|
||||
stopQuasiState:'',
|
||||
doorStatus:'',
|
||||
runLevel:'',
|
||||
stopState:'',
|
||||
position:'',
|
||||
loadingRate:''
|
||||
},
|
||||
activeName:'first',
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tableData:[
|
||||
{carriage:'1', carriageNumber:'101'},
|
||||
{carriage:'2', carriageNumber:'102'},
|
||||
{carriage:'3', carriageNumber:'103'},
|
||||
{carriage:'4', carriageNumber:'104'},
|
||||
{carriage:'5', carriageNumber:'105'},
|
||||
{carriage:'6', carriageNumber:'106'}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdCarAlarm() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.carAlarm.domId : '';
|
||||
},
|
||||
domIdBasicInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.basicInfo.domId : '';
|
||||
},
|
||||
domIdMarshalInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.marshalInfo.domId : '';
|
||||
},
|
||||
domIdAtpInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.atpInfo.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '列车信息显示';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName:'',
|
||||
tripNumber: '',
|
||||
groupNumber:''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
handleClick() {
|
||||
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
378
src/jmapNew/theme/datie_tky/menus/dialog/trainDetailInfo.vue
Normal file
378
src/jmapNew/theme/datie_tky/menus/dialog/trainDetailInfo.vue
Normal file
@ -0,0 +1,378 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane :id="domIdBasicInfo" label="基本信息" name="first">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="groupNumber">
|
||||
<span slot="label">车组号</span>
|
||||
<el-input v-model="addModel.groupNumber" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="type">
|
||||
<span slot="label">服务类型</span>
|
||||
<el-input v-model="addModel.type" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainCode">
|
||||
<span slot="label">序列号</span>
|
||||
<el-input v-model="addModel.trainCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="driverCode">
|
||||
<span slot="label">司机号</span>
|
||||
<el-input v-model="addModel.driverCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="targetCode">
|
||||
<span slot="label">目的地号</span>
|
||||
<el-input v-model="addModel.targetCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="sectionCode">
|
||||
<span slot="label">轨道</span>
|
||||
<el-input v-model="addModel.sectionCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="nextStation">
|
||||
<span slot="label">下一站</span>
|
||||
<el-input v-model="addModel.nextStation" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="targetName">
|
||||
<span slot="label">目的地</span>
|
||||
<el-input v-model="addModel.targetName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="trackingMode">
|
||||
<span slot="label">跟踪模式</span>
|
||||
<el-input v-model="addModel.trackingMode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="runStatus">
|
||||
<span slot="label">运行状态</span>
|
||||
<el-input v-model="addModel.runStatus" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="departureTime">
|
||||
<span slot="label">出发时刻</span>
|
||||
<el-input v-model="addModel.departureTime" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="arrivedTime">
|
||||
<span slot="label">到达时刻</span>
|
||||
<el-input v-model="addModel.arrivedTime" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="planDeviation">
|
||||
<span slot="label">计划偏离</span>
|
||||
<el-input v-model="addModel.planDeviation" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdMarshalInfo" label="编组信息" name="second">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="marshallingNo">
|
||||
<span slot="label">编组号</span>
|
||||
<el-input v-model="addModel.marshallingNo" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="carNo1">
|
||||
<span slot="label">车头号1</span>
|
||||
<el-input v-model="addModel.carNo1" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="carNo2">
|
||||
<span slot="label">车头号2</span>
|
||||
<el-input v-model="addModel.carNo2" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table :data="tableData" style="width: 100%" height="250">
|
||||
<el-table-column prop="carriage" label="车厢" width="80" />
|
||||
<el-table-column prop="carriageNumber" label="车厢号" width="80" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdAtpInfo" label="ATP信息" name="third">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="trainId">
|
||||
<span slot="label">车载ID</span>
|
||||
<el-input v-model="addModel.trainId" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="directionType">
|
||||
<span slot="label">运行方向</span>
|
||||
<el-input v-model="addModel.directionType" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="drivingMode">
|
||||
<span slot="label">驾驶模式</span>
|
||||
<el-input v-model="addModel.drivingMode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="speed">
|
||||
<span slot="label">速度</span>
|
||||
<el-input v-model="addModel.speed" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stopQuasiState">
|
||||
<span slot="label">停准状态</span>
|
||||
<el-input v-model="addModel.stopQuasiState" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="doorStatus">
|
||||
<span slot="label">车门状态</span>
|
||||
<el-input v-model="addModel.doorStatus" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="runLevel">
|
||||
<span slot="label">运行等级</span>
|
||||
<el-input v-model="addModel.runLevel" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="stopState">
|
||||
<span slot="label">停跳状态</span>
|
||||
<el-input v-model="addModel.stopState" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="position">
|
||||
<span slot="label">车头位置</span>
|
||||
<el-input v-model="addModel.position" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="loadingRate">
|
||||
<span slot="label">载重率</span>
|
||||
<el-input v-model="addModel.loadingRate" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdCarAlarm" label="车辆报警" name="fourth" />
|
||||
</el-tabs>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="19">
|
||||
<el-button :id="domIdCancel" @click="cancel">退出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainDetailInfo',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName:'',
|
||||
groupNumber:'',
|
||||
type:'',
|
||||
serviceNumber:'',
|
||||
trainCode:'',
|
||||
driverCode:'',
|
||||
targetCode:'',
|
||||
sectionCode:'',
|
||||
nextStation:'',
|
||||
targetName:'',
|
||||
trackingMode:'',
|
||||
runStatus:'',
|
||||
departureTime:'',
|
||||
arrivedTime:'',
|
||||
planDeviation:'',
|
||||
marshallingNo:'',
|
||||
carNo1:'',
|
||||
carNo2:'',
|
||||
trainId:'',
|
||||
directionType:'',
|
||||
drivingMode:'',
|
||||
speed:'',
|
||||
stopQuasiState:'',
|
||||
doorStatus:'',
|
||||
runLevel:'',
|
||||
stopState:'',
|
||||
position:'',
|
||||
loadingRate:''
|
||||
},
|
||||
activeName:'first',
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tableData:[
|
||||
{carriage:'1', carriageNumber:'101'},
|
||||
{carriage:'2', carriageNumber:'102'},
|
||||
{carriage:'3', carriageNumber:'103'},
|
||||
{carriage:'4', carriageNumber:'104'},
|
||||
{carriage:'5', carriageNumber:'105'},
|
||||
{carriage:'6', carriageNumber:'106'}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdCarAlarm() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.carAlarm.domId : '';
|
||||
},
|
||||
domIdBasicInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.basicInfo.domId : '';
|
||||
},
|
||||
domIdMarshalInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.marshalInfo.domId : '';
|
||||
},
|
||||
domIdAtpInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.atpInfo.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '列车信息显示';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName:'',
|
||||
tripNumber: '',
|
||||
groupNumber:''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
handleClick() {
|
||||
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
174
src/jmapNew/theme/datie_tky/menus/dialog/trainEditNumber.vue
Normal file
174
src/jmapNew/theme/datie_tky/menus/dialog/trainEditNumber.vue
Normal file
@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-form-item>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="旧车组号" prop="oldGroupNumber">
|
||||
<el-select v-model="addModel.oldGroupNumber" filterable disabled>
|
||||
<el-option v-for="train in trainList" :key="train.oldGroupNumber" :label="train.oldGroupNumber" :value="train.oldGroupNumber" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item label="新车组号" prop="newGroupNumber">
|
||||
<el-select v-model="addModel.newGroupNumber">
|
||||
<el-option v-for="train in trainList" :key="train.newGroupNumber" :label="train.newGroupNumber" :value="train.newGroupNumber" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group-train">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainEditNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
oldGroupNumber: '',
|
||||
newGroupNumber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
newGroupNumber: [
|
||||
{ required: true, message: '请输入新车组号', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '修改车组号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
oldGroupNumber: '',
|
||||
newGroupNumber: ''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.editTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
193
src/jmapNew/theme/datie_tky/menus/dialog/trainMoveNumber.vue
Normal file
193
src/jmapNew/theme/datie_tky/menus/dialog/trainMoveNumber.vue
Normal file
@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="90px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车 组 号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable disabled>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="purposeStationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.purposeStationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="purposeTrainWindowCode">
|
||||
<span slot="label">目的车次窗</span>
|
||||
<el-input v-model="addModel.purposeTrainWindowCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainMoveNumber',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: '',
|
||||
purposeStationName: '',
|
||||
purposeTrainWindowCode: ''
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '移动车组号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: '',
|
||||
purposeStationName: '',
|
||||
purposeTrainWindowCode: ''
|
||||
};
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainNo.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
155
src/jmapNew/theme/datie_tky/menus/dialog/updateTrip.vue
Normal file
155
src/jmapNew/theme/datie_tky/menus/dialog/updateTrip.vue
Normal file
@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm updateTrip"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="display: inline-block;margin-left:22px;">
|
||||
<span class="tripNumberName">车次号:</span>
|
||||
<div class="tripNumberClass">
|
||||
<el-input v-model="tripNumber" size="mini" @blur="handleTripNumber" />
|
||||
<div class="tripNumberTips">{{ messageTip1 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
export default {
|
||||
name: 'UpdateTrip',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow:false,
|
||||
tripNumber: '',
|
||||
messageTip1:'',
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.updateTrip.confirm.domId : '';
|
||||
},
|
||||
domIdChangeTripNumber() {
|
||||
return this.dialogShow ? OperationEvent.Train.updateTrip.changeTripNumber.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '修改车次号';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, tripNumber) {
|
||||
this.tripNumber = tripNumber;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
handleTripNumber() {
|
||||
this.judgeTripNumber();
|
||||
},
|
||||
judgeTripNumber() {
|
||||
const figuresOfServiceMinNumber = 2;
|
||||
const figuresOfServiceMaxNumber = 6;
|
||||
// this.$store.state.map.mapConfig.figuresOfServiceNumber;
|
||||
const tripNumber = this.tripNumber;
|
||||
const judge = /^[a-zA-Z0-9]*[\d]$/.test(this.tripNumber);
|
||||
let result = false;
|
||||
if (judge) {
|
||||
if (tripNumber.toString().length > figuresOfServiceMaxNumber || tripNumber.toString().length < figuresOfServiceMinNumber) {
|
||||
this.messageTip1 = '车次号长度' + figuresOfServiceMinNumber + '-' + figuresOfServiceMaxNumber + '位';
|
||||
result = false;
|
||||
} else {
|
||||
this.messageTip1 = '';
|
||||
result = true;
|
||||
}
|
||||
} else {
|
||||
this.tripNumber = '';
|
||||
this.messageTip1 = '请输入车次号(最后一位数字)';
|
||||
}
|
||||
return result;
|
||||
},
|
||||
commit() {
|
||||
const result = this.judgeTripNumber();
|
||||
if (this.tripNumber && result) {
|
||||
const params = {
|
||||
tripNumber: this.tripNumber
|
||||
};
|
||||
this.messageTip1 = '';
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Train.updateTripCommit, params, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.tripNumber = '';
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.tripNumberClass{
|
||||
display: inline-block;
|
||||
width:140px
|
||||
}
|
||||
.tripNumberName{
|
||||
margin-left: 5px;
|
||||
height: 22px;
|
||||
vertical-align: top;
|
||||
margin-right:10px;
|
||||
display: inline-block;
|
||||
}
|
||||
.tripNumberTips{
|
||||
margin-top: 10px;
|
||||
color: #f00;
|
||||
font-size: 13px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
@ -7,8 +7,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
// OperateMode
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
@ -89,6 +88,11 @@ export default {
|
||||
label: '区段故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔钩锁',
|
||||
handler: this.hookLock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
@ -196,17 +200,17 @@ export default {
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Local;
|
||||
// 故障模式菜单列表
|
||||
// if (this.operatemode === OperateMode.FAULT) {
|
||||
// if (!this.$store.state.scriptRecord.bgSet) {
|
||||
// const menuHook = [{
|
||||
// label: '道岔钩锁',
|
||||
// handler: this.hookLock
|
||||
// }];
|
||||
// this.menu = [...this.menuForce, ...menuHook];
|
||||
// } else {
|
||||
// this.menu = this.menuForce;
|
||||
// }
|
||||
// }
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'STATION_SWITCH_MAN') {
|
||||
const menuHook = [{
|
||||
label: '道岔钩锁',
|
||||
handler: this.hookLock
|
||||
}];
|
||||
this.menu = [...this.menuForce, ...menuHook];
|
||||
} else {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
638
src/jmapNew/theme/datie_tky/menus/menuTrain.vue
Normal file
638
src/jmapNew/theme/datie_tky/menus/menuTrain.vue
Normal file
@ -0,0 +1,638 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<train-control ref="trainControl" />
|
||||
<train-edit-number ref="trainEditNumber" />
|
||||
<train-create-number ref="trainCreateNumber" />
|
||||
<train-move-number ref="trainMoveNumber" />
|
||||
<train-delete-number ref="trainDeleteNumber" />
|
||||
<train-detail-info ref="trainDetailInfo" />
|
||||
<set-fault ref="setFault" pop-class="chengdou-03__systerm" />
|
||||
<speed-limit ref="speedLimit" pop-class="chengdou-03__systerm" />
|
||||
<train-stop ref="trainStop" pop-class="chengdou-03__systerm" />
|
||||
<!-- <train-set-plan ref="trainSetPlan" /> -->
|
||||
<update-trip ref="updateTrip" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import TrainControl from './dialog/trainControl';
|
||||
import TrainEditNumber from './dialog/trainEditNumber';
|
||||
import TrainMoveNumber from './dialog/trainMoveNumber';
|
||||
import TrainCreateNumber from './dialog/trainCreateNumber';
|
||||
import TrainDeleteNumber from './dialog/trainDeleteNumber';
|
||||
import TrainDetailInfo from './dialog/trainDetailInfo';
|
||||
// import TrainSetPlan from './dialog/trainSetPlan';
|
||||
import UpdateTrip from './dialog/updateTrip';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
|
||||
import TrainStop from '@/jmapNew/theme/components/menus/dialog/trainStop';
|
||||
|
||||
export default {
|
||||
name: 'MenuTrain',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
TrainControl,
|
||||
TrainEditNumber,
|
||||
TrainMoveNumber,
|
||||
TrainCreateNumber,
|
||||
TrainDeleteNumber,
|
||||
TrainDetailInfo,
|
||||
SetFault,
|
||||
UpdateTrip,
|
||||
SpeedLimit,
|
||||
TrainStop
|
||||
// TrainSetPlan
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
// {
|
||||
// label: '设置计划车',
|
||||
// handler: this.setPlanTrain,
|
||||
// cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN
|
||||
// },
|
||||
{
|
||||
label: '变更车次号',
|
||||
handler: this.modifyTripNumber,
|
||||
cmdType: CMD.Train.CMD_TRAIN_UPDATE_TRIP_NUMBER_TRAIN
|
||||
},
|
||||
{
|
||||
label: '删车次号',
|
||||
handler: this.removeTripNumber,
|
||||
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
|
||||
},
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.turnDirection,
|
||||
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '变更车次号',
|
||||
handler: this.modifyTripNumber,
|
||||
cmdType: CMD.Train.CMD_TRAIN_UPDATE_TRIP_NUMBER_TRAIN
|
||||
}
|
||||
// {
|
||||
// label: '设置计划车',
|
||||
// handler: this.setPlanTrain,
|
||||
// cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN
|
||||
// }
|
||||
// {
|
||||
// label: '新建车组号',
|
||||
// handler: this.createTrainNo
|
||||
// },
|
||||
// {
|
||||
// label: '移动车组号',
|
||||
// handler: this.moveTrainNo
|
||||
// },
|
||||
// {
|
||||
// label: '删除车组号',
|
||||
// handler: this.deleteTrainNo
|
||||
// },
|
||||
// {
|
||||
// label: '修改车组号',
|
||||
// handler: this.editTrainNo
|
||||
// },
|
||||
// {
|
||||
// label: '设计划车',
|
||||
// handler: this.setPlanTrainId
|
||||
// },
|
||||
// {
|
||||
// label: '设目的地',
|
||||
// handler: this.destinationTrainId
|
||||
// },
|
||||
// {
|
||||
// label: '设人工车',
|
||||
// handler: this.artificialTrainId
|
||||
// },
|
||||
// {
|
||||
// label: '设特殊人工车',
|
||||
// handler: this.undeveloped
|
||||
// },
|
||||
// {
|
||||
// label: '详细列车信息',
|
||||
// handler: this.detailTrainInfo
|
||||
// },
|
||||
// {
|
||||
// label: '属性',
|
||||
// handler: this.undeveloped
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
handler: this.triggerFaultManagement
|
||||
}
|
||||
],
|
||||
menuDirective: [
|
||||
{
|
||||
label: '切换驾驶模式',
|
||||
children: [
|
||||
{
|
||||
label: '转AM-C模式',
|
||||
handler: this.handlerApplyAmcMode
|
||||
},
|
||||
{
|
||||
label: '转SM-C模式',
|
||||
handler: this.handlerApplySmcMode
|
||||
},
|
||||
{
|
||||
label: '转AM-I模式',
|
||||
handler: this.handlerApplyAmiMode
|
||||
},
|
||||
{
|
||||
label: '转SM-I模式',
|
||||
handler: this.handlerApplySmiMode
|
||||
},
|
||||
{
|
||||
label: '转RM模式',
|
||||
handler: this.handlerApplyRmMode
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '确认运行至前方站',
|
||||
handler: this.nextStation
|
||||
},
|
||||
{
|
||||
label: '进路闭塞法行车',
|
||||
handler: this.routeBlockRun
|
||||
},
|
||||
{
|
||||
label: '越引导信号行驶',
|
||||
handler: this.handleOverFuideSignal
|
||||
},
|
||||
{
|
||||
label: '越红灯行驶',
|
||||
handler: this.handleOverEedLight
|
||||
},
|
||||
// {
|
||||
// label: '限速指令',
|
||||
// handler: this.handleSpeedLimit
|
||||
// },
|
||||
{
|
||||
label: '驾驶',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.handleTurnDirection
|
||||
},
|
||||
{
|
||||
label: '发车',
|
||||
handler: this.handleDepartTrain
|
||||
},
|
||||
{
|
||||
label: '停车',
|
||||
handler: this.handleParkingTrain
|
||||
}
|
||||
],
|
||||
menuSpeed: [
|
||||
{
|
||||
label: '确认运行至前方站',
|
||||
handler: this.limitSpeed
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode',
|
||||
'memberList'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function () {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Train) && (!this.buttonOperation || this.$route.query.ctc)) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
|
||||
if (station && station.controlMode === 'Interlock' && this.$route.query.ctc) {
|
||||
this.menu.forEach(item => { item.disabled = true; });
|
||||
} else { this.menu.forEach(item => { item.disabled = false; }); }
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'DRIVER') {
|
||||
this.menu = [...this.menuForce, ...this.menuDirective];
|
||||
} else {
|
||||
this.menu = [...this.menuForce];
|
||||
}
|
||||
}
|
||||
// 指令模式列表
|
||||
if (this.operatemode === OperateMode.DIRECTIVE) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
this.menu = [...this.menuDirective];
|
||||
}
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
},
|
||||
nextStation() {
|
||||
this.trainSend('Drive_Ahead');
|
||||
},
|
||||
routeBlockRun() {
|
||||
this.trainSend('Route_Block_Drive');
|
||||
},
|
||||
handleOverFuideSignal() {
|
||||
this.trainSend('Drive_Through_The_Guide_Signal');
|
||||
},
|
||||
handleOverEedLight() {
|
||||
this.trainSend('Drive_Through_The_Red_Light');
|
||||
},
|
||||
trainSend(type) {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: type,
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleSpeedLimit() { // 限速指令
|
||||
this.$refs.speedLimit.doShow(this.selected);
|
||||
},
|
||||
// 限速行驶
|
||||
limitSpeed() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.limitSpeed.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 设置计划车
|
||||
// setPlanTrain() {
|
||||
// const operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
// param: {}
|
||||
// };
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.trainSetPlan.doShow(operate, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// 设计划车
|
||||
setPlanTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.setPlanTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainControl.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设目的地车
|
||||
destinationTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.destinationTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainControl.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设人工车
|
||||
artificialTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.artificialTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainControl.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 详细列车信息
|
||||
detailTrainInfo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.detailTrainInfo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDetailInfo.doShow(operate, this.selected);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 创建车组号
|
||||
createTrainNo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.createTrainNo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainCreateNumber.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除车组号
|
||||
deleteTrainNo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.deleteTrainNo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDeleteNumber.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 修改车组号
|
||||
editTrainNo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.editTrainNo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainEditNumber.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 移动车组号
|
||||
moveTrainNo() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainNo.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainMoveNumber.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
handlerApplyAmcMode() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Change_Preselection_Mode',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: { preselectionMode: 'AM_C' }
|
||||
};
|
||||
commitTrainSend(group, param).then(({ valid, operate }) => {
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handlerApplySmcMode() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Change_Preselection_Mode',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: { preselectionMode: 'SM_C' }
|
||||
};
|
||||
commitTrainSend(group, param).then(({ valid, operate }) => {
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handlerApplyAmiMode() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Change_Preselection_Mode',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: { preselectionMode: 'AM_I' }
|
||||
};
|
||||
commitTrainSend(group, param).then(({ valid, operate }) => {
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handlerApplySmiMode() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Change_Preselection_Mode',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: { preselectionMode: 'SM_I' }
|
||||
};
|
||||
commitTrainSend(group, param).then(({ valid, operate }) => {
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handlerApplyRmMode() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Change_Preselection_Mode',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: { preselectionMode: 'RM' }
|
||||
};
|
||||
commitTrainSend(group, param).then(({ valid, operate }) => {
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 驾驶(托管)
|
||||
handleDriveTo() {
|
||||
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.collocation, this.selected, true);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 换端操作
|
||||
turnDirection() {
|
||||
commitOperate(menuOperate.Train.turnDirection, { groupNumber: this.selected.groupNumber }, 3).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error)=> {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 换端
|
||||
handleTurnDirection() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Turn_Direction',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate}) => {
|
||||
}).catch((error)=> {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleDepartTrain() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Depart_Train',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate}) => {
|
||||
}).catch((error)=> {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleParkingTrain() {
|
||||
commitOperate(menuOperate.Train.driverStop, {groupNumber:this.selected.groupNumber}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.trainStop.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
modifyTripNumber() {
|
||||
commitOperate(menuOperate.Train.updateTrip, {groupNumber:this.selected.groupNumber}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.updateTrip.doShow(operate, this.selected.tripNumber);
|
||||
}
|
||||
});
|
||||
},
|
||||
removeTripNumber() {
|
||||
commitOperate(menuOperate.Train.removeTrip, {groupNumber:this.selected.groupNumber}, 3).then(({valid, operate})=>{
|
||||
// if (valid) {}
|
||||
}).catch((error)=> {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -43,9 +43,9 @@ class Model {
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
const modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -56,9 +56,9 @@ class Model {
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
const modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -66,6 +66,17 @@ class 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();
|
||||
|
@ -150,16 +150,16 @@ export default {
|
||||
label: '开关门',
|
||||
handler: this.handleOpenOrCloseDoor
|
||||
},
|
||||
{
|
||||
label: '限速指令',
|
||||
handler: this.handleSpeedLimit
|
||||
},
|
||||
// {
|
||||
// label: '限速指令',
|
||||
// handler: this.handleSpeedLimit
|
||||
// },
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.handleTurnDirection
|
||||
},
|
||||
{
|
||||
label: '驾驶至',
|
||||
label: '驾驶',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
{
|
||||
@ -330,7 +330,7 @@ export default {
|
||||
handleSpeedLimit() { // 限速指令
|
||||
this.$refs.speedLimit.doShow(this.selected);
|
||||
},
|
||||
// 驾驶至(托管)
|
||||
// 驾驶(托管)
|
||||
handleDriveTo() {
|
||||
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
|
@ -45,9 +45,9 @@ class Model {
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
const modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -58,9 +58,9 @@ class Model {
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
const modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -68,6 +68,17 @@ class 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();
|
||||
|
@ -124,16 +124,16 @@ export default {
|
||||
label: '开关门',
|
||||
handler: this.handleOpenOrCloseDoor
|
||||
},
|
||||
{
|
||||
label: '限速指令',
|
||||
handler: this.handleSpeedLimit
|
||||
},
|
||||
// {
|
||||
// label: '限速指令',
|
||||
// handler: this.handleSpeedLimit
|
||||
// },
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.handleTurnDirection
|
||||
},
|
||||
{
|
||||
label: '驾驶至',
|
||||
label: '驾驶',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
{
|
||||
@ -325,7 +325,7 @@ export default {
|
||||
handleSpeedLimit() { // 限速指令
|
||||
this.$refs.speedLimit.doShow(this.selected);
|
||||
},
|
||||
// 驾驶至(托管)
|
||||
// 驾驶(托管)
|
||||
handleDriveTo() {
|
||||
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
|
@ -45,9 +45,9 @@ class Model {
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
const modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -58,9 +58,9 @@ class Model {
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
const modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -68,6 +68,17 @@ class 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();
|
||||
|
@ -91,16 +91,16 @@ export default {
|
||||
label: '开关门',
|
||||
handler: this.handleOpenOrCloseDoor
|
||||
},
|
||||
{
|
||||
label: '限速指令',
|
||||
handler: this.handleSpeedLimit
|
||||
},
|
||||
// {
|
||||
// label: '限速指令',
|
||||
// handler: this.handleSpeedLimit
|
||||
// },
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.handleTurnDirection
|
||||
},
|
||||
{
|
||||
label: '驾驶至',
|
||||
label: '驾驶',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
{
|
||||
@ -295,7 +295,7 @@ export default {
|
||||
handleSpeedLimit() { // 限速指令
|
||||
this.$refs.speedLimit.doShow(this.selected);
|
||||
},
|
||||
// 驾驶至(托管)
|
||||
// 驾驶(托管)
|
||||
handleDriveTo() {
|
||||
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
|
@ -44,9 +44,9 @@ class Model {
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
const modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -57,9 +57,9 @@ class Model {
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
const modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -67,6 +67,17 @@ class 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();
|
||||
|
@ -91,16 +91,16 @@ export default {
|
||||
label: '开关门',
|
||||
handler: this.handleOpenOrCloseDoor
|
||||
},
|
||||
{
|
||||
label: '限速指令',
|
||||
handler: this.handleSpeedLimit
|
||||
},
|
||||
// {
|
||||
// label: '限速指令',
|
||||
// handler: this.handleSpeedLimit
|
||||
// },
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.handleTurnDirection
|
||||
},
|
||||
{
|
||||
label: '驾驶至',
|
||||
label: '驾驶',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
{
|
||||
@ -294,7 +294,7 @@ export default {
|
||||
handleSpeedLimit() { // 限速指令
|
||||
this.$refs.speedLimit.doShow(this.selected);
|
||||
},
|
||||
// 驾驶至(托管)
|
||||
// 驾驶(托管)
|
||||
handleDriveTo() {
|
||||
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
|
@ -44,9 +44,9 @@ class Model {
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
const modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -57,9 +57,9 @@ class Model {
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
const modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -67,6 +67,17 @@ class 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();
|
||||
|
@ -230,16 +230,16 @@ export default {
|
||||
label: '开关门',
|
||||
handler: this.handleOpenOrCloseDoor
|
||||
},
|
||||
{
|
||||
label: '限速指令',
|
||||
handler: this.handleSpeedLimit
|
||||
},
|
||||
// {
|
||||
// label: '限速指令',
|
||||
// handler: this.handleSpeedLimit
|
||||
// },
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.handleTurnDirection
|
||||
},
|
||||
{
|
||||
label: '驾驶至',
|
||||
label: '驾驶',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
{
|
||||
@ -406,7 +406,7 @@ export default {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 驾驶至(托管)
|
||||
// 驾驶(托管)
|
||||
handleDriveTo() {
|
||||
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
|
@ -54,9 +54,9 @@ class Model {
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
const modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -67,9 +67,9 @@ class Model {
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
const modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -77,6 +77,17 @@ class 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();
|
||||
|
@ -231,16 +231,16 @@ export default {
|
||||
label: '开关门',
|
||||
handler: this.handleOpenOrCloseDoor
|
||||
},
|
||||
{
|
||||
label: '限速指令',
|
||||
handler: this.handleSpeedLimit
|
||||
},
|
||||
// {
|
||||
// label: '限速指令',
|
||||
// handler: this.handleSpeedLimit
|
||||
// },
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.handleTurnDirection
|
||||
},
|
||||
{
|
||||
label: '驾驶至',
|
||||
label: '驾驶',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
{
|
||||
@ -406,7 +406,7 @@ export default {
|
||||
handleSpeedLimit() { // 限速指令
|
||||
this.$refs.speedLimit.doShow(this.selected);
|
||||
},
|
||||
// 驾驶至(托管)
|
||||
// 驾驶(托管)
|
||||
handleDriveTo() {
|
||||
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
|
@ -54,9 +54,9 @@ class Model {
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
const modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -67,9 +67,9 @@ class Model {
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
const modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -77,6 +77,17 @@ class 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();
|
||||
|
@ -233,10 +233,10 @@ export default {
|
||||
label: '确认运行至前方站',
|
||||
handler: this.nextStation
|
||||
},
|
||||
{
|
||||
label: '限速指令',
|
||||
handler: this.handleSpeedLimit
|
||||
},
|
||||
// {
|
||||
// label: '限速指令',
|
||||
// handler: this.handleSpeedLimit
|
||||
// },
|
||||
{
|
||||
label: '越引导信号行驶',
|
||||
handler: this.handleOverFuideSignal
|
||||
@ -254,7 +254,7 @@ export default {
|
||||
handler: this.handleTurnDirection
|
||||
},
|
||||
{
|
||||
label: '驾驶至',
|
||||
label: '驾驶',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
{
|
||||
@ -519,7 +519,7 @@ export default {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 驾驶至(托管)
|
||||
// 驾驶(托管)
|
||||
handleDriveTo() {
|
||||
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
|
@ -54,9 +54,9 @@ class Model {
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
const modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -67,9 +67,9 @@ class Model {
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
const modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -77,6 +77,16 @@ class 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();
|
||||
|
@ -175,16 +175,16 @@ export default {
|
||||
label: '开关门',
|
||||
handler: this.handleOpenOrCloseDoor
|
||||
},
|
||||
{
|
||||
label: '限速指令',
|
||||
handler: this.handleSpeedLimit
|
||||
},
|
||||
// {
|
||||
// label: '限速指令',
|
||||
// handler: this.handleSpeedLimit
|
||||
// },
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.handleTurnDirection
|
||||
},
|
||||
{
|
||||
label: '驾驶至',
|
||||
label: '驾驶',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
{
|
||||
@ -464,7 +464,7 @@ export default {
|
||||
handleSpeedLimit() { // 限速指令
|
||||
this.$refs.speedLimit.doShow(this.selected);
|
||||
},
|
||||
// 驾驶至(托管)
|
||||
// 驾驶(托管)
|
||||
handleDriveTo() {
|
||||
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
|
@ -45,9 +45,9 @@ class Model {
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
const modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -58,9 +58,9 @@ class Model {
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
const modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
@ -68,6 +68,16 @@ class 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();
|
||||
|
@ -253,16 +253,16 @@ export default {
|
||||
label: '开关门',
|
||||
handler: this.handleOpenOrCloseDoor
|
||||
},
|
||||
{
|
||||
label: '限速指令',
|
||||
handler: this.handleSpeedLimit
|
||||
},
|
||||
// {
|
||||
// label: '限速指令',
|
||||
// handler: this.handleSpeedLimit
|
||||
// },
|
||||
{
|
||||
label: '换端',
|
||||
handler: this.handleTurnDirection
|
||||
},
|
||||
{
|
||||
label: '驾驶至',
|
||||
label: '驾驶',
|
||||
handler: this.handleDriveTo
|
||||
},
|
||||
{
|
||||
@ -436,7 +436,7 @@ export default {
|
||||
handleSpeedLimit() { // 限速指令
|
||||
this.$refs.speedLimit.doShow(this.selected);
|
||||
},
|
||||
// 驾驶至(托管)
|
||||
// 驾驶(托管)
|
||||
handleDriveTo() {
|
||||
commitOperate(menuOperate.Common.collocation, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
|
@ -48,29 +48,38 @@ class Model {
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
const modelInitial = this.public[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
initPrivateProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.private[model._type];
|
||||
const modelInitial = this.private[model._type];
|
||||
if (modelInitial) {
|
||||
for (var prop in modelInitial) {
|
||||
for (const prop in modelInitial) {
|
||||
model[prop] = modelInitial[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
|
@ -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) => {
|
||||
if (to.query.thirdJump) {
|
||||
setToken(to.query.key);
|
||||
@ -99,6 +106,7 @@ router.beforeEach( async (to, from, next) => {
|
||||
store.dispatch('setResourcesUrl', urlData.VOICE_API);
|
||||
store.dispatch('setUploadUrl', urlData.UPLOAD_API);
|
||||
store.dispatch('setBaseSite', urlData.BASE_SITE);
|
||||
subscribe();
|
||||
} catch (e) {
|
||||
const urlData = handlerUrl();
|
||||
store.dispatch('setBaseUrl', urlData.BASE_API);
|
||||
|
@ -74,7 +74,16 @@ export default {
|
||||
{label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '},
|
||||
{label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent department'},
|
||||
{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: [
|
||||
|
@ -168,7 +168,16 @@ export const SimulationType = {
|
||||
STATION_SUPERVISOR: '车站值班员',
|
||||
DRIVER: '司机',
|
||||
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 = {
|
||||
displayNew: '/displayNew',
|
||||
|
@ -335,6 +335,29 @@ export const loginInfo = {
|
||||
navigationMarginLeft: '140px',
|
||||
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: {
|
||||
title: '城市轨道交通实训平台',
|
||||
logoWidth: '60px',
|
||||
@ -729,6 +752,8 @@ export const ProjectIcon = {
|
||||
designheb: FaviconHeb,
|
||||
hyd: FaviconHeb,
|
||||
designhyd: FaviconHeb,
|
||||
hydrailway: FaviconHeb,
|
||||
designhydrailway: FaviconHeb,
|
||||
xadt: FaviconXadt,
|
||||
designxadt: FaviconXadt,
|
||||
jyd: FaviconJyd,
|
||||
@ -836,34 +861,36 @@ export const ProjectCode = {
|
||||
unittecsty: 'UNITTEC_STY',
|
||||
designunittecsty: 'UNITTEC_STY',
|
||||
teaching: 'TEACHING',
|
||||
designteaching: 'TEACHING'
|
||||
designteaching: 'TEACHING',
|
||||
hydrailway: 'HYD_RAILWAY',
|
||||
designhydrailway: 'HYD_RAILWAY'
|
||||
};
|
||||
/** 嵌入第三方平台 导航栏右上角 清空 */
|
||||
export const ThirdLoginList = ['richor', 'designrichor', 'richorygy', 'designrichorygy', 'richorcxjs', 'designrichorcxjs'];
|
||||
/** 底部栏仅展示公司信息不展示备案号 */
|
||||
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'];
|
||||
/** 实训设计平台通过项目code获取地图列表的项目 */
|
||||
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',
|
||||
'richorlesson3d', 'richorjoint', 'designrichorjoint', 'nologo', 'designnologo', 'srsandbox', 'designsrsandbox', 'designhlsdrts', 'hlsdrts', 'jxgm', 'designjxgm',
|
||||
'richorygy', 'designrichorygy', 'say', 'designsay', 'unittecsty', 'designunittecsty', 'richorhhcj', 'designrichorhhcj', 'teaching', 'designteaching', 'richorcxjs',
|
||||
'designrichorcxjs'];
|
||||
'designrichorcxjs', 'hydrailway', 'designhydrailway'];
|
||||
/** 案例展示隐藏的项目 */
|
||||
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',
|
||||
'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs'];
|
||||
/** 登录页右下角主体不展示 */
|
||||
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',
|
||||
'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs'];
|
||||
/** 登录页项目 title 登录输入框上方 大字体 加粗居中 */
|
||||
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',
|
||||
'richorygy', 'designrichorygy', 'say', 'designsay', 'unittecsty', 'designunittecsty', 'richorhhcj', 'designrichorhhcj', 'richorcxjs', 'designrichorcxjs'];
|
||||
/** 登录页 登录输入框无二维码 */
|
||||
@ -899,6 +926,8 @@ export const goOtherPlatformMenu = {
|
||||
designhls: '/login?project=hls',
|
||||
hyd: '/design/login?project=hyd',
|
||||
designhyd: '/login?project=hyd',
|
||||
hydrailway: '/design/login?project=hydrailway',
|
||||
designhydrailway: '/login?project=hydrailway',
|
||||
nty: '/design/login?project=nty',
|
||||
designnty: '/login?project=nty',
|
||||
bjd: '/design/login?project=bjd',
|
||||
@ -957,7 +986,8 @@ export const ProjectList = [
|
||||
{value: 'unittec_sty', label: '众合-陕铁院'},
|
||||
{value: 'richor_hhcj', label: '红河财经'},
|
||||
{value: 'teaching', label: '教学通用'},
|
||||
{value: 'richor_cxjs', label: '长兴技校'}
|
||||
{value: 'richor_cxjs', label: '长兴技校'},
|
||||
{value: 'hyd_railway', label: '哈盈达大铁'}
|
||||
];
|
||||
/** 本地项目打包 */
|
||||
export const localPackageProject = {
|
||||
|
@ -91,7 +91,8 @@ export default {
|
||||
CMD_DRIVER_PRESELECTION_MODE_UP:{value:'Driver_Preselection_Mode_Up', label:'列车预选模式升'},
|
||||
CMD_DRIVER_DOOR_MODE:{value:'Driver_Door_Mode', 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_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_FINISH_DEPARTURE: {value: 'CTC_FINISH_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_ASSIST_PRESS_MAIN_ASSIST:{value: 'ASSIST_PRESS_MAIN_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_BLOCK:{value: 'ASSIST_PRESS_BLOCK', label: '阻塞'},
|
||||
CTC_ASSIST_PRESS_RESTORE:{value: 'ASSIST_PRESS_RESTORE', 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_MODIFY_SECTION:{value: 'CTC_MODIFY_SECTION', label: '修改股道'},
|
||||
CTC_STATION_SEND_OUT_RUN_PLAN:{value: 'CTC_STATION_SEND_OUT_RUN_PLAN', label: '车站发送计划'},
|
||||
CTC_CANCEL_TWINKLE:{value: 'CTC_CANCEL_TWINKLE', label: '车站取消红闪'},
|
||||
|
||||
// CTC_REMOVE_RUN_PLAN:{value: 'CTC_REMOVE_RUN_PLAN', label: '移除行车日志'},
|
||||
CTC_MODIFY_ADJACENT_STATION:{value: 'CTC_MODIFY_ADJACENT_STATION', label: '修改邻站信息'},
|
||||
CTC_MODIFY_TRIP_NUMBER:{value: 'CTC_MODIFY_TRIP_NUMBER', label: '修改车次号(大铁CTC)'},
|
||||
CTC_SEND_NOTICE:{value: 'CTC_SEND_NOTICE', label: '发送发车预告'},
|
||||
CTC_AGREE_NOTICE:{value: 'CTC_AGREE_NOTICE', label: '同意发车预告'},
|
||||
|
||||
CTC_LOG_CANCEL_ARRIVE:{value: 'CTC_LOG_CANCEL_ARRIVE', label: '取消到达'},
|
||||
CTC_LOG_CANCEL_DEPARTURE:{value: 'CTC_LOG_CANCEL_DEPARTURE', 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_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_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_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: {
|
||||
|
@ -46,7 +46,7 @@ class CommandHandle {
|
||||
// },
|
||||
Train_Trust: {
|
||||
operate: 'Train_Trust',
|
||||
paramList:[{name: 'groupNumber'}, {name: 'targetDeviceCode'}],
|
||||
paramList:[{name: 'groupNumber'}, {name: 'param'}],
|
||||
simulationRole: 'Center',
|
||||
controlMode: ['OperateCenterControl'],
|
||||
conditionList: []
|
||||
@ -73,6 +73,10 @@ class CommandHandle {
|
||||
Train_Calculate_Interval: {
|
||||
operate: 'Train_Calculate_Interval',
|
||||
paramList: [{name: 'calculateParam'}]
|
||||
},
|
||||
Driver_Stop: {
|
||||
operate: 'Driver_Stop',
|
||||
paramList: [{name: 'groupNumber'}, {name: 'eb'}]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -3,7 +3,8 @@ export const State2SimulationMap = {
|
||||
'01': 'Local', // 现地工作站
|
||||
'02': 'Center', // 中心调度工作站
|
||||
'09':'Depot_IL', // 车辆段工作站
|
||||
'10': 'Local'
|
||||
'10': 'Local',
|
||||
'04': 'Local'
|
||||
};
|
||||
|
||||
export const State2ControlMap = {
|
||||
@ -64,7 +65,8 @@ export const deviceFaultType = {
|
||||
Train: [
|
||||
{label: '通信异常', value: 'COMMUNICATION_ABNORMAL'},
|
||||
{label: '驾驶故障', value: 'DRIVE_FAULT'},
|
||||
{label: '突然EB', value: 'SUDDEN_EB' }
|
||||
{label: '突然EB', value: 'SUDDEN_EB' },
|
||||
{label: '列车脱线', value: 'OFF_LINE' }
|
||||
],
|
||||
Power:[
|
||||
{label: '供电故障', value: 'FAULT'}
|
||||
|
@ -1774,17 +1774,17 @@ export const OperationEvent = {
|
||||
}
|
||||
},
|
||||
// 点灯 (大铁)
|
||||
signalLight: {
|
||||
signalTurnOn: {
|
||||
menuButton: {
|
||||
operation: '3231',
|
||||
domId: '_Tips-Signal-signalLight-MenuButton{BOTTOM}'
|
||||
domId: '_Tips-Signal-signalTurnOn-MenuButton{BOTTOM}'
|
||||
}
|
||||
},
|
||||
// 灭灯 (大铁)
|
||||
signalDestroy: {
|
||||
signalTurnOff: {
|
||||
menuButton: {
|
||||
operation: '3232',
|
||||
domId: '_Tips-Signal-signalDestroy-MenuButton{BOTTOM}'
|
||||
domId: '_Tips-Signal-signalTurnOff-MenuButton{BOTTOM}'
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -3431,6 +3431,18 @@ export const OperationEvent = {
|
||||
operation: '70v',
|
||||
domId: '_Tips-Train-removeTrip-Menu'
|
||||
}
|
||||
},
|
||||
driverStop: {
|
||||
menu: {
|
||||
operation: '70w',
|
||||
domId: '_Tips-Train-driverStop-Menu'
|
||||
}
|
||||
},
|
||||
turnDirection: {
|
||||
menu: {
|
||||
operation: '70x',
|
||||
domId: '_Tips-Train-turnDirection-Menu'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -39,6 +39,7 @@ const training = {
|
||||
memberList: [], // 综合仿真成员列表
|
||||
memberData: {}, // 综合仿真成员列表
|
||||
simulationUserList: [], // 综合仿真用户列表
|
||||
userRole: '', // 本人仿真成员角色
|
||||
orignalUserRoleId:'', // 设置旧的角色的id
|
||||
scriptQuitCount: 0, // 主动退出剧本
|
||||
scriptOperationType: '', // 剧本操作类型
|
||||
@ -297,6 +298,9 @@ const training = {
|
||||
/** 运行线 (宁波三号线) */
|
||||
setRunPathSelected: (state, runPathList) => {
|
||||
state.runPathList = runPathList;
|
||||
},
|
||||
setUserRole: (state, userRole) => {
|
||||
state.userRole = userRole;
|
||||
}
|
||||
},
|
||||
|
||||
@ -655,6 +659,9 @@ const training = {
|
||||
/** 运行线 (宁波三号线) */
|
||||
setRunPathSelected: ({ commit }, runPathList) => {
|
||||
commit('setRunPathSelected', runPathList);
|
||||
},
|
||||
setUserRole: ({ commit }, userRole) => {
|
||||
commit('setUserRole', userRole);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -54,7 +54,7 @@ export function creatSubscribe(topic, header) {
|
||||
}
|
||||
Vue.prototype.$stomp.subscribe(topic, callback, header);
|
||||
} catch (error) {
|
||||
console.error('websocket订阅失败');
|
||||
console.error('websocket订阅失败', error, topic, header);
|
||||
}
|
||||
}
|
||||
// 回调函数
|
||||
|
@ -181,7 +181,7 @@ export default {
|
||||
},
|
||||
beforeDestroy() {},
|
||||
mounted() {
|
||||
this.searchCmd();
|
||||
// this.searchCmd();
|
||||
},
|
||||
methods:{
|
||||
tableRowClassName({row, rowIndex}) {
|
||||
@ -205,7 +205,8 @@ export default {
|
||||
this.currentInfo = obj;
|
||||
if (!this.getSignInfo(obj.receiverInfos).receivedTime) {
|
||||
const data = {
|
||||
commandId: obj.id
|
||||
commandId: obj.id,
|
||||
title: obj.title
|
||||
};
|
||||
sendCommandNew(this.group, 'CTC_READ_DISPATCH_COMMAND', data).then((res) => {
|
||||
console.log(res, '---res');
|
||||
@ -241,7 +242,7 @@ export default {
|
||||
},
|
||||
signCmd(status) {
|
||||
if (!this.commandId) { return; }
|
||||
const signInfo = { commandId: this.commandId, signedBy: this.getActiveUser.memberId, signedStatus: status };
|
||||
const signInfo = { commandId: this.commandId, signedBy: this.getActiveUser.memberId, signedStatus: status, title: this.currentInfo.title };
|
||||
const data = {
|
||||
signInfo: signInfo
|
||||
};
|
||||
@ -290,7 +291,7 @@ export default {
|
||||
},
|
||||
searchCmd() {
|
||||
this.cmdTableData = [];
|
||||
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND').then((res) => {
|
||||
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND', {}).then((res) => {
|
||||
console.log(res, '---res');
|
||||
if (res.code == 200) {
|
||||
this.cmdTableData = res.data;
|
||||
|
@ -823,7 +823,7 @@ export default {
|
||||
},
|
||||
searchCmd() {
|
||||
return new Promise((resolve, reject) => {
|
||||
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND').then((res) => {
|
||||
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND', {}).then((res) => {
|
||||
console.log(res, '---res----');
|
||||
this.seachData = res.data;
|
||||
resolve();
|
||||
|
@ -190,7 +190,8 @@ export default {
|
||||
this.signedId = activeUser.memberId;
|
||||
}
|
||||
},
|
||||
doShow() {
|
||||
async doShow() {
|
||||
await this.searchCmd(); // 补齐剧本指令,同cmdManage
|
||||
this.getSenderName();
|
||||
this.getSignedData();
|
||||
this.dialogShow = true;
|
||||
@ -223,7 +224,8 @@ export default {
|
||||
hasReadCmd() {
|
||||
if (!this.commandId) { return; }
|
||||
const data = {
|
||||
commandId: this.commandId
|
||||
commandId: this.commandId,
|
||||
title: this.signedData.title
|
||||
};
|
||||
sendCommandNew(this.group, 'CTC_READ_DISPATCH_COMMAND', data).then((res) => {
|
||||
console.log(res, '---res');
|
||||
@ -233,7 +235,7 @@ export default {
|
||||
},
|
||||
signCmd(status) {
|
||||
if (!this.commandId) { return; }
|
||||
const signInfo = { commandId: this.commandId, signedBy: this.signedId, signedStatus: status };
|
||||
const signInfo = { commandId: this.commandId, signedBy: this.signedId, signedStatus: status, title: this.signedData.title };
|
||||
const data = {
|
||||
signInfo: signInfo
|
||||
};
|
||||
@ -244,6 +246,16 @@ export default {
|
||||
}).catch(error => {
|
||||
this.$messageBox('查询调度命令失败:' + error.message);
|
||||
});
|
||||
},
|
||||
searchCmd() {
|
||||
return new Promise((resolve, reject) => {
|
||||
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND', {}).then((res) => {
|
||||
console.log(res, '---res----');
|
||||
resolve();
|
||||
}).catch(error => {
|
||||
reject(error.message);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,9 @@
|
||||
<!-- 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-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>
|
||||
</el-table-column>
|
||||
<el-table-column label="语音识别关键词列表" width="350">
|
||||
@ -265,6 +267,37 @@ export default {
|
||||
watch: {
|
||||
'$store.state.map.mapDataLoadedCount': function (val) {
|
||||
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:{
|
||||
@ -279,37 +312,13 @@ export default {
|
||||
this.formModel.disposalProcesses = row.disposalProcesses;
|
||||
this.formModel.operationScore = row.operationScore;
|
||||
this.formModel.scriptId = row.scriptId;
|
||||
this.actionList = [];
|
||||
this.tempActionList = [];
|
||||
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';
|
||||
});
|
||||
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');
|
||||
});
|
||||
@ -360,6 +369,7 @@ export default {
|
||||
this.$store.dispatch('map/mapClear');
|
||||
},
|
||||
covert(element) {
|
||||
// console.log(JSON.stringify(element), '8888888---666666');
|
||||
const member = this.memberList[element.memberId];
|
||||
let resultData = '';
|
||||
if (element.type == 'Accept_Conversation_Invitation') {
|
||||
|
@ -388,6 +388,15 @@ export default {
|
||||
const maintainerList = {};
|
||||
const parentDepartmentList = {};
|
||||
const parkingLotSignalBuilding = {};
|
||||
const stationAssistant = {};
|
||||
const stationMaster = {};
|
||||
const stationSignaler = {};
|
||||
const stationPassenger = {};
|
||||
const stationSwitchMan = {};
|
||||
const stationFacilitator = {};
|
||||
const stationWorker = {};
|
||||
const deviceManager = {};
|
||||
const trainMaster = {};
|
||||
val.forEach(item => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
|
||||
this.memberData[item.id]['active'] = false;
|
||||
@ -436,6 +445,53 @@ export default {
|
||||
this.memberData[item.id].labelName = '停车场信号楼' + (item.name || '');
|
||||
parkingLotSignalBuilding[item.id] = this.memberData[item.id];
|
||||
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' },
|
||||
@ -474,6 +530,7 @@ export default {
|
||||
type: 'role',
|
||||
children: parentDepartmentList
|
||||
}, {
|
||||
|
||||
label: '电力调度',
|
||||
id: 'electricDispatcher',
|
||||
type: 'role',
|
||||
@ -483,7 +540,62 @@ export default {
|
||||
id: 'parkingLotSignalBuilding',
|
||||
type: 'role',
|
||||
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.filterNode();
|
||||
// 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) {
|
||||
this.audioPlay = val;
|
||||
@ -804,10 +931,10 @@ export default {
|
||||
// 停止录制 发送语音
|
||||
stopRecording() {
|
||||
this.audioPlay = true;
|
||||
clearInterval(this.inter);
|
||||
this.seconds = 0;
|
||||
const that = this;
|
||||
this.recorders.stopRecording(function(blobURL) {
|
||||
clearInterval(that.inter);
|
||||
that.seconds = 0;
|
||||
const blob = that.recorders.getBlob();
|
||||
const fd = new FormData();
|
||||
fd.append('file', blob);
|
||||
@ -1016,6 +1143,15 @@ export default {
|
||||
const temMaintainerList = [];
|
||||
const temDriverList = [];
|
||||
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 =>{
|
||||
switch (item.type) {
|
||||
case 'DISPATCHER':
|
||||
@ -1033,9 +1169,38 @@ export default {
|
||||
case 'DEPOT_DISPATCHER':
|
||||
temDepotDispatcherList.push({memberId: item.id, connect:true });
|
||||
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) {
|
||||
this.conversitionMemberList = [];
|
||||
this.messageList = [...this.commonMessageList];
|
||||
|
@ -15,7 +15,7 @@ export function covertMemberData (activeTrainList, resp) {
|
||||
lastData = JSON.parse(lastData);
|
||||
const lastMemberList = [];
|
||||
// const electricDispatcherList = [];
|
||||
const deviceListData = [[], [], [], [], [], [], [], []];
|
||||
const deviceListData = [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []];
|
||||
const driverList = [];
|
||||
lastData.forEach((member, index)=>{
|
||||
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.normalName = member.type + name;
|
||||
}
|
||||
const deviceType = ['行调', '通号', '行值', '司机', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼'];
|
||||
const deviceType = ['行调', '通号', '行值', '司机', '车辆段信号楼', '上级部门', '电力调度', '停车场信号楼', '车站助理', '车站站长', '车站信号员', '车站客运员', '车站扳道员', '车站引导员', '车站工务工', '设备管理员', '车务段段长 '];
|
||||
const deviceTypeIndex = deviceType.indexOf(member.type);
|
||||
if (deviceTypeIndex >= 0) {
|
||||
if (deviceTypeIndex == 3) {
|
||||
|
86
src/views/newMap/displayNew/demon/modifyTime.vue
Normal file
86
src/views/newMap/displayNew/demon/modifyTime.vue
Normal file
@ -0,0 +1,86 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :title="title" :visible.sync="show" width="550px" :before-close="doClose">
|
||||
<el-form ref="form" label-width="120px" :model="formModel" :rules="rules">
|
||||
<el-form-item :label="$t('display.setTime.systemTime')" prop="time">
|
||||
<el-time-picker
|
||||
v-model="formModel.time"
|
||||
:picker-options="pickerOptions"
|
||||
:placeholder="$t('display.setTime.anyTime')"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="show = false">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" :loading="status" @click="handleSure">{{ $t('global.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { modifySystemTime } from '@/api/simulation';
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
|
||||
// 修改系统时间
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
formModel: {
|
||||
time: new Date()
|
||||
},
|
||||
maxNumber: 1,
|
||||
pickerOptions: { selectableRange: '00:00:00 - 23:59:59' },
|
||||
status: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '修改系统时间';
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
rules() {
|
||||
return {
|
||||
time: [
|
||||
{ required: true, message: this.$t('display.setTime.selectSystemTime'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
// this.formModel.time = new Date(this.$store.state.training.initTime || null);
|
||||
this.show = true;
|
||||
},
|
||||
doClose() {
|
||||
this.status = false;
|
||||
this.show = false;
|
||||
},
|
||||
formatTime(time) {
|
||||
const hh = prefixIntrger(time.getHours(), 2);
|
||||
const mm = prefixIntrger(time.getMinutes(), 2);
|
||||
const ss = prefixIntrger(time.getSeconds(), 2);
|
||||
return `${hh}:${mm}:${ss}`;
|
||||
},
|
||||
handleSure() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.status = true;
|
||||
const model = {
|
||||
time: this.formatTime(this.formModel.time)
|
||||
};
|
||||
modifySystemTime(model, this.group).then(resp => {
|
||||
this.status = false;
|
||||
this.$message.success('修改系统时间成功!');
|
||||
}).catch(() => {
|
||||
this.status = false;
|
||||
this.$messageBox('修改系统时间失败,请稍后再试');
|
||||
});
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -5,7 +5,7 @@
|
||||
<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>
|
||||
<!-- cctv视图 -->
|
||||
|
@ -193,6 +193,88 @@ export default {
|
||||
}
|
||||
case 'PARKING_LOT_SIGNAL_BUILDING': {
|
||||
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;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1,17 +1,21 @@
|
||||
<template>
|
||||
<div class="main" :style="{width: canvasWidth+'px',height:'100%',position:'absolute',overflow:'hidden'}">
|
||||
<div class="main" :style="{width: canvasWidth+'px'}">
|
||||
<template>
|
||||
<transition name="el-zoom-in-bottom">
|
||||
<map-system-draft ref="mapCanvas" @back="back" />
|
||||
<map-system-draft v-show="!specialDispatch" ref="mapCanvas" @back="back" />
|
||||
</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-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-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" />
|
||||
<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>
|
||||
<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>
|
||||
</template>
|
||||
<script>
|
||||
@ -29,6 +33,7 @@ import MenuTrainList from '@/views/newMap/displayNew/menuTrainList';
|
||||
import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
|
||||
import { clearSimulation, getSimulationInfoNew, ranAsPlan, exitRunPlan } from '@/api/simulation';
|
||||
import { loadMapDataById } from '@/utils/loaddata';
|
||||
import DispatcherStation from '../jointTrainingNew/dispatcherStation';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
@ -41,7 +46,8 @@ export default {
|
||||
MenuSystemTime,
|
||||
MenuTrainList,
|
||||
MenuDispatherContest,
|
||||
MenuScript
|
||||
MenuScript,
|
||||
DispatcherStation
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -51,7 +57,8 @@ export default {
|
||||
textStatusHeight: 0,
|
||||
planRunning:false,
|
||||
dataError: false,
|
||||
group:''
|
||||
group:'',
|
||||
showMap: false
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
@ -87,6 +94,15 @@ export default {
|
||||
},
|
||||
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:{
|
||||
@ -125,6 +141,7 @@ export default {
|
||||
beforeDestroy() {
|
||||
clearSimulation(this.group);
|
||||
this.$store.dispatch('training/setSimulationUserList', []);
|
||||
this.$store.dispatch('training/setUserRole', '');
|
||||
this.$store.dispatch('training/reset');
|
||||
// this.$store.dispatch('map/mapClear');
|
||||
},
|
||||
@ -201,7 +218,6 @@ export default {
|
||||
this.group = this.$route.query.group;
|
||||
this.$store.dispatch('training/reset');
|
||||
this.loadSimulationInfo();
|
||||
this.loadMapData();
|
||||
},
|
||||
// 新版地图根据仿真group获取仿真基础信息
|
||||
async loadSimulationInfo() {
|
||||
@ -221,6 +237,10 @@ export default {
|
||||
if (resp.data.planRunning) {
|
||||
this.$store.commit('training/start');
|
||||
}
|
||||
if (this.isScript) {
|
||||
this.$store.dispatch('training/setPrdType', '02');
|
||||
}
|
||||
this.loadMapData();
|
||||
} else {
|
||||
this.$messageBox('此地图数据正在维护中,无法运行!');
|
||||
}
|
||||
@ -321,7 +341,20 @@ export default {
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('display.demon.endSimulationFail'));
|
||||
});
|
||||
},
|
||||
changeShowMap(flag) {
|
||||
this.showMap = flag;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss" rel="stylesheep/scss">
|
||||
.main {
|
||||
display: block;
|
||||
width: 100% !important;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background: #000000;
|
||||
}
|
||||
</style>
|
||||
|
@ -29,6 +29,9 @@
|
||||
<template v-if="isScriptRun">
|
||||
<el-button type="danger" size="small" @click="handleQuitQuest">退出剧本</el-button>
|
||||
</template>
|
||||
<template v-if="$route.query.lineCode == '16'">
|
||||
<el-button type="primary" size="small" @click="modifySystemTime">修改系统时间</el-button>
|
||||
</template>
|
||||
<template v-else-if="!projectDevice">
|
||||
<el-button v-if="project !== 'srsandbox' && $route.query.lineCode !== '16' " type="success" :disabled="isDisable" size="small" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
|
||||
<!-- isDisable&& -->
|
||||
@ -51,6 +54,7 @@
|
||||
/>
|
||||
|
||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||
<modify-time v-if="$route.query.lineCode == '16'" ref="modifySysTime" />
|
||||
</div>
|
||||
|
||||
</template>
|
||||
@ -58,6 +62,7 @@
|
||||
<!-- 单人仿真 -->
|
||||
<script>
|
||||
import SetTime from './demon/setTime';
|
||||
import ModifyTime from './demon/modifyTime';
|
||||
import DemonMenu from './demonMenu';
|
||||
import DemonChat from './demonChat';
|
||||
import { Notification } from 'element-ui';
|
||||
@ -80,6 +85,7 @@ export default {
|
||||
name: 'MenuDemon',
|
||||
components: {
|
||||
SetTime,
|
||||
ModifyTime,
|
||||
DemonChat,
|
||||
MenuSchema,
|
||||
DemonMenu,
|
||||
@ -306,6 +312,10 @@ export default {
|
||||
this.$messageBox(this.$t('display.demon.exitTaskFail'));
|
||||
});
|
||||
},
|
||||
// 修改系统时间
|
||||
modifySystemTime() {
|
||||
this.$refs.modifySysTime.doShow();
|
||||
},
|
||||
// 选择脚本
|
||||
async selectQuest({row, id, mapLocation, roleName}) {
|
||||
try {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="height:100%;">
|
||||
<div class="schema" :style="{top: offset+'px'}">
|
||||
<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">
|
||||
@ -12,9 +12,12 @@
|
||||
</el-select>
|
||||
<template v-if="!dataError">
|
||||
<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="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="isScheduling && isDepot && project !== 'teaching'" size="small" type="primary" @click="runPlanEditShow">运行图编辑</el-button>
|
||||
<!-- 加载剧本 -->
|
||||
@ -37,6 +40,8 @@
|
||||
<!-- 加载剧本列表弹窗 -->
|
||||
<add-quest ref="addQuest" @selectQuest="selectQuest" />
|
||||
<line-board ref="lineBoard" />
|
||||
<train-ticket ref="trainTicket" />
|
||||
<register-book ref="registerBook" />
|
||||
<!-- <run-plan-edit v-if="isScheduling && isDepot" ref="runPlanEdit" /> -->
|
||||
</div>
|
||||
</template>
|
||||
@ -56,6 +61,8 @@ import { getIbpInfoByStation } from '@/api/ibp';
|
||||
import { loadRunPlanData } from '@/utils/loaddata';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { timesSpeedPlayback } from '@/api/rtSimulation';
|
||||
import TrainTicket from '../trainTicket/index';
|
||||
import RegisterBook from '../registerBook/index';
|
||||
|
||||
// 右上角操作
|
||||
export default {
|
||||
@ -67,7 +74,9 @@ export default {
|
||||
AddQuest,
|
||||
// RunPlanEdit,
|
||||
SelectStation,
|
||||
LineBoard
|
||||
LineBoard,
|
||||
TrainTicket,
|
||||
RegisterBook
|
||||
},
|
||||
props: {
|
||||
offset: {
|
||||
@ -89,7 +98,9 @@ export default {
|
||||
swch: '02',
|
||||
isScriptCommand:false,
|
||||
faultMode: false,
|
||||
speed: 1
|
||||
speed: 1,
|
||||
centralizedstationList: [],
|
||||
centralizedStationMap: {}
|
||||
// firstLoad: true
|
||||
};
|
||||
},
|
||||
@ -130,12 +141,18 @@ export default {
|
||||
isDepot() {
|
||||
return this.$route.query.type === 'DEPOT';
|
||||
},
|
||||
showDispatcherStation() {
|
||||
return this.$route.query.lineCode === '16' && this.$store.state.training.prdType === '02';
|
||||
},
|
||||
isContest() {
|
||||
return this.project.includes('drts');
|
||||
},
|
||||
isAdmin() {
|
||||
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() {
|
||||
return this.isAdmin ? [
|
||||
{ value: 1, label: '1倍速' },
|
||||
@ -189,6 +206,21 @@ export default {
|
||||
},
|
||||
'$store.state.socket.simulationSpeed': function (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() {
|
||||
@ -220,24 +252,119 @@ export default {
|
||||
showLineBoard() {
|
||||
this.$refs.lineBoard.doShow();
|
||||
},
|
||||
changeShowMap() {
|
||||
this.$emit('changeShowMap', false);
|
||||
},
|
||||
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({
|
||||
path:'/displayNew/demon',
|
||||
query:{
|
||||
lineCode:this.$route.query.lineCode,
|
||||
group: this.$route.query.group,
|
||||
prdType: this.$route.query.prdType,
|
||||
prdType: '01',
|
||||
mapId:this.$route.query.mapId,
|
||||
project: this.project,
|
||||
newApi: this.$route.query.newApi,
|
||||
newApi: false,
|
||||
// joint: true,
|
||||
ctc: true,
|
||||
try: this.$route.query.try,
|
||||
try: this.$route.query.try || 0,
|
||||
token:getToken(),
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
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() {
|
||||
// const routeData = this.$router.resolve({
|
||||
// path:'/bigTrainRunplanManage',
|
||||
|
@ -1,6 +1,7 @@
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import store from '@/store/index';
|
||||
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
|
||||
import { transfiniteList, trainTypeList } from '@/scripts/ConstDic';
|
||||
// 操作
|
||||
export const operateEnum = {
|
||||
Set_Fault:{
|
||||
@ -155,7 +156,42 @@ export const operateEnum = {
|
||||
},
|
||||
Station:{
|
||||
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:{
|
||||
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) {
|
||||
debugger;
|
||||
if (operationType == 'Set_Fault' || operationType == 'Cancel_Fault') {
|
||||
let deviceName = '';
|
||||
const device = store.getters['map/getDeviceByCode'](operationParamMap.code) || {};
|
||||
@ -250,6 +656,8 @@ export function covertOperate(operationType, operationParamMap) {
|
||||
} else {
|
||||
if (device._type == 'Power') {
|
||||
deviceName = '供电线(' + device.code + ')';
|
||||
} else if (device._type == 'Train') {
|
||||
deviceName = '列车(' + device.groupNumber + ')';
|
||||
} else {
|
||||
deviceName = '' + device.name;
|
||||
}
|
||||
@ -268,7 +676,74 @@ export function covertOperate(operationType, operationParamMap) {
|
||||
});
|
||||
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];
|
||||
if (device == 'CM') {
|
||||
device = 'ControlConvertMenu';
|
||||
@ -276,6 +751,12 @@ export function covertOperate(operationType, operationParamMap) {
|
||||
if (operationType == 'Train_Load_Spare_Train') {
|
||||
device = 'Section';
|
||||
}
|
||||
if (operationType.includes('ASSIST')) {
|
||||
device = 'Station';
|
||||
}
|
||||
if (operationType.includes('CTC_ZONE')) {
|
||||
device = 'CTCZONE';
|
||||
}
|
||||
const list = ['Train_Update_Type',
|
||||
'Train_Add_Train_Trace',
|
||||
'Train_Remove_Train_Trace',
|
||||
@ -342,6 +823,45 @@ function covertDeviceName(deviceInfo, deviceType) {
|
||||
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) {
|
||||
let deviceName = '【';
|
||||
let paramName = '';
|
||||
@ -364,10 +884,12 @@ function covertOperation(deviceType, operationParamMap, operationType) {
|
||||
// } else {
|
||||
|
||||
// }
|
||||
deviceName += '】';
|
||||
} else if (operateEnum[deviceType].type) {
|
||||
deviceName += operateEnum[deviceType].type + '】';
|
||||
deviceName += operateEnum[deviceType].type;
|
||||
} else if (operateEnum[deviceType].function) {
|
||||
deviceName += covertFunction(operateEnum[deviceType].function, operationType);
|
||||
}
|
||||
deviceName += '】';
|
||||
const paramInfo = operateEnum[deviceType][operationType];
|
||||
if (paramInfo) {
|
||||
if (paramInfo.isDevice) {
|
||||
@ -387,12 +909,17 @@ function covertOperation(deviceType, operationParamMap, operationType) {
|
||||
}
|
||||
} else {
|
||||
if (paramInfo.isList) {
|
||||
// debugger;
|
||||
const params = paramInfo.params;
|
||||
if (params && params.length > 0) {
|
||||
paramName += '【';
|
||||
params.forEach((param, index)=>{
|
||||
paramName += ' ' + param.name;
|
||||
const data = operationParamMap[param.code];
|
||||
let opMap = operationParamMap;
|
||||
if (paramInfo.code) {
|
||||
opMap = operationParamMap[paramInfo.code];
|
||||
}
|
||||
const data = opMap[param.code];
|
||||
if (param.result) {
|
||||
param.result.forEach(result=>{
|
||||
switch (result.judge) {
|
||||
@ -441,6 +968,18 @@ function covertFunction(func, device) {
|
||||
return func(device);
|
||||
}
|
||||
|
||||
function getUserNameById(id) {
|
||||
let name = '';
|
||||
const userList = store.state.training.simulationUserList;
|
||||
const user = userList.find(item=>{
|
||||
return item.memberId == id;
|
||||
});
|
||||
if (user) {
|
||||
name = user.nickName;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
function getRouteNameById(routeId) {
|
||||
const routeList = store.state.map.routeList;
|
||||
const route = routeList.find(route=>{
|
||||
@ -453,6 +992,31 @@ function getStationNameById(stationId) {
|
||||
const station = store.getters['map/getDeviceByCode'](stationId) || {};
|
||||
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) {
|
||||
const station = store.getters['map/getDeviceByCode'](stationResult.stationCode) || {};
|
||||
let param = '不同意';
|
||||
|
@ -2,13 +2,14 @@
|
||||
<div class="main" :style="{width: canvasWidth+'px'}">
|
||||
<div v-show="panelShow" :panelShow="panelShow">
|
||||
<transition name="el-zoom-in-bottom">
|
||||
<map-system-draft ref="mapCanvas" @back="back" />
|
||||
<map-system-draft v-show="userRole != 'DISPATCHER'" ref="mapCanvas" @back="back" />
|
||||
</transition>
|
||||
<script-button-group
|
||||
ref="scriptButtonGroup"
|
||||
:offset="offset"
|
||||
:text-status-height="textStatusHeight"
|
||||
:group="group"
|
||||
:user-role.sync="userRole"
|
||||
@viewScriptRoles="viewScriptRoles"
|
||||
@viewRunPlan="viewRunPlan"
|
||||
@loadRunPlan="loadRunPlan"
|
||||
@ -19,7 +20,12 @@
|
||||
@setTreeData="setTreeData"
|
||||
@changeScriptMode="changeScriptMode"
|
||||
@setMapLocation="setMapLocation"
|
||||
@changeShowMap="changeShowMap"
|
||||
@quitQuest="quitQuest"
|
||||
/>
|
||||
<div v-if="lineCode === '16'" v-show="userRole === 'DISPATCHER' && !showMap">
|
||||
<dispatcher-station ref="dispatcherStation" @changeShowMap="changeShowMap" />
|
||||
</div>
|
||||
<script-preview-chat ref="chatbox" :group="group" :user-role="userRole" :offset="offset" />
|
||||
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
|
||||
</div>
|
||||
@ -49,6 +55,7 @@ import { loadDraftScriptNew } from '@/api/designPlatform';
|
||||
import Vue from 'vue';
|
||||
import { ScriptMode } from '@/scripts/ConstDic';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import DispatcherStation from '@/views/newMap/jointTrainingNew/dispatcherStation.vue';
|
||||
|
||||
export default {
|
||||
name: 'DisplayDraft',
|
||||
@ -60,6 +67,7 @@ export default {
|
||||
FaultChoose,
|
||||
MenuSystemTime,
|
||||
SelectRole,
|
||||
DispatcherStation,
|
||||
ScriptButtonGroup
|
||||
},
|
||||
data() {
|
||||
@ -73,6 +81,7 @@ export default {
|
||||
mapLocation:{},
|
||||
showStation: '',
|
||||
group: '',
|
||||
lineCode: '',
|
||||
prdTypeMap: {
|
||||
'01': '01', // 现地 => 现地
|
||||
'02': '02', // 行调 => 行调
|
||||
@ -80,9 +89,12 @@ export default {
|
||||
'05': '' // 派班 => null
|
||||
},
|
||||
userRole:'',
|
||||
showMap: false,
|
||||
isDrive: this.prdType == '04',
|
||||
treeData:[],
|
||||
memberList:[],
|
||||
centralizedstationList: [],
|
||||
centralizedStationMap: {},
|
||||
scriptMode: ScriptMode.TEACH
|
||||
};
|
||||
},
|
||||
@ -117,6 +129,11 @@ export default {
|
||||
this.showStation = code;
|
||||
}
|
||||
},
|
||||
'$store.state.map.map': function (map) {
|
||||
if (map) {
|
||||
this.setCentralizedstationList(map); // 获取集中站列表
|
||||
}
|
||||
},
|
||||
'$store.state.training.prdType':function(val) {
|
||||
this.setPosition();
|
||||
// this.setMode();
|
||||
@ -129,8 +146,12 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.group = this.$route.query.group || '';
|
||||
this.lineCode = this.$route.query.lineCode;
|
||||
},
|
||||
methods: {
|
||||
changeShowMap(flag) {
|
||||
this.showMap = flag;
|
||||
},
|
||||
back() {
|
||||
this.$refs.scriptButtonGroup.back();
|
||||
},
|
||||
@ -159,20 +180,24 @@ export default {
|
||||
}
|
||||
});
|
||||
let prdType;
|
||||
let type;
|
||||
if (role.type == '行值') {
|
||||
prdType = '01';
|
||||
type = 'STATION_SUPERVISOR';
|
||||
this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
|
||||
this.$store.dispatch('training/setRoleDeviceCode', role.deviceCode);
|
||||
} else if (role.type == '行调') {
|
||||
prdType = '02';
|
||||
type = 'DISPATCHER';
|
||||
this.$store.dispatch('training/setRoles', 'DISPATCHER');
|
||||
this.$store.dispatch('scriptRecord/updateRole', 'DISPATCHER' + ':' + role.id);
|
||||
} else if (role.type == '司机') {
|
||||
prdType = '04';
|
||||
type = 'DRIVER';
|
||||
this.$store.dispatch('training/setRoles', 'DRIVER');
|
||||
this.$store.dispatch('scriptRecord/updateRole', 'DRIVER' + ':' + role.id);
|
||||
} else if (role.type == '通号') {
|
||||
prdType = '';
|
||||
type = 'MAINTAINER';
|
||||
this.$store.dispatch('training/setRoles', 'MAINTAINER');
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/jlmap3d/maintainer',
|
||||
query:{
|
||||
@ -184,12 +209,68 @@ export default {
|
||||
}
|
||||
});
|
||||
window.open(routeData.href);
|
||||
this.$store.dispatch('training/setRoles', 'MAINTAINER');
|
||||
this.$store.dispatch('scriptRecord/updateRole', 'MAINTAINER' + ':' + role.id);
|
||||
} else if (role.type == '车辆段信号楼') {
|
||||
prdType = '05';
|
||||
type = 'DEPOT_DISPATCHER';
|
||||
this.$store.dispatch('training/setRoles', 'DEPOT_DISPATCHER');
|
||||
} else if (role.type == '上级部门') {
|
||||
prdType = '';
|
||||
type = 'PARENT_DEPARTMENT';
|
||||
this.$store.dispatch('training/setRoles', 'PARENT_DEPARTMENT');
|
||||
} else if (role.type == '电力调度') {
|
||||
prdType = '';
|
||||
type = 'ELECTRIC_DISPATCHER';
|
||||
this.$store.dispatch('training/setRoles', 'ELECTRIC_DISPATCHER');
|
||||
} else if (role.type == '停车场信号楼') {
|
||||
prdType = '';
|
||||
type = 'PARKING_LOT_SIGNAL_BUILDING';
|
||||
this.$store.dispatch('training/setRoles', 'PARKING_LOT_SIGNAL_BUILDING');
|
||||
|
||||
} else if (role.type == '车站助理') {
|
||||
prdType = '';
|
||||
type = 'STATION_ASSISTANT';
|
||||
this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT');
|
||||
} else if (role.type == '车站站长') {
|
||||
prdType = '';
|
||||
type = 'STATION_MASTER';
|
||||
this.$store.dispatch('training/setRoles', 'STATION_MASTER');
|
||||
} else if (role.type == '车站信号员') {
|
||||
prdType = '01';
|
||||
type = 'STATION_SIGNALER';
|
||||
this.$store.dispatch('training/setRoles', 'STATION_SIGNALER');
|
||||
} else if (role.type == '车站客运员') {
|
||||
prdType = '';
|
||||
type = 'STATION_PASSENGER';
|
||||
this.$store.dispatch('training/setRoles', 'STATION_PASSENGER');
|
||||
} else if (role.type == '车站扳道员') {
|
||||
prdType = '01';
|
||||
type = 'STATION_SWITCH_MAN';
|
||||
this.$store.dispatch('training/setRoles', 'STATION_SWITCH_MAN');
|
||||
} else if (role.type == '车站引导员') {
|
||||
prdType = '';
|
||||
type = 'STATION_FACILITATOR';
|
||||
this.$store.dispatch('training/setRoles', 'STATION_FACILITATOR');
|
||||
} else if (role.type == '车站工务工') {
|
||||
prdType = '';
|
||||
type = 'STATION_WORKER';
|
||||
this.$store.dispatch('training/setRoles', 'STATION_WORKER');
|
||||
} else if (role.type == '设备管理员') {
|
||||
prdType = '';
|
||||
type = 'DEVICE_MANAGER';
|
||||
this.$store.dispatch('training/setRoles', 'DEVICE_MANAGER');
|
||||
} else if (role.type == '车务段段长') {
|
||||
prdType = '';
|
||||
type = 'TRAIN_MASTER';
|
||||
this.$store.dispatch('training/setRoles', 'TRAIN_MASTER');
|
||||
} else {
|
||||
prdType = '';
|
||||
}
|
||||
this.switchMode(prdType);
|
||||
this.$store.dispatch('training/setPrdType', prdType);
|
||||
this.$store.dispatch('scriptRecord/updateRole', type + ':' + role.id);
|
||||
|
||||
if (role.type == '行值' || role.type == '车站信号员' || role.type == '车站扳道员') {
|
||||
this.setShowStation(role.deviceCode);
|
||||
}
|
||||
this.memberData.map(member=>{
|
||||
if (member.id == role.id) {
|
||||
member.userId = this.$store.state.user.id;
|
||||
@ -274,6 +355,38 @@ export default {
|
||||
}
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation);
|
||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
},
|
||||
quitQuest() {
|
||||
this.userRole = '';
|
||||
this.setShowStation('');
|
||||
},
|
||||
setShowStation(stationCode) {
|
||||
const showStation = this.centralizedStationMap[stationCode];
|
||||
const list = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
this.$jlmap.updateShowStation(list, showStation);
|
||||
this.$nextTick(()=>{
|
||||
this.$jlmap.setCenter(showStation);
|
||||
});
|
||||
},
|
||||
setCentralizedstationList(map) {
|
||||
this.centralizedstationList = [];
|
||||
(map.stationList || []).forEach(item => {
|
||||
if (item.centralized) {
|
||||
this.centralizedstationList.push({value: item.code, name: item.name});
|
||||
this.centralizedStationMap[item.code] = item.code;
|
||||
item.chargeStationCodeList && item.chargeStationCodeList.length && item.chargeStationCodeList.forEach(ele => {
|
||||
this.centralizedStationMap[ele] = item.code;
|
||||
});
|
||||
}
|
||||
});
|
||||
console.log(this.centralizedStationMap, '----this.centralizedStationMap--');
|
||||
// if (this.centralizedstationList.length && !this.showStation) {
|
||||
// this.showStation = this.centralizedstationList[0].value;
|
||||
// }
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -285,6 +398,7 @@ export default {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: #000000;
|
||||
|
||||
-moz-user-select: none;
|
||||
-o-user-select: none;
|
||||
|
@ -17,9 +17,21 @@
|
||||
</div>
|
||||
<!-- 右上角按钮列表 -->
|
||||
<div class="schema" :style="{top: offset+'px'}">
|
||||
<el-select v-model="speed" style="width: 100px;" size="small" @change="speedChange">
|
||||
<el-option
|
||||
v-for="item in speedList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<template v-if="!dataError">
|
||||
<el-button-group>
|
||||
<el-button size="small" :disabled="viewDisabled || isscriptRun" type="success" @click="viewScriptRoles">{{ $t('display.schema.selectRoles') }}</el-button>
|
||||
<el-button v-if="userRole=== 'STATION_SUPERVISOR'&&$route.query.lineCode ==='16'" size="small" @click="goCtc">车务终端</el-button>
|
||||
<el-button v-if="$route.query.lineCode ==='16'&&$store.state.training.prdType === '01'" size="small" @click="showTrainTicket">路票</el-button>
|
||||
<el-button v-if="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" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||
@ -40,6 +52,8 @@
|
||||
:driver-show="isDriver"
|
||||
:all-style="'top:'+(offset+textStatusHeight)+'px'"
|
||||
/>
|
||||
<train-ticket ref="trainTicket" />
|
||||
<register-book ref="registerBook" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -58,10 +72,16 @@ import ConstConfig from '@/scripts/ConstConfig';
|
||||
import { loadRunPlanData } from '@/utils/loaddata';
|
||||
import Cookies from 'js-cookie';
|
||||
import { Notification } from 'element-ui';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import TrainTicket from '@/views/newMap/trainTicket/index.vue';
|
||||
import RegisterBook from '@/views/newMap/registerBook/index.vue';
|
||||
import { timesSpeedPlayback } from '@/api/rtSimulation';
|
||||
export default {
|
||||
name:'ScriptButtonGroup',
|
||||
components:{
|
||||
DemonMenu
|
||||
DemonMenu,
|
||||
TrainTicket,
|
||||
RegisterBook
|
||||
},
|
||||
props:{
|
||||
offset: {
|
||||
@ -72,6 +92,10 @@ export default {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
userRole: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
textStatusHeight: {
|
||||
type: Number,
|
||||
default() {
|
||||
@ -88,6 +112,7 @@ export default {
|
||||
activeTrainList:[],
|
||||
isscriptRun:false, // 剧本是否正在加载
|
||||
scriptMode: ScriptMode.TEACH,
|
||||
speed: 1,
|
||||
planRunning:false
|
||||
};
|
||||
},
|
||||
@ -110,11 +135,41 @@ export default {
|
||||
isStation() {
|
||||
return this.$store.state.training.prdType == '01';
|
||||
},
|
||||
showDispatcherStation() {
|
||||
return this.$route.query.lineCode === '16' && this.$store.state.training.prdType === '02';
|
||||
},
|
||||
scriptModeList() {
|
||||
return ScriptMode;
|
||||
},
|
||||
isAdmin() {
|
||||
return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05');
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
speedList() {
|
||||
return this.isAdmin ? [
|
||||
{ value: 1, label: '1倍速' },
|
||||
{ value: 2, label: '2倍速' },
|
||||
{ value: 3, label: '3倍速' },
|
||||
{ value: 4, label: '4倍速' },
|
||||
{ value: 5, label: '5倍速' },
|
||||
{ value: 6, label: '6倍速' },
|
||||
{ value: 7, label: '7倍速' },
|
||||
{ value: 8, label: '8倍速' },
|
||||
{ value: 9, label: '9倍速' },
|
||||
{ value: 10, label: '10倍速' }
|
||||
] : [
|
||||
{ value: 1, label: '1倍速' },
|
||||
{ value: 2, label: '2倍速' },
|
||||
{ value: 3, label: '3倍速' },
|
||||
{ value: 4, label: '4倍速' },
|
||||
{ value: 5, label: '5倍速' }
|
||||
];
|
||||
},
|
||||
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:{
|
||||
@ -130,6 +185,9 @@ export default {
|
||||
},
|
||||
'$store.state.runPlan.loadRunPlanCount': function () {
|
||||
this.viewDisabled = false;
|
||||
},
|
||||
'$store.state.socket.simulationSpeed': function (val) {
|
||||
this.speed = val;
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
@ -149,6 +207,40 @@ export default {
|
||||
this.$store.dispatch('map/resetActiveTrainList', true);
|
||||
},
|
||||
methods:{
|
||||
goCtc() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/displayNew/demon',
|
||||
query:{
|
||||
lineCode:this.$route.query.lineCode,
|
||||
group: this.$route.query.group,
|
||||
prdType: '01',
|
||||
mapId:this.$route.query.mapId,
|
||||
project: this.project,
|
||||
newApi: false,
|
||||
ctc: true,
|
||||
try: this.$route.query.try || 0,
|
||||
token:getToken(),
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank');
|
||||
},
|
||||
showTrainTicket() {
|
||||
this.$refs.trainTicket.doShow();
|
||||
},
|
||||
showRegisterBook() {
|
||||
this.$refs.registerBook.doShow();
|
||||
},
|
||||
changeShowMap() {
|
||||
this.$emit('changeShowMap', false);
|
||||
},
|
||||
speedChange(val) {
|
||||
timesSpeedPlayback(this.$route.query.group, val).then(resp => {
|
||||
this.$message.success(`设置${val}倍速成功!`);
|
||||
}).catch(e => {
|
||||
this.$message.error('设置倍速失败!');
|
||||
});
|
||||
},
|
||||
// 加载地图数据
|
||||
async initLoadData() {
|
||||
this.changeScriptMode(this.scriptMode);
|
||||
@ -258,7 +350,78 @@ export default {
|
||||
id: 'parkingLotSignalBuilding',
|
||||
type: 'role',
|
||||
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;
|
||||
this.$emit('setTreeData', treeData);
|
||||
this.$emit('setMemberData', lastMemberList);
|
||||
@ -340,6 +503,7 @@ export default {
|
||||
this.$store.dispatch('training/setRoles', '');
|
||||
this.$store.dispatch('training/setPrdType', '');
|
||||
this.$emit('clearAllData');
|
||||
this.$emit('quitQuest');
|
||||
// if (resp.data.planRunning) {
|
||||
// this.$store.dispatch('training/start');// 仿真开始按计划行车
|
||||
// } else {
|
||||
@ -404,6 +568,7 @@ export default {
|
||||
.trainingButton{
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
z-index: 1;
|
||||
}
|
||||
.display-draft{
|
||||
position: absolute;
|
||||
|
@ -1,8 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="width:100%;height:100%;">
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
<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="success" :disabled="isDisable||dataError" @click="selectBeginTime">{{ $t('scriptRecord.drivingByPlan') }}</el-button>
|
||||
</el-button-group>
|
||||
@ -25,9 +28,11 @@
|
||||
:offset="offset"
|
||||
:data-error="dataError"
|
||||
:offset-bottom="offsetBottom"
|
||||
@changeShowMap="changeShowMap"
|
||||
/>
|
||||
|
||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||
<modify-time v-if="$route.query.lineCode == '16'" ref="modifySysTime" />
|
||||
|
||||
<tip-script-record-new
|
||||
ref="tipTaskRecordNew"
|
||||
@ -54,6 +59,7 @@ import MenuSchema from '@/views/newMap/displayNew/menuSchema';
|
||||
import DemonMenu from '@/views/newMap/displayNew/demonMenu';
|
||||
import TipScriptRecordNew from '@/views/scriptManage/tipScriptRecord';
|
||||
import SetTime from '@/views/newMap/displayNew/demon/setTime';
|
||||
import ModifyTime from '@/views/newMap/displayNew/demon/modifyTime';
|
||||
import { Notification } from 'element-ui';
|
||||
import { getSimulationMemberList} from '@/api/simulation';
|
||||
import ChatBox from '@/views/newMap/chatView/chatBox.vue';
|
||||
@ -62,6 +68,7 @@ export default {
|
||||
name: 'MenuScript',
|
||||
components: {
|
||||
SetTime,
|
||||
ModifyTime,
|
||||
MenuSchema,
|
||||
DemonMenu,
|
||||
TipScriptRecordNew,
|
||||
@ -93,7 +100,9 @@ export default {
|
||||
return {
|
||||
isScriptCommand:false,
|
||||
isReplaceBg: false,
|
||||
userRole:''
|
||||
userRole:'',
|
||||
centralizedstationList: [],
|
||||
centralizedStationMap: {}
|
||||
};
|
||||
},
|
||||
|
||||
@ -118,6 +127,9 @@ export default {
|
||||
},
|
||||
isDisable() {
|
||||
return this.$store.state.training.started;
|
||||
},
|
||||
userId() {
|
||||
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -129,6 +141,11 @@ export default {
|
||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
});
|
||||
},
|
||||
'$store.state.map.map': function (map) {
|
||||
if (map) {
|
||||
this.setCentralizedstationList(map); // 获取集中站列表
|
||||
}
|
||||
},
|
||||
'$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识
|
||||
getSimulationMemberList(this.group).then(resp => {
|
||||
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;
|
||||
});
|
||||
if (member) {
|
||||
const memberType = ['STATION_SUPERVISOR', 'DISPATCHER', 'DRIVER', 'MAINTAINER', 'DEPOT_DISPATCHER', 'PARENT_DEPARTMENT', 'ELECTRIC_DISPATCHER', 'PARKING_LOT_SIGNAL_BUILDING'];
|
||||
const prdTypeList = ['01', '02', '04', '', '05', '', ''];
|
||||
const memberType = ['STATION_SUPERVISOR', 'DISPATCHER', 'DRIVER', 'MAINTAINER', 'DEPOT_DISPATCHER', 'PARENT_DEPARTMENT',
|
||||
'ELECTRIC_DISPATCHER', 'PARKING_LOT_SIGNAL_BUILDING', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER',
|
||||
'STATION_PASSENGER', 'STATION_SWITCH_MAN', 'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER', ' TRAIN_MASTER'];
|
||||
const prdTypeList = ['01', '02', '04', '', '05', '', '', '', '', '', '01', '', '01', '', '', '', ''];
|
||||
const index = memberType.indexOf(member.type);
|
||||
let prdType;
|
||||
if (index >= 0) {
|
||||
@ -156,7 +175,18 @@ export default {
|
||||
},
|
||||
'$store.state.scriptRecord.userRole':function (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() {
|
||||
// this.clearAutoSave();
|
||||
@ -174,6 +204,10 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 修改系统时间
|
||||
modifySystemTime() {
|
||||
this.$refs.modifySysTime.doShow();
|
||||
},
|
||||
selectBeginTime() {
|
||||
this.$refs.setTime.doShow();
|
||||
},
|
||||
@ -192,6 +226,63 @@ export default {
|
||||
},
|
||||
setReplace(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;
|
||||
// }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -69,16 +69,27 @@ export default {
|
||||
const member = this.$store.state.training.memberData[val];
|
||||
const station = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
|
||||
if (station) {
|
||||
this.showStation = station.code;
|
||||
const showStationCode = this.stationCentralizedMap[station.code];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
const list = [];
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
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);
|
||||
}
|
||||
this.$store.dispatch('training/setRoleDeviceCode', station.code);
|
||||
this.$jlmap.updateShowStation(list, showStationCode || station.code);
|
||||
this.setCenter(showStationCode);
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
@ -86,6 +97,18 @@ export default {
|
||||
this.$message.error('调整角色成员失败!');
|
||||
});
|
||||
},
|
||||
jmapShowStation(station) {
|
||||
this.showStation = station.code;
|
||||
const showStationCode = this.stationCentralizedMap[station.code];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
const list = [];
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
this.$store.dispatch('training/setRoleDeviceCode', station.code);
|
||||
this.$jlmap.updateShowStation(list, showStationCode || station.code);
|
||||
this.setCenter(showStationCode);
|
||||
},
|
||||
setCenter(code) {
|
||||
if (this.$store.state.training.prdType === '09' && this.$store.state.map.map.displayList && this.$store.state.map.map.displayList.length) {
|
||||
const tempData = this.$store.state.map.map.displayList.find(item => { return item.stationCodeList.includes(code) && item.type === 'DEPOT_IL'; });
|
||||
@ -150,6 +173,7 @@ export default {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
|
||||
this.$store.dispatch('training/setUserRole', item.type);
|
||||
this.$jlmap.updateShowStation(list, showStationCode || item.deviceCode);
|
||||
this.setCenter(showStationCode);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user