Merge remote-tracking branch 'origin/test'

This commit is contained in:
fan 2022-07-05 18:03:57 +08:00
commit 1fe561222c
61 changed files with 6564 additions and 1333 deletions

8
.env.local-test Normal file
View File

@ -0,0 +1,8 @@
# just a flag
NODE_ENV = 'local-test'
# base api
# VUE_APP_BASE_API = 'https://test.joylink.club/jlcloud'
# VUE_APP_VOICE_API = 'https://joylink.club/oss/joylink'
# VUE_APP_UPLOAD_API = 'https://upload.joylink.club'
# VUE_APP_BASE_SITE='https://test.joylink.club/cbtc'

View File

@ -10,6 +10,7 @@
"build": "vue-cli-service build --mode production", "build": "vue-cli-service build --mode production",
"test": "vue-cli-service build --mode staging", "test": "vue-cli-service build --mode staging",
"local": "vue-cli-service build --mode", "local": "vue-cli-service build --mode",
"buildas": "vue-cli-service build --mode",
"preview": "node build/index.js --preview", "preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src", "lint": "eslint --ext .js,.vue src",
"test:unit": "jest --clearCache && vue-cli-service test:unit", "test:unit": "jest --clearCache && vue-cli-service test:unit",

View File

@ -513,3 +513,11 @@ export function updateTemplateRunPlan (data) {
data data
}); });
} }
// 大铁 获取 调度台 运行计划
export function getRunplanInRailway(group) {
return request({
url: `/api/simulation/${group}/ctc/railway/runPlan/list`,
method: 'get'
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

1
src/icons/svg/arrow.svg Normal file
View File

@ -0,0 +1 @@
<svg t="1656312203347" class="icon" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="15854" width="88" height="48"><path d="M516.22268 160.461856l418.045361 347.315464-418.045361 348.371134zM89.731959 376.874227h426.490721V633.402062H89.731959z" fill="" p-id="15855"></path></svg>

After

Width:  |  Height:  |  Size: 311 B

View File

@ -149,13 +149,13 @@ export default class Station extends Group {
createControlMode() { createControlMode() {
const model = this.model; const model = this.model;
if (!this.style.Station.StationControl.disPlayNone) { if (!this.style.Station.StationControl.disPlayNone) {
const queryList = window.location.search.substring(1).split('&'); const queryList = window.location.search.substring(1).split('&');
const queryCtc = queryList.find(item => { const queryCtc = queryList.find(item => {
return item.includes('ctc'); return item.includes('ctc');
}); });
if (queryCtc) { if (queryCtc) {
this.createCtcControlMode() this.createCtcControlMode();
} else if (this.style.Station.StationControl.special) { } else if (this.style.Station.StationControl.special) {
if (model.visible && model.createControlMode) { // model.createControlMode 控制模式 if (model.visible && model.createControlMode) { // model.createControlMode 控制模式
this.createControlModeAU(); this.createControlModeAU();
this.createControlModeCC(); this.createControlModeCC();
@ -168,129 +168,129 @@ export default class Station extends Group {
this.createCenterControl(); // 中控按钮 this.createCenterControl(); // 中控按钮
this.createSubstationControl(); // 站控按钮 this.createSubstationControl(); // 站控按钮
this.createInterconnectedControl(); // 联锁控 this.createInterconnectedControl(); // 联锁控
this.createVeryControl(); this.createVeryControl();
this.createSelfDiscipline(); this.createSelfDiscipline();
} }
} }
} }
this.setState(model); this.setState(model);
} }
createCtcControlMode() {//大铁 createCtcControlMode() { // 大铁
//非常站控 // 非常站控
const model = this.model; const model = this.model;
// 分散自律 // 分散自律
this.selfDisciplineThree = new EThreeLamp({ this.selfDisciplineThree = new EThreeLamp({
_subType: 'veryControl', _subType: 'veryControl',
style: this.style, style: this.style,
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
point: { point: {
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.selfDisciplineThree.offset.x, x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.selfDisciplineThree.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.selfDisciplineThree.offset.y y: model.controlModePoint.y + this.style.Station.StationControl.selfDisciplineThree.offset.y
}, },
context: this.style.Station.StationControl.selfDisciplineThree.text, context: this.style.Station.StationControl.selfDisciplineThree.text,
pop: false pop: false
}); });
this.add(this.selfDisciplineThree); this.add(this.selfDisciplineThree);
// 非常站控 // 非常站控
this.veryControl = new ESingleControl({ this.veryControl = new ESingleControl({
_subType: 'veryControl', _subType: 'veryControl',
style: this.style, style: this.style,
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
point: { point: {
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 2 / 3 + this.style.Station.StationControl.veryControl.offset.x, x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 2 / 3 + this.style.Station.StationControl.veryControl.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.veryControl.offset.y y: model.controlModePoint.y + this.style.Station.StationControl.veryControl.offset.y
}, },
context: this.style.Station.StationControl.veryControl.text, context: this.style.Station.StationControl.veryControl.text,
pop: false pop: false
}); });
this.add(this.veryControl); this.add(this.veryControl);
//按图排路 // 按图排路
this.graphRoad = new ESingleControl({ this.graphRoad = new ESingleControl({
_subType: 'graphRoad', _subType: 'graphRoad',
style: this.style, style: this.style,
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
point: { point: {
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 2 / 3 + this.style.Station.StationControl.graphRoad.offset.x, x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 2 / 3 + this.style.Station.StationControl.graphRoad.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.graphRoad.offset.y y: model.controlModePoint.y + this.style.Station.StationControl.graphRoad.offset.y
}, },
context: this.style.Station.StationControl.graphRoad.text, context: this.style.Station.StationControl.graphRoad.text,
pop: false pop: false
}); });
this.add(this.graphRoad); this.add(this.graphRoad);
//计划控制 // 计划控制
this.planControl = new ESingleControl({ this.planControl = new ESingleControl({
_subType: 'planControl', _subType: 'planControl',
style: this.style, style: this.style,
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
point: { point: {
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.planControl.offset.x, x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.planControl.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.planControl.offset.y y: model.controlModePoint.y + this.style.Station.StationControl.planControl.offset.y
}, },
context: this.style.Station.StationControl.planControl.text, context: this.style.Station.StationControl.planControl.text,
pop: false pop: false
}); });
this.add(this.planControl); this.add(this.planControl);
//中心通信 // 中心通信
this.centerCommunication = new ESingleControl({ this.centerCommunication = new ESingleControl({
_subType: 'centerCommunication', _subType: 'centerCommunication',
style: this.style, style: this.style,
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
point: { point: {
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.centerCommunication.offset.x, x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.centerCommunication.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.centerCommunication.offset.y y: model.controlModePoint.y + this.style.Station.StationControl.centerCommunication.offset.y
}, },
context: this.style.Station.StationControl.centerCommunication.text, context: this.style.Station.StationControl.centerCommunication.text,
pop: false pop: false
}); });
this.add(this.centerCommunication); this.add(this.centerCommunication);
//自律机通信 // 自律机通信
this.selfDisciplineCommunication = new ESingleControl({ this.selfDisciplineCommunication = new ESingleControl({
_subType: 'selfDisciplineCommunication', _subType: 'selfDisciplineCommunication',
style: this.style, style: this.style,
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
point: { point: {
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 2 / 3 + this.style.Station.StationControl.selfDisciplineCommunication.offset.x, x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 2 / 3 + this.style.Station.StationControl.selfDisciplineCommunication.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.selfDisciplineCommunication.offset.y y: model.controlModePoint.y + this.style.Station.StationControl.selfDisciplineCommunication.offset.y
}, },
context: this.style.Station.StationControl.selfDisciplineCommunication.text, context: this.style.Station.StationControl.selfDisciplineCommunication.text,
pop: false pop: false
}); });
this.add(this.selfDisciplineCommunication); this.add(this.selfDisciplineCommunication);
//允许转回 // 允许转回
this.allowedTurnBack = new ESingleControl({ this.allowedTurnBack = new ESingleControl({
_subType: 'allowedTurnBack', _subType: 'allowedTurnBack',
style: this.style, style: this.style,
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
point: { point: {
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 2 / 3 + this.style.Station.StationControl.allowedTurnBack.offset.x, x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 2 / 3 + this.style.Station.StationControl.allowedTurnBack.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.allowedTurnBack.offset.y y: model.controlModePoint.y + this.style.Station.StationControl.allowedTurnBack.offset.y
}, },
context: this.style.Station.StationControl.allowedTurnBack.text, context: this.style.Station.StationControl.allowedTurnBack.text,
pop: false pop: false
}); });
this.add(this.allowedTurnBack); this.add(this.allowedTurnBack);
// 列控 // 列控
this.trainControl = new ESingleControl({ this.trainControl = new ESingleControl({
_subType: 'trainControl', _subType: 'trainControl',
style: this.style, style: this.style,
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
point: { point: {
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.trainControl.offset.x, x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.trainControl.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.trainControl.offset.y y: model.controlModePoint.y + this.style.Station.StationControl.trainControl.offset.y
}, },
context: this.style.Station.StationControl.trainControl.text, context: this.style.Station.StationControl.trainControl.text,
pop: false pop: false
}); });
this.add(this.trainControl); this.add(this.trainControl);
} }
createControlModeAU() { // 西安二 createControlModeAU() { // 西安二
const model = this.model; const model = this.model;
this.stationControlAU = new Text({ this.stationControlAU = new Text({
@ -428,96 +428,95 @@ export default class Station extends Group {
} }
} }
} }
createSelfDiscipline() { createSelfDiscipline() {
const model = this.model; const model = this.model;
if (this.style.Station.StationControl.selfDiscipline) { if (this.style.Station.StationControl.selfDiscipline) {
this.selfDiscipline = new ESingleControl({ this.selfDiscipline = new ESingleControl({
_subType: 'self_discipline', _subType: 'self_discipline',
style: this.style, style: this.style,
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
point: { point: {
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.selfDiscipline.offset.x, x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.selfDiscipline.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.selfDiscipline.offset.y y: model.controlModePoint.y + this.style.Station.StationControl.selfDiscipline.offset.y
}, },
context: this.style.Station.StationControl.selfDiscipline.text, context: this.style.Station.StationControl.selfDiscipline.text,
pop: false pop: false
}); });
this.add(this.selfDiscipline); this.add(this.selfDiscipline);
} }
if (this.style.Station.StationControl.selfDisciplineControl) { if (this.style.Station.StationControl.selfDisciplineControl) {
this.selfDisciplineControl = new ESingleControl({ this.selfDisciplineControl = new ESingleControl({
_subType: 'self_discipline_control', _subType: 'self_discipline_control',
style: this.style, style: this.style,
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
point: { point: {
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.selfDisciplineControl.offset.x, x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.selfDisciplineControl.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.selfDisciplineControl.offset.y y: model.controlModePoint.y + this.style.Station.StationControl.selfDisciplineControl.offset.y
}, },
context: this.style.Station.StationControl.selfDisciplineControl.text, context: this.style.Station.StationControl.selfDisciplineControl.text,
pop: false pop: false
}); });
this.add(this.selfDisciplineControl); this.add(this.selfDisciplineControl);
} }
} }
createVeryControl() { createVeryControl() {
console.log('createVeryControl', this.style.Station.StationControl.veryControl);
const model = this.model; const model = this.model;
if (this.style.Station.StationControl.veryControl) { if (this.style.Station.StationControl.veryControl) {
this.veryControl = new ESingleControl({ this.veryControl = new ESingleControl({
_subType: 'very', _subType: 'very',
style: this.style, style: this.style,
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
point: { point: {
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.veryControl.offset.x, x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.veryControl.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.centerControl.offset.y y: model.controlModePoint.y + this.style.Station.StationControl.centerControl.offset.y
}, },
context: this.style.Station.StationControl.veryControl.text, context: this.style.Station.StationControl.veryControl.text,
pop: false pop: false
}); });
this.add(this.veryControl); this.add(this.veryControl);
} }
if (this.style.Station.StationControl.veryControlButton) { if (this.style.Station.StationControl.veryControlButton) {
this.veryControlButton = new Rect({ this.veryControlButton = new Rect({
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
_subType: 'veryControlButton', _subType: 'veryControlButton',
shape: { shape: {
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.x - this.style.Station.StationControl.lamp.radiusR, x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.x - this.style.Station.StationControl.lamp.radiusR,
y: model.controlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y - this.style.Station.StationControl.lamp.radiusR, y: model.controlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y - this.style.Station.StationControl.lamp.radiusR,
width: this.style.Station.StationControl.lamp.radiusR * 2, width: this.style.Station.StationControl.lamp.radiusR * 2,
height: this.style.Station.StationControl.lamp.radiusR * 2 height: this.style.Station.StationControl.lamp.radiusR * 2
}, },
style: { style: {
lineWidth: 1, lineWidth: 1,
stroke: '#fff', stroke: '#fff',
fill: this.style.Station.StationControl.veryControlButton.defaultColor fill: this.style.Station.StationControl.veryControlButton.defaultColor
} }
}); });
this.add(this.veryControlButton); this.add(this.veryControlButton);
this.veryControlButtonText = new Text({ this.veryControlButtonText = new Text({
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
_subType: 'veryControlButtonText', _subType: 'veryControlButtonText',
position: [0, 0], position: [0, 0],
style: { style: {
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.y, x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.y,
y: model.controlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y + this.style.Station.StationControl.lamp.radiusR + this.style.Station.StationControl.text.distance, y: model.controlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y + this.style.Station.StationControl.lamp.radiusR + this.style.Station.StationControl.text.distance,
fontWeight: this.style.Station.StationControl.text.fontWeight, fontWeight: this.style.Station.StationControl.text.fontWeight,
fontSize: this.style.Station.StationControl.text.fontSize, fontSize: this.style.Station.StationControl.text.fontSize,
fontFamily: this.style.fontFamily, fontFamily: this.style.fontFamily,
text: this.style.Station.StationControl.veryControlButton.text, text: this.style.Station.StationControl.veryControlButton.text,
textFill: this.style.Station.StationControl.text.fontColor, textFill: this.style.Station.StationControl.text.fontColor,
textAlign: this.style.Station.StationControl.text.textAlign, textAlign: this.style.Station.StationControl.text.textAlign,
textVerticalAlign: this.style.Station.StationControl.text.textVerticalAlign textVerticalAlign: this.style.Station.StationControl.text.textVerticalAlign
}, },
pop: false, pop: false
}); });
this.add(this.veryControlButtonText); this.add(this.veryControlButtonText);
} }
} }
createCenterControl() { // 中控按钮 createCenterControl() { // 中控按钮
const model = this.model; const model = this.model;
if (this.style.Station.StationControl.centerControl.show) { if (this.style.Station.StationControl.centerControl.show) {
@ -696,7 +695,7 @@ export default class Station extends Group {
}); });
this.add(this.interconnectedControl); this.add(this.interconnectedControl);
} }
} }
handleCenter() { // 中控 handleCenter() { // 中控
this.noneBeforeMode = 'Center'; this.noneBeforeMode = 'Center';
@ -766,9 +765,9 @@ export default class Station extends Group {
this.centerControl && this.centerControl.setTextColor(this.style.Station.StationControl.lamp.grayColor); this.centerControl && this.centerControl.setTextColor(this.style.Station.StationControl.lamp.grayColor);
this.interconnectedControl && this.interconnectedControl.setColor(this.style.Station.StationControl.lamp.purpleColor); this.interconnectedControl && this.interconnectedControl.setColor(this.style.Station.StationControl.lamp.purpleColor);
this.interconnectedControl && this.interconnectedControl.setTextColor(this.style.Station.StationControl.lamp.purpleColor); this.interconnectedControl && this.interconnectedControl.setTextColor(this.style.Station.StationControl.lamp.purpleColor);
this.veryControl && this.veryControl.setColor(this.style.Station.StationControl.veryControl.lightColor); this.veryControl && this.veryControl.setColor(this.style.Station.StationControl.veryControl.lightColor);
this.veryControlButton && this.veryControlButton.setStyle({ fill: this.style.Station.StationControl.veryControlButton.lightColor }); this.veryControlButton && this.veryControlButton.setStyle({ fill: this.style.Station.StationControl.veryControlButton.lightColor });
} }
handleNone() { // 空 handleNone() { // 空
if (this.style.Station.stationText.noneModeColor) { if (this.style.Station.stationText.noneModeColor) {
@ -795,11 +794,11 @@ export default class Station extends Group {
this.troButton && this.troButton.hide(); this.troButton && this.troButton.hide();
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.stationControlCC && this.stationControlCC.setStyle({text:'EL', textFill:this.style.Station.StationControl.text.emergencyControlColor}); this.stationControlCC && this.stationControlCC.setStyle({text:'EL', textFill:this.style.Station.StationControl.text.emergencyControlColor});
this.veryControl && this.veryControl.setColor(this.style.Station.StationControl.veryControl.defaultColor); this.veryControl && this.veryControl.setColor(this.style.Station.StationControl.veryControl.defaultColor);
this.selfDiscipline && this.selfDiscipline.setColor(this.style.Station.StationControl.selfDiscipline.defaultColor); this.selfDiscipline && this.selfDiscipline.setColor(this.style.Station.StationControl.selfDiscipline.defaultColor);
this.selfDisciplineControl && this.selfDisciplineControl.setColor(this.style.Station.StationControl.selfDisciplineControl.defaultColor); this.selfDisciplineControl && this.selfDisciplineControl.setColor(this.style.Station.StationControl.selfDisciplineControl.defaultColor);
this.veryControlButton && this.veryControlButton.setStyle({ fill: this.style.Station.StationControl.veryControlButton.defaultColor }); this.veryControlButton && this.veryControlButton.setStyle({ fill: this.style.Station.StationControl.veryControlButton.defaultColor });
if (this.style.Station.stationText.isSpecialType) { if (this.style.Station.stationText.isSpecialType) {
this.stationText.setColor(this.style.Station.stationText.noneModeColor); this.stationText.setColor(this.style.Station.stationText.noneModeColor);
this.stationText.setBackground(this.style.Station.stationText.defaultBackColor); this.stationText.setBackground(this.style.Station.stationText.defaultBackColor);

View File

@ -617,6 +617,49 @@ export const menuOperate = {
setRoute: { setRoute: {
operation: OperationEvent.CTCCommand.setRoute.menu.operation, operation: OperationEvent.CTCCommand.setRoute.menu.operation,
cmdType: CMD.CTC.CTC_SET_ROUTE cmdType: CMD.CTC.CTC_SET_ROUTE
},
// 大铁 调度台 添加运行计划
addDispatcherLogerRp: {
operation: OperationEvent.CTCCommand.addDispatcherLogerRp.menu.operation,
cmdType: CMD.CTC.CTC_ZONE_SAVE_RUN_PLAN
},
// 大铁 调度台 删除运行计划
deleteDispatcherLogerRp:{
operation: OperationEvent.CTCCommand.deleteDispatcherLogerRp.menu.operation,
cmdType: CMD.CTC.CTC_ZONE_DELETE_RUN_PLAN
},
// 车站签收行车计划
stationSignRunplan:{
operation: OperationEvent.CTCCommand.stationSignRunplan.menu.operation,
cmdType: CMD.CTC.CTC_STATION_SIGN_RUN_PLAN
},
// 大铁 调度台 发布所有行车计划
releaseAllDispatcherLogerRp:{
operation: OperationEvent.CTCCommand.releaseAllDispatcherLogerRp.menu.operation,
cmdType: CMD.CTC.CTC_ZONE_RELEASE_ALL_RUN_PLAN
},
// 调度台行车计划修改股道
modifyDispatcherLogerRpSection:{
operation: OperationEvent.CTCCommand.modifyDispatcherLogerRpSection.menu.operation,
cmdType: CMD.CTC.CTC_ZONE_SAVE_TRACK_SECTION
}
},
Rail: {
railFillInTicket: {
operation: OperationEvent.RailCommand.railFillInTicket.menu.operation,
cmdType: CMD.RAIL.CMD_RAIL_FILL_IN_TICKET
},
railQueryTicket: {
operation: OperationEvent.RailCommand.railQueryTicket.menu.operation,
cmdType: CMD.RAIL.CMD_RAIL_QUERY_TICKET
},
railFillInRegister: {
operation: OperationEvent.RailCommand.railFillInRegister.menu.operation,
cmdType: CMD.RAIL.CMD_RAIL_FILL_IN_REGISTER
},
railQueryRegister: {
operation: OperationEvent.RailCommand.railQueryRegister.menu.operation,
cmdType: CMD.RAIL.CMD_RAIL_QUERY_REGISTER
} }
} }
@ -656,11 +699,11 @@ export function commitOperate(operate, paramList, over, fillStep = {}) {
Object.assign(step, fillStep); Object.assign(step, fillStep);
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
store.dispatch('training/nextNew', step).then(({ valid }) => { store.dispatch('training/nextNew', step).then(({ valid, response }) => {
if (valid) { if (valid) {
store.dispatch('menuOperation/handleBreakFlag', { break: true }); store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
resolve({ valid: valid, operate: {...step} }); resolve({ valid: valid, operate: {...step}, response:response});
}).catch(error=>{ }).catch(error=>{
reject(error); reject(error);
}); });

View File

@ -0,0 +1,364 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
:title="title"
:visible.sync="show"
width="670px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form id="AddDispatcherForm" ref="form" :model="model" label-width="80px" :rules="rules">
<el-form-item label="车站:" prop="stationCode" style="width: 100%;">
<el-select v-model="model.stationCode" placeholder="" style="width:180px" @change="changeStation">
<el-option
v-for="item in stationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="列车类型:" prop="trainType">
<el-select v-model="model.trainType" placeholder="" style="width:180px">
<el-option
v-for="item in trainTypeList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="运行类型:" prop="runType" style="margin-left: 45px;">
<el-select v-model="model.runType" placeholder="" style="width:180px">
<el-option
v-for="item in runTypeList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="到达车次:" prop="arriveTripNumber">
<el-input v-model="model.arriveTripNumber" style="width:160px" :disabled="model.startRunPlan" />
</el-form-item>
<el-form-item label="出发车次:" prop="departTripNumber" style="margin-left: 66px;">
<el-input v-model="model.departTripNumber" style="width:160px" :disabled="model.endRunPlan" />
</el-form-item>
<el-form-item label="接车口:" prop="arriveDirectionCode">
<el-select v-model="model.arriveDirectionCode" placeholder="" style="width:180px" :disabled="model.startRunPlan">
<el-option
v-for="item in filterArrMapStationDirectionList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="发车口:" prop="departDirectionCode" style="margin-left:45px;">
<el-select v-model="model.departDirectionCode" placeholder="" style="width:180px" :disabled="model.endRunPlan">
<el-option
v-for="item in filterDepMapStationDirectionList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="接车股道:" prop="arriveSectionCode">
<el-select v-model="model.arriveSectionCode" placeholder="" style="width:160px" :disabled="model.startRunPlan">
<el-option
v-for="item in filterArrSectionList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="发车股道:" prop="departSectionCode" style="margin-left: 67px;">
<el-select v-model="model.departSectionCode" placeholder="" style="width:160px" :disabled="model.endRunPlan">
<el-option
v-for="item in filterDepSectionList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="到达时间:" prop="arrivePlanTime">
<el-date-picker v-model="model.arrivePlanTime" type="datetime" :disabled="model.startRunPlan" value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm" style="width:160px" />
</el-form-item>
<el-form-item label="" prop="startRunPlan" class="noMargin" style="margin-left:10px;">
<el-checkbox v-model="model.startRunPlan">始发</el-checkbox>
</el-form-item>
<el-form-item label="出发时间:" prop="departPlanTime" style="margin-left:10px;">
<el-date-picker v-model="model.departPlanTime" type="datetime" :disabled="model.endRunPlan" value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm" style="width:160px" />
</el-form-item>
<el-form-item label="" prop="endRunPlan" class="noMargin" style="margin-left:10px;">
<el-checkbox v-model="model.endRunPlan">终到</el-checkbox>
</el-form-item>
<el-form-item label="" prop="electrical" class="noMargin" style="margin-left:80px;">
<el-checkbox v-model="model.electrical">电力</el-checkbox>
</el-form-item>
<el-form-item label="" prop="passenger" class="noMargin" style="margin-left:10px;">
<el-checkbox v-model="model.passenger">办理客运</el-checkbox>
</el-form-item>
<el-form-item label="" prop="transfinite" style="margin-left:20px;" class="noMargin">
<el-select v-model="model.transfinite" placeholder="" style="width:110px">
<el-option
v-for="item in transfiniteList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<br>
<el-form-item label="" prop="trackDiscordant" style="margin-left:80px;width: 220px;" class="noMargin">
<el-checkbox v-model="model.trackDiscordant">运行股道与基本径路不一致</el-checkbox>
</el-form-item>
<el-form-item label="" prop="entryOutDiscordant" style="margin-left:90px;width: 220px;" class="noMargin">
<el-checkbox v-model="model.entryOutDiscordant">出入口与基本径路不一致</el-checkbox>
</el-form-item>
<!-- trackDiscordant -->
<!-- 运行股道与基本径路不一致 -->
<!-- entryOutDiscordant -->
<!-- 出入口与基本径路不一致 -->
<!-- keyTrains
重点列车 -->
</el-form>
<el-row justify="center" style="margin-top:10px">
<el-col :span="7" :offset="5">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="7" :offset="2">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex';
export default {
name: 'AddDispatcherLogerRunplan',
data() {
var validateTripNumber = (rule, value, callback) => {
if (value) {
const judge = /^[a-zA-Z0-9]*[\d]$/.test(value);
if (judge) {
if (value.toString().length > 6 || value.toString().length < 2) {
callback('车次长度2-6位');
} else {
callback();
}
} else {
callback('字母+数字,最后一位数字');
}
} else {
// callback('');
callback();
}
};
return {
dialogShow: false,
loading: false,
mapStationDirectionList:[],
filterArrMapStationDirectionList:[],
filterDepMapStationDirectionList:[],
filterArrSectionList:[],
filterDepSectionList:[],
filterSectionList:[],
trainTypeList:[
{name:'跨局快速旅客列车', code:'FAST_PASSENGER_TRAIN' }
],
runTypeList:[
{name:'快速旅客列车', code:'FAST_PASSENGER_TRAIN' }
],
transfiniteList:[
{name:'不超限', code:'NO' },
{name:'超级超限', code:'TRANSFINITE_SUPER' },
{name:'一级超限', code:'TRANSFINITE_ONE_LEVEL' },
{name:'二级超限', code:'TRANSFINITE_TWO_LEVEL' }
],
model:{
// runPlanCode:'', //
stationCode:'', //
// groupNumber:'', // :
arriveSectionCode:'', //
arrivePlanTime:'', //
arriveTripNumber:'', //
arriveStationCode:'', //
arriveDirectionCode:'', //
departSectionCode:'', //
departPlanTime:'', //
departTripNumber:'', //
departStationCode:'', //
departDirectionCode:'', //
startRunPlan:false, // true,false
endRunPlan:false, // true,false
electrical:false, // true,false
passenger:false, // true,false
// keyTrains:false, // true,false
// military:false, // true,false
trackDiscordant:false, //
entryOutDiscordant:false, //
transfinite:'NO' // NO TRANSFINITE_SUPER TRANSFINITE_ONE_LEVEL TRANSFINITE_TWO_LEVEL
},
rules: {
stationCode:[
{ required: true, message: '请选择车站', trigger: 'blur' },
{ required: true, message: '请选择车站', trigger: 'change' }
],
arriveTripNumber:[
{ required: true, validator: validateTripNumber, trigger: 'blur' }
],
departTripNumber:[
{ required: true, validator: validateTripNumber, trigger: 'blur' }
]
}
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.addDispatcherLogerRp.menu.domId : '';
},
title() {
return '增加阶段计划车次';
}
},
methods: {
doShow({filterSectionList, mapStationDirectionMap}) {
this.mapStationDirectionList = Object.values(mapStationDirectionMap);
this.filterSectionList = filterSectionList;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
changeStation(stationCode) {
this.filterArrMapStationDirectionList = this.mapStationDirectionList.filter(each=>{ return each.stationCode == stationCode; });
this.filterDepMapStationDirectionList = this.mapStationDirectionList.filter(each=>{ return each.stationCode == stationCode; });
this.filterArrSectionList = this.filterSectionList.filter(each=>{ return each.stationCode == stationCode; });
this.filterDepSectionList = this.filterSectionList.filter(each=>{ return each.stationCode == stationCode; });
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.model = {
stationCode:'', //
arriveSectionCode:'', //
arrivePlanTime:'', //
arriveTripNumber:'', //
arriveStationCode:'', //
arriveDirectionCode:'', //
departSectionCode:'', //
departPlanTime:'', //
departTripNumber:'', //
departStationCode:'', //
departDirectionCode:'', // )
startRunPlan:false, // true,false
endRunPlan:false, // true,false
electrical:false, // true,false
passenger:false, // true,false
trackDiscordant:false, //
entryOutDiscordant:false, //
transfinite:'NO' // NO TRANSFINITE_SUPER TRANSFINITE_ONE_LEVEL TRANSFINITE_TWO_LEVEL
};
this.filterArrMapStationDirectionList = [];
this.filterDepMapStationDirectionList = [];
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs.form.validate((valid) => {
if (valid) {
this.loading = true;
commitOperate(menuOperate.CTC.addDispatcherLogerRp, {planParam:this.model}, 3).then(({valid, response})=>{
if (valid) {
this.$emit('addDisLoger', response.data);
this.doClose();
}
}).catch(() => {
this.doClose();
this.$emit('noticeInfo');
});
}
});
},
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 lang="scss">
.chengdou-03__systerm .el-dialog #AddDispatcherForm .el-form-item label{
padding-right:5px;
line-height:30px;
}
.chengdou-03__systerm .el-dialog #AddDispatcherForm .el-form-item{
margin-bottom:20px;
}
#AddDispatcherForm .el-form-item__content{
line-height:30px;
}
#AddDispatcherForm{
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
#AddDispatcherForm .el-input__inner {
height: 22px !important;
line-height: 22px !important;
}
#AddDispatcherForm span.el-input__suffix .el-input__icon{
height:22px;
line-height:22px;
}
#AddDispatcherForm span.el-input__prefix .el-input__icon{
line-height:22px;
display:none;
}
#AddDispatcherForm .el-form-item.noMargin .el-form-item__content{
margin-left:0px !important;
}
#AddDispatcherForm .el-form-item.noMargin .el-checkbox__label{
padding-left: 5px;
vertical-align: top;
line-height: 30px;
}
#AddDispatcherForm .el-input--prefix .el-input__inner{
padding-left:10px;
padding-right: 26px;
}
</style>

View File

@ -0,0 +1,111 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
:title="title"
:visible.sync="show"
width="280px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="text-align: center;">
确定删除该条行车计划
</div>
<el-row justify="center" class="button-group" style="margin-top:20px">
<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="3">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'DeleteDispatcherLoger',
data() {
return {
dialogShow: false,
loading: false,
model:{
stationCode:'',
runPlanCode:''
}
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.deleteRunplan.menu.domId : '';
},
title() {
return '警告';
}
},
methods: {
doShow(row) {
// stationCode
// const param = {stationCode:this.currentRow.stationCode, runPlanCode:this.currentRow.runPlanCode};
// commitOperate(menuOperate.CTC.deleteTrainFixedPath, param, 3).then(({valid})=>{
// if (valid) {
// that.$message.success('');
// }
// }).catch(() => {
// that.$message.error('');
// });
// 4. CTC_ZONE_DELETE_RUN_PLAN stationCode runPlanCode
this.model.stationCode = row.stationCode;
this.model.runPlanCode = row.runPlanCode;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.loading = true;
const param = this.model;
commitOperate(menuOperate.CTC.deleteDispatcherLogerRp, param, 2).then(({valid})=>{
this.loading = false;
this.$emit('clearRpRow');
if (valid) {
this.$emit('deleteDisLoger', param);
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('clearRpRow');
this.doClose();
this.$emit('noticeInfo');
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$emit('clearRpRow');
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -0,0 +1,191 @@
<template>
<el-dialog
id="stageRunplanClass"
v-dialogDrag
class="chengdou-03__systerm"
:title="title"
:visible.sync="show"
width="945px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div>
<span>最近接受时间: {{ updateTime }}</span>
</div>
<el-table
id="stageRunplanLeftTable"
:data="tableData"
border
height="370"
style="width: 100%;border:1px #ccc solid"
>
<el-table-column
type="index"
label="序号"
width="70"
/>
<el-table-column
prop="arriveTripNumber"
label="到达车次"
width="100"
/>
<el-table-column
prop="departTripNumber"
label="出发车次"
width="100"
/>
<el-table-column
prop="status"
label="类型"
width="100"
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<div v-else-if="scope.row.status==1">添加</div>
<div v-else-if="scope.row.status==0">变化</div>
</template>
</el-table-column>
<el-table-column
prop="arriveSectionCode"
label="到达股道"
width="100"
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<div v-else-if="scope.row.status==1">{{ sectionMap[scope.row.arriveSectionCode] }}</div>
<div v-else-if="scope.row.arriveSectionCode">{{ sectionMap[scope.row.arriveSectionCode]+'['+sectionMap[scope.row.oldArriveSectionCode]+']' }}</div>
</template>
</el-table-column>
<el-table-column
prop="arrivePlanTime"
label="到达时间"
width="170"
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<div v-else>{{ scope.row.arrivePlanTime }}</div>
</template>
</el-table-column>
<el-table-column
prop="departSectionCode"
label="出发股道"
width="100"
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<!-- {{ sectionMap }} -->
<div v-else-if="scope.row.status==1">{{ sectionMap[scope.row.departSectionCode] }}</div>
<div v-else-if="scope.row.departSectionCode">{{ sectionMap[scope.row.departSectionCode]+'['+sectionMap[scope.row.oldDepartSectionCode]+']' }}</div>
</template>
</el-table-column>
<el-table-column
prop="departPlanTime"
label="出发时间"
width="170"
>
<template slot-scope="scope">
<div v-if="scope.row.status==-1">删除</div>
<div v-else>{{ scope.row.departPlanTime }}</div>
</template>
</el-table-column>
</el-table>
<el-row justify="center" class="button-group" style="margin-top:10px">
<el-col :span="6" :offset="5">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">签收</el-button>
</el-col>
<el-col :span="6" :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 {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name:'StageRunplan',
data() {
return {
dialogShow:false,
loading: false,
tableData:[],
sectionMap:{},
updateTime:''
};
},
computed: {
...mapGetters('map', [
'sectionList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.stationSignRunplan.menu.domId : '';
},
title() {
return '阶段计划';
}
},
methods:{
doShow(currentRailwaySimulationRunplan) {
this.stationCode = currentRailwaySimulationRunplan.stationCode;
this.tableData = currentRailwaySimulationRunplan.dataList;
this.updateTime = currentRailwaySimulationRunplan.updateTime;
this.sectionMap = {};
this.sectionList.forEach(section=>{
if (section.standTrack) { this.sectionMap[section.code] = section.name; }
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.loading = true;
commitOperate(menuOperate.CTC.stationSignRunplan, {stationCode:this.stationCode}, 3).then(({valid})=>{
this.loading = false;
if (valid) {
this.$emit('closeFlash');
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$emit('noticeInfo');
});
},
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 lang="css">
#stageRunplanClass.chengdou-03__systerm .el-dialog .el-dialog__body{
padding: 10px;
}
#stageRunplanClass.chengdou-03__systerm .el-dialog .el-table .cell div{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

View File

@ -0,0 +1,393 @@
<template>
<div v-show="isShow" class="dispatcherLoger">
<div class="dispatcherLogerButton">
<div class="dispatcherLogerLine" />
<div class="dispatcherLogerBtnGroup">
<div id="addRunplan" class="dispatcherLogerClickBtn" @click="addRunplan">添加</div>
<div id="deleteRunplan" class="dispatcherLogerClickBtn" @click="deleteRunplan">删除</div>
<div id="sendRunplan" class="dispatcherLogerClickBtn" @click="sendRunplan">发送计划</div>
</div>
<div class="closeDL">
<i class="el-icon-close close_icon" @click.stop="doClose" />
</div>
</div>
<div class="dispatcherLogerContent" :style="{'height':height+'px'}">
<el-table
id="dispatcherLogerContentTable"
ref="dispatcherLogerContentTable"
:data="tableData"
border
:height="height"
highlight-current-row
style="width: 100%;border:1px #ccc solid"
@cell-click="selectedTripNumber"
>
<!-- -->
<!-- @current-change="handleCurrentChange" -->
<el-table-column
prop="tripNumber"
label=""
width="100"
>
<template slot-scope="scope">
<div>{{ scope.row.tripNumber }} {{ scope.row.status==-1?'(删)':'' }}</div>
</template>
</el-table-column>
<!-- <el-table-column width="155" prop="trainType" label="列车类型">
<template slot-scope="scope">
<div v-if="scope.row.trainType" class="accessName">
{{ runTypeMap[scope.row.trainType] }}
</div>
</template>
</el-table-column>
<el-table-column width="155" prop="runType" label="运行类型">
<template slot-scope="scope">
<div v-if="scope.row.runType" class="accessName">
{{ runTypeMap[scope.row.runType].name }}
</div>
</template>
</el-table-column> -->
<el-table-column width="155" prop="arriveTripNumber" label="到达车次">
<template slot-scope="scope">{{ scope.row.arriveTripNumber }}</template>
</el-table-column>
<el-table-column width="155" prop="departTripNumber" label="发车车次">
<template slot-scope="scope">{{ scope.row.departTripNumber }}</template>
</el-table-column>
<!-- runPlanCode:"", stationCode:"", tripNumber:"", groupNumber:"",
trackSectionCode:"", arriveSectionCode:"", departSectionCode:"",
arriveTime:"", departTime:"", arrivePlanTime:"", departPlanTime:"",
arriveTripNumber:"", departTripNumber:"",
startRunPlan: null/false/true,endRunPlan: null/false/true,
electrical: null/false/true,passenger: null/false/true,
keyTrains: null/false/true,military: null/false/true,
trackDiscordant:null/false/true, entryOutDiscordant: null/false/true,
transfinite: NO/TRANSFINITE_SUPER/TRANSFINITE_ONE_LEVEL/TRANSFINITE_TWO_LEVEL -->
<!-- width="155" -->
<el-table-column prop="arriveDirectionCode" label="接车口">
<template slot-scope="scope">
<div v-if="scope.row.arriveDirectionCode" class="accessName" :title="scope.row.arriveDirectionCode">
{{ mapStationDirectionData[scope.row.arriveDirectionCode].name }}
</div>
</template>
</el-table-column>
<!-- width="155" -->
<el-table-column prop="departDirectionCode" label="发车口">
<template slot-scope="scope">
<div v-if="scope.row.departDirectionCode" class="accessName" :title="scope.row.departDirectionCode">
{{ mapStationDirectionData[scope.row.departDirectionCode].name }}
</div>
</template>
</el-table-column>
<el-table-column width="155" prop="arriveSectionCode" label="接车股道">
<template slot-scope="scope">
<el-select
v-model="tableData[scope.$index].arriveSectionCode"
placeholder=""
size="mini"
:disabled="scope.row.status==-1"
popper-class="stationSelect"
@change="changeArriveRunPlan($event,scope.row,scope.$index)"
>
<el-option
v-for="item in filterSectionList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<!--
electrical
电力
passenger
办理客运 -->
<!-- <div v-if="scope.row.arriveSectionCode" class="accessName">
{{ filterSectionMap[scope.row.arriveSectionCode].name }}
</div>
</template> -->
</template></el-table-column>
<el-table-column width="155" prop="departSectionCode" label="发车股道">
<template slot-scope="scope">
<el-select
v-model="tableData[scope.$index].departSectionCode"
placeholder=""
size="mini"
popper-class="stationSelect"
:disabled="scope.row.status==-1"
@change="changeDepartRunPlan($event,scope.row,scope.$index)"
>
<el-option
v-for="item in filterSectionList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<!-- <div v-if="scope.row.departSectionCode" class="accessName">
{{ filterSectionMap[scope.row.departSectionCode].name }}
</div> -->
</template>
</el-table-column>
<el-table-column width="155" prop="arrivePlanTime" label="到达时间">
<template slot-scope="scope">
<div v-if="scope.row.arrivePlanTime" class="accessName">
{{ scope.row.arrivePlanTime }}
</div>
</template>
</el-table-column>
<el-table-column width="155" prop="departPlanTime" label="出发时间">
<template slot-scope="scope">
<div v-if="scope.row.departPlanTime" class="accessName">
{{ scope.row.departPlanTime }}
</div>
</template>
</el-table-column>
</el-table>
</div>
<add-dispatcher-loger-runplan ref="addDispatcherLogerRunplan" @noticeInfo="noticeInfo" @addDisLoger="addDisLoger" />
<delete-dispatcher-loger ref="deleteDispatcherLoger" @clearRpRow="clearRpRow" @noticeInfo="noticeInfo" @deleteDisLoger="deleteDisLoger" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</div>
</template>
<script>
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import { copyAssign } from '@/utils/index';
import {getRunplanInRailway} from '@/api/runplan';
import AddDispatcherLogerRunplan from './dialog/addDispatcherLogerRunplan';
import DeleteDispatcherLoger from './dialog/deleteDispatcherLoger';
import { mapGetters } from 'vuex';
export default {
name:'DispatcherLoger',
components: {
NoticeInfo,
AddDispatcherLogerRunplan,
DeleteDispatcherLoger
},
data() {
return {
isShow:false,
height: this.$store.state.app.height - 37,
filterSectionList:[],
// filterSectionMap:{},
tableData:[],
group:'',
currentRow:null,
trainTypeMap:{'FAST_PASSENGER_TRAIN':'跨局快速旅客列车'},
runTypeMap:{'FAST_PASSENGER_TRAIN':'快速旅客列车'}
};
},
computed: {
...mapGetters('map', [
'sectionList'
]),
mapStationDirectionData() {
return this.$store.state.map.mapStationDirectionData;
}
},
watch:{
// '$store.state.socket.railwaySimulationRpChange': function (val) {
// this.loadData();
// }
'$store.state.map.mapDataLoadedCount': function (val) { //
this.loadData();
},
// 仿-仿
'$store.state.socket.simulationReset': function (val) { //
this.loadData();
}
},
mounted() {
this.group = this.$route.query.group;
},
methods:{
loadData() {
getRunplanInRailway(this.group).then(response => {
this.tableData = response.data || [];
}).catch(()=>{
this.tableData = [];
});
this.tableData = [];
//
// const railwaySimulationRpMsg = copyAssign({}, this.$store.state.socket.railwaySimulationRpMsg);
// this.tableData = Object.values(railwaySimulationRpMsg);
},
doShow() {
this.loadFilterSectionMap();
// this.tableData = [];
// this.loadData();
this.isShow = true;
},
loadFilterSectionMap() {
// this.filterSectionMap = {};
// this.sectionList.forEach(section=>{
// if (section.standTrack) {
// this.filterSectionMap[section.code] = {code:section.code, name:section.name};
// }
// });
this.filterSectionList = [];
this.filterSectionList = this.sectionList.filter(section=>{
return section.standTrack;
});
},
addDisLoger(model) {
this.tableData.unshift(model);
},
deleteDisLoger(model) {
this.tableData.map(data=>{
if (data.stationCode == model.stationCode && data.runPlanCode == model.runPlanCode) {
data.status = -1;
}
});
},
changeArriveRunPlan(event, row, index) {
this.modifyDispatcherLogerRpSection(row, row.arriveSectionCode, 'R');
},
changeDepartRunPlan(event, row, index) {
this.modifyDispatcherLogerRpSection(row, row.departSectionCode, 'D');
},
modifyDispatcherLogerRpSection(row, sectionCode, type) {
// stationCode
// runPlanCode
// sectionCode
// model R,D
const params = {stationCode:row.stationCode, runPlanCode:row.runPlanCode, sectionCode:sectionCode, model:type};
commitOperate(menuOperate.CTC.modifyDispatcherLogerRpSection, params, 3).then(({valid, response})=>{
if (valid) {
const reslut = response.data;
this.tableData.map(data=>{
if (data.stationCode == reslut.stationCode && data.runPlanCode == reslut.runPlanCode) {
data.arriveSectionCode = reslut.arriveSectionCode;
data.departSectionCode = reslut.departSectionCode;
}
});
}
}).catch(() => {
// this.$message.error('');
});
},
doClose() {
this.isShow = false;
this.rpMenuPopShow = false;
this.clearRpRow();
},
//
sendRunplan() {
// stationSignRunplan
const that = this;
this.$confirm('确定发布所有行车计划?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
commitOperate(menuOperate.CTC.releaseAllDispatcherLogerRp, {}, 3).then(({valid})=>{
if (valid) {
that.$message.success('发布成功!');
}
}).catch(() => {
that.$message.error('发布失败');
});
}).catch(e => {});
},
clearRpRow() {
this.currentRow = null;
this.$refs.dispatcherLogerContentTable.setCurrentRow();
},
deleteRunplan() {
if (this.currentRow) {
const param = {stationCode:this.currentRow.stationCode, runPlanCode:this.currentRow.runPlanCode};
this.$refs.deleteDispatcherLoger.doShow(param);
}
},
addRunplan() {
this.$refs.addDispatcherLogerRunplan.doShow({
filterSectionList:this.filterSectionList,
mapStationDirectionMap:this.mapStationDirectionData
});
},
selectedTripNumber(row, column, cell, event) {
this.currentRow = row;
},
noticeInfo() {
this.$refs.noticeInfo.doShow();
}
}
};
</script>
<style lang="scss" scoped>
.dispatcherLoger{
z-index: 60;
position: absolute;
width: 100%;
top: 0;
left: 0;
background: #fff;
}
.dispatcherLogerButton{
height: 37px;
background: #f0f0f0;
border: 1px #a5a5a5 solid;
margin-top: 1px;
display: flex;
flex-direction: row;
align-items: flex-start;
margin-left:10px;
}
.dispatcherLogerLine{
margin-top: 1px;
height: 31px;
width: 4px;
border: 1px #b3b3b2 solid;
margin-left: 2px;
background: #f7f7f7;
}
.dispatcherLogerBtnGroup{
display: flex;
flex-direction: row;
align-items: flex-start;
margin-left: 45px;
}
.dispatcherLogerClickBtn{
background: #f0f0f0;
font-size: 13px;
border-top: 2px #e0e0e0 solid;
border-left: 2px #e0e0e0 solid;
border-bottom: 2px #4c4c4c solid;
border-right: 2px #4c4c4c solid;
padding: 6px 15px;
margin-top: 2px;
cursor:pointer;
margin-left: 3px;
}
.dispatcherLogerContent{
width: 100%;
background:#fff;
border-top: 3px #818181 solid;
border-left: 3px #818181 solid;
overflow-x: auto;
overflow-y: hidden;
position: relative;
}
.close_icon{
}
.closeDL{
position: absolute;
right:10px;
top:5px;
padding:5px;;
cursor: pointer;
}
</style>
<style lang="scss">
#dispatcherLogerContentTable.el-table td, #dispatcherLogerContentTable.el-table th{
padding-top: 5px;
padding-bottom: 5px;
border-color: #a5a5a5;
}
#dispatcherLogerContentTable.el-table .cell{ padding-left: 5px;padding-right: 5px; text-align: center;font-size: 13px;}
#dispatcherLogerContentTable .el-table__body tr.current-row>td{
background-color: #6aa8ec;
color: #fff;
}
</style>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="menus" :style="{width: width + 'px'}"> <div class="menus" :style="{width: width + 'px'}">
<div v-if="isCtc" style="font-size: 14px;padding: 0 10px;background: #DEE3F3;line-height: 30px;position: absolute;width: 100%;z-index: 9;">{{ `哈尔滨局CTC3.0(车务终端A机)--王岗${dateString}第一班 18:00 管理员代--` }}</div> <div v-if="isCtc" style="font-size: 14px;padding: 0 10px;background: #DEE3F3;line-height: 30px;position: absolute;width: 100%;z-index: 9;">{{ `哈尔滨局CTC3.0(车务终端A机)--王岗${this.dateString}第一班 18:00 管理员代--` }}</div>
<menu-bar v-if="isCtc" ref="menuBar" :date-strin="dateString1" :selected="selected" /> <menu-bar v-if="isShowBar" ref="menuBar" :date-strin="dateString1" :selected="selected" />
<div v-if="isCtc" style="position: absolute; top: 64px;z-index: 10;background: #F0F0F0;padding: 2px;height: 65px;width: 100%;"> <div v-if="isCtc" style="position: absolute; top: 64px;z-index: 10;background: #F0F0F0;padding: 2px;height: 65px;width: 100%;">
<div style="display: flex;"> <div style="display: flex;">
<img :src="ctcBarIcon1" class="img-box"> <img :src="ctcBarIcon1" class="img-box">
@ -24,9 +24,9 @@
<img :src="ctcBarIcon18" class="img-box" @click="handleRunplan"> <img :src="ctcBarIcon18" class="img-box" @click="handleRunplan">
</div> </div>
<div style="display: flex;padding: 2px;border-top: 2px solid #D1D1D1;margin-top: 3px"> <div style="display: flex;padding: 2px;border-top: 2px solid #D1D1D1;margin-top: 3px">
<div class="img-box" style="width: 100px;height: 25px;line-height: 21px;text-align: center;">调度命令</div> <div class="img-box" :class="{flicker: hasCommandMsg, redFlick: hasCommandMsg}" style="width: 100px;height: 25px;line-height: 21px;text-align: center;" @click="showCmdManage">调度命令</div>
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;" /> <div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;" />
<div class="img-box" style="width: 100px;height: 25px;line-height: 21px;text-align: center;margin-left: 100px;">阶段计划</div> <div id="stageRunplanOut" class="img-box" @click="stageRunplan">阶段计划</div>
<div class="img-box" style="width: 100px;height: 25px;line-height: 21px;text-align: center;margin-left: 5px;">阶段记事</div> <div class="img-box" style="width: 100px;height: 25px;line-height: 21px;text-align: center;margin-left: 5px;">阶段记事</div>
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">{{ dateString1 + ' ' + time }}</div> <div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">{{ dateString1 + ' ' + time }}</div>
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">同步站机通信中断</div> <div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">同步站机通信中断</div>
@ -37,6 +37,9 @@
<div style="width: 60%;height: 30px;line-height: 30px;text-align: center;">提示信息窗</div> <div style="width: 60%;height: 30px;line-height: 30px;text-align: center;">提示信息窗</div>
<div style="width: 40%;height: 30px;line-height: 30px;text-align: center;border-left: 2px #ccc solid;">{{ '操控A:主机' + ' ' + dateString + ' ' + time }}</div> <div style="width: 40%;height: 30px;line-height: 30px;text-align: center;border-left: 2px #ccc solid;">{{ '操控A:主机' + ' ' + dateString + ' ' + time }}</div>
</div> </div>
<!-- <div v-if="!isCtc && isDispStation" class="goDispatcherLoger">
<el-button size="small" @click="goDispatcherLoger">行车日志</el-button>
</div> -->
<menu-button v-if="!isCtc" ref="menuButton" :selected="selected" /> <menu-button v-if="!isCtc" ref="menuButton" :selected="selected" />
<menu-button-ctc v-if="isCtc" ref="menuButtonCtc" :selected="selected" /> <menu-button-ctc v-if="isCtc" ref="menuButtonCtc" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" /> <menu-station-stand ref="menuStationStand" :selected="selected" />
@ -49,13 +52,18 @@
<passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" /> <passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" />
<passive-Timeout ref="passiveTimeout" /> <passive-Timeout ref="passiveTimeout" />
<runplan-pane v-if="isCtc" ref="runplanPane" /> <runplan-pane v-if="isCtc" ref="runplanPane" />
<!-- <dispatcher-loger v-if="isDispStation" ref="dispatcherLoger" /> -->
<bottom-table ref="bottomTable" /> <bottom-table ref="bottomTable" />
<menu-panel v-if="isCtc" ref="menuPanel" /> <menu-panel v-if="isCtc" ref="menuPanel" />
<stage-runplan v-if="isCtc" ref="stageRunplan" @closeFlash="closeStageFlash" @noticeInfo="noticeInfo" />
<notice-info v-if="isCtc" ref="noticeInfo" pop-class="chengdou-03__systerm" />
<cmdManage v-if="isCtc" ref="cmdManage" />
<signedCmd v-if="isCtc" ref="signedCmd" @signedCmdClose="signedCmdClose" @changeSignedStatus="changeSignedStatus" />
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters, mapState } from 'vuex';
import MenuSignal from './menuSignal'; import MenuSignal from './menuSignal';
import MenuButton from './menuButton'; import MenuButton from './menuButton';
import MenuStationStand from './menuStationStand'; import MenuStationStand from './menuStationStand';
@ -66,6 +74,9 @@ import MenuStation from './menuStation';
import MenuBar from './menuBar'; import MenuBar from './menuBar';
import MenuButtonCtc from './menuButtonCtc'; import MenuButtonCtc from './menuButtonCtc';
import RunplanPane from './runplanPane'; import RunplanPane from './runplanPane';
import StageRunplan from './dialog/stageRunplan';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import DispatcherLoger from './dispatcherLoger';
import PassiveAlarm from './passiveDialog/alarm'; import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control'; import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout'; import PassiveTimeout from './passiveDialog/timeout';
@ -91,6 +102,8 @@ import CtcBarIcon15 from '@/assets/ctc_icon/pic15.png';
import CtcBarIcon16 from '@/assets/ctc_icon/pic16.png'; import CtcBarIcon16 from '@/assets/ctc_icon/pic16.png';
import CtcBarIcon17 from '@/assets/ctc_icon/pic17.png'; import CtcBarIcon17 from '@/assets/ctc_icon/pic17.png';
import CtcBarIcon18 from '@/assets/ctc_icon/pic18.png'; import CtcBarIcon18 from '@/assets/ctc_icon/pic18.png';
import cmdManage from '@/views/dispatcherStationManage/cmdManage.vue';
import signedCmd from '@/views/dispatcherStationManage/signedCmd.vue';
export default { export default {
name: 'Menus', name: 'Menus',
@ -108,8 +121,13 @@ export default {
PassiveTimeout, PassiveTimeout,
MenuButtonCtc, MenuButtonCtc,
RunplanPane, RunplanPane,
StageRunplan,
NoticeInfo,
// DispatcherLoger,
BottomTable, BottomTable,
MenuPanel MenuPanel,
cmdManage,
signedCmd
}, },
props: { props: {
selected: { selected: {
@ -121,6 +139,7 @@ export default {
}, },
data() { data() {
return { return {
currentRailwaySimulationRunplan:{},
alarmMessages: [ alarmMessages: [
{ id: 1, message: '这是告警信息一' }, { id: 1, message: '这是告警信息一' },
{ id: 2, message: '这是告警信息二' }, { id: 2, message: '这是告警信息二' },
@ -166,11 +185,24 @@ export default {
...mapGetters('config', [ ...mapGetters('config', [
'width' 'width'
]), ]),
...mapState('socket', [
'dispatchCommandMsg'
]),
hasCommandMsg() {
let status = false;
if (this.dispatchCommandMsg.body) {
status = true;
}
return status;
},
isShowBar() { isShowBar() {
return this.$store.state.training.prdType && this.$store.state.training.prdType !== '07'; return this.$store.state.training.prdType === '02' || this.$route.query.ctc;
}, },
isCtc() { isCtc() {
return this.$route.query.ctc; return this.$route.query.ctc;
},
isDispStation() {
return this.$route.query.dispatcherStation;
} }
}, },
watch: { watch: {
@ -181,6 +213,16 @@ export default {
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`)); this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
const date = new Date(+new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`)); const date = new Date(+new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`));
this.initDate(date); this.initDate(date);
},
'$store.state.socket.railwaySimulationRunplanSendChange': function (val) {
if (this.isCtc) {
this.getRailwaySimulationRunplanSend();
}
},
'$store.state.training.roleDeviceCode': function (val) {
if (this.isCtc) {
this.getRailwaySimulationRunplanSend();
}
} }
}, },
mounted() { mounted() {
@ -204,6 +246,32 @@ export default {
window.onclick = function (e) {}; window.onclick = function (e) {};
}, },
methods: { methods: {
changeSignedStatus(info) {
this.isCtc && this.$refs.cmdManage.changeSignedStatus(info);
},
signedCmdClose() {
this.isCtc && this.$refs.cmdManage.doShow();
},
showCmdManage() {
if (!this.isCtc) { return; }
if (this.hasCommandMsg) {
this.$refs.signedCmd.doShow();
} else {
this.$refs.cmdManage.doShow();
}
},
getRailwaySimulationRunplanSend() {
const stationCode = this.$store.state.training.roleDeviceCode;
const railwaySimulationRunplanSendMap = this.$store.state.socket.railwaySimulationRunplanSendMap;
if (railwaySimulationRunplanSendMap[stationCode] && railwaySimulationRunplanSendMap[stationCode].dataList.length > 0) {
//
document.getElementById('stageRunplanOut').classList.add('active');
this.currentRailwaySimulationRunplan = railwaySimulationRunplanSendMap;
} else {
const sendRunplan = document.getElementById('stageRunplanOut').className;
document.getElementById('stageRunplanOut').className = sendRunplan.replace('active', '');
}
},
initDate(date) { initDate(date) {
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}:${prefixIntrger(date.getSeconds(), 2)}`; this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}:${prefixIntrger(date.getSeconds(), 2)}`;
const years = date.getFullYear() + ''; const years = date.getFullYear() + '';
@ -216,11 +284,47 @@ export default {
}, },
handleRunplan() { handleRunplan() {
this.$refs.runplanPane.doShow(); this.$refs.runplanPane.doShow();
},
stageRunplan() {
if (document.getElementById('stageRunplanOut').className.includes('active')) {
const stationCode = this.$store.state.training.roleDeviceCode;
this.$refs.stageRunplan.doShow(this.currentRailwaySimulationRunplan[stationCode]);
}
},
noticeInfo() {
this.$refs.noticeInfo.doShow();
},
closeStageFlash() {
const sendRunplan = document.getElementById('stageRunplanOut').className;
document.getElementById('stageRunplanOut').className = sendRunplan.replace('active', '');
const stationCode = this.$store.state.training.roleDeviceCode;
this.$store.dispatch('socket/deleteRailwaySimulationRunplan', stationCode);
} }
// goDispatcherLoger() {
// this.$refs.dispatcherLoger.doShow();
// }
} }
}; };
</script> </script>
<style lang="scss" scoped>
.redFlick {
background: red;
}
@keyframes fade {
from {
opacity: 1.0;
}
50% {
opacity: 0.2;
}
to {
opacity: 1.0;
}
}
.flicker {
animation: fade 600ms infinite;
}
</style>
<style> <style>
.menus .pop-menu { .menus .pop-menu {
background: #F0F0F0; background: #F0F0F0;
@ -745,4 +849,30 @@ export default {
.img-box:hover{ .img-box:hover{
border: 2px #ccc inset; border: 2px #ccc inset;
} }
#stageRunplanOut{
width: 100px;height: 25px;line-height: 21px;text-align: center;margin-left: 100px;
}
#stageRunplanOut.active{
animation:changeColor 1s infinite;
-moz-animation:changeColor 1s infinite; /* Firefox */
-webkit-animation:changeColor 1s infinite; /* Safari and Chrome */
}
@keyframes changeColor
{
0% {background:#f0f0f0;}
50% {background:#ff1900;}
100% {background:#f0f0f0;}
}
@-moz-keyframes changeColor /* Firefox */
{
0% {background:#f0f0f0;}
50% {background:#ff1900;}
100% {background:#f0f0f0;}
}
@-webkit-keyframes changeColor /* Safari and Chrome */
{
0% {background:#f0f0f0;}
50% {background:#ff1900;}
100% {background:#f0f0f0;}
}
</style> </style>

View File

@ -1,6 +1,6 @@
<template> <template>
<div id="menuBarChengdu3"> <div id="menuBarChengdu3">
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%;top: 30px;" /> <menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%;" :style="{ top: top }" />
<station-control-convert ref="stationControlConvert" /> <station-control-convert ref="stationControlConvert" />
<password-box ref="passwordBox" @setLoginResult="getLoginResult" /> <password-box ref="passwordBox" @setLoginResult="getLoginResult" />
<view-name ref="viewName" /> <view-name ref="viewName" />
@ -212,270 +212,14 @@ export default {
], ],
Center: [ Center: [
{ {
title: '系统', title: '登录(L)',
operate: OperationEvent.Command.mBar.system,
children: [
{
title: '登录',
click: this.undeveloped
},
{
title: '注销',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '连接主用中心',
click: this.undeveloped
},
{
title: '连接备用中心',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '退出',
click: this.undeveloped
}
]
},
{
title: '临时限速',
operate: OperationEvent.Command.mBar.limitSpeed,
children: [
{
title: '设置临时限速',
operate: OperationEvent.Section.setLimitSpeed,
click: this.setLimitSpeed
},
{
title: '取消临时限速',
operate: OperationEvent.Section.cancelSpeed,
click: this.cancleLimitSpeed
}
]
},
{
title: '查看',
operate: OperationEvent.Command.mBar.check,
children: [
{
title: '运行图',
click: this.undeveloped
},
{
title: '报告分析',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '视图',
click: this.undeveloped,
operate: '',
children: [{
title: '报警',
click: this.undeveloped
},
{
title: '列车运行信息',
click: this.undeveloped
},
{
title: '设备状态',
click: this.undeveloped
},
{
title: '列车详细信息',
click: this.undeveloped
},
{
title: '站台详细信息',
click: this.undeveloped
}]
},
{
title: '终端站发车列表',
click: this.undeveloped
},
{
title: '详细设备状态',
click: this.undeveloped
},
{
title: '查找列车',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '显示目的地号',
click: this.undeveloped
},
{
title: '显示轨道名',
click: this.undeveloped
},
{
title: '显示道岔名',
click: this.undeveloped
},
{
title: '显示信号机名',
click: this.undeveloped
},
{
title: '显示车次窗位置',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '显示车次号',
click: this.undeveloped
},
{
title: '显示车组号',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '全屏',
click: this.undeveloped
},
{
title: '放大',
click: this.undeveloped
},
{
title: '缩小',
click: this.undeveloped
},
{
title: '恢复',
click: this.undeveloped
}
]
},
{
title: '车站定位',
operate: '', operate: '',
children: [ children: []
]
}, },
{ {
title: '显示', title: '应用程序(T)',
operate: OperationEvent.Command.mBar.view,
hide: true,
children: [
{
title: '设置列车识别号显示',
click: this.setTrainIdDisplay,
operate: OperationEvent.Command.view.setTrainIdDisplay
},
{
title: '设置名称显示',
click: this.setNameDisplay,
operate: OperationEvent.Command.view.setNameDisplay
},
{
title: '设置设备显示',
click: this.setDeviceDisplay,
operate: OperationEvent.Command.view.setDeviceDisplay
}
]
},
{
title: 'ATS终端操作',
operate: '', operate: '',
children: [ children: []
{
title: '当天运行车计划',
click: this.undeveloped
},
{
title: '出入库预告',
click: this.undeveloped
}
]
},
{
title: '计划车操作',
operate: '',
children: [
{
title: '添加计划车',
click: this.undeveloped
},
{
title: '平移计划车',
click: this.undeveloped
},
{
title: '删除计划车',
click: this.undeveloped
}
]
},
{
title: '批处理命令',
operate: '',
children: [
{
title: '全线扣车',
click: this.undeveloped
},
{
title: '取消全线扣车',
click: this.undeveloped
},
{
title: '取消上行全线扣车',
click: this.undeveloped
},
{
title: '取消下行全线扣车',
click: this.undeveloped
}
]
},
{
title: '信息管理',
operate: '',
children: [
{
title: '调度日志',
click: this.undeveloped
},
{
title: '调度留言提醒',
click: this.undeveloped
},
{
title: '报警设置',
click: this.undeveloped
}
]
},
{
title: '帮助',
operate: '',
children: [
{
title: '关于ITS GPC 工作站',
click: this.about,
operate: OperationEvent.Command.help.about
}
]
} }
] ]
} }
@ -484,10 +228,13 @@ export default {
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'stationList' 'stationList'
]) ]),
top() {
return this.$store.state.training.prdType === '02' ? '0' : '30px';
}
}, },
created() { created() {
this.menuNormal['Center'][3].children = this.initStationList(); // this.menuNormal['Center'][3].children = this.initStationList();
}, },
methods: { methods: {
initStationList() { initStationList() {

View File

@ -44,7 +44,7 @@
<div class="runplanLine" /> <div class="runplanLine" />
<div class="rpDispacherCommand runplanClickBtn">调度命令</div> <div class="rpDispacherCommand runplanClickBtn">调度命令</div>
<div class="runplanBtnGroup"> <div class="runplanBtnGroup">
<div class="runplanClickBtn">阶段计划(F8)</div> <div id="stageRunplan" class="runplanClickBtn" @click="stageRunplan">阶段计划(F8)</div>
<div id="sendRunplan" class="runplanClickBtn" @click="sendRunplan">发送计划</div> <div id="sendRunplan" class="runplanClickBtn" @click="sendRunplan">发送计划</div>
<div class="runplanClickBtn">阶段记事</div> <div class="runplanClickBtn">阶段记事</div>
</div> </div>
@ -484,6 +484,7 @@
</div> </div>
<send-runplan ref="sendRunplan" @closeFlash="closeFlash" @noticeInfo="noticeInfo" /> <send-runplan ref="sendRunplan" @closeFlash="closeFlash" @noticeInfo="noticeInfo" />
<stage-runplan ref="stageRunplan" @closeFlash="closeStageFlash" @noticeInfo="noticeInfo" />
<modify-adjacent-station ref="modifyAdjacentStation" @clearRpRow="clearRpRow" @noticeInfo="noticeInfo" /> <modify-adjacent-station ref="modifyAdjacentStation" @clearRpRow="clearRpRow" @noticeInfo="noticeInfo" />
<delete-runplan ref="deleteRunplan" @clearRpRow="clearRpRow" @noticeInfo="noticeInfo" /> <delete-runplan ref="deleteRunplan" @clearRpRow="clearRpRow" @noticeInfo="noticeInfo" />
<modify-trip-number ref="modifyTripNumber" @clearRpRow="clearRpRow" @noticeInfo="noticeInfo" /> <modify-trip-number ref="modifyTripNumber" @clearRpRow="clearRpRow" @noticeInfo="noticeInfo" />
@ -505,6 +506,7 @@ import Rpwp from '@/assets/ctc_icon/rpwp.png';
import Rph from '@/assets/ctc_icon/rph.png'; import Rph from '@/assets/ctc_icon/rph.png';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import SendRunplan from './dialog/sendRunplan'; import SendRunplan from './dialog/sendRunplan';
import StageRunplan from './dialog/stageRunplan';
import DeleteRunplan from './dialog/deleteRunplan'; import DeleteRunplan from './dialog/deleteRunplan';
import ModifyAdjacentStation from './dialog/modifyAdjacentStation'; import ModifyAdjacentStation from './dialog/modifyAdjacentStation';
import ModifyTripNumber from './dialog/modifyTripNumber'; import ModifyTripNumber from './dialog/modifyTripNumber';
@ -515,6 +517,7 @@ export default {
name:'RunplanPane', name:'RunplanPane',
components: { components: {
SendRunplan, SendRunplan,
StageRunplan,
DeleteRunplan, DeleteRunplan,
ModifyAdjacentStation, ModifyAdjacentStation,
ModifyTripNumber, ModifyTripNumber,
@ -541,6 +544,7 @@ export default {
filterSectionList:[], filterSectionList:[],
activeDepartRunPlan:{}, activeDepartRunPlan:{},
activeArriveRunPlan:{}, activeArriveRunPlan:{},
currentRailwaySimulationRunplan:{},
// radioSelected:'' // radioSelected:''
currentRow:null currentRow:null
}; };
@ -553,9 +557,26 @@ export default {
watch:{ watch:{
'$store.state.socket.railCtcRunplanChange': function (val) { '$store.state.socket.railCtcRunplanChange': function (val) {
this.loadData(); this.loadData();
},
'$store.state.socket.railwaySimulationRunplanSendChange': function (val) {
this.getRailwaySimulationRunplanSend();
} }
// railwaySimulationRunplanSendMap
// railwaySimulationRunplanSendChange
}, },
methods:{ methods:{
getRailwaySimulationRunplanSend() {
const stationCode = this.$store.state.training.roleDeviceCode;
const railwaySimulationRunplanSendMap = this.$store.state.socket.railwaySimulationRunplanSendMap;
if (railwaySimulationRunplanSendMap[stationCode] && railwaySimulationRunplanSendMap[stationCode].dataList.length > 0) {
//
document.getElementById('stageRunplan').classList.add('active');
this.currentRailwaySimulationRunplan = railwaySimulationRunplanSendMap;
} else {
const sendRunplan = document.getElementById('stageRunplan').className;
document.getElementById('stageRunplan').className = sendRunplan.replace('active', '');
}
},
loadData() { loadData() {
this.tableData = []; this.tableData = [];
const railCtcRunplanInitMsg = copyAssign({}, this.$store.state.socket.railCtcRunplanInitMsg); const railCtcRunplanInitMsg = copyAssign({}, this.$store.state.socket.railCtcRunplanInitMsg);
@ -589,6 +610,7 @@ export default {
this.tableData = []; this.tableData = [];
this.loadData(); this.loadData();
this.isShow = true; this.isShow = true;
this.getRailwaySimulationRunplanSend();
window.addEventListener('keydown', this.handleKeyDown); window.addEventListener('keydown', this.handleKeyDown);
// arriveRunPlan: Object // arriveRunPlan: Object
// code: "00110010" // code: "00110010"
@ -622,6 +644,11 @@ export default {
this.agreeNotcie(); this.agreeNotcie();
break; break;
} }
case 'F8': {
event.preventDefault();
this.stageRunplan();
break;
}
} }
} }
}, },
@ -630,6 +657,12 @@ export default {
this.$refs.sendRunplan.doShow(this.tableData, this.activeDepartRunPlan, this.activeArriveRunPlan, this.filterSectionList); this.$refs.sendRunplan.doShow(this.tableData, this.activeDepartRunPlan, this.activeArriveRunPlan, this.filterSectionList);
} }
}, },
stageRunplan() {
if (document.getElementById('stageRunplan').className.includes('active')) {
const stationCode = this.$store.state.training.roleDeviceCode;
this.$refs.stageRunplan.doShow(this.currentRailwaySimulationRunplan[stationCode]);
}
},
focusDepartRunPlan(event, row) { focusDepartRunPlan(event, row) {
this.activeDepartRunPlan[row.code] = {sectionCode:event, code:row.code}; this.activeDepartRunPlan[row.code] = {sectionCode:event, code:row.code};
}, },
@ -680,6 +713,12 @@ export default {
const sendRunplan = document.getElementById('sendRunplan').className; const sendRunplan = document.getElementById('sendRunplan').className;
document.getElementById('sendRunplan').className = sendRunplan.replace('active', ''); document.getElementById('sendRunplan').className = sendRunplan.replace('active', '');
}, },
closeStageFlash() {
const sendRunplan = document.getElementById('stageRunplan').className;
document.getElementById('stageRunplan').className = sendRunplan.replace('active', '');
const stationCode = this.$store.state.training.roleDeviceCode;
this.$store.dispatch('socket/deleteRailwaySimulationRunplan', stationCode);
},
selectedTripNumber(row, column, cell, event) { selectedTripNumber(row, column, cell, event) {
if (column.property == 'tripNumber') { if (column.property == 'tripNumber') {
if (this.currentRow && this.currentRow.code == row.code) { if (this.currentRow && this.currentRow.code == row.code) {
@ -984,7 +1023,7 @@ export default {
.runplanTwo1Level{line-height: 28px;} .runplanTwo1Level{line-height: 28px;}
.runplanTwo3Level{line-height: 70px;} .runplanTwo3Level{line-height: 70px;}
.runplanZhe{width: 16px;display: inline-block;vertical-align: top;} .runplanZhe{width: 16px;display: inline-block;vertical-align: top;}
#sendRunplan.active{ #sendRunplan.active,#stageRunplan.active{
animation:changeColor 1s infinite; animation:changeColor 1s infinite;
-moz-animation:changeColor 1s infinite; /* Firefox */ -moz-animation:changeColor 1s infinite; /* Firefox */
-webkit-animation:changeColor 1s infinite; /* Safari and Chrome */ -webkit-animation:changeColor 1s infinite; /* Safari and Chrome */

View File

@ -0,0 +1,113 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<set-fault ref="setFault" pop-class="datie-02__systerm" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
// import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'SectionMenu',
components: {
PopMenu,
NoticeInfo,
SetFault
},
props: {
selected: {
type: Object,
default: () => {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
Local: [
]
},
menuForce: [
{
label: '区段故障解锁',
// handler: this.setStoppage,
handler: this.cancelStoppage,
// cmdType: CMD.Fault.CMD_SET_FAULT
cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
// console.log(this.buttonOperation, '***********');
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && (!this.buttonOperation || this.$route.query.ctc)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods:{
initMenu() {
//
if (this.selected.type != '04') {
// this.menu = MenuContextHandler.covert(this.menuNormal);
this.menu = this.menuNormal.Local;
} else {
this.menu = [];
}
//
if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') {
this.menu = this.menuForce;
}
},
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);
}
});
}
}
};
</script>

View File

@ -0,0 +1,71 @@
import deviceType from '../../constant/deviceType';
class Model {
constructor() {
this.screenLine = 3;
// 公共字段部分默认初始值
this['public'] = {};
this['public'][deviceType.Signal] = {
lampPositionType: '02',
lampPostType: '02'
};
// 私有字段部分默认初始值
this['private'] = {};
this['private'][deviceType.StationControl] = {
indicatorShow: true // 标识灯名称显示
};
this['private'][deviceType.Station] = {
kmPostShow: true // 公里标显示
};
this['private'][deviceType.Switch] = {
nameShow: true
};
this['private'][deviceType.Section] = {
nameShow: true,
borderBorderShow: true, // 区段边界显示
destinationNameShow: true, // 目的地码名称显示
standTrackNameShow: true, // 站台轨名称显示
reentryTrackNameShow: true, // 折返轨名称显示
transferTrackNameShow: true // 转换轨名称显示
};
this['private'][deviceType.Signal] = {
nameShow: true, // 信号机名称显示
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
atsAutoTriggerShow: true // ATS自动触发表示灯显示
};
this['private'][deviceType.Train] = {
};
this['private'][deviceType.TrainWindow] = {
trainWindowShow: true
};
}
initPublicProps(model) {
if (model) {
var modelInitial = this.public[model._type];
if (modelInitial) {
for (var prop in modelInitial) {
model[prop] = modelInitial[prop];
}
}
}
return model;
}
initPrivateProps(model) {
if (model) {
var modelInitial = this.private[model._type];
if (modelInitial) {
for (var prop in modelInitial) {
model[prop] = modelInitial[prop];
}
}
}
return model;
}
}
export default new Model();

View File

@ -76,6 +76,7 @@ const IscsStationConfig = () => import('@/views/iscs/iscsSystem/stationConfig/in
const NewMapDraft = () => import('@/views/newMap/newMapdraft/index'); const NewMapDraft = () => import('@/views/newMap/newMapdraft/index');
const NewMapDraftSystem = () => import('@/views/newMap/newMapdraftSystem/index'); const NewMapDraftSystem = () => import('@/views/newMap/newMapdraftSystem/index');
const MapDraftPicture = () => import('@/views/newMap/mapDraftPicture/index');
const NewDesignPlatformUser = () => import('@/views/newMap/newDesignUser/index'); const NewDesignPlatformUser = () => import('@/views/newMap/newDesignUser/index');
const Taskmanage = () => import('@/views/lesson/taskmanage/list'); const Taskmanage = () => import('@/views/lesson/taskmanage/list');
@ -243,7 +244,7 @@ export const projectRichorJoint = '023'; // 中航锐创(实训室)
export const projectSrsandbox = '024'; // 上饶沙盘 export const projectSrsandbox = '024'; // 上饶沙盘
export const projectJxgm = '025'; // 江西工贸 export const projectJxgm = '025'; // 江西工贸
export const projectSay = '026'; // 江苏安全 export const projectSay = '026'; // 江苏安全
export const projectRichorhhcj = '027'; //红河财经 export const projectRichorhhcj = '027'; // 红河财经
export const userTrainingPlatform = '016'; // 实训系统 export const userTrainingPlatform = '016'; // 实训系统
// export const refereePlatform = '017'; // 裁判系统 // export const refereePlatform = '017'; // 裁判系统
@ -1356,6 +1357,11 @@ export const asyncRouter = [
component: NewMapDraftSystem, component: NewMapDraftSystem,
hidden: true hidden: true
}, },
{ // 地图画面管理
path: 'usermap/map/pictureDraw/:mapId/:view',
component: MapDraftPicture,
hidden: true
},
{ {
path:'iscs/design', path:'iscs/design',
redirect: '/iscs/design', redirect: '/iscs/design',

View File

@ -73,7 +73,8 @@ export default {
{label: '电力调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric dispatcher'}, {label: '电力调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric dispatcher'},
{label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '}, {label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '},
{label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent department'}, {label: '上级部门', value: 'PARENT_DEPARTMENT', enLabel: 'Parent department'},
{label: '停车场信号楼', value: 'PARKING_LOT_SIGNAL_BUILDING', enLabel: 'Parking Signal Building'} {label: '停车场信号楼', value: 'PARKING_LOT_SIGNAL_BUILDING', enLabel: 'Parking Signal Building'},
{label: '车站助理', value: 'STATION_ASSISTANT', enLabel: 'StationAssistant'}
], ],
releaseReview: [ releaseReview: [
@ -117,7 +118,8 @@ export default {
{ label: '司机', value: 'Driver' }, { label: '司机', value: 'Driver' },
{ label: '列车', value: 'Train' }, { label: '列车', value: 'Train' },
{ label: '方向杆', value: 'DirectionRod'}, { label: '方向杆', value: 'DirectionRod'},
{ label: 'CTC', value: 'CTC' } { label: 'CTC', value: 'CTC' },
{ label: '路票', value: 'RAIL' }
], ],
simulationDeviceList:[ simulationDeviceList:[
@ -242,13 +244,13 @@ export default {
{ label: '自动换端', value: 'AUTO' }, { label: '自动换端', value: 'AUTO' },
{ label: '无人折返', value: 'UNMANNED' } { label: '无人折返', value: 'UNMANNED' }
], ],
directionLabelList: [ directionLabelList: [
{ label: 'X', value: 'X' }, { label: 'X', value: 'X' },
{ label: 'XF', value: 'XF' }, { label: 'XF', value: 'XF' },
{ label: 'XD', value: 'XD' }, { label: 'XD', value: 'XD' },
{ label: 'S', value: 'S' }, { label: 'S', value: 'S' },
{ label: 'SF', value: 'SF' }, { label: 'SF', value: 'SF' },
{ label: 'SD', value: 'SD' } { label: 'SD', value: 'SD' }
] ]
} }
}; };

View File

@ -143,7 +143,7 @@ export const IbpOperation = {
PRERESET_Z: {operate: '14', event: 'PRERESET_Z', name: '计轴预复位'}, PRERESET_Z: {operate: '14', event: 'PRERESET_Z', name: '计轴预复位'},
SD: {operate: '15', event: 'SD', name: '试灯'}, SD: {operate: '15', event: 'SD', name: '试灯'},
XXGM: {operate: '16', event: 'XXGM', name: '下行屏蔽门开门'}, XXGM: {operate: '16', event: 'XXGM', name: '下行屏蔽门开门'},
SXGM: {operate: '17', event: 'SXGM', name: '上行屏蔽门开门'}, SXGM: {operate: '17', event: 'SXGM', name: '上行屏蔽门开门'}
}; };
/** /**
@ -167,7 +167,8 @@ export const SimulationType = {
DISPATCHER: '行调', DISPATCHER: '行调',
STATION_SUPERVISOR: '车站值班员', STATION_SUPERVISOR: '车站值班员',
DRIVER: '司机', DRIVER: '司机',
MAINTAINER: '通号' MAINTAINER: '通号',
STATION_ASSISTANT: '车站助理'
}; };
export const UrlConfig = { export const UrlConfig = {
displayNew: '/displayNew', displayNew: '/displayNew',

View File

@ -650,7 +650,7 @@ export const loginInfo = {
systemType: '026' systemType: '026'
}, },
unittecsty: { unittecsty: {
title: '城市轨道交通实训平台', title: '轨道交通实训平台',
loginPath: '/login?project=unittecsty', loginPath: '/login?project=unittecsty',
loginParam: 'UNITTEC_STY', loginParam: 'UNITTEC_STY',
titleDistance: '-150px', titleDistance: '-150px',
@ -662,7 +662,7 @@ export const loginInfo = {
systemType: '011' systemType: '011'
}, },
designunittecsty: { designunittecsty: {
title: '城市轨道交通设计平台', title: '轨道交通设计平台',
loginPath: '/design/login?project=unittecsty', loginPath: '/design/login?project=unittecsty',
loginParam: 'UNITTEC_STY', loginParam: 'UNITTEC_STY',
titleDistance: '-150px', titleDistance: '-150px',

View File

@ -405,6 +405,24 @@ export default {
CTC_COVER_RUN_PLAN_LIST_TO_EDIT_AREA:{value: 'CTC_COVER_RUN_PLAN_LIST_TO_EDIT_AREA', label: '导入列车固定径路'}, CTC_COVER_RUN_PLAN_LIST_TO_EDIT_AREA:{value: 'CTC_COVER_RUN_PLAN_LIST_TO_EDIT_AREA', label: '导入列车固定径路'},
CTC_REMOVE_RUN_PLAN_FROM_EDIT_AREA:{value: 'CTC_REMOVE_RUN_PLAN_FROM_EDIT_AREA', label: '删除列车固定径路'}, CTC_REMOVE_RUN_PLAN_FROM_EDIT_AREA:{value: 'CTC_REMOVE_RUN_PLAN_FROM_EDIT_AREA', label: '删除列车固定径路'},
CTC_RELEASE_RUN_PLAN_TO_SIMULATION:{value: 'CTC_RELEASE_RUN_PLAN_TO_SIMULATION', label: '运行计划发布至CTC'}, CTC_RELEASE_RUN_PLAN_TO_SIMULATION:{value: 'CTC_RELEASE_RUN_PLAN_TO_SIMULATION', label: '运行计划发布至CTC'},
CTC_SET_ROUTE:{value: 'CTC_SET_ROUTE', label: 'CTC办理进路'} CTC_SET_ROUTE:{value: 'CTC_SET_ROUTE', label: 'CTC办理进路'},
CTC_ZONE_SAVE_RUN_PLAN:{value:'CTC_ZONE_SAVE_RUN_PLAN', label: '调度台添加行车计划'},
CTC_ZONE_DELETE_RUN_PLAN:{value:'CTC_ZONE_DELETE_RUN_PLAN', label: '调度台删除行车计划'},
CTC_ZONE_RELEASE_ALL_RUN_PLAN:{value:'CTC_ZONE_RELEASE_ALL_RUN_PLAN', label: '调度台发布所有行车计划'},
CTC_ZONE_RELEASE_STATION_RUN_PLAN:{value:'CTC_ZONE_RELEASE_STATION_RUN_PLAN', label: '调度台发布车站行车计划'},
CTC_STATION_SIGN_RUN_PLAN:{value:'CTC_STATION_SIGN_RUN_PLAN', label: '车站签收阶段计划'},
CTC_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: '调度台行车计划修改到发车站'}
},
RAIL: {
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: '查询行车簿册'}
} }
}; };

View File

@ -3785,9 +3785,69 @@ export const OperationEvent = {
operation: '1127', operation: '1127',
domId: '_Tips-CTC-setRoute-Menu{TOP}' domId: '_Tips-CTC-setRoute-Menu{TOP}'
} }
},
// 大铁 调度台 添加运行计划
addDispatcherLogerRp: {
menu: {
operation: '1128',
domId: '_Tips-CTC-addDispatcherLogerRp-Menu{TOP}'
}
},
// 大铁 调度台 删除运行计划
deleteDispatcherLogerRp: {
menu: {
operation: '1129',
domId: '_Tips-CTC-addDispatcherLogerRp-Menu{TOP}'
}
},
// 大铁 调度台 发布所有行车计划
releaseAllDispatcherLogerRp:{
menu: {
operation: '1130',
domId: '_Tips-CTC-releaseAllDispatcherLogerRp-Menu{TOP}'
}
},
// 车站签收行车计划
stationSignRunplan:{
menu: {
operation: '1131',
domId: '_Tips-CTC-stationSignRunplan-Menu{TOP}'
}
},
// 调度台行车计划修改股道
modifyDispatcherLogerRpSection:{
menu: {
operation: '1132',
domId: '_Tips-CTC-modifyDispatcherLogerRpSection-Menu{TOP}'
}
}
},
RailCommand: {
railFillInTicket: {
menu: {
operation: '1201',
domId: '_Tips-Rail-railFillInTicket-Menu{TOP}'
}
},
railQueryTicket: {
menu: {
operation: '1202',
domId: '_Tips-Rail-railQueryTicket'
}
},
railFillInRegister: {
menu: {
operation: '1203',
domId: '_Tips-Rail-railFillInRegister'
}
},
railQueryRegister: {
menu: {
operation: '1204',
domId: '_Tips-Rail-railQueryTicket'
}
} }
} }
}; };
import { MapDeviceType } from './Config.js'; import { MapDeviceType } from './Config.js';

View File

@ -238,8 +238,8 @@ const map = {
activeTrainListChange: 0, // 当前按计划行车的列车列表变化标识只对列车的groupNumber进行了检测 activeTrainListChange: 0, // 当前按计划行车的列车列表变化标识只对列车的groupNumber进行了检测
activeTrainList: [], // 当前按计划行车的列车列表 activeTrainList: [], // 当前按计划行车的列车列表
showCentralizedStationCode: '', // 现地分集中站显示(集中站code) showCentralizedStationCode: '', // 现地分集中站显示(集中站code)
stationSGuideMasterLock: false, stationSGuideMasterLock: false,
stationXGuideMasterLock: false, stationXGuideMasterLock: false,
showCentralizedStationNum: 0, // 现地分集中站显示判断 showCentralizedStationNum: 0, // 现地分集中站显示判断
overlapList: [], // 延续保护list overlapList: [], // 延续保护list
overlapData: {}, // 延续保护数据 overlapData: {}, // 延续保护数据
@ -696,21 +696,18 @@ const map = {
return flag; return flag;
} }
}, },
checkStationGuideMaster: state => (stationCode,sGuideMasterLock,xGuideMasterLock) => { checkStationGuideMaster: state => (stationCode, sGuideMasterLock, xGuideMasterLock) => {
if (state.showCentralizedStationCode === stationCode) { if (state.showCentralizedStationCode === stationCode) {
state.stationSGuideMasterLock = sGuideMasterLock; state.stationSGuideMasterLock = sGuideMasterLock;
state.stationXGuideMasterLock = xGuideMasterLock; state.stationXGuideMasterLock = xGuideMasterLock;
} }
}, },
checkDeviceShow: state => deviceCode => { checkDeviceShow: state => deviceCode => {
if (state.map && state.map.displayList && state.map.displayList.length && store.state.training.prdType) { if (state.map && state.map.displayList && state.map.displayList.length && store.state.training.prdType) {
let flag = false; let flag = false;
const stationCode = state.showCentralizedStationCode; const stationCode = state.showCentralizedStationCode;
if (deviceCode === 'BTN36775'){
console.log(store.state.training.prdType, state.map.displayList, '---', stationCode, deviceCode);
}
state.map.displayList.forEach(item => { state.map.displayList.forEach(item => {
if ( if (
store.state.training.prdType === '01' && store.state.training.prdType === '01' &&
item.type === 'LOCAL' && item.type === 'LOCAL' &&
((item.stationCodeList.includes(stationCode) && item.elementList.includes(deviceCode)) || !stationCode) ((item.stationCodeList.includes(stationCode) && item.elementList.includes(deviceCode)) || !stationCode)

View File

@ -229,10 +229,17 @@ function handle(state, data) {
parseInt(tripNumberAr[tripNumberAr.length - 1]) % 2 == 0 ? element.arriveRunPlan.up = tripNumberAr : element.arriveRunPlan.down = tripNumberAr; parseInt(tripNumberAr[tripNumberAr.length - 1]) % 2 == 0 ? element.arriveRunPlan.up = tripNumberAr : element.arriveRunPlan.down = tripNumberAr;
} }
const code = element.stationCode + '' + element.code; const code = element.stationCode + '' + element.code;
state.railCtcRunplanInitMsg[code] = copyAssign(state.railCtcRunplanInitMsg[code], element); state.railCtcRunplanInitMsg[code] = copyAssign(state.railCtcRunplanInitMsg[code] || {}, element);
}); });
state.railCtcRunplanChange++; state.railCtcRunplanChange++;
break; break;
// 大铁项目 ctc 调度发布行车计划 给车站下发消息
case 'SIMULATION_RAILWAY_RUN_PLAN_SEND':
msg.forEach(each=>{
state.railwaySimulationRunplanSendMap[each.stationCode] = each;
});
state.railwaySimulationRunplanSendChange++;
break;
// 大铁项目 ctc 车务管理端 初始化消息 // 大铁项目 ctc 车务管理端 初始化消息
case 'SIMULATION_CTC_MANAGER_RUN_PLAN_EDIT_INIT': case 'SIMULATION_CTC_MANAGER_RUN_PLAN_EDIT_INIT':
state.railCtcStationManageRpMsg = {}; state.railCtcStationManageRpMsg = {};
@ -258,14 +265,33 @@ function handle(state, data) {
}); });
state.railCtcStationManageRpChange++; state.railCtcStationManageRpChange++;
break; break;
// // 大铁项目 ctc 车务管理端 覆盖消息 // 调度命令信息
// case 'SIMULATION_CTC_MANAGER_RUN_PLAN_EDIT_COVER': case 'SIMULATION_RAIL_CTC_DISPATCH_COMMAND':
// state.railCtcStationManageRpMsg = {}; state.dispatchCommandMsg = msg;
break;
// // 大铁项目 调度台 运行图信息 初始化消息
// case 'SIMULATION_RAILWAY_RUN_PLAN_INIT':
// state.railwaySimulationRpMsg = {};
// msg.forEach(element => { // msg.forEach(element => {
// const code = element.stationCode + '' + element.tripNumber; // const code = element.stationCode + '' + element.runPlanCode;
// state.railCtcStationManageRpMsg[code] = element; // state.railwaySimulationRpMsg[code] = element;
// }); // });
// state.railCtcStationManageRpChange++; // break;
// // 大铁项目 调度台 运行图信息 修改/增加消息
// case 'SIMULATION_RAILWAY_RUN_PLAN_CHANGE':
// msg.forEach(element => {
// const code = element.stationCode + '' + element.runPlanCode;
// state.railwaySimulationRpMsg[code] = copyAssign(state.railwaySimulationRpMsg[code] || {}, element);
// });
// state.railwaySimulationRpChange++;
// break;
// // 大铁项目 调度台 运行图信息 移除消息
// case 'SIMULATION_RAILWAY_RUN_PLAN_REMOVE':
// msg.forEach(element => {
// const code = element.stationCode + '' + element.runPlanCode;
// delete state.railwaySimulationRpMsg[code];
// });
// state.railwaySimulationRpChange++;
// break; // break;
} }
} }
@ -418,10 +444,15 @@ const socket = {
simulationPlanChange:{}, // 运行图加线/抽线/变化推送消息 simulationPlanChange:{}, // 运行图加线/抽线/变化推送消息
loggedOutMsg: '', loggedOutMsg: '',
railCtcStatusMsg: {}, // 占线板信息 railCtcStatusMsg: {}, // 占线板信息
dispatchCommandMsg: {}, // 调度命令信息
railCtcRunplanInitMsg:{}, // 大铁项目 ctc 运行图初始化信息 railCtcRunplanInitMsg:{}, // 大铁项目 ctc 运行图初始化信息
railCtcRunplanChange:0, // 大铁项目 ctc 运行图信息变化 railCtcRunplanChange:0, // 大铁项目 ctc 运行图信息变化
railCtcStationManageRpMsg:{}, // 大铁项目 ctc 车务管理 端运行图信息 railCtcStationManageRpMsg:{}, // 大铁项目 ctc 车务管理 端运行图信息
railCtcStationManageRpChange:0 // 大铁项目 ctc 车务管理 运行图信息变化 railCtcStationManageRpChange:0, // 大铁项目 ctc 车务管理 运行图信息变化
railwaySimulationRunplanSendMap:{}, // 大铁项目 调度台 发布 行车计划
railwaySimulationRunplanSendChange:0 // 大铁项目 调度台 发布 行车计划变化
// railwaySimulationRpMsg:{}, // 大铁项目 调度台 调度台
// railwaySimulationRpChange:0 // 大铁项目 调度台 运行图信息变化
}, },
getters: { getters: {
}, },
@ -507,6 +538,13 @@ const socket = {
}, },
setIscsStatePisMessages: (state, speed) => { setIscsStatePisMessages: (state, speed) => {
state.iscsStatePisMessages = speed; state.iscsStatePisMessages = speed;
},
deleteRailwaySimulationRunplan: (state, stationCode) => {
delete state.railwaySimulationRunplanSendMap[stationCode];
state.railwaySimulationRunplanSendChange++;
},
clearDispatchCommandMsg: (state, data) => {
state.dispatchCommandMsg = {};
} }
}, },
@ -601,6 +639,9 @@ const socket = {
}, },
handleIscsPisState:({ commit }, state) => { handleIscsPisState:({ commit }, state) => {
commit('setIscsStatePisMessages', state); commit('setIscsStatePisMessages', state);
},
deleteRailwaySimulationRunplan:({ commit }, stationCode) => {
commit('deleteRailwaySimulationRunplan', stationCode);
} }
} }
}; };

View File

@ -450,6 +450,7 @@ const training = {
rtn && rtn.valid && commit('next'); rtn && rtn.valid && commit('next');
} }
} }
console.log(rtn, '*********');
resolve(rtn); resolve(rtn);
}).catch(error => { }).catch(error => {
// console.error(error); // console.error(error);

View File

@ -25,9 +25,10 @@ export function handlerUrl(data) {
// const data = null; // const data = null;
// BASE_API = 'https://joylink.club/jlcloud'; // BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud'; BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.233/rtss-server';
// BASE_API = 'http://114.116.51.125/jlcloud'; // BASE_API = 'http://114.116.51.125/jlcloud';
// BASE_API = 'http://192.168.8.152:9000'; // 袁琪 // BASE_API = 'http://192.168.8.152:9000'; // 袁琪
// BASE_API = 'http://192.168.8.172:9200'; // 旭强 // BASE_API = 'http://192.168.3.94:9000'; // 旭强
// BASE_API = 'http://192.168.3.15:9000'; // 张赛 // BASE_API = 'http://192.168.3.15:9000'; // 张赛
// BASE_API = 'http://192.168.8.140:9000'; // 杜康 // BASE_API = 'http://192.168.8.140:9000'; // 杜康
// BASE_API = 'http://192.168.3.37:9000'; // 卫志宏 // BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
@ -44,6 +45,11 @@ export function handlerUrl(data) {
VOICE_API = data && data.resourcesDomainName ? 'https://' + data.resourcesDomainName : 'https://joylink.club/oss/joylink'; VOICE_API = data && data.resourcesDomainName ? 'https://' + data.resourcesDomainName : 'https://joylink.club/oss/joylink';
UPLOAD_API = 'http://joylink.club/jlfile'; UPLOAD_API = 'http://joylink.club/jlfile';
BASE_SITE = 'https://test.joylink.club/cbtc'; BASE_SITE = 'https://test.joylink.club/cbtc';
} else if (process.env.NODE_ENV === 'local-test') {
BASE_API = 'https://192.168.3.233/rtss-server';
VOICE_API = 'https://192.168.3.233/oss/joylink';
UPLOAD_API = 'https://192.168.3.233';
BASE_SITE = '/cbtc';
} else if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_PRO === 'local') { } else if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_PRO === 'local') {
BASE_API = 'http://160.20.60.15:9000'; BASE_API = 'http://160.20.60.15:9000';
VOICE_API = 'http://160.20.60.15/oss/joylink'; VOICE_API = 'http://160.20.60.15/oss/joylink';

View File

@ -34,6 +34,9 @@ export function getTopic(type, group, stationCode) {
case 'CTC': case 'CTC':
topic = `/user/queue/simulation/${group}/ctc`; topic = `/user/queue/simulation/${group}/ctc`;
break; break;
// case 'CTC_RAILWAY':
// topic = `/queue/simulation/${group}/railway`;
// break;
case 'CTC_MANAGE': case 'CTC_MANAGE':
// topic = `/user/queue/simulation/${group}/ctc/manage`; // topic = `/user/queue/simulation/${group}/ctc/manage`;
topic = `/user/queue/simulation/${group}/ctcManage`; topic = `/user/queue/simulation/${group}/ctcManage`;

View File

@ -0,0 +1,337 @@
<template>
<el-dialog
v-dialogDrag
class="cmd-manage chengdou-03__systerm"
:title="title"
:visible.sync="show"
width="1000px"
:before-close="doClose"
:z-index="2010"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="main">
<div class="left">
<div class="left-type">车站</div>
<div class="type-content">
<div class="content-item">
<img :src="shouxinImg" style="width: 58px; height: 58px">
<div>收令箱</div>
</div>
</div>
</div>
<div class="content-box">
<div class="box-top">
<div class="top-title">收令箱</div>
<div class="top-table">
<el-table :data="cmdTableData" style="width: 100%" height="160" highlight-current-row :row-class-name="tableRowClassName" @current-change="handleCurrentChange">
<el-table-column prop="title" label="标题" />
<el-table-column prop="number" label="号码" width="80" />
<el-table-column label="命令类型" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ typeObj[scope.row.type] || '' }}</span>
</template>
</el-table-column>
<el-table-column prop="sendTime" label="收令日期" width="160" />
<el-table-column prop="companyOfSender" label="发令单位" />
<el-table-column prop="senderName" label="发令人" />
<el-table-column label="签否">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ signedStatusObj[getSignInfo(scope.row.receiverInfos).signedStatus] || '' }}</span>
</template>
</el-table-column>
<el-table-column label="签收人">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ getSignedBy(getSignInfo(scope.row.receiverInfos)) || '' }}</span>
</template>
</el-table-column>
<el-table-column label="签收时间" width="160">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ getSignInfo(scope.row.receiverInfos).time || '' }}</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
<div class="box-middle">
<div class="middle-left">
<el-input v-model="currentInfo.content" readonly type="textarea" rows="19" resize="none" placeholder="请输入内容" />
</div>
<div class="middle-right">
<div class="middle-right-top">
<el-table :data="getTableData" style="width: 100%" height="190">
<el-table-column type="index" label="序" width="50" />
<el-table-column prop="deviceName" label="受令单位" />
<el-table-column prop="copyers" label="抄知处所" />
</el-table>
</div>
<div class="middle-right-middle">
<span>阅读信息</span>
<el-checkbox v-model="needRead">需阅读</el-checkbox>
<el-checkbox v-model="stopRead">停止阅读</el-checkbox>
</div>
<div class="middle-right-bottom">
<el-table :data="tableData2" style="width: 100%" height="200">
<el-table-column type="index" label="序" width="50" />
<el-table-column prop="reader" label="阅读人" />
<el-table-column prop="readTime" label="阅读时间" />
</el-table>
</div>
</div>
</div>
</div>
</div>
<div class="bottom-btn">
<el-button :disabled="!commandId || currentHasSigned" @click="signCmd('REFUSE')">拒签</el-button>
<el-button :disabled="!commandId || currentHasSigned" @click="signCmd('SIGNED')">签收</el-button>
<el-button @click="doClose">关闭</el-button>
</div>
</el-dialog>
</template>
<script>
import { sendCommandNew } from '@/api/jmap/training';
import shouxinxiang from '@/assets/dispatcherStation/shouxinxiang.png';
import { mapState } from 'vuex';
import { parseTime } from '@/utils/index';
export default {
name:'CmdManage',
data() {
return {
shouxinImg: shouxinxiang,
cmdTableData: [],
tableData2: [],
needRead: false,
stopRead: false,
dialogShow: false,
currentInfo: {},
typeObj: {
NORMAL: '正常调度命令'
},
signedStatusObj: {
UNSIGNED: '未签收',
SIGNED: '签收',
REFUSE: '拒签'
}
};
},
computed: {
...mapState('training', [
'memberList', 'simulationUserList', 'initTime'
]),
...mapState('socket', [
'dispatchCommandMsg'
]),
show() {
return this.dialogShow;
},
group() {
return this.$route.query.group;
},
title() {
return '调度命令管理';
},
commandId() {
return this.currentInfo.id || '';
},
currentHasSigned() {
let hasSigned = false;
if (this.currentInfo.receiverInfos) {
const obj = this.getSignInfo(this.currentInfo.receiverInfos);
if (obj && obj.signedStatus != 'UNSIGNED') {
hasSigned = true;
}
}
return hasSigned;
},
getActiveUser() {
const userInfo = this.simulationUserList.find(item => {
return item.userId == this.$store.state.user.id;
});
const activeUser = userInfo || {};
return activeUser;
},
getTableData() {
const receiverList = Object.values(this.currentInfo.receiverInfos || {});
const mList = [];
receiverList.forEach(ii => {
const obj = this.memberList.find(item => {
return item.id == ii.receiverId;
});
if (obj) {
mList.push({
commandId: this.commandId,
...ii,
...obj
});
}
});
const list = [];
mList.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
const obj = {
...this.currentInfo,
...item,
deviceName: device ? device.name : ''
};
list.push(obj);
});
return list;
}
},
watch: {
dispatchCommandMsg(Obj) {
if (Obj.type == 'ADD') {
const list = Obj.body;
this.cmdTableData.push(list);
this.show && this.$store.commit('socket/clearDispatchCommandMsg');
}
}
},
beforeDestroy() {},
mounted() {
this.searchCmd();
},
methods:{
tableRowClassName({row, rowIndex}) {
const status = this.getSignInfo(row.receiverInfos).signedStatus;
if (status === 'SIGNED') {
return 'signed-row';
}
return 'unsigned-row';
},
doShow() {
this.dialogShow = true;
this.$store.commit('socket/clearDispatchCommandMsg');
},
doClose() {
this.dialogShow = false;
},
handleCurrentChange(obj) {
this.currentInfo = obj;
},
getSignInfo(info) {
const obj = info[this.getActiveUser.memberId] || {};
return obj;
},
getSignedBy(info) {
const signedInfo = this.simulationUserList.find(item => {
return item.memberId == info.signedBy;
});
let name = '';
if (signedInfo) {
name = signedInfo.nickName;
}
return name;
},
signCmd(status) {
if (!this.commandId) { return; }
const signInfo = { commandId: this.commandId, signedBy: this.getActiveUser.memberId, signedStatus: status };
const data = {
signInfo: signInfo
};
sendCommandNew(this.group, 'CTC_SIGN_DISPATCH_COMMAND', data).then((res) => {
console.log(res, '---res');
if (res.code == 200) {
this.changeSignedStatus(signInfo);
} else {
this.$messageBox(`${this.signedStatusObj[status]}调度命令失败:${res.message}`);
}
}).catch(error => {
this.$messageBox(`${this.signedStatusObj[status]}调度命令失败:${error.message}`);
});
},
changeSignedStatus(signInfo) {
const index = this.cmdTableData.findIndex(item => {
return item.id == signInfo.commandId;
});
if (index >= 0) {
const obj = this.cmdTableData[index];
const mId = signInfo.signedBy;
obj.receiverInfos[mId].signedBy = mId;
obj.receiverInfos[mId].signedStatus = signInfo.signedStatus;
obj.receiverInfos[mId].time = parseTime(this.initTime);
this.cmdTableData.splice(index, 1, obj);
}
},
searchCmd() {
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND').then((res) => {
console.log(res, '---res');
if (res.code == 200) {
this.cmdTableData = res.data;
} else {
this.$messageBox('查询调度命令失败:' + res.message);
}
}).catch(error => {
this.$messageBox('查询调度命令失败:' + error.message);
});
}
}
};
</script>
<style lang="scss" scoped>
.main {
height: 100%;
display: flex;
.left {
display: flex;
flex-direction: column;
width: 150px;
flex: 1;
.left-type {
display: flex;
justify-content: center;
align-items: center;
font-weight: bold;
height: 30px;
border: 1px solid #A0A0A0;
}
.type-content {
background: #A0A0A0;
flex: 1;
.content-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #fff;
&:hover {
cursor: pointer;
}
}
}
}
.content-box {
width: calc(100% - 150px);
padding-left: 10px;
.box-top {
.el-table {
/deep/ .signed-row {
color: red;
}
/deep/ .unsigned-row {
color: blue;
}
}
}
.box-middle {
padding-top: 10px;
display: flex;
.middle-left {
width: calc(100% - 290px);
}
.middle-right {
padding-left: 10px;
width: 290px;
}
}
}
}
.bottom-btn {
height: 40px;
display: flex;
justify-content: flex-end;
align-items: flex-end;
}
</style>

View File

@ -0,0 +1,388 @@
<template>
<el-dialog
v-dialogDrag
class="dispatcher-cmd chengdou-03__systerm"
:title="title"
:visible.sync="show"
width="1300px"
:before-close="doClose"
:z-index="2010"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="main">
<el-row style="height: 100%;">
<el-col :span="6" style="height: 100%;">
<div class="left">
<el-tabs v-model="activeTab" type="border-card" @tab-click="tabClick">
<el-tab-pane label="操作" name="operate">
<div class="operate-box">
<div class="create-cmd">
<el-button type="primary" @click="createCmd">新建调度命令</el-button>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="查询" name="search">
<div class="search-box">
<div>查询</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</el-col>
<el-col :span="12">
<div class="middle">
<el-tabs v-model="cmdTab" type="border-card">
<el-tab-pane label="调度命令" name="cmd">
<el-form ref="form" :model="command" label-width="80px">
<el-form-item label="命令标题">
<el-input v-model="command.title" />
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="命令号">
<el-input v-model="command.number" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发令时间">
<el-date-picker v-model="command.sendTime" type="datetime" placeholder="选择日期时间" style="width: 100%;" value-format="yyyy-MM-dd HH:mm:ss" />
</el-form-item>
</el-col>
</el-row>
<el-col :span="12">
<el-form-item label="发令人">
<el-select v-model="command.senderName" disabled placeholder="请选择" style="width: 100%;" @change="senderChange">
<el-option
v-for="item in memberDataList"
:key="item.id"
:label="item.labelName"
:value="item.labelName"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发令单位">
<el-input v-model="command.companyOfSender" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="授权时间">
<el-date-picker v-model="command.authorizationTime" type="datetime" placeholder="选择日期时间" style="width: 100%;" value-format="yyyy-MM-dd HH:mm:ss" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="授权状态">
<el-input v-model="command.authorizationStatus" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="定稿时间">
<el-date-picker v-model="command.finalizationTime" type="datetime" placeholder="选择日期时间" style="width: 100%;" value-format="yyyy-MM-dd HH:mm:ss" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核人">
<el-select v-model="command.reviewerId" placeholder="请选择" style="width: 100%;">
<el-option
v-for="item in simulationUserList"
:key="item.memberId"
:label="item.nickName"
:value="item.memberId"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="拟令人">
<el-select v-model="command.author" placeholder="请选择" style="width: 100%;">
<el-option
v-for="item in simulationUserList"
:key="item.memberId"
:label="item.nickName"
:value="item.memberId"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="命令分类">
<el-select v-model="command.type" placeholder="请选择" style="width: 100%;">
<el-option
v-for="item in typeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-form>
</el-tab-pane>
</el-tabs>
<el-tabs v-model="textTab" type="border-card">
<el-tab-pane label="命令正文" name="text">
<div class="cmd-box">
<div>
<el-input v-model="cmdTextarea" type="textarea" :rows="6" placeholder="请输入内容" />
</div>
</div>
</el-tab-pane>
</el-tabs>
<div>
<div class="table-title">
<span>受令列表</span>
<!-- <el-checkbox v-model="tableChecked">全选</el-checkbox> -->
</div>
<div class="table">
<el-table ref="table" :data="getTableData" border style="width: 100%" height="200" @selection-change="selectionChange">
<el-table-column type="selection" width="50" />
<el-table-column prop="deviceName" label="受令单位" width="180" />
<el-table-column prop="copyers" label="抄送" width="180" />
<el-table-column label="签收状态">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.nickName ? signedStatusObj[scope.row.signedStatus] : '' }}</span>
</template>
</el-table-column>
<el-table-column prop="nickName" label="签收人" />
<el-table-column prop="signTime" label="签收时间" />
</el-table>
</div>
</div>
<div class="midle-bottom">
<el-button type="primary" @click="sendCmd">下达</el-button>
<el-button type="primary" @click="doClose">关闭</el-button>
</div>
</div>
</el-col>
<el-col :span="6">
<div class="right">
常用词汇
</div>
</el-col>
</el-row>
</div>
</el-dialog>
</template>
<script>
import { sendCommandNew } from '@/api/jmap/training';
import { mapState } from 'vuex';
export default {
name:'DispatcherCmd',
data() {
return {
dialogShow: false,
activeTab: 'operate',
cmdTab: 'cmd',
textTab: 'text',
typeOptions: [
{label: '正常调度命令', value: 'NORMAL'}
],
signedStatusObj: {
UNSIGNED: '未签收',
SIGNED: '签收',
REFUSE: '拒签'
},
command: {
title: '',
number: '',
sendTime: '',
senderId: '',
senderName: '',
companyOfSender: '',
authorizationTime: '',
authorizationStatus: '',
finalizationTime: '',
reviewerId: '',
author: '',
receiverIds: [],
type: '',
content: '',
allSigned: ''
},
cmdTextarea: '',
tableChecked: false,
memberDataList: []
};
},
computed: {
...mapState('training', [
'memberList', 'memberData', 'simulationUserList'
]),
show() {
return this.dialogShow;
},
group() {
return this.$route.query.group;
},
title() {
return '调度命令管理系统';
},
mapSimulationUserList() {
const obj = {};
this.simulationUserList.forEach(item => {
obj[item.userId] = item;
});
return obj;
},
getTableData() {
const mList = this.memberList.filter(item => {
return item.type == 'STATION_SUPERVISOR';
});
const list = [];
mList.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
const useInfo = this.mapSimulationUserList[item.userId];
const obj = {
...item,
userId: item.userId + '',
deviceName: device ? device.name : '',
nickName: useInfo ? useInfo.nickName : '',
copyers: '',
signedStatus: 'UNSIGNED',
signTime: ''
};
list.push(obj);
});
return list;
}
},
watch: {},
beforeDestroy() {},
mounted() {},
methods:{
createCmd() {
this.$confirm('当前调度命令已经被编辑修改过了,你要放弃所有的修改吗?', '操作提示', {
confirmButtonText: '是',
cancelButtonText: '否'
}).then(() => {
this.initData();
}).catch(() => {
console.log('取消新建调度命令!');
});
},
initData() {
this.command = {
title: '',
number: '',
sendTime: '',
senderId: '',
senderName: this.command.senderName,
companyOfSender: '',
authorizationTime: '',
authorizationStatus: '',
finalizationTime: '',
reviewerId: '',
author: '',
receiverIds: [],
type: '',
content: '',
allSigned: ''
};
this.cmdTextarea = '';
this.$refs.table.clearSelection();
},
senderChange(memberId) {
const obj = this.mapSimulationUserList.find(item => {
return item.memberId == memberId;
});
if (obj) {
const device = this.$store.getters['map/getDeviceByCode'](obj.deviceCode);
this.command.companyOfSender = device ? device.name : '';
}
},
getSenderName() {
this.memberDataList = Object.values(this.memberData);
const activeUser = this.memberDataList.find(item => {
return item.userId == this.$store.state.user.id;
});
if (activeUser) {
// this.command.senderId = activeUser.id;
this.command.senderName = activeUser.labelName;
}
},
doShow() {
this.getSenderName();
this.dialogShow = true;
},
doClose() {
this.dialogShow = false;
},
tabClick() {
console.log('tabClick');
},
selectionChange(selection) {
const arr = [];
selection.forEach(item => {
arr.push(item.id);
});
this.command.receiverIds = arr;
console.log(this.simulationUserList, '----simulationUserList----');
},
sendCmd() {
this.command.content = this.cmdTextarea;
const data = {
command: this.command
};
sendCommandNew(this.group, 'CTC_SEND_DISPATCH_COMMAND', data).then((res) => {
console.log(res, '---res');
this.$message.success('发送调度命令成功!');
this.initData();
}).catch(error => {
this.$messageBox('发送调度命令失败:' + error.message);
});
},
searchCmd() {
sendCommandNew(this.group, 'CTC_QUERY_DISPATCH_COMMAND').then((res) => {
console.log(res, '---res----');
}).catch(error => {
this.$messageBox('查询调度命令失败:' + error.message);
});
}
}
};
</script>
<style lang="scss" scoped>
// .dispatcher-cmd{
// }
.main {
height: 100%;
.left {
height: 100%;
.create-cmd {
text-align: end;
}
}
/deep/ .el-tabs__item {
height: 30px !important;
line-height: 30px !important;
}
.middle {
/deep/ .el-form-item {
margin-bottom: 0px;
}
.el-input {
/deep/ .el-input__icon {
line-height: 22px;
}
}
.midle-bottom {
height: 40px;
display: flex;
justify-content: center;
align-items: center;
}
}
}
</style>
<style>
.dispatcher-cmd .el-dialog .el-dialog__body {
padding: 5px !important;
}
.dispatcher-cmd .el-dialog {
margin-top: 8vh !important;
}
</style>

View File

@ -0,0 +1,275 @@
<template>
<el-dialog
v-dialogDrag
class="cmd-manage chengdou-03__systerm"
:title="title"
:visible.sync="show"
width="1000px"
:before-close="doClose"
:z-index="2010"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="main">
<div class="top">
<el-row>
<el-col :span="24">
<div>
<span>命令类型名称</span>
<span>{{ typeObj[signedData.type] }}</span>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div>
<span>命令号码</span>
<span>{{ signedData.number }}</span>
</div>
</el-col>
<el-col :span="8">
<div>
<span>日期</span>
<span>{{ getParseTime(signedData.sendTime, '{y}-{m}-{d}') }}</span>
</div>
</el-col>
<el-col :span="8">
<div>
<span>发令时刻</span>
<span>{{ getParseTime(signedData.sendTime, '{h}:{i}:{s}') }}</span>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<div>
<span>发令单位</span>
<span>{{ signedData.companyOfSender }}</span>
</div>
</el-col>
<el-col :span="15">
<div>
<span>调度员姓名</span>
<span>{{ signedData.senderName }}</span>
</div>
</el-col>
</el-row>
</div>
<div class="content-box">
<div class="box-title">命令内容</div>
<div class="box-top">
<el-input v-model="signedData.content" readonly type="textarea" rows="9" resize="none" placeholder="请输入内容" />
</div>
<div class="box-table">
<el-table :data="getTableData" style="width: 100%" height="200">
<el-table-column type="index" label="序" width="50" />
<el-table-column prop="deviceName" label="受令单位" />
<el-table-column prop="copyers" label="抄知处所" />
</el-table>
</div>
<div class="box-bottom">
<div>
<el-checkbox v-model="needprint">签收后打印</el-checkbox>
<el-checkbox v-model="needRead">需他人阅读</el-checkbox>
</div>
<div class="bottom-signed">
<span>签收人姓名</span>
<el-input v-model="signedBy" readonly style="width: 150px" />
</div>
</div>
</div>
</div>
<div class="bottom-btn">
<el-button :disabled="!commandId || currentHasSigned" @click="signCmd('REFUSE')">拒签</el-button>
<el-button :disabled="!commandId || currentHasSigned" @click="signCmd('SIGNED')">签收</el-button>
<el-button @click="doClose">关闭</el-button>
</div>
</el-dialog>
</template>
<script>
import { sendCommandNew } from '@/api/jmap/training';
import { mapState } from 'vuex';
import { parseTime } from '@/utils/index';
export default {
name:'CmdManage',
data() {
return {
signedData: {},
needRead: false,
needprint: false,
dialogShow: false,
signedId: '',
signedBy: '',
typeObj: {
NORMAL: '正常调度命令'
},
signedStatusObj: {
UNSIGNED: '未签收',
SIGNED: '签收',
REFUSE: '拒签'
}
};
},
computed: {
...mapState('training', [
'memberList', 'simulationUserList', 'initTime'
]),
...mapState('socket', [
'dispatchCommandMsg'
]),
show() {
return this.dialogShow;
},
group() {
return this.$route.query.group;
},
title() {
return '调度命令管理';
},
commandId() {
return this.signedData.id || '';
},
currentHasSigned() {
let hasSigned = false;
if (this.signedData.receiverInfos) {
const obj = this.getSignInfo(this.signedData.receiverInfos);
if (obj && obj.signedStatus != 'UNSIGNED') {
hasSigned = true;
}
}
return hasSigned;
},
getActiveUser() {
const userInfo = this.simulationUserList.find(item => {
return item.userId == this.$store.state.user.id;
});
const activeUser = userInfo || {};
return activeUser;
},
getTableData() {
const receiverList = Object.values(this.signedData.receiverInfos || {});
const mList = [];
receiverList.forEach(ii => {
const obj = this.memberList.find(item => {
return item.id == ii.receiverId;
});
if (obj) {
mList.push({
commandId: this.commandId,
...ii,
...obj
});
}
});
const list = [];
mList.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
const obj = {
...this.signedData,
...item,
deviceName: device ? device.name : ''
};
list.push(obj);
});
return list;
}
},
watch: {},
beforeDestroy() {},
mounted() {},
methods:{
getParseTime(val, f) {
return val ? parseTime(val, f) : '';
},
getSenderName() {
this.signedBy = '';
this.signedId = '';
const activeUser = this.simulationUserList.find(item => {
return item.userId == this.$store.state.user.id;
});
if (activeUser) {
this.signedBy = activeUser.nickName;
this.signedId = activeUser.memberId;
}
},
doShow() {
this.getSenderName();
this.getSignedData();
this.dialogShow = true;
},
doClose() {
this.dialogShow = false;
this.$emit('signedCmdClose');
},
getSignedData() {
this.signedData = {};
if (this.dispatchCommandMsg.type == 'ADD') {
this.signedData = this.dispatchCommandMsg.body;
}
},
getSignInfo(info) {
const obj = info[this.getActiveUser.memberId] || {};
return obj;
},
getSignedBy(info) {
const signedInfo = this.simulationUserList.find(item => {
return item.memberId == info.signedBy;
});
let name = '';
if (signedInfo) {
name = signedInfo.nickName;
}
return name;
},
signCmd(status) {
if (!this.commandId) { return; }
const signInfo = { commandId: this.commandId, signedBy: this.signedId, signedStatus: status };
const data = {
signInfo: signInfo
};
sendCommandNew(this.group, 'CTC_SIGN_DISPATCH_COMMAND', data).then((res) => {
console.log(res, '---res');
this.$emit('changeSignedStatus', signInfo);
this.doClose();
}).catch(error => {
this.$messageBox('查询调度命令失败:' + error.message);
});
}
}
};
</script>
<style lang="scss" scoped>
.main {
height: 100%;
.top {
padding: 5px 10px;
border: 1px solid #ccc;
span {
font-size: 16px;
}
}
.content-box {
.box-title {
height: 40px;
line-height: 40px;
}
.box-bottom {
height: 50px;
display: flex;
justify-content: space-between;
align-items: center;
.bottom-signed {
display: flex;
}
}
}
}
.bottom-btn {
height: 40px;
display: flex;
justify-content: flex-end;
align-items: flex-end;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -750,6 +750,7 @@ export default {
} }
}, 1000); }, 1000);
}, function (error) { }, function (error) {
that.audioPlay = false;
switch (error.code || error.name) { switch (error.code || error.name) {
case 'PERMISSION_DENIED': case 'PERMISSION_DENIED':
case 'PermissionDeniedError': case 'PermissionDeniedError':

View File

@ -8,7 +8,7 @@
<!-- <el-button v-if="$route.query.lineCode === '15'" size="small" type="jumpjlmap3d" @click="jumpjlmap3dDriver">司机视角</el-button> --> <!-- <el-button v-if="$route.query.lineCode === '15'" size="small" type="jumpjlmap3d" @click="jumpjlmap3dDriver">司机视角</el-button> -->
<el-button v-if="$route.query.lineCode === '15'" size="small" @click="clCaAnCall">经典案例分析</el-button> <el-button v-if="$route.query.lineCode === '15'" size="small" @click="clCaAnCall">经典案例分析</el-button>
<el-button v-if="$route.query.lineCode === '15'" size="small" @click="normStudy">规范学习</el-button> <el-button v-if="$route.query.lineCode === '15'" size="small" @click="normStudy">规范学习</el-button>
<el-button v-if="$route.query.lineCode === '16'" size="small" @click="showLineBoard">占线板</el-button> <el-button v-if="$route.query.lineCode === '16'" size="small" @click="showLineBoard">占线板</el-button>
</el-button-group> </el-button-group>
</div> </div>
<Jl3dRailway-Device <Jl3dRailway-Device
@ -20,7 +20,7 @@
/> />
<Jl3dRailway-Drive v-show="drivingShow" ref="Jl3dRailwayDrive" :panel-show="drivingShow" @showdriving="showdriving" /> <Jl3dRailway-Drive v-show="drivingShow" ref="Jl3dRailwayDrive" :panel-show="drivingShow" @showdriving="showdriving" />
<draw-select ref="drawSelect" /> <draw-select ref="drawSelect" />
<line-board ref="lineBoard" /> <line-board ref="lineBoard" />
</div> </div>
</template> </template>
<script> <script>
@ -39,7 +39,7 @@ export default {
Jl3dRailwayDevice, Jl3dRailwayDevice,
Jl3dRailwayDrive, Jl3dRailwayDrive,
DrawSelect, DrawSelect,
LineBoard LineBoard
}, },
props:{ props:{
isAllShow:{ isAllShow:{
@ -145,8 +145,8 @@ export default {
}); });
} }
if(this.$route.query.project == "zzww"){ if (this.$route.query.project == 'zzww') {
this.jumpjlmap3dDriver(); this.jumpjlmap3dDriver();
} }
}, },
methods:{ methods:{
@ -164,9 +164,9 @@ export default {
normStudy() { normStudy() {
this.$refs.drawSelect.doShow(null, 'normStudy'); this.$refs.drawSelect.doShow(null, 'normStudy');
}, },
showLineBoard() { showLineBoard() {
this.$refs.lineBoard.doShow(); this.$refs.lineBoard.doShow();
}, },
jumpjlmap3dmodel() { jumpjlmap3dmodel() {
if (this.deviceif == false) { if (this.deviceif == false) {
this.deviceif = true; this.deviceif = true;
@ -185,7 +185,7 @@ export default {
jumpjlmap3dDriver() { jumpjlmap3dDriver() {
this.drivingShow = true; this.drivingShow = true;
this.$refs.Jl3dRailwayDrive.show(this.mapId, this.group); this.$refs.Jl3dRailwayDrive.show(this.mapId, this.group);
}, }
} }
}; };
</script> </script>

View File

@ -361,8 +361,12 @@ export default {
} }
if (item && item.trackView && item.trackView.trackLineMap) { if (item && item.trackView && item.trackView.trackLineMap) {
for (const key in item.trackView.trackLineMap) { for (const key in item.trackView.trackLineMap) {
if (this.standTrackSectionMap[key]) { if (this.standTrackSectionMap[key] && item.trackView.trackLineMap[key]) {
this.standTrackSectionMap[key].lines = item.trackView.trackLineMap[key]; for (const trainCode in item.trackView.trackLineMap[key]) {
if (this.standTrackSectionMap[key].lineMap[trainCode]) {
Object.assign(this.standTrackSectionMap[key].lineMap[trainCode], item.trackView.trackLineMap[key][trainCode]);
} else { this.standTrackSectionMap[key].lineMap[trainCode] = item.trackView.trackLineMap[key][trainCode]; }
}
} }
} }
} }
@ -384,10 +388,13 @@ export default {
let oddNumber = true; let oddNumber = true;
for (const key in this.standTrackSectionMap) { for (const key in this.standTrackSectionMap) {
if (this.standTrackSectionMap[key].belongStation === this.selectCode) { if (this.standTrackSectionMap[key].belongStation === this.selectCode) {
if (this.standTrackSectionMap[key].lines && this.standTrackSectionMap[key].lines.length) { if ( JSON.stringify(this.standTrackSectionMap[key].lineMap) !== '{}') {
this.standTrackSectionMap[key].lines.forEach((item, index) => { let flag = true;
this.trackList.push(Object.assign({}, item, { trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, oddNumber: oddNumber, showTrack: index === 0 })); const lineMap = this.standTrackSectionMap[key].lineMap;
}); for (const item in lineMap) {
this.trackList.push(Object.assign({}, lineMap[item], { trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, oddNumber: oddNumber, showTrack: flag }));
flag = false;
}
oddNumber = !oddNumber; oddNumber = !oddNumber;
} else { } else {
this.trackList.push({trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, noData: true, oddNumber: oddNumber, showTrack: true}); this.trackList.push({trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, noData: true, oddNumber: oddNumber, showTrack: true});
@ -400,7 +407,7 @@ export default {
'$store.state.map.mapDataLoadedCount': function (val) { // '$store.state.map.mapDataLoadedCount': function (val) { //
this.sectionList.forEach(item => { this.sectionList.forEach(item => {
if (item.standTrack) { if (item.standTrack) {
this.standTrackSectionMap[item.code] = { trackName: item.name, occupied: false, belongStation:item.belongStation, lines: [] }; this.standTrackSectionMap[item.code] = { trackName: item.name, occupied: false, belongStation:item.belongStation, lineMap: {}};
} }
}); });
} }
@ -421,18 +428,20 @@ export default {
selectStandCode(code) { selectStandCode(code) {
this.selectCode = code; this.selectCode = code;
this.trackList = []; this.trackList = [];
let oddNumber = true;
for (const key in this.standTrackSectionMap) { for (const key in this.standTrackSectionMap) {
if (this.standTrackSectionMap[key].belongStation === this.selectCode) { if (this.standTrackSectionMap[key].belongStation === this.selectCode) {
if (this.standTrackSectionMap[key].lines && this.standTrackSectionMap[key].lines.length) { if ( JSON.stringify(this.standTrackSectionMap[key].lineMap) !== '{}') {
this.standTrackSectionMap[key].lines.forEach((item, index) => { let flag = true;
if (!index) { const lineMap = this.standTrackSectionMap[key].lineMap;
this.trackList.push(Object.assign({}, item, { sectionName: this.standTrackSectionMap[key].sectionName, occupied: this.standTrackSectionMap[key].occupied })); for (const item in lineMap) {
} else { this.trackList.push(Object.assign({}, lineMap[item], { trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, oddNumber: oddNumber, showTrack: flag }));
this.trackList.push(Object.assign({}, item)); flag = false;
} }
}); oddNumber = !oddNumber;
} else { } else {
this.trackList.push({sectionName: this.standTrackSectionMap[key].sectionName, occupied: this.standTrackSectionMap[key].occupied}); this.trackList.push({trackName: this.standTrackSectionMap[key].trackName, occupied: this.standTrackSectionMap[key].occupied, noData: true, oddNumber: oddNumber, showTrack: true});
oddNumber = !oddNumber;
} }
} }
} }

View File

@ -211,7 +211,11 @@ export default {
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); // this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); //
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`)); this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
// this.$store.dispatch('training/countTime'); // this.$store.dispatch('training/countTime');
this.$store.dispatch('training/setPrdType', resp.data.prodType); if (resp.data.prodType === '03') {
this.$store.dispatch('training/setPrdType', this.$route.query.prdType);
} else {
this.$store.dispatch('training/setPrdType', resp.data.prodType);
}
this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan); this.$store.dispatch('runPlan/setRunPlanInfo', resp.data.runPlan);
this.planRunning = resp.data.planRunning; this.planRunning = resp.data.planRunning;
if (resp.data.planRunning) { if (resp.data.planRunning) {
@ -223,7 +227,7 @@ export default {
this.dataError = resp.data.dataError; this.dataError = resp.data.dataError;
} }
}, },
// showMode // showMode 11
// switchModeInner(swch) { // switchModeInner(swch) {
// let showMode = '03'; // let showMode = '03';
// if (swch == '01') { // if (swch == '01') {

View File

@ -124,9 +124,9 @@ export default {
'$store.state.training.operateErrMsg': function (val) { '$store.state.training.operateErrMsg': function (val) {
this.tipInfo({ color: val.color, message: val.errMsg }); this.tipInfo({ color: val.color, message: val.errMsg });
}, },
'$store.state.socket.simulationOver':function(val) { '$store.state.socket.simulationOver':function(val) {
this.back(); this.back();
}, },
'$store.state.training.simulationUserList': function(val) { '$store.state.training.simulationUserList': function(val) {
const userInfo = this.$store.state.training.simulationUserList.find(user => user.userId == this.$store.state.user.id ); const userInfo = this.$store.state.training.simulationUserList.find(user => user.userId == this.$store.state.user.id );
if (userInfo.type === 'STATION_SUPERVISOR') { if (userInfo.type === 'STATION_SUPERVISOR') {

View File

@ -36,7 +36,7 @@
<el-button type="danger" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button> <el-button type="danger" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
</template> </template>
</template> </template>
<el-button v-if="project !='bjd'" type="primary" size="small" @click="back">{{ projectDevice || isCtc?'退出':$t('display.demon.back') }}</el-button> <el-button v-if="project !='bjd'" type="primary" size="small" @click="back">{{ projectDevice || isCtc ?'退出':$t('display.demon.back') }}</el-button>
</el-button-group> </el-button-group>
</div> </div>
@ -155,12 +155,12 @@ export default {
isDisable() { isDisable() {
return this.$store.state.training.started; return this.$store.state.training.started;
}, },
isCtc() { isCtc() {
return !!this.$route.query.ctc return !!this.$route.query.ctc;
}, },
zIndex() { zIndex() {
return this.$route.query.ctc ? 11:0 return this.$route.query.ctc ? 11 : 0;
}, },
project() { project() {
return getSessionStorage('project'); return getSessionStorage('project');
}, },
@ -263,8 +263,10 @@ export default {
permissionType: PermissionType.SIMULATION permissionType: PermissionType.SIMULATION
}; };
getGoodsTryUse(data).then(res => { getGoodsTryUse(data).then(res => {
this.remainingTime = res.data.tryTime; if (res.data) {
this.timeNow = Date.parse(new Date()) / 1000 + this.remainingTime; this.remainingTime = res.data.tryTime;
this.timeNow = Date.parse(new Date()) / 1000 + this.remainingTime;
}
if (this.try) { if (this.try) {
this.time = setInterval(() => { this.time = setInterval(() => {
this.tryTime += 1; this.tryTime += 1;

View File

@ -13,7 +13,8 @@
<template v-if="!dataError"> <template v-if="!dataError">
<el-button-group v-if="project !== 'bjd'"> <el-button-group v-if="project !== 'bjd'">
<el-button v-if="$route.query.lineCode === '16'&&!isCtc" size="small" @click="goCtc">CTC</el-button> <el-button v-if="$route.query.lineCode === '16'&&!isCtc" size="small" @click="goCtc">CTC</el-button>
<el-button v-if="$route.query.lineCode === '16'&&!isCtc" size="small" @click="goRpManage">管理终端</el-button> <!-- <el-button v-if="$route.query.lineCode === '16'&&!isCtc" size="small" @click="goRpManage">管理终端</el-button> -->
<!-- <el-button v-if="$route.query.lineCode === '16'&&!isCtc" size="small" @click="goDsManage">调度台</el-button> -->
<el-button v-if="isLocalStation && $route.query.lineCode!='08' && $route.query.lineCode!='16'" size="small" @click="goIbp">IBP盘</el-button> <el-button v-if="isLocalStation && $route.query.lineCode!='08' && $route.query.lineCode!='16'" size="small" @click="goIbp">IBP盘</el-button>
<el-button v-if="isScheduling && isDepot" size="small" type="primary" @click="runPlanEditShow">运行图编辑</el-button> <el-button v-if="isScheduling && isDepot" size="small" type="primary" @click="runPlanEditShow">运行图编辑</el-button>
<!-- 加载剧本 --> <!-- 加载剧本 -->
@ -237,22 +238,59 @@ export default {
}); });
window.open(routeData.href, '_blank'); window.open(routeData.href, '_blank');
}, },
goRpManage() { // goRpManage() {
const routeData = this.$router.resolve({ // const routeData = this.$router.resolve({
path:'/bigTrainRunplanManage', // path:'/bigTrainRunplanManage',
query:{ // query:{
group: this.$route.query.group, // group: this.$route.query.group,
mapId:this.$route.query.mapId, // mapId:this.$route.query.mapId,
project: this.project, // project: this.project,
prdType: this.$route.query.prdType, // prdType: this.$route.query.prdType,
lineCode:this.$route.query.lineCode, // lineCode:this.$route.query.lineCode,
// stationCode:this.$store.state.training.roleDeviceCode, // // stationCode:this.$store.state.training.roleDeviceCode,
// token:getToken(), // // token:getToken(),
noPreLogout: true // noPreLogout: true
} // }
}); // });
window.open(routeData.href, '_blank'); // window.open(routeData.href, '_blank');
}, // },
// goDispatcherStation() {
// const routeData = this.$router.resolve({
// // path:'/bigTrainDispatcherStation',
// path:'/displayNew/demon',
// query:{
// group: this.$route.query.group,
// mapId:this.$route.query.mapId,
// project: this.project,
// prdType: this.$route.query.prdType,
// lineCode:this.$route.query.lineCode,
// newApi: this.$route.query.newApi,
// dispatcherStation:true,
// // stationCode:this.$store.state.training.roleDeviceCode,
// // token:getToken(),
// try: this.$route.query.try,
// token:getToken(),
// noPreLogout: true
// }
// });
// window.open(routeData.href, '_blank');
// },
// goDsManage() {
// const routeData = this.$router.resolve({
// path:'/dispatcherStationManage',
// query:{
// group: this.$route.query.group,
// mapId:this.$route.query.mapId,
// project: this.project,
// prdType: this.$route.query.prdType,
// lineCode:this.$route.query.lineCode,
// // stationCode:this.$store.state.training.roleDeviceCode,
// token:getToken(),
// noPreLogout: true
// }
// });
// window.open(routeData.href, '_blank');
// },
changeOperateMode() { changeOperateMode() {
this.faultMode = !this.faultMode; this.faultMode = !this.faultMode;
let mode = OperateMode.NORMAL; let mode = OperateMode.NORMAL;

View File

@ -312,7 +312,6 @@ export default {
const lineCode = this.$store.state.map.map.skinVO.code; const lineCode = this.$store.state.map.map.skinVO.code;
if (Vue.prototype.$theme) { if (Vue.prototype.$theme) {
this.localStationShow = Vue.prototype.$theme._localShowMode[lineCode] === 'ecStation'; this.localStationShow = Vue.prototype.$theme._localShowMode[lineCode] === 'ecStation';
console.log(this.localStationShow, '============');
} }
this.$store.dispatch('map/setTrainWindowShow', this.previewOrMapDraw); this.$store.dispatch('map/setTrainWindowShow', this.previewOrMapDraw);
}, },

View File

@ -0,0 +1,445 @@
<template>
<div class="dispatcher-station">
<div class="station-title">上海局CTC系统-行调台-控制工具条</div>
<div class="main">
<div class="menu-list">
<el-button v-for="(item, index) in menuList" :key="index" class="btn" type="text" @click="clickMenu(item.refPath)">{{ item.label }}</el-button>
</div>
<div class="btn-box">
<div v-for="(item, index) in buttonList" :key="index" class="btn-div" @click="doShow(item.refPath)">
<div class="img">
<el-image
style="width: 83px; height: 83px"
:src="item.imgUrl"
/>
</div>
<div class="text">{{ item.label }}</div>
</div>
</div>
</div>
<DispatchCmd ref="dispatch-cmd" />
<DispatcherLoger ref="dispatcherLoger" />
</div>
</template>
<script>
import DispatchCmd from '@/views/dispatcherStationManage/dispatchCmd';
import DispatcherLoger from '@/jmapNew/theme/datie_02/menus/dispatcherLoger';
import ZhanchangIcon from '@/assets/dispatcherStation/zhanchang.png';
import YunxingIcon from '@/assets/dispatcherStation/yunxing.png';
import CmdIcon from '@/assets/dispatcherStation/cmd.png';
import { getToken } from '@/utils/auth';
import { creatSubscribe, clearSubscribe, getTopic } from '@/utils/stomp';
export default {
name: 'DispatcherStation',
components: {
DispatchCmd,
DispatcherLoger
},
data() {
return {
stationCode:'',
groupModel: '',
hasUnsubscribe:false,
buttonList: [
{
label: '运行图',
refPath: 'dispatcherLoger',
imgUrl: YunxingIcon
},
{
label: '调度命令',
refPath: 'dispatch-cmd',
imgUrl: CmdIcon
},
{
label: '站场图',
refPath: 'station-map',
imgUrl: ZhanchangIcon
},
{
label: '数据更新',
refPath: '',
imgUrl: CmdIcon
},
{
label: '时间同步',
refPath: '',
imgUrl: CmdIcon
}
],
menuList: [
{
label: '登录(L)',
refPath: ''
},
{
label: '应用程序(T)',
refPath: ''
}
]
};
},
watch: {
'$store.state.training.prdType': function(prdType, oldPrdType) {
this.changePrdType(prdType, oldPrdType);
}
},
mounted() {
// const _that = this;
// window.onbeforeunload = () => { _that.clearSubscribe(); };
this.groupModel = this.$route.query.group;
// this.subscribe();
},
// beforeDestroy() {
// this.clearSubscribe();
// },
methods: {
doShow(refPath) {
if (!refPath) {
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
return;
}
if (refPath === 'station-map') {
this.$emit('changeShowMap', true);
} else {
this.$refs[refPath].doShow();
}
},
clickMenu(refPath) {
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
changePrdType(prdType, oldPrdType) {
// if (prdType) {
// this.subscribe(prdType);
// }
// if (oldPrdType) {
// this.clearSubscribe(oldPrdType);
// }
if (prdType == '01') {
this.clearSubscribe();
this.hasUnsubscribe = true;
} else if (prdType == '02' && this.hasUnsubscribe) {
this.subscribe();
}
},
async subscribe(prdType) {
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
creatSubscribe(getTopic('CTC', this.$route.query.group), header);
// if (prdType == '02') {
// // creatSubscribe(getTopic('CTC_RAILWAY', this.$route.query.group), header);
// } else if (prdType == '01') {
// // creatSubscribe(getTopic('CTC', this.$route.query.group), header);
// }
},
clearSubscribe(prdType) {
// if (prdType == '02') {
// // clearSubscribe(getTopic('CTC_RAILWAY', this.groupModel));
// } else if (prdType == '01') {
clearSubscribe(getTopic('CTC', this.groupModel));
// }
}
}
};
</script>
<style lang="scss" scoped>
.dispatcher-station{
height: 100%;
width: 100%;
overflow: hidden;
background: #E1EDF9;
.station-title {
height: 30px;
padding: 0 10px;
line-height: 30px;
width: 100%;
}
.main {
margin: 5px;
height: calc(100% - 40px);
border: 1px solid #000;
background: #C0C0C0;
.menu-list {
width: 100%;
padding-left: 50px;
background: #D9DFF0;
.el-button {
padding: 5px;
}
}
.btn-box {
height: 100%;
border-top: 2px solid #808080;
display: flex;
justify-content: space-around;
padding: 20px 10px;
.btn-div {
width: 120px;
height: 100px;
text-align: center;
.text {
font-weight: bold;
text-align: center;
}
&:hover {
cursor: pointer;
}
}
}
}
}
</style>
<style>
.chengdou-03__systerm {
overflow: hidden !important;
}
.chengdou-03__systerm .el-dialog {
background: #0055E8;
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
border: 1px solid rgb(69, 134, 247);
border-radius: 6px;
font-size: 13px !important;
color: #000;
}
.chengdou-03__systerm .el-dialog span {
font-size: 13px !important;
line-height: 22px;
}
.chengdou-03__systerm .el-dialog span .el-icon-arrow-up{
line-height: 18px;
}
.chengdou-03__systerm .el-dialog .el-dialog__footer {
background: #ECE9D8;
opacity: 1;
}
.chengdou-03__systerm .el-dialog .el-dialog__body {
padding: 20px;
margin: 0px 3px 3px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #ECE9D8;
opacity: 1;
}
.chengdou-03__systerm .el-dialog .el-dialog__title {
font-size: 16px;
color: #fff;
position: absolute;
top: 4px;
left: 7px;
}
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 6px;
right: 3px;
line-height: 16px;
}
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.chengdou-03__systerm .el-dialog .el-button {
height: 24px;
line-height: 22px;
padding: 0px;
width: 80px;
border: 2px outset #E2E2E2;
border-radius: 4px !important;
color: #000;
background: #F0F0F0;
}
.chengdou-03__systerm .el-dialog .expand {
width: 120px;
}
.chengdou-03__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.chengdou-03__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.chengdou-03__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.chengdou-03__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.chengdou-03__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
height: 22px !important;
line-height: 22px !important;
}
.chengdou-03__systerm .el-dialog .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
height: 22px !important;
line-height: 22px !important;
}
.chengdou-03__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.chengdou-03__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.chengdou-03__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.chengdou-03__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.chengdou-03__systerm .el-dialog .el-table--border th.gutter {
background: #EBEADB !important;
}
.chengdou-03__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.chengdou-03__systerm .el-dialog .el-table .cell {
height: 22px;
line-height: 22px;
}
.chengdou-03__systerm .el-dialog .el-table th.is-leaf {
background: #F0F0F0 !important;
border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.chengdou-03__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.chengdou-03__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.chengdou-03__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.chengdou-03__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.chengdou-03__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.chengdou-03__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.chengdou-03__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.chengdou-03__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.chengdou-03__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
position: absolute;
-webkit-box-sizing: content-box;
box-sizing: content-box;
content: "";
border: 1px solid #000;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
top: 1px;
}
.chengdou-03__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.chengdou-03__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.chengdou-03__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.chengdou-03__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
width: 4px;
height: 4px;
border-radius: 100%;
background-color: #000 !important;
position: absolute;
left: 50%;
top: 50%;
}
.chengdou-03__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.chengdou-03__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.chengdou-03__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
</style>

View File

@ -19,6 +19,9 @@
<atr-dialog ref="atrDialog" /> <atr-dialog ref="atrDialog" />
<train-trunk-detail ref="trainTrunkDetail" @openTra="openTra" /> <train-trunk-detail ref="trainTrunkDetail" @openTra="openTra" />
</div> </div>
<div v-if="lineCode === '16'" v-show="prdType === '02'&& !showMap">
<dispatcher-station ref="dispatcherStation" @changeShowMap="changeShowMap" />
</div>
<menu-demon-joint <menu-demon-joint
ref="demonMenu" ref="demonMenu"
:group="group" :group="group"
@ -53,6 +56,7 @@
@runPlanLoadShow="runPlanLoadShow" @runPlanLoadShow="runPlanLoadShow"
@faultChooseShow="faultChooseShow" @faultChooseShow="faultChooseShow"
@switchStationMode="switchStationMode" @switchStationMode="switchStationMode"
@changeShowMap="changeShowMap"
/> />
<join-fault-choose ref="faultChoose" :group="group" :offset="offset" /> <join-fault-choose ref="faultChoose" :group="group" :offset="offset" />
<join-run-plan-Load ref="runPlanLoad" :group="group" /> <join-run-plan-Load ref="runPlanLoad" :group="group" />
@ -105,6 +109,7 @@ import TtlDialog from '@/views/newMap/displayBaSiDi/ttl';
import TmtDialog from '@/views/newMap/displayBaSiDi/tmt'; import TmtDialog from '@/views/newMap/displayBaSiDi/tmt';
import AtrDialog from '@/views/newMap/displayBaSiDi/atr'; import AtrDialog from '@/views/newMap/displayBaSiDi/atr';
import TrainTrunkDetail from '@/views/newMap/displayBaSiDi/trainTrunkDetail'; import TrainTrunkDetail from '@/views/newMap/displayBaSiDi/trainTrunkDetail';
import DispatcherStation from './dispatcherStation';
import Vue from 'vue'; import Vue from 'vue';
export default { export default {
@ -132,7 +137,8 @@ export default {
TtlDialog, TtlDialog,
TmtDialog, TmtDialog,
AtrDialog, AtrDialog,
TrainTrunkDetail TrainTrunkDetail,
DispatcherStation
}, },
data() { data() {
return { return {
@ -160,7 +166,8 @@ export default {
deviceif:false, deviceif:false,
deviceShow: true, deviceShow: true,
centralizedStationMap: {}, centralizedStationMap: {},
selfJmap: null selfJmap: null,
showMap: false
}; };
}, },
computed: { computed: {
@ -192,7 +199,7 @@ export default {
return getSessionStorage('project'); return getSessionStorage('project');
}, },
specialDispatch() { specialDispatch() {
return this.lineCode === '14' && this.$store.state.training.prdType === '02'; return (this.lineCode === '14' && this.$store.state.training.prdType === '02') || (this.lineCode === '16' && this.$store.state.training.prdType === '02' && !this.showMap);
}, },
isRunPlan() { isRunPlan() {
return this.$store.state.training.started; return this.$store.state.training.started;
@ -306,6 +313,9 @@ export default {
if (menuBottom && buttonWidth < 780) { if (menuBottom && buttonWidth < 780) {
this.offsetBottom = (menuBottom.offsetHeight || 0) + 15; this.offsetBottom = (menuBottom.offsetHeight || 0) + 15;
} }
if (this.$route.query.lineCode === '16' && this.$store.state.training.prdType === '02') {
this.offset = 35;
}
}); });
}, },
// //
@ -453,6 +463,26 @@ export default {
this.jl3dmaintainershow = false; this.jl3dmaintainershow = false;
this.drivingShow = false; this.drivingShow = false;
break; break;
case 'STATION_ASSISTANT':
if (this.selfJmap) { Vue.prototype.$jlmap = this.selfJmap; }
this.$store.dispatch('training/setPrdType', '01');
this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT');
this.$refs.menuSchema.chiShowStation = deviceCode;
this.showStation = deviceCode;
if (this.lineCode === '14') {
const list = [];
const mapDevice = this.$store.state.map.mapDevice;
this.$jlmap.setMap(this.$store.state.map.map, this.$store.state.map.mapDevice, {routeDate: this.$store.state.map.routeData, autoReentryData: this.$store.state.map.autoReentryData});
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.$jlmap.updateShowMode(list, '02');
}
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
this.mapViewLoadedOver && this.switchStationMode(deviceCode);
this.jl3dmaintainershow = false;
this.drivingShow = false;
break;
case 'DEPOT_DISPATCHER': case 'DEPOT_DISPATCHER':
this.$store.dispatch('training/setPrdType', '09'); this.$store.dispatch('training/setPrdType', '09');
this.$store.dispatch('training/setRoles', 'DEPOT_DISPATCHER'); this.$store.dispatch('training/setRoles', 'DEPOT_DISPATCHER');
@ -490,16 +520,16 @@ export default {
this.mapViewLoadedOver && this.setShowStation(''); this.mapViewLoadedOver && this.setShowStation('');
this.drivingShow = false; this.drivingShow = false;
break; break;
case 'RAIL_CTC': case 'RAIL_CTC':
this.$store.dispatch('training/setPrdType', '10'); this.$store.dispatch('training/setPrdType', '10');
this.$store.dispatch('training/setRoles', 'RAIL_CTC'); this.$store.dispatch('training/setRoles', 'RAIL_CTC');
this.$refs.menuSchema.chiShowStation = deviceCode; this.$refs.menuSchema.chiShowStation = deviceCode;
this.showStation = deviceCode; this.showStation = deviceCode;
this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]); this.$jlmap.amendDevice([...this.sectionList, ...this.signalList, ...this.trainWindowList]);
this.mapViewLoadedOver && this.switchStationMode(deviceCode); this.mapViewLoadedOver && this.switchStationMode(deviceCode);
this.jl3dmaintainershow = false; this.jl3dmaintainershow = false;
this.drivingShow = false; this.drivingShow = false;
break; break;
default: default:
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setPrdType', '');
this.$store.dispatch('training/setRoles', 'AUDIENCE'); this.$store.dispatch('training/setRoles', 'AUDIENCE');
@ -590,7 +620,7 @@ export default {
if (this.$store.state.training.prdType == '04') { if (this.$store.state.training.prdType == '04') {
this.panelShow = false; this.panelShow = false;
this.drivingShow = true; this.drivingShow = true;
this.$refs.Jl3dDrive.show(this.mapId, this.group, 34, 'isTraining'); this.$refs.Jl3dDrive.show(this.mapId, this.group, 34, 'isTraining', this.deviceCode);
} else { } else {
const routeData = this.$router.resolve({ const routeData = this.$router.resolve({
path:'/jlmap3d/sandbox', path:'/jlmap3d/sandbox',
@ -709,6 +739,9 @@ export default {
openTrainTrunkDetail(index) { openTrainTrunkDetail(index) {
this.$refs.trainTrunkDetail.doShow(index); this.$refs.trainTrunkDetail.doShow(index);
}, },
changeShowMap(flag) {
this.showMap = flag;
},
openTra() { openTra() {
this.$refs.traDialog.doShow(); this.$refs.traDialog.doShow();
}, },
@ -720,8 +753,8 @@ export default {
} else if (item.messageType === 'PLAY_CHANGE' && item.userId == this.userId) { } else if (item.messageType === 'PLAY_CHANGE' && item.userId == this.userId) {
this.userRole = item.type || 'AUDIENCE'; this.userRole = item.type || 'AUDIENCE';
this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode); this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode);
this.setSimulationPrdType(this.centralizedStationMap[item.deviceCode]);
this.deviceCode = item.deviceCode; this.deviceCode = item.deviceCode;
this.setSimulationPrdType(this.centralizedStationMap[item.deviceCode]);
this.$nextTick(() => { this.$nextTick(() => {
if (item.deviceCode && this.$store.state.training.prdType !== '09') { this.setCenter(item.deviceCode); } if (item.deviceCode && this.$store.state.training.prdType !== '09') { this.setCenter(item.deviceCode); }
}); });

View File

@ -113,10 +113,13 @@ export default {
}, { }, {
labelName: '车辆段', labelName: '车辆段',
children: [] children: []
},{ }, {
labelName: 'CTC操作员', labelName: 'CTC操作员',
children: [] children: []
}] }, {
labelName: '车站助理',
children: []
}]
}; };
}, },
computed: { computed: {
@ -150,6 +153,7 @@ export default {
const driverList = []; const driverList = [];
const maintainerList = []; const maintainerList = [];
const ctcOperatorList = []; const ctcOperatorList = [];
const stationAssistantList = [];
val.forEach(item => { val.forEach(item => {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode); const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
switch (item.type) { switch (item.type) {
@ -177,10 +181,14 @@ export default {
this.memberData[item.id].labelName = '通号' + (item.name || ''); this.memberData[item.id].labelName = '通号' + (item.name || '');
maintainerList.push(this.memberData[item.id]); maintainerList.push(this.memberData[item.id]);
break; break;
case 'RAIL_CTC': case 'RAIL_CTC':
this.memberData[item.id].labelName = 'CTC操作员' + device.name; this.memberData[item.id].labelName = 'CTC操作员' + device.name;
ctcOperatorList.push(this.memberData[item.id]); ctcOperatorList.push(this.memberData[item.id]);
break break;
case 'STATION_ASSISTANT':
this.memberData[item.id].labelName = '车站助理' + +device.name + (item.name ? `-${item.name }` : '');
stationAssistantList.push(this.memberData[item.id]);
break;
} }
}); });
this.treeData = [{ this.treeData = [{
@ -208,10 +216,14 @@ export default {
id: 'electricDispatcher', id: 'electricDispatcher',
children: electricDispatcherList children: electricDispatcherList
}, { }, {
labelName: 'CTC操作员', labelName: 'CTC操作员',
id: 'ctcOperator', id: 'ctcOperator',
children: ctcOperatorList children: ctcOperatorList
} }, {
labelName: '车站助理',
id: 'stationAssistant',
children: stationAssistantList
}
]; ];
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.tree) { if (this.$refs.tree) {

View File

@ -129,9 +129,9 @@ export default {
lineCode() { lineCode() {
return this.$route.query.lineCode; return this.$route.query.lineCode;
}, },
datie(){ datie() {
return this.$route.query.lineCode == '16' return this.$route.query.lineCode == '16';
}, },
mapId() { mapId() {
return this.$route.query.mapId; return this.$route.query.mapId;
}, },
@ -306,6 +306,10 @@ export default {
this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR'); this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
this.$emit('getUserRole'); this.$emit('getUserRole');
break; break;
case 'STATION_ASSISTANT':
this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'STATION_ASSISTANT');
this.$emit('getUserRole');
break;
case 'CI': case 'CI':
this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'CI'); this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'CI');
this.$emit('getUserRole'); this.$emit('getUserRole');

View File

@ -13,8 +13,11 @@
/> />
</el-select> </el-select>
<el-button-group> <el-button-group>
<el-button v-if="isCtc" size="small" @click="showLineBoard">占线板</el-button> <el-button v-if="userRole=== 'STATION_SUPERVISOR'&&$route.query.lineCode ==='16'" size="small" @click="goCtc">车务终端</el-button>
<el-button v-if="userRole=== 'STATION_SUPERVISOR' && !$route.query.projectDevice && $route.query.lineCode!='08'" size="small" @click="goIbp">IBP盘</el-button> <el-button v-if="$route.query.lineCode ==='16'&&$store.state.training.prdType === '01'" size="small" @click="showTrainTicket">路票</el-button>
<el-button v-if="$route.query.lineCode === '16'&&$store.state.training.prdType ==='01'" size="small" @click="showRegisterBook">簿册</el-button>
<el-button v-if="showDispatcherStation" size="small" @click="changeShowMap">调度台</el-button>
<el-button v-if="ibpShow" size="small" @click="goIbp">IBP盘</el-button>
<el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice && hasBigScreen" size="small" @click="goBigScreen">大屏</el-button> <el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice && hasBigScreen" size="small" @click="goBigScreen">大屏</el-button>
<el-button v-if="(userRole==='DISPATCHER' || userRole=== 'STATION_SUPERVISOR') && !$route.query.projectDevice && iscsShow" size="small" @click="goIscs">ISCS</el-button> <el-button v-if="(userRole==='DISPATCHER' || userRole=== 'STATION_SUPERVISOR') && !$route.query.projectDevice && iscsShow" size="small" @click="goIscs">ISCS</el-button>
<el-button v-if="running && !dataError && $route.query.type !== 'ILW' && !datie" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button> <el-button v-if="running && !dataError && $route.query.type !== 'ILW' && !datie" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
@ -24,13 +27,14 @@
</template> </template>
</el-button-group> </el-button-group>
<el-button v-if="(isAdmin || $route.query.type === 'ILW') && !dataError && !isScreen" size="small" :type="faultMode ? '' : 'primary' " @click="changeOperateMode()">{{ faultMode?' 切换到普通模式[Tab]':'切换到故障模式[Tab]' }}</el-button> <el-button v-if="(isAdmin || $route.query.type === 'ILW') && !dataError && !isScreen" size="small" :type="faultMode ? '' : 'primary' " @click="changeOperateMode()">{{ faultMode?' 切换到普通模式[Tab]':'切换到故障模式[Tab]' }}</el-button>
<!-- isCenter && !dataError && !isAdmin 此判断用于以后(目前 暂时不用)786 --> <!-- isCenter && !dataError && !isAdmin 此判断用于以后(目前 暂时不用) -->
<el-button v-if="isShowDirective" size="small" :type="directiveMode ? 'primary' : ''" @click="changeDirectiveMode()">{{ directiveMode? '切换到普通模式[Tab]':'切换到指令模式[Tab]' }}</el-button> <el-button v-if="isShowDirective" size="small" :type="directiveMode ? 'primary' : ''" @click="changeDirectiveMode()">{{ directiveMode? '切换到普通模式[Tab]':'切换到指令模式[Tab]' }}</el-button>
</div> </div>
<!-- running && --> <!-- running && -->
<join-run-plan-view v-if="!dataError" ref="runPlanView" :group="group" /> <join-run-plan-view v-if="!dataError" ref="runPlanView" :group="group" />
<select-ibp ref="selectIbp" /> <select-ibp ref="selectIbp" />
<line-board ref="lineBoard" /> <train-ticket ref="trainTicket" />
<register-book ref="registerBook" />
</div> </div>
</template> </template>
@ -46,13 +50,16 @@ import { loadRunPlanData } from '@/utils/loaddata';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import { timesSpeedPlayback } from '@/api/rtSimulation'; import { timesSpeedPlayback } from '@/api/rtSimulation';
import { queryHasIscs } from '@/api/iscs'; import { queryHasIscs } from '@/api/iscs';
import LineBoard from '../displayCity/lineBoard'; import { getToken } from '@/utils/auth';
import TrainTicket from '../trainTicket/index';
import RegisterBook from '../registerBook/index';
export default { export default {
name: 'MenuDemonSchema', name: 'MenuDemonSchema',
components:{ components:{
JoinRunPlanView, JoinRunPlanView,
SelectIbp, SelectIbp,
LineBoard TrainTicket,
RegisterBook
}, },
props: { props: {
group: { group: {
@ -141,9 +148,6 @@ export default {
datie() { datie() {
return this.$route.query.lineCode == '16'; return this.$route.query.lineCode == '16';
}, },
isCtc() {
return !!this.$route.query.ctc;
},
isScreen() { isScreen() {
return this.$store.state.training.prdType === '07'; return this.$store.state.training.prdType === '07';
}, },
@ -158,6 +162,13 @@ export default {
}, },
isSystemAdmin() { isSystemAdmin() {
return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05'); return this.$store.state.user.roles.includes('04') || this.$store.state.user.roles.includes('05');
},
showDispatcherStation() {
return this.$route.query.lineCode === '16' && this.$store.state.training.prdType === '02';
},
ibpShow() {
const lineCodeList = ['08', '16'];
return this.userRole === 'STATION_SUPERVISOR' && !this.$route.query.projectDevice && !lineCodeList.includes(this.$route.query.lineCode);
} }
}, },
watch: { watch: {
@ -244,6 +255,24 @@ export default {
} }
this.$store.dispatch('training/changeOperateMode', { mode: mode }); this.$store.dispatch('training/changeOperateMode', { mode: mode });
}, },
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');
},
changeDirectiveMode() { // changeDirectiveMode() { //
this.directiveMode = !this.directiveMode; this.directiveMode = !this.directiveMode;
let mode = OperateMode.NORMAL; let mode = OperateMode.NORMAL;
@ -313,8 +342,14 @@ export default {
this.$message.error('设置倍速失败!'); this.$message.error('设置倍速失败!');
}); });
}, },
showLineBoard() { showTrainTicket() {
this.$refs.lineBoard.doShow(); this.$refs.trainTicket.doShow();
},
showRegisterBook() {
this.$refs.registerBook.doShow();
},
changeShowMap() {
this.$emit('changeShowMap', false);
}, },
// ibp // ibp
goIbp() { goIbp() {

View File

@ -0,0 +1,660 @@
<template>
<transition name="el-zoom-in-center">
<div class="mapPaint">
<div v-show="maskOpen" class="mask" />
<div class="map-view">
<div class="operation_box" :class="{'rightShow': draftShow}">
<el-button-group>
<el-button size="small" :disabled="!stepData.length" @click="revocation">撤销</el-button>
<el-button size="small" :disabled="!recoverStepData.length" @click="recover">恢复</el-button>
</el-button-group>
</div>
<div class="operation_box back_box">
<el-button size="small" @click="backRoute">返回</el-button>
<el-button size="small" style="margin-left: 5px;" @click="updateObjAxis">更新坐标</el-button>
</div>
<jlmap-visual ref="jlmapVisual" :draft-show="draftShow" @onSelect="clickEvent" @onMenu="onContextmenu" />
</div>
<div class="map-draft" :class="{'hide': draftShow}">
<div class="btn_left_box" @click="clickRightBtn"><i :class="draftShow?'el-icon-arrow-right':'el-icon-arrow-left'" /></div>
<div class="box">
<map-operate
ref="mapOperate"
:map-info="mapInfo"
:selected="selected"
:map-saveing="mapSaveing"
@saveMapEvent="saveMapEvent"
@updateMapModel="updateMapModel"
@setCenter="setCenter"
/>
</div>
</div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</transition>
</template>
<script>
import { saveMap, verifyMap, getMapDetail, postBuildMapImport, getRouteNewList, getAutoReentryList } from '@/api/jmap/mapdraft';
import { ViewMode, TrainingMode, getDeviceMenuByDeviceType, DeviceMenu } from '@/scripts/ConstDic';
import JlmapVisual from '@/views/newMap/jlmapNew/index';
import MapOperate from './mapoperate/index';
import { EventBus } from '@/scripts/event-bus';
import { mapGetters } from 'vuex';
import PopMenu from '@/components/PopMenu';
export default {
name: 'MapView',
components: {
JlmapVisual,
MapOperate,
PopMenu
},
data() {
return {
viewSelect: ViewMode.MIX,
mapSaveing: false,
ViewMode: ViewMode,
viewDraft: 'draft',
autoSaveTask: null,
selected: null,
mapInfo: { name: this.$t('map.pleaseSelectMap') },
oldDevice: null,
draftShow: false,
size: {
width: document.documentElement.clientWidth - 521,
height: document.documentElement.clientHeight - 90
},
updtModel: {
code: '',
scaling: '',
origin: {
x: '',
y: ''
}
},
menu: [],
menuNormal: []
};
},
computed: {
...mapGetters('map', [
'stepData',
'recoverStepData',
'stationList'
]),
maskOpen() {
return this.$store.state.config.maskOpen;
}
},
watch: {
'$store.state.map.mapDataLoadedCount': function () {
this.initAutoSaveTask();
},
'$store.state.app.windowSizeCount': function() {
this.setWindowSize();
},
$route() {
this.clearAutoSave();
this.$nextTick(() => {
this.loadInitPage();
});
},
'$store.state.menuOperation.menuCount': function () {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.popDoShow(this.$store.state.menuOperation.menuPosition);
} else {
this.popDoClose();
}
}
},
mounted() {
this.setWindowSize();
this.loadInitPage();
EventBus.$on('SELECTON', () => {
this.selected = null;
});
},
beforeDestroy() {
EventBus.$off('SELECTON');
this.clearAutoSave();
this.$store.dispatch('map/mapClear');
},
methods: {
clickRightBtn() {
this.draftShow = !this.draftShow;
},
getMapOrigin() {
const dataZoom = this.$store.state.map.dataZoom;
if (dataZoom && dataZoom.offsetX) {
this.updtModel.origin.x = Number.parseInt(dataZoom.offsetX);
this.updtModel.origin.y = Number.parseInt(dataZoom.offsetY);
this.updtModel.scaling = dataZoom.scaleRate;
}
},
//
mapLocation(item) {
if (item) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
this.popDoClose();
}
},
initMenu() {
this.menuNormal = [];
this.stationList.forEach(station => {
if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
const node = {
label: station.name,
children: []
};
station.chargeStationCodeList.forEach(item => {
const next = this.$store.getters['map/getDeviceByCode'](item);
node.children.push({
code: next.code,
label: next.name,
handler: this.mapLocation
});
});
this.menuNormal.push(node);
}
});
this.menu = [...this.menuNormal];
},
popDoShow(point) {
this.popClickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
popClickEvent() {
const self = this;
window.onclick = function () {
self.popDoClose();
};
},
popDoClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
updateObjAxis() {
this.getMapOrigin();
this.$confirm('您确认按当前绘图位置更新坐标及缩放比例?', this.$t('tip.hint'), {
confirmButtonText: this.$t('tip.confirm'),
cancelButtonText: this.$t('tip.cancel'),
type: 'warning'
}).then(() => {
const map = this.$store.state.map.map;
this.$store.dispatch('map/saveMapDeviceDefaultRelations').then(() => {
const param = {
mapId: this.$route.params.mapId,
skinVO: {
code: this.$store.state.map.map.skinVO.code,
name: this.$store.state.map.map.skinVO.name
},
origin: {
x: this.updtModel.origin.x || map.origin.x,
y: this.updtModel.origin.y || map.origin.y
},
scaling: this.updtModel.scaling
};
saveMap(Object.assign(map, param)).then(() => {
this.$message.success(this.$t('map.updateSuccessfully'));
}).catch(() => {
this.$messageBox(this.$t('map.updateFailed'));
});
});
}).catch(() => { });
},
setWindowSize() {
this.$nextTick(() => {
const width = this.$store.state.app.width;
const height = this.$store.state.app.height - 90;
this.$store.dispatch('config/resize', { width, height });
});
},
endViewLoading(isSuccess) {
if (!isSuccess) {
this.$store.dispatch('map/mapClear');
}
this.$nextTick(() => {
EventBus.$emit('viewLoading', false);
});
},
loadInitPage() {
this.$store.dispatch('training/changeMode', { mode: TrainingMode.MAP_EDIT });
this.$store.commit('map/clearStepData'); //
this.mapInfo = { name: this.$t('map.pleaseSelectMap'), id: this.$route.params.mapId };
if (parseInt(this.mapInfo.id)) {
this.mapInfo.name = this.$route.query.name;
getMapDetail(this.$route.params.mapId).then(response => {
this.$store.dispatch('map/setMapData', response.data).then(() => {
this.$store.dispatch('training/setMapDefaultState');
});
this.initAutoSaveTask();
}).catch((error) => {
console.log(error, '加载地图错误提示');
this.$message.error(this.$t('tip.failedLoadMap'));
this.endViewLoading();
});
} else {
this.endViewLoading();
}
},
initAutoSaveTask() {
const timeout = 1000 * 60 * 3;
this.clearAutoSave(this.autoSaveTask);
if (this.viewDraft === 'draft') {
this.autoSaveTask = setInterval(this.saveMapEvent, timeout);
}
},
clearAutoSave() {
if (this.autoSaveTask) {
clearInterval(this.autoSaveTask);
this.autoSaveTask = null;
}
},
handleSelectControlPage (model) {
if (this.$refs.mapOperate) {
this.$refs.mapOperate.handleSelectControlPage(model);
this.$store.dispatch('menuOperation/setMapDrawSelectCount');
}
},
handleSelectPhysicalView(handle) {
if (this.$refs.jlmapVisual) {
this.$refs.jlmapVisual.setLevelVisible(handle);
}
},
clickEvent(em) {
const device = this.getDeviceByEm(em);
this.deviceHighLight(this.oldDevice, false);
this.deviceHighLight(device, true);
this.oldDevice = device;
this.onSelect(device);
},
//
getDeviceByEm(em) {
var device = this.$store.getters['map/getDeviceByCode'](em.deviceCode) || null;
if (device) {
device._viewVal = em.val;
}
return device;
},
onSelect(device) {
this.selected = device || null;
this.selected && this.handleSelectControlPage(device);
},
onContextmenu(em) {
this.point = {
x: em.clientX,
y: em.clientY
};
if (!em.deviceType) {
var menu = getDeviceMenuByDeviceType('Cancel');
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
}
},
verifySectionPoint(map) { //
let flag = true;
map.sectionList.forEach(elem => {
if (elem.points.length > 0) {
for (let index = 0; index < elem.points.length; index++) {
if (String(elem.points[index].x) === 'undefined' || String(elem.points[index].y) === 'undefined') {
this.$message(`${elem.name}${this.$t('tip.sectionPointsDeficiency')}`);
flag = false;
}
}
} else {
this.$message(this.$t('tip.sectionPointsDeficiency'));
flag = false;
}
});
return flag;
},
verifySectionRelation(map) {
let flag = true;
const tipInfoList = [];
map.sectionList.forEach(section => {
section.type === '01' && map.sectionList.forEach(item => {
if (section.code !== item.code && item.type === '01' && this.checkSectionPointsHasCoincide(section.points, item.points) && !this.checkCorrelation(section, item)) {
tipInfoList.push('区段' + section.name + '(' + section.code + '): 或者区段' + item.name + '(' + item.code + ')' + '关联关系设置错误!' );
}
});
});
if (!tipInfoList.length) {
flag = true;
} else {
flag = false;
this.$messageBox(this.$t('tip.dataValidationFailed'));
this.tableToExcel(tipInfoList);
}
return flag;
},
async verifyInterlockDevice(map) {
let flag = true;
const tipInfoList = [];
const routeCodeList = [];
const cycleCodeList = [];
const resp1 = await getRouteNewList(this.$route.params.mapId, {pageSize:9999, pageNum:1});
if (resp1.data && resp1.data.list) {
resp1.data.list.forEach(item => {
routeCodeList.push(item.code);
});
}
const resp2 = await getAutoReentryList(this.$route.params.mapId, {pageSize:9999, pageNum:1});
if (resp2.data && resp2.data.list) {
resp2.data.list.forEach(item => {
cycleCodeList.push(item.code);
});
}
map.cycleButtonList.forEach(cycleButton => {
if (!cycleCodeList.includes(cycleButton.cycleCode)) {
flag = false;
tipInfoList.push('自动折返功能按钮' + cycleButton.name + '(' + cycleButton.code + ')' + '的关联自动折返数据不存在!');
}
});
map.automaticRouteButtonList.forEach(routeButton => {
if (!routeCodeList.includes(routeButton.automaticRouteCode)) {
flag = false;
tipInfoList.push('自动进路功能按钮' + routeButton.name + '(' + routeButton.code + ')' + '的关联进路数据不存在!');
}
});
if (!flag) {
this.$messageBox(this.$t('tip.dataValidationFailed'));
this.tableToExcel(tipInfoList);
}
return flag;
},
verifyStationPosition(map) {
let flag = true;
const tipInfoList = [];
map.stationStandList.forEach(stationStand => {
const section = this.$store.getters['map/getDeviceByCode'](stationStand.standTrackCode);
const list = [];
section && section.points.forEach(point => {
list.push(point.x);
});
if (stationStand.position.x > Math.max(...list) || stationStand.position.x < Math.min(...list)) {
flag = false;
tipInfoList.push('站台' + stationStand.name + '(' + stationStand.code + ')' + '位置偏移出关联站台轨,请检查关联站台轨是否正确!');
}
});
if (!flag) {
this.$messageBox(this.$t('tip.dataValidationFailed'));
this.tableToExcel(tipInfoList);
}
return flag;
},
verifySignalPosition(map) {
let flag = true;
const tipInfoList = [];
map.signalList.forEach(signal => {
const section = this.$store.getters['map/getDeviceByCode'](signal.sectionCode);
if (section) {
const offsetX = signal.positionPoint ? signal.positionPoint.x : 0;
const signalPositionX = signal.position.x - offsetX;
const max = Math.max(section.points[section.points.length - 1].x, section.points[0].x);
const min = Math.min(section.points[section.points.length - 1].x, section.points[0].x);
if (signalPositionX < min && signalPositionX > max) {
tipInfoList.push('信号机' + signal.name + '(' + signal.code + ')未在其关联的区段' + section.name + '(' + section.code + ')里');
}
} else {
tipInfoList.push('信号机' + signal.name + '(' + signal.code + ')所关联的区段不存在');
}
});
if (!tipInfoList.length) {
flag = true;
} else {
flag = false;
this.$messageBox(this.$t('tip.dataValidationFailed'));
this.tableToExcel(tipInfoList);
}
return flag;
},
checkPointsCoincide(point1, point2) { //
if (point1 && point2) {
return point1.x === point2.x && point1.y === point2.y;
}
return false;
},
checkSectionPointsHasCoincide(points1, points2) { //
return points1.length && points2.length && (this.checkPointsCoincide(points1[0], points2[0]) || this.checkPointsCoincide(points1[0], points2[points2.length - 1]) || this.checkPointsCoincide(points1[points1.length - 1], points2[points2.length - 1]) || this.checkPointsCoincide(points1[points1.length - 1], points2[0]));
},
checkCorrelation(section1, section2) { //
return section1.leftSectionCode === section2.code || section1.rightSectionCode === section2.code;
},
saveMapEvent() { //
const map = this.$store.state.map.map;
if (this.$refs.jlmapVisual && map && parseInt(this.$route.params.mapId)) {
this.mapSaveing = true;
this.$store.dispatch('map/saveMapDeviceDefaultRelations').then(() => { // 稿
saveMap(Object.assign(map, { mapId: this.$route.params.mapId })).then(() => {
this.$message.success(this.$t('tip.saveSuccessfully'));
this.mapSaveing = false;
this.initAutoSaveTask();
}).catch(error => {
console.log(error);
this.$messageBox(this.$t('tip.saveFailed'));
this.mapSaveing = false;
if (error.code === 40004 || error.code === 40005 || error.code === 40003) {
this.clearAutoSave();
} else {
this.initAutoSaveTask();
}
});
}).catch(error => {
console.log(error, '错误提示');
this.mapSaveing = false;
this.$message(this.$t('tip.saveFailed'));
});
}
},
async checkOver() {
if (this.$refs.jlmapVisual) {
const map = this.$store.state.map.map;
if (map && this.$route.params.mapId) {
const checkInterlockDevice = await this.verifyInterlockDevice(map);
if (this.verifySectionRelation(map) && this.verifySignalPosition(map) && checkInterlockDevice && this.verifyStationPosition(map)) {
verifyMap(this.$route.params.mapId).then(res => {
if (res.data.length) {
this.tableToExcel(res.data);
this.$messageBox(this.$t('tip.dataValidationFailed'));
} else {
this.$message.success(this.$t('tip.dataValidationSuccess'));
}
}).catch(() => {
this.$message.error(this.$t('tip.requestFailed'));
});
}
}
}
},
tableToExcel(data) {
const filterVal = ['index'];
const arr = [];
data.forEach(item => {
arr.push({ index: item });
});
const dataList = this.formatJson(filterVal, arr);
import('@/utils/Export2Excel').then(excel => { excel.export_json_to_excel([this.$t('tip.dataQuestion')], dataList, this.$t('tip.dataList')); });
},
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => v[j]));
},
backRoute() {
this.$router.push({ path: `/design/usermap/home` });
},
updateMapModel(models) { //
this.$store.dispatch('map/updateSystemMapDevices', models);
},
//
revocation() {
this.$store.dispatch('map/setRevocation');
},
//
recover() {
this.$store.dispatch('map/setRecover');
},
//
setCenter(code) {
this.$refs.jlmapVisual.setCenter(code);
const device = this.$store.getters['map/getDeviceByCode'](code);
this.deviceHighLight(this.oldDevice, false);
this.deviceHighLight(device, true);
this.oldDevice = device;
},
createMap() {
this.$refs.mapCreate.show();
},
importf() { // jsons
const loading = this.$loading({
lock: true,
text: '正在导入中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
setTimeout(() => {
const obj = this.$refs.files;
if (!obj.files) return;
const f = obj.files[0];
const reader = new FileReader();
const that = this;
reader.readAsText(f, 'utf-8');
reader.onload = function(e) {
const data = e.target.result;
postBuildMapImport(JSON.parse(data)).then(() => {
loading.close();
that.$message.success('导入成功!');
that.refresh();
loading.close();
}).catch(error => {
loading.close();
that.$message.error('导入失败' + error.message);
});
obj.value = '';
};
});
},
//
deviceHighLight(device, flag) {
if (device && device.instance && typeof device.instance.drawSelected === 'function' ) {
if (device._type === 'Section' && device.type === '04') {
device.relevanceSectionList.forEach(item => {
const sectionModel = this.$store.getters['map/getDeviceByCode'](item);
sectionModel && sectionModel.instance.drawSelected(flag);
});
} else if (device._type === 'Section' && device.type === '01' && device.logicSectionCodeList && device.logicSectionCodeList.length) {
device.logicSectionCodeList.forEach(item => {
const sectionModel = this.$store.getters['map/getDeviceByCode'](item);
sectionModel && sectionModel.instance.drawSelected(flag);
});
} else {
device.instance.drawSelected(flag);
}
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ {
.menu-item{
background: #f1ecec;
.pop-menu {
background: #5F9EA0;
}
}
}
.mask{
opacity: 0;
background: #000;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 9;
}
.operation_box{
position: absolute;
right: 20px;
top: 15px;
z-index: 9;
&.rightShow{
right: 540px;
}
}
.back_box{
left: 10px;
display: inline-block;
width: 180px;
}
.btn_left_box{
position: absolute;
left: 0;
top: 50%;
padding: 8px 3px;
background: #fff;
z-index: 10;
transform: translateX(-22px);
cursor: pointer;
border-radius: 5px 0 0 5px;
}
.box{
height: 100%;
}
.mapPaint{
height: 100%;
overflow: hidden;
position: relative;
}
.map-view {
float: left;
width: 100%;
position: relative;
}
.map-draft {
width: 520px;
height: 100%;
position: absolute;
right: 0;
transform: translateX(520px);
transition: all 0.5s;
background: #fff;
z-index: 9;
/deep/{
.v-modal{
opacity: 0;
}
}
&.hide{
transform: translateX(0);
}
}
.uploadDemo {
position: relative;
overflow: hidden;
float: right;
padding: 3px 0;
margin-right: 3px;
cursor: pointer;
input {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
opacity: 0;
cursor: pointer;
}
}
</style>

View File

@ -0,0 +1,50 @@
<template>
<div style="height:100%">
<div class="view-control-content">
<config-list ref="createForm" :form="createForm" :form-model="addModel" :rules="createRules" />
</div>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
</el-button-group>
</div>
</div>
</template>
<script>
import ConfigList from '../config/list';
export default {
name:'CreateOperate',
components: {
ConfigList
},
props:{
createForm:{
type:Object,
required:true
},
addModel:{
type:Object,
required:true
},
createRules:{
type:Object,
required:true
}
},
methods:{
create() {
this.$refs['createForm'].validate((valid) => {
if (valid) {
this.$emit('create');
}
});
},
resetFields() {
this.$refs.createForm && this.$refs.createForm.resetFields();
},
resetForm() {
this.$refs.createForm.resetForm();
}
}
};
</script>

View File

@ -0,0 +1,67 @@
<template>
<div style="height:100%">
<div class="view-control-content">
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
</div>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
</el-button-group>
</div>
</div>
</template>
<script>
import ConfigList from '../config/list';
export default {
name:'OperateProperty',
components: {
ConfigList
},
props:{
form:{
type:Object,
required:true
},
editModel:{
type:Object,
required:true
},
rules:{
type:Object,
required:true
},
type:{
type:String,
required:true
}
},
data() {
return {
isDeleteHide:true
};
},
methods:{
//
edit() {
this.$refs['dataform'].validate((valid) => {
if (valid) {
const data = Object.assign({_type: this.type}, this.editModel);
if (this.type == 'Text') {
data.content = `${this.editModel.prepend}::${this.editModel.content}`;
}
this.$emit('updateMapModel', data);
this.$emit('clearDeviceSelect');
} else {
this.$message('还有属性未填写,修改未生效!');
}
});
},
resetFields() {
this.$refs.dataform && this.$refs.dataform.resetFields();
},
clearValidate() {
this.$refs.dataform && this.$refs.dataform.clearValidate();
}
}
};
</script>

View File

@ -0,0 +1,477 @@
<template>
<el-form ref="form" :label-width="form.labelWidth" size="mini" :rules="rules" :model="formModel" class="form_data">
<template v-for="(items, index) in form.items">
<fieldset v-if="items.item.length" :key="index" :class="items.name?'card':'noCard'">
<legend class="card_title">{{ items.name }}</legend>
<template v-for="item in items.item">
<template v-if="checkFieldType(item, 'select')">
<el-form-item :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
<el-select
v-model="formModel[item.prop]"
filterable
:placeholder="item.placeholder"
:disabled="item.disabled"
:clearable="item.clearable"
@change="((val)=>{deviceChange(val, item)})"
>
<el-option
v-for="option in item.options"
:key="option[item.optionValue]"
:label="handleLabel(option, item.optionLabel)"
:value="option[item.optionValue]"
/>
</el-select>
</el-form-item>
</template>
<template v-if="checkFieldType(item, 'multiSelect')">
<el-form-item :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
<el-select
v-model="formModel[item.prop]"
filterable
multiple
:placeholder="item.placeholder"
:disabled="item.disabled"
:clearable="item.clearable"
@change="((val)=>{deviceChange(val, item)})"
>
<el-option
v-for="option in item.options"
:key="option[item.optionValue]"
:label="handleLabel(option, item.optionLabel)"
:value="option[item.optionValue]"
/>
</el-select>
</el-form-item>
</template>
<template v-if="checkFieldType(item, 'selectHover')">
<el-form-item :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
<el-select
v-model="formModel[item.prop]"
filterable
:placeholder="item.placeholder"
:disabled="item.disabled"
:clearable="item.clearable"
@change="((val)=>{deviceChange(val, item)})"
>
<el-option
v-for="option in item.options"
:key="option.code"
:label="handleLabel(option, item.optionLabel)"
:value="option.code"
/>
</el-select>
<el-button
:type="item.buttonShowType ? 'danger' : 'primary'"
@click="item.hover(item.buttonType)"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
</template>
<template v-if="checkFieldType(item, 'multiSelectHover')">
<el-form-item :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
<el-select
v-model="formModel[item.prop]"
filterable
multiple
:placeholder="item.placeholder"
:disabled="item.disabled"
:clearable="item.clearable"
@change="((val)=>{deviceChange(val, item)})"
>
<el-option
v-for="option in item.options"
:key="option.code"
:label="handleLabel(option, item.optionLabel)"
:value="option.code"
/>
</el-select>
<el-button
:type="item.buttonShowType ? 'danger' : 'primary'"
@click="item.hover(item.buttonType)"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
</template>
<template v-if="checkFieldType(item, 'input')">
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
<el-input v-model="formModel[item.prop]" type="text" :disabled="item.disabled" maxlength="30" :show-word-limit="true" @input="((val)=>{deviceChange(val, item)})" />
</el-form-item>
</template>
<template v-if="checkFieldType(item, 'number')">
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
<template v-if="!item.firstLevel">
<template>
<el-input-number v-model="formModel[item.prop]" :min="item.min" :max="item.max" :label="item.label" :disabled="item.disabled" style="width: 140px" @change="((val)=>{deviceChange(val,item)})" />
</template>
<span class="numberSpan">{{ item.placeholder }}</span>
<el-button v-if="item.button" type="primary" size="mini" class="numberBtn" @click="item.clickFunction">{{ item.buttonText }}</el-button>
</template>
<template v-else>
<el-input-number v-model="formModel[item.firstLevel][item.secondLevel]" :min="item.min" :max="item.max" :label="item.label" :disabled="item.disabled" />
<span class="numberSpan">{{ item.placeholder }}</span>
<el-button v-if="item.button" type="primary" size="mini" class="numberBtn" @click="item.clickFunction">{{ item.buttonText }}</el-button>
</template>
</el-form-item>
</template>
<template v-if="checkFieldType(item, 'color')">
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
<el-color-picker v-model="formModel[item.prop]" show-alpha :predefine="skins" :disabled="item.disabled" />
</el-form-item>
</template>
<template v-if="checkFieldType(item, 'radio')">
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
<el-radio-group v-model="formModel[item.prop]" :disabled="item.disabled">
<el-radio v-for="(opts, indexs) in item.radioList" :key="indexs" :border="item.border" :label="opts[item.optionValue]">{{ opts[item.optionLabel] }}</el-radio>
</el-radio-group>
</el-form-item>
</template>
<!-- 坐标点并列显示 -->
<template v-if="checkFieldType(item, 'coordinate')">
<div v-if="!item.isHidden" :key="item.prop" class="coordinate">
<span class="title" :style="{width: item.width}">{{ item.label }}</span>
<div v-for="opt in item.children" :key="opt.code" class="listWidth">
<el-form-item :label="opt.label" :prop="opt.prop" :label-width="opt.labelWidth">
<template>
<el-input-number v-model="formModel[opt.firstLevel][opt.secondLevel]" :label="opt.label" :disabled="opt.disabled" @change="((val)=>{deviceChange(val, opt)})" />
</template>
</el-form-item>
</div>
</div>
</template>
<template v-if="checkFieldType(item, 'sectionUnit')">
<div :key="item.prop" class="coordinate">
<span class="title" :style="{width: item.width}">{{ item.label }}</span>
<div class="point-section">
<template v-for="(sectionUnit, j) in formModel[item.prop]">
<div :key="j" class="sectionUnit">
<el-form-item label="左端区段" :prop="'sectionUnitList[' + j + '].leftCode'" label-width="70px">
<el-select v-model="sectionUnit.leftCode" filterable placeholder="请选择" clearable class="sectionUnitCode">
<el-option
v-for="elem in item.options"
:key="elem.code"
:label="elem.name"
:value="elem.code"
/>
</el-select>
<el-button
:type="item.buttonShowType && item.listIndex === ('leftCode' + j) ? 'danger' : 'primary'"
@click="item.hover(item.buttonType, `leftCode${j}`)"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="右端区段" :prop="'sectionUnitList[' + j + '].rightCode'" label-width="70px">
<el-select v-model="sectionUnit.rightCode" filterable placeholder="请选择" clearable class="sectionUnitCode">
<el-option
v-for="elem in item.options"
:key="elem.code"
:label="elem.name"
:value="elem.code"
/>
</el-select>
<el-button
:type="item.buttonShowType && item.listIndex === ('rightCode' + j) ? 'danger' : 'primary'"
@click="item.hover(item.buttonType, `rightCode${j}`)"
>{{ $t('map.activate') }}</el-button>
<el-button type="success" icon="el-icon-plus" circle @click="item.addSectionUnit(j)" />
<el-button v-if="j" type="danger" icon="el-icon-delete" circle @click="item.delSectionUnit(j)" />
</el-form-item>
</div>
</template>
</div>
</div>
</template>
<!-- 多个坐标点绘制 -->
<template v-if="checkFieldType(item, 'points')">
<div v-if="!item.isHidden" :key="item.prop" class="coordinate">
<span class="title" :style="{width: item.width}">{{ item.label }}</span>
<div class="point-section">
<template v-for="(point, j) in formModel[item.prop]">
<div :key="j" style="overflow: hidden;">
<span v-if="!item.hiddenSpan" class="pointsEach" :style="{'margin-right': j == 0 || j == formModel[item.prop].length - 1 ? '9px' : '5px'}">{{ j == 0 ? ' ' : j == formModel[item.prop].length - 1 ? ' ' : `中点${j}` }}</span>
<el-form-item
label=""
:prop="'points[' + j + '].x'"
class="pointsEachItem"
label-width="0px"
>
<el-input-number v-model="point.x" :disabled="item.pointDisabled" />
</el-form-item>
<span class="pointsEachNext">, </span>
<el-form-item
label=""
:prop="'points[' + j + '].y'"
class="pointsEachItem"
style="margin-right: 5px;"
label-width="4px"
>
<el-input-number v-model="point.y" :disabled="item.pointDisabled" />
</el-form-item>
<el-button
icon="el-icon-plus"
:disabled="item.pointDisabled"
circle
class="point-button"
@click="item.addPoint(j)"
/>
<el-button
icon="el-icon-minus"
:disabled="j == 0 || j == formModel[item.prop].length - 1"
circle
class="point-button"
style="margin-left: 4px;"
@click="item.delPoint(j)"
/>
</div>
</template>
</div>
</div>
</template>
<!-- 多个坐标点绘制 -->
<template v-if="checkFieldType(item, 'coordinatePoint')">
<div :key="item.prop" class="coordinate">
<span class="title" :style="{width: item.width}">{{ item.label }}</span>
<div class="point-section" :style="{ width: `calc(100% - 10px - ${item.width})` }">
<template v-for="(point, j) in formModel[item.prop]">
<div :key="j" style="overflow: hidden;">
<span style="display: table; margin-right: 6px; font-size: 14px; float: left; line-height: 28px;">{{ j + 1 }}.</span>
<el-form-item style="display: table; float: left;" label-width="0px">
<el-input-number v-model="point.x" :disabled="item.pointDisabled" />
</el-form-item>
<span style="display: table; margin-left: 8px; float: left; line-height: 28px;">, </span>
<el-form-item style="display: table; float: left; margin-right: 5px;" label-width="4px">
<el-input-number v-model="point.y" :disabled="item.pointDisabled" />
</el-form-item>
<el-button
icon="el-icon-plus"
:disabled="item.pointDisabled"
circle
class="point-button"
@click="item.addPoint(j)"
/>
<el-button
icon="el-icon-minus"
:disabled="j == 0"
circle
class="point-button"
style="margin-left: 4px;"
@click="item.delPoint(j)"
/>
</div>
</template>
</div>
</div>
</template>
<template v-if="checkFieldType(item, 'checkbox')">
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
<el-checkbox v-model="formModel[item.prop]" :disabled="item.disabled" @change="((val)=>{deviceChange(val, item)})" />
</el-form-item>
</template>
<template v-if="checkFieldType(item, 'font')">
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
<el-font v-model="formModel[item.prop]" :disabled="item.disabled" :placeholder="item.placeholder" />
</el-form-item>
</template>
<template v-if="checkFieldType(item, 'fontContent')">
<el-form-item v-if="!item.isHidden" :key="item.prop" :label="item.label" :prop="item.prop" :required="item.required">
<el-input v-model="formModel[item.content]" :placeholder="item.placeholder" class="input-with-select">
<el-select slot="prepend" v-model="formModel[item.prepend]" :placeholder="item.placeholder">
<el-option :label="$t('map.horizontal')" value="H" />
<el-option :label="$t('map.vertical')" value="V" />
</el-select>
</el-input>
</el-form-item>
</template>
<template v-if="checkFieldType(item, 'lengthFact')">
<div v-if="!item.isHidden" :key="item.prop" class="coordinate">
<span class="title" :style="{width: item.width}">{{ item.label }}</span>
<div class="point-section">
<template v-for="(elem, j) in formModel[item.prop]">
<div :key="j" style="overflow: hidden;">
<el-form-item :label="elem.name" :prop="'logicLengthList[' + j + '].lengthFact'" label-width="20px">
<el-input-number v-model="elem.lengthFact" :min="0" :precision="3" style="width: 120px;" /><span></span>
<el-button v-if="!j" type="primary" size="mini" style="margin-left: 20px;" @click="item.mergeLength">合并长度</el-button>
</el-form-item>
</div>
</template>
</div>
</div>
</template>
</template>
</fieldset>
</template>
<slot />
</el-form>
</template>
<script>
import ElFont from '@/views/components/font/index';
export default {
name: 'ConfigList',
components: {
ElFont
},
props: {
formModel: {
type: Object,
required: true
},
form: {
type: Object,
required: true
},
rules: {
type: Object,
default: function () {
return null;
}
}
},
data () {
return {
skins: []
};
},
methods: {
deviceChange(data, item) {
if (item.deviceChange) {
item.deviceChange(data);
}
},
handleLabel(option, label) {
if (label == 'name') {
return option.name;
} else if (label == 'code') {
return option.code;
} else if (label == 'label') {
return option.label;
} else if (label == 'name&&code') {
if (option.code) {
return option.name + ' (' + option.code + ')';
} else {
return option.name;
}
} else if (label == 'code&&name') {
return option.code + ' (' + option.name + ')';
} else {
return option.label;
}
},
decompose(item, prop) {
if (!prop.includes('.')) {
return prop;
}
const keyArr = prop.split('.');
return keyArr[0][keyArr[1]];
},
checkFieldType(field, type) {
if (field.hasOwnProperty('isHidden')) {
return field.type === type && !field.isHidden;
} else {
return field.type === type;
}
},
validate(callback) {
this.$refs.form.validate((valid) => {
if (valid) {
callback(true);
} else {
callback(false);
}
});
},
resetForm() {
this.$refs.form.resetFields();
},
clearValidate() {
this.$refs.form.clearValidate(); //
},
resetFields() {
this.$refs.form.resetFields(); //
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.coordinate {
overflow: hidden;
.title {
text-align: right;
font-size: 14px;
color: #606266;
line-height: 40px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
line-height: 28px;
width: 120px;
font-weight: bold;
display: block;
float: left;
margin-right: 7px;
}
.listWidth{
display: table;
float: left;
margin-right: 20px;
&:last-child{
margin: 0;
}
}
}
.point-section {
float: left;
}
.point-button {
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
float: left;
/deep/ {
.el-icon-plus,
.el-icon-minus {
transform: translateY(0px);
}
}
}
.el-input-number--mini {
width: 110px;
}
.form_data{
padding: 6px 10px 10px 10px;
}
.card{
border: 1px solid #ccc;
margin-bottom: 5px;
.card_title {
padding: 0px 5px;
}
}
.noCard{
border: none;
margin-bottom: 0px;
padding: 0;
}
/deep/ {
.input-with-select .el-input-group__prepend {
background-color: #fff;
}
}
.numberSpan{padding-left: 1px;}
.numberBtn{margin-left: 20px;}
.sectionUnit{border: 1px solid #CCCCCC; border-radius: 5px;padding: 2px;padding-top: 10px;}
.sectionUnitCode{width: 115px;}
.pointsEach{display: table; margin-right: 3px; font-size: 14px; float: left; line-height: 28px;}
.pointsEachNext{display: table; margin-left: 8px; float: left; line-height: 28px;}
.pointsEachItem{display: table; float: left; }
</style>

View File

@ -0,0 +1,84 @@
<template>
<div>
<operate-property
ref="dataform"
:form="form"
:edit-model="editModel"
:rules="rules"
type="Line"
@updateMapModel="updateMapModel"
@clearDeviceSelect="clearDeviceSelect"
/>
</div>
</template>
<script>
import OperateProperty from './components/operateProperty';
import { mapGetters } from 'vuex';
export default {
name: 'Device',
components: {
OperateProperty
},
data() {
return {
editModel: {},
rules: {},
typeList: []
};
},
computed: {
...mapGetters('map', [
'signalList',
'sectionList',
'switchList',
'stationList',
'stationStandList'
]),
form () {
return {
labelWidth: '130px',
items: {
code: {
name: '',
item: []
},
draw: {
name: this.$t('map.drawData'),
item: [
{ prop: 'type', label: '类型', type: 'select', optionLabel: 'label', optionValue: 'value', options: this.typeList },
{ prop: 'code', label: this.$t('map.textCode'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.textList, deviceChange: this.deviceChange },
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '120px', children: [
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px', disabled: false },
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px', disabled: false }
] }
]
},
map: {
name: this.$t('map.mapData'),
item: []
}
}
};
},
deviceList () {
return [];
}
},
methods: {
updateMapModel() {
},
clearDeviceSelect() {
},
deviceChange() {
}
}
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,236 @@
<template>
<transition name="el-zoom-in-center">
<div class="map-control">
<div class="map-operate">
<div class="draftMapName">
<span>{{ $t('map.mapName') }}</span>
<el-tooltip class="item" effect="dark" :content="mapInfo.name" placement="top">
<b>{{ mapInfo.name }}</b>
</el-tooltip>
</div>
<el-button v-if="isSave" type="text" style="padding: 3px 0;float: right;" :disabled="$attrs.mapSaveing" @click="saveMapEvent">{{ $t('map.save') }}</el-button>
</div>
<el-tabs v-model="enabledTab" class="mapEdit" type="card">
<el-tab-pane v-for="(each,index) in tabList" :key="index" :label="each.label" class="tab_pane_box" :name="each.name" :lazy="lazy">
<component
:is="each.menus"
:ref="each.name"
:selected="selected"
v-bind="$attrs"
v-on="$listeners"
@deviceSelect="deviceSelect"
/>
</el-tab-pane>
</el-tabs>
</div>
</transition>
</template>
<script>
import DeviceDraft from './device';
import MultiSelect from './multiSelect';
export default {
name: 'MapOperate',
components: {
},
props: {
selected: {
type: Object,
default: function () {
return null;
}
},
mapInfo: {
type: Object,
default: function() { return {name: this.$t('map.pleaseSelectMap')}; }
}
},
data() {
return {
lazy: true,
tabList:[
{label: '设备', name: 'device', menus: DeviceDraft},
{label: '多选', name: 'multiSelect', menus: MultiSelect}
],
selectDevice:'',
enabledTab: 'Line'
};
},
computed: {
isSave() {
return this.mapInfo && this.mapInfo.id;
}
},
watch: {
'$store.state.map.updateCount': function () {
this.$refs[this.enabledTab][0].edit();
},
selected(val) {
if (this.selected) {
this.$nextTick(() => {
this.$refs[this.enabledTab][0].deviceSelect(val);
});
}
}
},
mounted() {},
methods: {
handleSelectControlPage(device) {
const type = device._type;
if (this.selectDevice) {
this.enabledTab = this.selectDevice;
} else {
this.enabledTab = type;
}
},
deviceSelect(type) {
this.selectDevice = type;
},
saveMapEvent() {
this.$emit('saveMapEvent');
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.draftMapName{
width:280px;
overflow:hidden;
height:17px;
text-overflow:ellipsis;
white-space:nowrap;
}
.el-dropdown-link {
cursor: pointer;
color: #409EFF;
}
.el-icon-arrow-down {
font-size: 12px;
}
.map-control {
width: 100%;
height: 100%;
}
.operate-button{
padding: 3px 0;
margin-right: 5px;
}
// .physical-view {
// line-height: 25px;
// height: 118px;
// padding-left: 12px;
// .el-checkbox {
// width: 70px;
// margin: 0;
// margin-right: 30px;
// }
// }
.map-operate{
height: 47px;
padding: 15px;
display:flex;
}
.mapEdit{
height: calc(100% - 47px);
.tab_pane_box{
height: 100%;
}
}
/deep/ .button_box{
width: 100%;
background: #ffffff;
border-top: 1px #f3f1f1 solid;
box-shadow: 4px 7px 10px #565656;
border-radius: 0;
border-bottom: 1px transparent solid;
position:absolute;
bottom:0;
z-index:3;
}
/deep/ .view-control-content{
height:100%;
padding-bottom:46px;
overflow-y:auto;
}
/deep/ .map-draft-group {
float: right;
margin: 6px 5px;
}
/deep/ .view-control {
height:100%;
}
/deep/ {
.mapEdit .el-tabs__nav-wrap.is-scrollable {
padding: 0 20px;
}
.mapEdit .el-tabs__header .el-tabs__item.is-active {
border-bottom-color: #f5f7fa;
background: #f5f7fa;
}
.mapEdit .el-tabs__active-bar{
background: transparent;
}
.mapEdit .el-tabs__content {
height: calc(100% - 56px);
}
.card .el-tabs__nav .el-tabs__item.is-active {
border-bottom: 2px solid #E4E7ED;
background: #409eff;
color: #fff;
}
.card .el-tabs__nav .el-tabs__item{
padding: 0 20px!important;
}
.mapEdit .el-tabs__nav-prev {
width: 20px;
height: 41px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 1px 1px 4px #ccc;
}
.mapEdit .el-tabs__nav-next {
width: 20px;
height: 41px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 1px 1px 4px #ccc;
}
}
//
/deep/ {
.card .el-transfer-panel__filter{
margin: 5px 15px;
}
.card .el-transfer-panel__list.is-filterable{
height: 290px;
}
.card .el-transfer-panel__body{
height: 328px;
}
.card .el-transfer__buttons{
padding: 0 16px;
}
.card .el-transfer{
display: flex;
justify-content: center;
align-items: center;
}
}
</style>

View File

@ -0,0 +1,13 @@
<template>
</template>
<script>
export default {
name: "multiSelect"
}
</script>
<style scoped>
</style>

View File

@ -120,9 +120,14 @@ export default {
const header = { group: this.$route.query.group || '', 'X-Token': getToken() }; const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header); creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header);
creatSubscribe(getTopic('STATE', this.$route.query.group), header); creatSubscribe(getTopic('STATE', this.$route.query.group), header);
if (this.$route.query.ctc == 'true') { // if (this.$route.query.ctc == 'true') {
if (this.$route.query.lineCode == '16') {
creatSubscribe(getTopic('CTC', this.$route.query.group), header); creatSubscribe(getTopic('CTC', this.$route.query.group), header);
} }
// $route.query.lineCode === '16';
// if (this.$route.query.dispatcherStation == 'true') {
// creatSubscribe(getTopic('CTC_RAILWAY', this.$route.query.group), header);
// }
await this.$store.dispatch('training/setHasSubscribed'); await this.$store.dispatch('training/setHasSubscribed');
}, },
async subscribeNew() { async subscribeNew() {
@ -141,9 +146,13 @@ export default {
clearSubscribe() { clearSubscribe() {
clearSubscribe(`${displayTopic}\/${this.groupModel}`); clearSubscribe(`${displayTopic}\/${this.groupModel}`);
clearSubscribe(getTopic('STATE', this.groupModel)); clearSubscribe(getTopic('STATE', this.groupModel));
if (this.$route.query.ctc == 'true') { // if (this.$route.query.ctc == 'true') {
if (this.$route.query.lineCode == '16') {
clearSubscribe(getTopic('CTC', this.groupModel)); clearSubscribe(getTopic('CTC', this.groupModel));
} }
// if (this.$route.query.dispatcherStation == 'true') {
// clearSubscribe(getTopic('CTC_RAILWAY', this.groupModel));
// }
}, },
setCenter(code) { setCenter(code) {
this.$refs.mapCommon && this.$refs.mapCommon.setCenter(code); this.$refs.mapCommon && this.$refs.mapCommon.setCenter(code);

View File

@ -45,173 +45,190 @@
</div> </div>
</template> </template>
<script> <script>
import { DeviceMenu } from '@/scripts/ConstDic' import { DeviceMenu } from '@/scripts/ConstDic';
import { listMap, deleteAllMap } from '@/api/jmap/mapdraft' import { listMap, deleteAllMap } from '@/api/jmap/mapdraft';
import { UrlConfig } from '@/scripts/ConstDic' import { UrlConfig } from '@/scripts/ConstDic';
import { removeSessionStorage } from '@/utils/auth' import { removeSessionStorage } from '@/utils/auth';
import MapOperateMenu from './mapmanage/operateMenu' import MapOperateMenu from './mapmanage/operateMenu';
import MapImport from './mapmanage/mapImport' import MapImport from './mapmanage/mapImport';
import { getSessionStorage } from '@/utils/auth' import { getSessionStorage } from '@/utils/auth';
export default { export default {
name: 'UserMapList', name: 'UserMapList',
components: { components: {
MapOperateMenu, MapOperateMenu,
MapImport, MapImport
}, },
data() { data() {
return { return {
loading: true, loading: true,
defaultShowKeys: [], defaultShowKeys: [],
filterText: '', filterText: '',
treeData: [], treeData: [],
treeList: [], treeList: [],
selected: {}, selected: {},
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'name', label: 'name'
}, },
point: { point: {
x: 0, x: 0,
y: 0, y: 0
}, },
editModel: {}, editModel: {},
lineCode: '', lineCode: '',
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts', 'hlsdrts', 'designhlsdrts'], loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts', 'hlsdrts', 'designhlsdrts']
};
},
computed: {
project() {
return getSessionStorage('project');
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
}
},
beforeDestroy() {
removeSessionStorage('demonList');
},
mounted() {
this.loadInitData();
},
methods: {
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
createMap() {
this.$emit('createMap');
},
deleteAllMap() {
this.$confirm('确定删除全部地图数据?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deleteAllMap().then(res => {
this.$message({
type: 'success',
message: '删除成功!'
});
this.loadInitData();
});
})
.catch(e => {});
},
async loadInitData() {
this.loading = true;
this.treeData = this.treeList = [];
try {
const res = await listMap({ drawWay: true });
res.data &&
res.data.forEach(elem => {
elem.type = 'map';
elem.children = [
{
id: '1',
name: this.$t('designPlatform.mapDesign'),
type: 'mapDesign',
mapId: elem.id,
mapName: elem.name,
lineCode: elem.lineCode
},
{
id: '2',
name: '系统配置绘图',
type: 'mapSystem',
mapId: elem.id,
mapName: elem.name,
lineCode: elem.lineCode
},
{
id: '3',
name: '画面管理',
type: 'mapPicture',
mapId: elem.id,
mapName: elem.name,
lineCode: elem.lineCode
}
];
});
this.treeData = res.data;
this.treeList = this.filterText
? res.data.filter(elem => {
return elem.name.includes(this.filterText);
})
: res.data;
this.loading = false;
} catch (error) {
this.loading = false;
this.$messageBox(this.$t('error.refreshFailed'));
}
},
clickEvent(obj, data, ele) {
switch (obj.type) {
case 'mapDesign': {
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
this.$router.push({
path: `${UrlConfig.newDesignuser.mapDraw}/${obj.mapId}/draft`,
query: { name: obj.mapName, lineCode: obj.lineCode }
});
break;
}
case 'mapSystem': {
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
this.$router.push({
path: `/design/usermap/map/systemDraw/${obj.mapId}/draft`,
query: { name: obj.mapName, lineCode: obj.lineCode }
});
break;
}
case 'mapPicture': {
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations');
}
this.$router.push({
path: `/design/usermap/map/pictureDraw/${obj.mapId}/draft`,
query: { name: obj.mapName, lineCode: obj.lineCode }
});
break;
}
}
},
showContextMenu(e, obj, node, vueElem) {
this.$refs.tree.setCurrentKey(obj.id);
this.$refs.tree.currentNode = node;
if (obj && obj.type == 'map') {
e.preventDefault();
const menu = DeviceMenu.Map;
this.point = {
x: e.clientX,
y: e.clientY
};
this.editModel = obj;
this.editModel.lineCode = obj.lineCode;
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
}
},
jlmap3d() {
this.$router.push({ path: '/design/jlmap3d/edit', query: { mapid: this.editModel.id } });
},
assetmanager3d() {
this.$router.push({ path: '/design/jlmap3d/assetmanager' });
},
importMap() {
this.$refs.mapImport.show();
}
} }
}, };
computed: {
project() {
return getSessionStorage('project')
},
},
watch: {
filterText(val) {
this.$refs.tree.filter(val)
},
},
beforeDestroy() {
removeSessionStorage('demonList')
},
mounted() {
this.loadInitData()
},
methods: {
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
},
createMap() {
this.$emit('createMap')
},
deleteAllMap() {
this.$confirm('确定删除全部地图数据?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
deleteAllMap().then(res => {
this.$message({
type: 'success',
message: '删除成功!',
})
this.loadInitData()
})
})
.catch(e => {})
},
async loadInitData() {
this.loading = true
this.treeData = this.treeList = []
try {
const res = await listMap({ drawWay: true })
res.data &&
res.data.forEach(elem => {
elem.type = 'map'
elem.children = [
{
id: '1',
name: this.$t('designPlatform.mapDesign'),
type: 'mapDesign',
mapId: elem.id,
mapName: elem.name,
lineCode: elem.lineCode,
},
{
id: '2',
name: '系统配置绘图',
type: 'mapSystem',
mapId: elem.id,
mapName: elem.name,
lineCode: elem.lineCode,
},
]
})
this.treeData = res.data
this.treeList = this.filterText
? res.data.filter(elem => {
return elem.name.includes(this.filterText)
})
: res.data
this.loading = false
} catch (error) {
this.loading = false
this.$messageBox(this.$t('error.refreshFailed'))
}
},
clickEvent(obj, data, ele) {
switch (obj.type) {
case 'mapDesign': {
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations')
}
this.$router.push({
path: `${UrlConfig.newDesignuser.mapDraw}/${obj.mapId}/draft`,
query: { name: obj.mapName, lineCode: obj.lineCode },
})
break
}
case 'mapSystem': {
if (this.loadingProjectList.includes(this.project)) {
this.$store.dispatch('app/transitionAnimations')
}
this.$router.push({
path: `/design/usermap/map/systemDraw/${obj.mapId}/draft`,
query: { name: obj.mapName, lineCode: obj.lineCode },
})
break
}
}
},
showContextMenu(e, obj, node, vueElem) {
this.$refs.tree.setCurrentKey(obj.id)
this.$refs.tree.currentNode = node
if (obj && obj.type == 'map') {
e.preventDefault()
const menu = DeviceMenu.Map
this.point = {
x: e.clientX,
y: e.clientY,
}
this.editModel = obj
this.editModel.lineCode = obj.lineCode
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu })
}
},
jlmap3d() {
this.$router.push({ path: '/design/jlmap3d/edit', query: { mapid: this.editModel.id } })
},
assetmanager3d() {
this.$router.push({ path: '/design/jlmap3d/assetmanager' })
},
importMap() {
this.$refs.mapImport.show()
},
},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.clearfix { .clearfix {

View File

@ -0,0 +1,173 @@
<template>
<el-dialog
title="路票"
:visible="registerBookShow"
fullscreen
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
center
>
<div style="text-align: right;">
<el-button size="small" style="margin-right: 20px;margin-bottom: 10px;" type="primary" @click="add">新增</el-button>
</div>
<el-table
:data="tableData"
style="width: 100%"
>
<el-table-column prop="date" label="月 日" width="95">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.moonDay" />
<span v-else>{{ scope.row.moonDay }}</span>
</template>
</el-table-column>
<el-table-column prop="time" label="时 分" width="95">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.hourMinute" />
<span v-else>{{ scope.row.hourMinute }}</span>
</template>
</el-table-column>
<el-table-column prop="checkResult" label="检查试验结果,所发现的不良及破损程度" width="280">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.result" />
<span v-else>{{ scope.row.result }}</span>
</template>
</el-table-column>
<el-table-column label="通 知 时 间">
<el-table-column prop="noticeDate" label="月 日" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.noticeTime.moonDay" />
<span v-else>{{ scope.row.noticeTime.moonDay }}</span>
</template>
</el-table-column>
<el-table-column prop="noticeTime" label="时 分" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.noticeTime.hourMinute" />
<span v-else>{{ scope.row.noticeTime.hourMinute }}</span>
</template>
</el-table-column>
<el-table-column prop="noticeWay" label="通知到达的方式" width="130">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.noticeTime.info" />
<span v-else>{{ scope.row.noticeTime.info }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="到 达 时 间">
<el-table-column prop="arriveDate" label="月 日" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.arriveTime.moonDay" />
<span v-else>{{ scope.row.arriveTime.moonDay }}</span>
</template>
</el-table-column>
<el-table-column prop="arriveTime" label="时 分" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.arriveTime.hourMinute" />
<span v-else>{{ scope.row.arriveTime.hourMinute }}</span>
</template>
</el-table-column>
<el-table-column prop="arriveSeal" label="该段的工作人员到达后盖章" width="200">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.arriveTime.info" />
<span v-else>{{ scope.row.arriveTime.info }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="销除不良及破损的时分及盖章">
<el-table-column prop="repairDate" label="月 日" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.endTime.moonDay" />
<span v-else>{{ scope.row.endTime.moonDay }}</span>
</template>
</el-table-column>
<el-table-column prop="repairTime" label="时 分" width="100">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.endTime.hourMinute" />
<span v-else>{{ scope.row.endTime.hourMinute }}</span>
</template>
</el-table-column>
<el-table-column prop="repairReason" label="破损及不良的原因,采用何种办法进行修理的。工作人员及车站值班员盖章。">
<template slot-scope="scope">
<el-input v-if="dataIndex === scope.$index" v-model="scope.row.endTime.info" />
<span v-else>{{ scope.row.endTime.info }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="" width="60">
<template slot-scope="scope">
<el-button v-if="dataIndex === scope.$index" type="text" size="small" @click="saveData(scope.row, scope.$index)">保存</el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
</template>
<script>
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'Index',
data() {
return {
registerBookShow: false,
tableData: [],
dataIndex: null
};
},
methods: {
doClose() {
this.registerBookShow = false;
this.dataIndex = null;
},
doShow() {
this.registerBookShow = true;
this.queryData();
},
queryData() {
const params = { stationCode: this.$store.state.map.showCentralizedStationCode};
commitOperate(menuOperate.Rail.railQueryRegister, params, 3).then(({valid, operate, response})=>{
this.tableData = response.data ? response.data.lines : [];
this.dataIndex = null;
}).catch(()=>{
this.$message.error('查询簿册失败!');
});
},
saveData(data) {
const params = { stationCode: this.$store.state.map.showCentralizedStationCode, line: data };
commitOperate(menuOperate.Rail.railFillInRegister, params, 3).then(({valid, operate})=>{
this.queryData();
}).catch(()=>{
this.$message.error('保存簿册失败!');
});
},
add() {
const data = {
moonDay: '',
hourMinute: '',
result: '',
noticeTime: {
moonDay: '',
hourMinute: '',
info: ''
},
arriveTime: {
moonDay: '',
hourMinute: '',
info: ''
},
endTime: {
moonDay: '',
hourMinute: '',
info: ''
}
};
this.dataIndex = this.tableData.length || 0;
this.tableData.push(data);
}
}
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,64 @@
<template>
<div style="border: 1px solid #000000;margin-top: 20px;padding: 20px;background: #9df59b;">
<div style="text-align: center;font-size: 28px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div style="font-size: 14px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 20px;justify-content: end;">
<div></div>
<el-input v-model="greenLicenseForm.number" size="small" :disabled="switchFlag" style="width: 80px;" />
<div style="margin-right: 20px;"></div>
</div>
<div style="font-size: 16px;margin-top: 20px;">
<span style="margin-left: 36px;"></span>
<el-radio-group v-model="greenLicenseForm.reason" :disabled="switchFlag" style="display: inline;">
<el-radio label="出站(进路)信号机故障">出站进路信号机故障</el-radio>
<el-radio label="未设出站信号机" style="margin-left: 5px;">未设出站信号机</el-radio>
<el-radio label="列车头部越过出站(进路)信号机" style="margin-left: 5px;">列车头部越过出站进路信号机</el-radio>
</el-radio-group>
<span>的情况下准许第</span>
<el-input v-model="greenLicenseForm.tripNumber" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<span>次列车由</span>
<el-input v-model="greenLicenseForm.line" style="display: inline;" :disabled="switchFlag" size="small" class="inline-input" />
<span>线上发车</span>
</div>
<div style="font-size: 16px;margin-top: 60px;display: flex;align-items: center;justify-content: end;">
<div><span style="color: #f00;">{{ showCentralizedStationName }}</span>站名印车站值班员签名</div>
<el-input v-model="greenLicenseForm.signature" :disabled="switchFlag" size="small" style="width: 80px;" />
</div>
<div style="font-size: 16px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 10px;justify-content: end;">
<el-input v-model="greenLicenseForm.year" :disabled="switchFlag" size="small" style="width: 80px;" />
<div></div>
<el-input v-model="greenLicenseForm.moon" :disabled="switchFlag" size="small" style="width: 80px;" />
<div></div>
<el-input v-model="greenLicenseForm.day" :disabled="switchFlag" size="small" style="width: 80px;" />
<div>日填发</div>
</div>
</div>
</template>
<script>
export default {
name: 'GreenLicence',
props: {
greenLicenseForm:{
type: Object,
required: true
},
switchFlag:{
type: Boolean,
required: true
},
showCentralizedStationName: {
type: String,
required: true
}
},
data() {
return {
};
}
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,293 @@
<template>
<el-dialog
title="路票"
:visible="trainTicketShow"
width="640px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
center
>
<div>
<div style="display: flex;align-items: center;margin-bottom: 10px;">
<div>附件类型</div>
<el-select v-model="attachmentType" size="small" placeholder="请选择" @change="attachmentTypeChange">
<el-option
v-for="item in typeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<!-- <el-button v-if="activeName === 'first'" style="margin-left: 20px;" size="small" type="primary" @click="query">查询</el-button>-->
</div>
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane label="路票填写" name="first">
<rail-ticket v-if="attachmentType === 'RAIL_TICKET'" :switch-flag="false" :ticket-form="ticketForm" :station-list="stationList" />
<green-licence v-else-if="attachmentType === 'GREEN_LICENCE'" :switch-flag="false" :green-license-form="greenLicenseForm" :show-centralized-station-name="showCentralizedStationName" />
<red-licence v-else-if="attachmentType === 'RED_LICENCE'" :show-centralized-station-name="showCentralizedStationName" :switch-flag="false" :red-license-form="redLicenseForm" />
<div style="text-align: center;">
<el-button size="small" style="margin-top: 10px;" type="primary" @click="submit">提交</el-button>
</div>
</el-tab-pane>
<el-tab-pane label="路票查询" name="second">
<div v-if="attachmentType === 'RAIL_TICKET'" style="height: 450px;overflow-y: auto;">
<template v-for="(item, index) in railTicketList">
<rail-ticket :key="index" :switch-flag="true" :ticket-form="item" :station-list="stationList" />
</template>
</div>
<div v-else-if="attachmentType === 'GREEN_LICENCE'" style="height: 450px;overflow-y: auto;">
<template v-for="(item, index) in greenLicenseList">
<green-licence :key="index" :show-centralized-station-name="showCentralizedStationName" :switch-flag="true" :green-license-form="item" />
</template>
</div>
<div v-else-if="attachmentType === 'RED_LICENCE'" style="height: 450px;overflow-y: auto;">
<template v-for="(item, index) in redLicenseList">
<red-licence :key="index" :show-centralized-station-name="showCentralizedStationName" :switch-flag="true" :red-license-form="item" />
</template>
</div>
</el-tab-pane>
</el-tabs>
<!-- <div v-else-if="attachmentType === 'dispatchingCommand'" style="margin-top: 20px;padding: 20px;">
<div style="text-align: center;font-size: 28px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div style="margin-top: 10px;display: flex;align-items: center;justify-content: end;">
<el-input v-model="years" size="small" style="width: 80px;" />
<div></div>
<el-input v-model="months" size="small" style="width: 80px;" />
<div></div>
<el-input v-model="days" size="small" style="width: 80px;" />
<div></div>
<el-input v-model="hours" size="small" style="width: 80px;" />
<div></div>
<el-input v-model="minutes" size="small" style="width: 80px;" />
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<el-input v-model="days" size="small" style="width: 80px;" />
<div></div>
</div>
<div style="border: 1px solid #000;display: flex;align-items: center;margin-top: 10px;">
<div style="border-right: 1px solid #000;width: 25%;text-align: center;height: 40px;line-height: 40px;">受令处所</div>
<div style="width: 25%;border-right: 1px solid #000;"><el-input v-model="shouingchusuo" /></div>
<div style="border-right: 1px solid #000;width: 25%;text-align: center;height: 40px;line-height: 40px;">调度员姓名</div>
<div style="width: 25%;"><el-input v-model="dispatcherName" /></div>
</div>
<div style="border-right: 1px solid #000;border-left: 1px solid #000;display: flex;border-bottom: 1px solid #000;">
<div style="border-right: 1px solid #000;width: 25%;text-align: center;height: 96px;line-height: 96px;">内容</div>
<div style="width: 75%;">
<el-input
v-model="content"
type="textarea"
:rows="4"
placeholder="请输入内容"
/>
</div>
</div>
<div style="margin-top: 10px;display: flex;justify-content: end;align-items: center;">
<div>受令车站</div>
<el-input v-model="shouLingStation" size="small" style="width: 80px;" />
<div>车站值班员</div>
<el-input v-model="stationWatchman" size="small" style="width: 80px;" />
</div>
</div>
<div v-else-if="attachmentType === 'shuntNotice'" style="border: 1px solid #000;margin-top: 20px;padding: 20px;">
<div style="text-align: center;font-size: 28px;">出站/跟踪调车通知书</div>
<div style="text-indent: 36px;font-size: 16px;">
<span>对方站承认的号码第</span>
<el-input v-model="hao" size="small" class="inline-input" style="display: inline;" />
<span>准许自/</span>
<el-input v-model="hours" size="small" class="inline-input" style="display: inline;" />
<span></span>
<el-input v-model="minutes" size="small" class="inline-input" style="display: inline;" />
<span>分起/</span>
<el-input v-model="trainCode" size="small" class="inline-input" style="display: inline;" />
<span>机车由车站向</span>
<el-input v-model="qujian" size="small" class="inline-input" style="display: inline;" />
<span>区间出战/跟踪调车</span>
</div>
<div style="font-size: 16px;margin-top: 60px;display: flex;align-items: center;justify-content: end;">
<div>站名印车站值班扳道签名</div>
<el-input v-model="signName" size="small" style="width: 80px;" />
</div>
<div style="font-size: 16px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 10px;justify-content: end;">
<el-input v-model="years" size="small" style="width: 80px;" />
<div></div>
<el-input v-model="months" size="small" style="width: 80px;" />
<div></div>
<el-input v-model="days" size="small" style="width: 80px;" />
<div>日填发</div>
</div>
</div>
<div v-else-if="attachmentType === 'lightVehicleManual'" style="border: 1px solid #000;margin-top: 20px;padding: 20px;">
<div style="text-align: center;font-size: 28px;"> 使 </div>
<div style="display: flex;align-items: center;" />
</div>-->
</div>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import RailTicket from './trainTicket';
import GreenLicence from './greenLicence';
import RedLicence from './redLicence';
export default {
name: 'Index',
components: {
RailTicket,
GreenLicence,
RedLicence
},
data() {
return {
trainTicketShow: false,
attachmentType: 'RAIL_TICKET',
railTicketList: [],
greenLicenseList: [],
redLicenseList: [],
activeName: 'first',
ticketForm: {
number: '',
tripNumber: '',
station: '',
nextStation: '',
stationSeal: true,
no: '',
deputy: false
},
greenLicenseForm: {
number: '',
reason: '',
tripNumber: '',
line: '',
stationSeal: true,
signature: '',
year: '',
moon: '',
day: ''
},
redLicenseForm: {
number: '',
licenseReceived: true,
licenseTripNumber: '',
licenseStation: '',
licenseNextStation: '',
licenseHour: '',
licenseMinute: '',
licenseTripNumber2: '',
noticeTripNumber: '',
noticeHour1: '',
noticeMinute1: '',
noticeTripNumber1: '',
noticeHour2: '',
noticeMinute2: '',
noticeTripNumber2: '',
stationSeal: true,
signature: '',
year: '',
moon: '',
day: ''
},
typeList: [
{label: '路票', value: 'RAIL_TICKET'},
{label: '绿色许可证', value: 'GREEN_LICENCE'},
{label: '红色许可证', value: 'RED_LICENCE'}
// {label: '', value: 'dispatchingCommand'},
// {label: '/', value: 'shuntNotice'},
// {label: '使', value: 'lightVehicleManual'},
// {label: '簿', value: 'commandRegister'},
// {label: '', value: 'writtenNotice'},
// {label: '', value: 'departureNotice'}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
showCentralizedStationName() {
if (this.$store.state.map.showCentralizedStationCode) {
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode);
if (station) { return station.name; } else { return ''; }
} else { return ''; }
}
},
methods: {
doClose() {
this.trainTicketShow = false;
},
doShow() {
this.trainTicketShow = true;
this.ticketForm.station = this.showCentralizedStationName;
},
handleClick() {
if (this.activeName === 'second') {
this.query();
}
},
attachmentTypeChange() {
if (this.activeName === 'second') {
this.query();
}
},
clearData() {
this.ticketForm = {number: '', tripNumber: '', station: '', nextStation: '', stationSeal: true, no: '', deputy: false};
this.greenLicenseForm = {number: '', reason: '', tripNumber: '', line: '', stationSeal: true, signature: '', year: '', moon: '', day: '' };
this.redLicenseForm = {number: '', licenseReceived: true, licenseTripNumber: '', licenseStation: '', licenseNextStation: '', licenseHour: '',
licenseMinute: '', licenseTripNumber2: '', noticeTripNumber: '', noticeHour1: '', noticeMinute1: '', noticeTripNumber1: '', noticeHour2: '',
noticeMinute2: '', noticeTripNumber2: '', stationSeal: true, signature: '', year: '', moon: '', day: ''};
},
query() {
const params = { type: this.attachmentType };
commitOperate(menuOperate.Rail.railQueryTicket, params, 3).then(({valid, response, operate}) => {
if (valid) {
if (this.attachmentType === 'RAIL_TICKET') {
this.railTicketList = response.data || [];
} else if (this.attachmentType === 'GREEN_LICENCE') {
this.greenLicenseList = response.data || [];
} else if (this.attachmentType === 'RED_LICENCE') {
this.redLicenseList = response.data || [];
}
}
}).catch(()=> {
this.$message.error('查询路票失败!');
});
},
submit() {
const params = { ticket: { type: this.attachmentType }, stationCode: this.$store.state.map.showCentralizedStationCode };
if (this.attachmentType === 'RAIL_TICKET') {
params.ticket = Object.assign(params.ticket, this.ticketForm);
} else if (this.attachmentType === 'GREEN_LICENCE') {
params.ticket = Object.assign(params.ticket, this.greenLicenseForm);
} else if (this.attachmentType === 'RED_LICENCE') {
params.ticket = Object.assign(params.ticket, this.redLicenseForm);
}
commitOperate(menuOperate.Rail.railFillInTicket, params, 3).then(({valid, operate})=>{
this.clearData();
this.ticketForm.station = this.showCentralizedStationName;
}).catch(()=>{
this.$message.error('提交路票失败!');
});
}
}
};
</script>
<style scoped>
/deep/.inline-input .el-input__inner{
width: 80px;
}
/deep/.station-input .el-input__inner{
width: 200px;
height: 50px;
line-height: 50px;
font-size: 40px;
}
/deep/.el-radio__label{
font-size: 16px;
}
/deep/.el-radio{
margin-right: 0;
}
</style>

View File

@ -0,0 +1,92 @@
<template>
<div style="border: 1px solid #000000;margin-top: 20px;padding: 20px;background: #e799d8;">
<div style="text-align: center;font-size: 28px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div style="font-size: 14px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 20px;justify-content: end;">
<div></div>
<el-input v-model="redLicenseForm.number" :disabled="switchFlag" size="small" style="width: 80px;" />
<div style="margin-right: 20px;"></div>
</div>
<div style="font-size: 16px;margin-top: 10px;text-indent:36px;">
<span>现在一切电话中断准许第</span>
<el-input v-model="redLicenseForm.licenseTripNumber" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<span>次列车自</span>
<el-input v-model="redLicenseForm.licenseStation" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<span>站至</span>
<el-input v-model="redLicenseForm.licenseNextStation" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<span>本列车前于</span>
<el-input v-model="redLicenseForm.licenseHour" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<span></span>
<el-input v-model="redLicenseForm.licenseMinute" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<span>分发出的第</span>
<el-input v-model="redLicenseForm.licenseTripNumber2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<span>次列车邻站到达通知</span>
<el-radio-group v-model="redLicenseForm.licenseReceived" :disabled="switchFlag" style="display: inline;">
<el-radio label="已"></el-radio>
<el-radio label="未" style="margin-left: 5px;"></el-radio>
</el-radio-group>
<span>收到</span>
</div>
<div style="text-align: center;font-size: 28px;margin-top: 10px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div style="font-size: 16px;margin-top: 10px;text-indent: 36px;">
<span>1.</span>
<el-input v-model="redLicenseForm.noticeTripNumber" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<span>次列车到达你站后准接你站发出的列车</span>
</div>
<div style="font-size: 16px;margin-top: 10px;text-indent: 36px;">
<span>2.</span>
<el-input v-model="redLicenseForm.noticeHour1" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<span></span>
<el-input v-model="redLicenseForm.noticeMinute1" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<span>分发出第</span>
<el-input v-model="redLicenseForm.noticeTripNumber1" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<span>次列车并于</span>
<el-input v-model="redLicenseForm.noticeHour2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<span></span>
<el-input v-model="redLicenseForm.noticeMinute2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<span>分再发出第</span>
<el-input v-model="redLicenseForm.noticeTripNumber2" :disabled="switchFlag" style="display: inline;" size="small" class="inline-input" />
<span>次列车</span>
</div>
<div style="font-size: 16px;margin-top: 60px;display: flex;align-items: center;justify-content: end;">
<div><span style="color: #f00;">{{ showCentralizedStationName }}</span>站名印车站值班员签名</div>
<el-input v-model="redLicenseForm.signature" :disabled="switchFlag" size="small" style="width: 80px;" />
</div>
<div style="font-size: 16px;margin-top: 15px;display: flex;align-items: center;margin-bottom: 10px;justify-content: end;">
<el-input v-model="redLicenseForm.year" :disabled="switchFlag" size="small" style="width: 80px;" />
<div></div>
<el-input v-model="redLicenseForm.moon" :disabled="switchFlag" size="small" style="width: 80px;" />
<div></div>
<el-input v-model="redLicenseForm.day" :disabled="switchFlag" size="small" style="width: 80px;" />
<div>日填发</div>
</div>
</div>
</template>
<script>
export default {
name: 'RedLicence',
props: {
redLicenseForm:{
type: Object,
required: true
},
switchFlag:{
type: Boolean,
required: true
},
showCentralizedStationName: {
type: String,
required: true
}
},
data() {
return {
};
}
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,67 @@
<template>
<div style="border: 1px solid #000000;margin-top: 20px;padding: 20px;">
<div style="text-align: center;font-size: 28px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<div style="display: flex;justify-content: center;align-items: center;font-size: 18px;margin-top: 10px;">
<div>电话记录&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<el-input v-model="ticketForm.number" :disabled="switchFlag" size="mini" style="width: 80px;" />
<div></div>
</div>
<div style="display: flex;justify-content: center;align-items: center;font-size: 18px;margin-top: 10px;">
<div style="margin-left: 80px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<el-input v-model="ticketForm.tripNumber" :disabled="switchFlag" size="mini" style="width: 80px;" />
</div>
<div style="display: flex; justify-content: center;font-size: 40px;font-weight: bolder;margin-top: 25px;align-items: center;">
<div>{{ ticketForm.station }}</div>
<svg-icon icon-class="arrow" style="width: 100px" />
<div>
<el-select v-model="ticketForm.nextStation" size="small" :disabled="switchFlag" class="station-input" placeholder="请选择">
<el-option
v-for="item in stationList"
:key="item.code"
:label="item.name"
:value="item.name"
/>
</el-select>
</div>
</div>
<div style="display: flex; justify-content: space-between;font-size: 18px;margin-top: 25px;margin-bottom: 25px;align-items: center;">
<div style="margin-left: 50px;"><span style="color: #f00">{{ ticketForm.station }}</span>站名印</div>
<div>
<span>编号</span>
<el-input v-model="ticketForm.no" size="small" :disabled="switchFlag" style="width: 80px;" />
</div>
</div>
<div style="text-align: center;">
<!-- <el-select v-model=""></el-select>-->
</div>
</div>
</template>
<script>
export default {
name: 'TrainTicket',
props: {
ticketForm:{
type: Object,
required: true
},
switchFlag:{
type: Boolean,
required: true
},
stationList: {
type: Array,
required: true
}
},
data() {
return {
};
}
};
</script>
<style scoped>
</style>