diff --git a/src/api/jmap/training.js b/src/api/jmap/training.js index a721b0a3d..e8e806ba9 100644 --- a/src/api/jmap/training.js +++ b/src/api/jmap/training.js @@ -234,10 +234,11 @@ export function startTraining(group, params) { }); } /** 结束实训 */ -export function endTraining(group) { +export function endTraining(group, data) { return request({ url: `/api/training2Simulation/${group}/finish`, - method: 'put' + method: 'put', + data }); } /** 实训完成步骤 */ diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index b433ed257..7d63a7b0b 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -437,17 +437,12 @@ class Jlmap { this.$painter.$transformHandle.revisibleAll(); } updatePicture(list = []) { - console.log('---------------'); - // debugger; list.forEach(item => { const device = this.mapDevice[item]; if (device && device._type !== deviceType.Switch && device._type !== deviceType.Train) { const pictureDevice = store.getters['map/getPictureDeviceByCode'](item); device._pictureHide = pictureDevice ? pictureDevice.pictureHide : false; this.$painter.updatePicture(device); - if (device.code === 'X97979') { - console.log(pictureDevice, 'pictureDevice', this.mapDevice[device.code]); - } try { if (device._type === deviceType.Section && device.type === '03') { this.mapDevice[device.switch.code]._pictureHide = pictureDevice ? pictureDevice.pictureHide : false; diff --git a/src/jmapNew/shape/graph/Psd/EHorizontal2Door.js b/src/jmapNew/shape/graph/Psd/EHorizontal2Door.js index 33cff02aa..e6d2ba7e6 100644 --- a/src/jmapNew/shape/graph/Psd/EHorizontal2Door.js +++ b/src/jmapNew/shape/graph/Psd/EHorizontal2Door.js @@ -84,7 +84,7 @@ class EHorizontal2Door extends Group { this.stand2.setStyle('fill', style.Psd.horizontal2Door.defaultColor); } } - if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) { + if (model.noStatus || (model.atsNoStatus && store.state.map.picture === 'dispatchWork')) { this.stand1.setStyle('fill', '#7F7F7F'); this.stand2.setStyle('fill', '#7F7F7F'); } diff --git a/src/jmapNew/shape/graph/Psd/ERectDoor.js b/src/jmapNew/shape/graph/Psd/ERectDoor.js index 227cd39f9..716ab0781 100644 --- a/src/jmapNew/shape/graph/Psd/ERectDoor.js +++ b/src/jmapNew/shape/graph/Psd/ERectDoor.js @@ -51,7 +51,7 @@ class ERect2Door extends Group { this.psd.setStyle('fill', style.Psd.rectDoor.defaultColor); } } - if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) { + if (model.noStatus || (model.atsNoStatus && store.state.map.picture === 'dispatchWork')) { this.psd.setStyle('fill', '#7F7F7F'); } } diff --git a/src/jmapNew/shape/graph/Section/index.js b/src/jmapNew/shape/graph/Section/index.js index c05475ad6..b31edc13a 100644 --- a/src/jmapNew/shape/graph/Section/index.js +++ b/src/jmapNew/shape/graph/Section/index.js @@ -578,7 +578,7 @@ export default class Section extends Group { // 区段延时解锁 model.remain > 0 && this.delayUnlock(); // 设置灰显 - if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) { + if (model.noStatus || (model.atsNoStatus && store.state.map.picture === 'dispatchWork')) { this.setAshShow(); } // 设置脱轨器 diff --git a/src/jmapNew/shape/graph/Signal/index.js b/src/jmapNew/shape/graph/Signal/index.js index 5f5d4544d..b74acd722 100644 --- a/src/jmapNew/shape/graph/Signal/index.js +++ b/src/jmapNew/shape/graph/Signal/index.js @@ -1210,7 +1210,7 @@ class Signal extends Group { } this.model.virtual && this.sigBack && this.sigBack.show(); // 设置灰显 - if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) { + if (model.noStatus || (model.atsNoStatus && store.state.map.picture === 'dispatchWork')) { this.setAshShow(); } @@ -1218,7 +1218,7 @@ class Signal extends Group { if (this.style.Signal.text.conflictColor && model.checkConflict) { this.sigName.setColor(this.style.Signal.text.conflictColor); } - if (store.state.training.prdType === '01') { + if (store.state.map.picture === 'localWork') { this.lowButton && this.lowButton.show(); } } diff --git a/src/jmapNew/shape/graph/Station/EStationText.js b/src/jmapNew/shape/graph/Station/EStationText.js index 672c8922d..7d4c96574 100644 --- a/src/jmapNew/shape/graph/Station/EStationText.js +++ b/src/jmapNew/shape/graph/Station/EStationText.js @@ -42,8 +42,8 @@ class EStationText extends Group { z: this.model.z, silent: !model.visible || false, style: { - x: model.subheadPosition.x, - y: model.subheadPosition.y, + x: model.computedSubheadTextPosition.x, + y: model.computedSubheadTextPosition.y, fontWeight: model.fontWeight, fontSize: model.subheadFont || 18, fontFamily: style.fontFamily, diff --git a/src/jmapNew/shape/graph/Station/index.js b/src/jmapNew/shape/graph/Station/index.js index 96fe16def..4061db974 100644 --- a/src/jmapNew/shape/graph/Station/index.js +++ b/src/jmapNew/shape/graph/Station/index.js @@ -34,10 +34,12 @@ export default class Station extends Group { this.computedPosition = pictureDevice.position; this.computedTurnBackPoint = { x: model.turnBackPoint ? model.turnBackPoint.x + offsetX : 0, y: model.turnBackPoint ? model.turnBackPoint.y + offsetY : 0 }; this.computedControlModePoint = { x: model.controlModePoint.x + offsetX, y: model.controlModePoint.y + offsetY }; + this.computedSubheadTextPosition = { x: model.subheadPosition ? model.subheadPosition.x + offsetX : 0, y: model.subheadPosition ? model.subheadPosition.y + offsetY : 0 }; } else { this.computedPosition = model.position; this.computedTurnBackPoint = model.turnBackPoint; this.computedControlModePoint = model.controlModePoint; + this.computedSubheadTextPosition = model.subheadPosition; } this.z = 40; this.model = model; @@ -59,6 +61,7 @@ export default class Station extends Group { 'stationText': EStationText // 车站名称 (普通站台样式) }; model.computedPosition = this.computedPosition; + model.computedSubheadTextPosition = this.computedSubheadTextPosition; // 遍历当前线路下的绘图元素 组合模式 traverseLineElements(style.Station, elementTypeList, model, style, this); diff --git a/src/jmapNew/shape/graph/StationStand/ETrainSetButton.js b/src/jmapNew/shape/graph/StationStand/ETrainSetButton.js index cd9cddf84..967b742be 100644 --- a/src/jmapNew/shape/graph/StationStand/ETrainSetButton.js +++ b/src/jmapNew/shape/graph/StationStand/ETrainSetButton.js @@ -55,7 +55,7 @@ class ETrainSetButton extends Group { } setState(model) { - if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) { + if (model.noStatus || (model.atsNoStatus && store.state.map.picture === 'dispatchWork')) { this.setColor('#7F7F7F'); } } diff --git a/src/jmapNew/shape/graph/StationStand/index.js b/src/jmapNew/shape/graph/StationStand/index.js index 12c635464..8c535b354 100644 --- a/src/jmapNew/shape/graph/StationStand/index.js +++ b/src/jmapNew/shape/graph/StationStand/index.js @@ -159,7 +159,7 @@ class StationStand extends Group { this.downDetainLamp && this.downDetainLamp.hide(); } setScreenDoorOpenStatus(model) { - if (!this.model.noStatus && !(this.model.atsNoStatus && store.state.training.prdType == '02')) { + if (!this.model.noStatus && !(this.model.atsNoStatus && store.state.map.picture === 'dispatchWork')) { this.gapStand && this.gapStand.setState(model); } } @@ -183,7 +183,7 @@ class StationStand extends Group { currentTypeList.forEach(element => { this[element].setState(model); }); - if (store.state.training.prdType === '01') { + if (store.state.map.picture === 'localWork') { this.stopJumpLamp && this.stopJumpLamp.show(); this.cancelStopJumpLamp && this.cancelStopJumpLamp.show(); this.upDetainLamp && this.upDetainLamp.show(); diff --git a/src/jmapNew/shape/graph/StationStand/safeStand/EGapStand.js b/src/jmapNew/shape/graph/StationStand/safeStand/EGapStand.js index 8201de20d..86ef8f30f 100644 --- a/src/jmapNew/shape/graph/StationStand/safeStand/EGapStand.js +++ b/src/jmapNew/shape/graph/StationStand/safeStand/EGapStand.js @@ -110,7 +110,7 @@ class EGapStand extends Group { this.setClose(); } } - if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) { + if (model.noStatus || (model.atsNoStatus && store.state.map.picture === '02')) { this.setColor('#7F7F7F'); } } diff --git a/src/jmapNew/shape/graph/Switch/index.js b/src/jmapNew/shape/graph/Switch/index.js index 3657c219a..044ea66f4 100644 --- a/src/jmapNew/shape/graph/Switch/index.js +++ b/src/jmapNew/shape/graph/Switch/index.js @@ -877,7 +877,7 @@ export default class Switch extends Group { const sectionC = this.mapDevice[switchModel.sectionCCode]; sectionC && sectionC.instance && sectionC.instance.handleSwitchSection(sectionC); } - if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) { + if (model.noStatus || (model.atsNoStatus && store.state.map.picture === 'dispatchWork')) { this.setAshShow(); } !model.auto && this.artificialArc && this.artificialArc.show(); diff --git a/src/jmapNew/shape/graph/Train/index.js b/src/jmapNew/shape/graph/Train/index.js index 8559cb3c4..6050ac372 100644 --- a/src/jmapNew/shape/graph/Train/index.js +++ b/src/jmapNew/shape/graph/Train/index.js @@ -40,7 +40,7 @@ export default class Train extends Group { _computed() { const model = this.model; const style = this.style; - if (model.trainWindowModel) { + if (model.trainWindowModel && model.trainWindowModel.instance) { const amendData = store.getters['map/amendPoints'](model.trainWindowModel.code); if (amendData) { model.trainWindowModel.instance.computedPoint = amendData.position; diff --git a/src/jmapNew/shape/graph/TrainWindow/EMouse.js b/src/jmapNew/shape/graph/TrainWindow/EMouse.js index 0d790f839..297607a32 100644 --- a/src/jmapNew/shape/graph/TrainWindow/EMouse.js +++ b/src/jmapNew/shape/graph/TrainWindow/EMouse.js @@ -4,34 +4,25 @@ export default class EMouse { } mouseover(e) { - if (this.device.prdType) { - this.device.setVisible(true); - const instance = this.device.getInstanceByCode(this.device.model.sectionCode); - if (instance && instance.mouseEvent && instance.mouseEvent.mouseover) { - instance.mouseEvent.mouseEnter(e); - } + this.device.setVisible(true); + const instance = this.device.getInstanceByCode(this.device.model.sectionCode); + if (instance && instance.mouseEvent && instance.mouseEvent.mouseover) { + instance.mouseEvent.mouseEnter(e); } } mouseout(e) { - if (this.device.prdType) { - this.device.setVisible(false); - const instance = this.device.getInstanceByCode(this.device.model.sectionCode); - if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) { - instance.mouseEvent.mouseLeave(e); - } + this.device.setVisible(false); + const instance = this.device.getInstanceByCode(this.device.model.sectionCode); + if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) { + instance.mouseEvent.mouseLeave(e); } } mouseEnter() { - // if (this.device.prdType) { - // this.device.setVisible(true); - // } } mouseLeave() { - if (this.device.prdType ) { - this.device.setVisible(false); - } + this.device.setVisible(false); } } diff --git a/src/jmapNew/shape/graph/TrainWindow/index.js b/src/jmapNew/shape/graph/TrainWindow/index.js index 3329eddc4..637fc59de 100644 --- a/src/jmapNew/shape/graph/TrainWindow/index.js +++ b/src/jmapNew/shape/graph/TrainWindow/index.js @@ -23,13 +23,12 @@ class TrainWindow extends Group { this.model = model; this.style = style; this.z = 9; - this.prdType = store.state.training.prdType; this.create(); this.createMouseEvent(); this.setState(model); } create() { - if (this.prdType !== '01') { + if (store.state.map.picture !== 'localWork') { this.createTrainWindow(); } } diff --git a/src/jmapNew/theme/components/menus/dialog/cmdManage.vue b/src/jmapNew/theme/components/menus/dialog/cmdManage.vue index 65b19d733..ad052d164 100644 --- a/src/jmapNew/theme/components/menus/dialog/cmdManage.vue +++ b/src/jmapNew/theme/components/menus/dialog/cmdManage.vue @@ -91,8 +91,8 @@
- {{ trainingDetail.name }} + {{ trainingDetail ?trainingDetail.name:'' }}
@@ -54,6 +56,16 @@