From 4c02e416bc17d0c706eacfed42b4d31f20bb7f76 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 6 Mar 2020 15:27:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E9=83=BD=E4=B8=80=E5=8F=B7=E7=BA=BF?= =?UTF-8?q?=20=E5=88=97=E8=BD=A6=E6=89=80=E5=9C=A8=E5=8C=BA=E6=AE=B5?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4=EF=BC=88?= =?UTF-8?q?=E9=83=A8=E5=88=86=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/bejing_01.js | 3 +++ src/jmapNew/config/skinCode/chengdu_01.js | 3 +++ src/jmapNew/config/skinCode/chengdu_03.js | 3 +++ src/jmapNew/config/skinCode/fuzhou_01.js | 3 +++ src/jmapNew/config/skinCode/haerbin_01.js | 3 +++ src/jmapNew/config/skinCode/ningbo_01.js | 3 +++ src/jmapNew/painter.js | 2 +- src/jmapNew/shape/Train/index.js | 19 +++++++++++++++++++ .../theme/beijing_01/menus/menuSignal.vue | 1 - .../theme/beijing_01/menus/menuSwitch.vue | 1 - .../chengdu_03/menus/dialog/standControl.vue | 1 - 11 files changed, 38 insertions(+), 4 deletions(-) diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index 8b0c646bf..5b60ed632 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -135,6 +135,9 @@ class SkinCode extends defaultStyle { }, block: { special: false, // 区段特殊显示 + }, + trainPosition:{ + display: false // 列车实时位置显示 } }; diff --git a/src/jmapNew/config/skinCode/chengdu_01.js b/src/jmapNew/config/skinCode/chengdu_01.js index 7fa20717e..825d54c2e 100644 --- a/src/jmapNew/config/skinCode/chengdu_01.js +++ b/src/jmapNew/config/skinCode/chengdu_01.js @@ -135,6 +135,9 @@ class SkinCode extends defaultStyle { }, block: { special: false, // 区段特殊显示 + }, + trainPosition:{ + display: true // 列车实时位置显示 } }; diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index 4ef903b5d..da0e6a652 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -138,6 +138,9 @@ class SkinCode extends defaultStyle { }, block: { special: false, // 区段特殊显示 + }, + trainPosition:{ + display: false // 列车实时位置显示 } }; diff --git a/src/jmapNew/config/skinCode/fuzhou_01.js b/src/jmapNew/config/skinCode/fuzhou_01.js index 6a3c1dff6..4bc15dab7 100644 --- a/src/jmapNew/config/skinCode/fuzhou_01.js +++ b/src/jmapNew/config/skinCode/fuzhou_01.js @@ -128,6 +128,9 @@ class SkinCode extends defaultStyle { }, block: { special: false, // 区段特殊显示 + }, + trainPosition:{ + display: false // 列车实时位置显示 } }; diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index 76851b190..f69e8d708 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -128,6 +128,9 @@ class SkinCode extends defaultStyle { }, block: { special: true, // 区段特殊显示 + }, + trainPosition:{ + display: false // 列车实时位置显示 } }; diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 76614087b..8c811ef8a 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -136,6 +136,9 @@ class SkinCode extends defaultStyle { block: { special: false, // 区段特殊显示 blockGlint: true, // 区段封锁闪烁显示 + }, + trainPosition:{ + display: false // 列车实时位置显示 } }; diff --git a/src/jmapNew/painter.js b/src/jmapNew/painter.js index dc81d8a36..d1c7af375 100644 --- a/src/jmapNew/painter.js +++ b/src/jmapNew/painter.js @@ -148,7 +148,7 @@ class Painter { try { if (device._dispose) { this.delete(device); - } else if (deviceType.Train == device._type) { + } else if (deviceType.Train.toUpperCase() == device.deviceType) { this.updateTrain(device); } else { const instance = device.instance; diff --git a/src/jmapNew/shape/Train/index.js b/src/jmapNew/shape/Train/index.js index 4d97249ea..0bd0a63cc 100644 --- a/src/jmapNew/shape/Train/index.js +++ b/src/jmapNew/shape/Train/index.js @@ -3,6 +3,8 @@ import TrainHead from './TrainHead'; import TrainBody from './TrainBody'; import BoundingRect from 'zrender/src/core/BoundingRect'; import Rect from 'zrender/src/graphic/shape/Rect'; +import { deepAssign } from '@/utils/index'; +import store from '@/store'; /** 列车 */ export default class Train extends Group { @@ -115,6 +117,18 @@ export default class Train extends Group { getShapeTipPoint() { } + updateSection() { + const train = this.model; + if (train.physicalCode && train.offsetp) { + const data = train.physicalCode; + const oldmodel = store.getters['map/getDeviceByCode'](data); + let models = []; + const model = deepAssign(oldmodel, {_type: 'Section'}); // 修改元素model + models = [model]; + store.dispatch('map/updateMapDevices', models); + } + } + // 恢复颜色状态 recover() { this.trainB && this.trainB.setHShow(false); @@ -309,6 +323,11 @@ export default class Train extends Group { this.setCommunicationStatus(model.runLevel); // this.setTrainTypeStatus(model.type); 配合早晚点设置 this.setDoorStatus(model.doorCloseLock); + + const style = this.style; + if (style.Section.trainPosition.display) { + this.updateSection(); + } } // let points = []; // if (model) { diff --git a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue index e585b0181..68d334a51 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue @@ -153,7 +153,6 @@ export default { }, watch: { '$store.state.menuOperation.menuCount': function (val) { - debugger; if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) { this.doShow(this.$store.state.menuOperation.menuPosition); } else { diff --git a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue index bce77aaa9..202a8a862 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue @@ -191,7 +191,6 @@ export default { break; } case OperationEvent.Switch.lock.button.operation: { - debugger; // 道岔单锁 if (!selectType.singleLock) { this.lock(selectType); diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue index cc3d499ca..5377545e0 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/standControl.vue @@ -388,7 +388,6 @@ export default { this.stationName = station.name; } } - debugger; if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) { this.radio = selected.direction; } else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {