From 9b422cd3b9d770bcb1d70acee1f74744b217f5ac Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Wed, 19 May 2021 15:14:49 +0800 Subject: [PATCH 01/38] =?UTF-8?q?=E5=8D=97=E4=BA=AC=E4=BA=8C=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF=E8=B0=83=E6=95=B4=EF=BC=88=E6=9C=AA=E5=AE=8C=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nanjing_02/menus/dialog/mapVisual.vue | 2 +- .../nanjing_02/menus/dialog/troDetail.vue | 33 +- src/jmapNew/theme/nanjing_02/menus/index.vue | 42 +- .../theme/nanjing_02/menus/menuBar.vue | 3 +- src/router/index.js | 6 + src/views/demonstration/detail/index.vue | 6 +- src/views/newMap/displayBaSiDi/baSiDi.vue | 365 ++++++++++++++++++ src/views/newMap/displayBaSiDi/index.vue | 315 +++++++++++++++ 8 files changed, 731 insertions(+), 41 deletions(-) create mode 100644 src/views/newMap/displayBaSiDi/baSiDi.vue create mode 100644 src/views/newMap/displayBaSiDi/index.vue diff --git a/src/jmapNew/theme/nanjing_02/menus/dialog/mapVisual.vue b/src/jmapNew/theme/nanjing_02/menus/dialog/mapVisual.vue index d8aec6eca..fe64b16a2 100644 --- a/src/jmapNew/theme/nanjing_02/menus/dialog/mapVisual.vue +++ b/src/jmapNew/theme/nanjing_02/menus/dialog/mapVisual.vue @@ -182,7 +182,7 @@ export default { // 重置jlmap宽高 resetSize() { this.$nextTick(() => { - this.map && this.map.resize({ width: 1920, height: 960 }); + this.map && this.map.resize({ width: this.width, height: this.height }); }); }, // 设置显示图层 diff --git a/src/jmapNew/theme/nanjing_02/menus/dialog/troDetail.vue b/src/jmapNew/theme/nanjing_02/menus/dialog/troDetail.vue index a64f39426..bb7c8b603 100644 --- a/src/jmapNew/theme/nanjing_02/menus/dialog/troDetail.vue +++ b/src/jmapNew/theme/nanjing_02/menus/dialog/troDetail.vue @@ -8,7 +8,7 @@ :before-close="doClose" :z-index="2000" > - +
@@ -18,12 +18,13 @@ diff --git a/src/jmapNew/theme/nanjing_02/menus/menuBar.vue b/src/jmapNew/theme/nanjing_02/menus/menuBar.vue index ec526437a..d2c83508b 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuBar.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuBar.vue @@ -261,7 +261,8 @@ export default { 'order' ]), ...mapGetters('map', [ - 'stationList' + 'stationList', + 'trainList' ]), userId() { return this.$store.state.user ? this.$store.state.user.id : ''; diff --git a/src/router/index.js b/src/router/index.js index c5f947fc7..442c0d725 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -34,6 +34,7 @@ const Jlmap3dOtherVR = () => import('@/views/jlmap3d/maintainer/jl3dothervr'); const DisplayNew = () => import('@/views/newMap/displayNew/index'); const DisplayCity = () => import('@/views/newMap/displayCity/index'); +const DisplayBaSiDi = () => import('@/views/newMap/displayBaSiDi/index'); const DesignDisplayNew = () => import('@/views/newMap/displayNew/scriptDisplay/scriptPreview/index'); const PracticeDisplay = () => import('@/views/newMap/displayNew/practiceDisplay'); const BigLPFStrategy = () => import('@/views/newMap/displayNew/bigLPFStrategy'); @@ -393,6 +394,11 @@ export const publicAsyncRoute = [ component: DisplayCity, hidden: true }, + { + path: '/displayBaSiDi/:mode', + component: DisplayBaSiDi, + hidden: true + }, { path: '/design/displayNew/:mode', component: DesignDisplayNew, diff --git a/src/views/demonstration/detail/index.vue b/src/views/demonstration/detail/index.vue index e5fe7bf3d..959d86981 100644 --- a/src/views/demonstration/detail/index.vue +++ b/src/views/demonstration/detail/index.vue @@ -249,7 +249,11 @@ export default { if (this.loadingProjectList.includes(this.project)) { this.$store.dispatch('app/transitionAnimations'); } - this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query }); + if (this.currentPrdType === '02' && this.courseModel.lineCode === '14') { + this.$router.push({ path: `/displayBaSiDi/demon`, query: query }); + } else { + this.$router.push({ path: `${UrlConfig.displayNew}/demon`, query: query }); + } launchFullscreen(); }).catch(error=>{ if (error.code == 10003) { diff --git a/src/views/newMap/displayBaSiDi/baSiDi.vue b/src/views/newMap/displayBaSiDi/baSiDi.vue new file mode 100644 index 000000000..d2b87962c --- /dev/null +++ b/src/views/newMap/displayBaSiDi/baSiDi.vue @@ -0,0 +1,365 @@ + + + + + diff --git a/src/views/newMap/displayBaSiDi/index.vue b/src/views/newMap/displayBaSiDi/index.vue new file mode 100644 index 000000000..91dd9eee4 --- /dev/null +++ b/src/views/newMap/displayBaSiDi/index.vue @@ -0,0 +1,315 @@ + + From 8db97250d86121a2eb7fdc991da51e6fb1b74191 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Wed, 19 May 2021 18:03:58 +0800 Subject: [PATCH 02/38] =?UTF-8?q?=E6=9A=82=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nanjing_02/menus/dialog/mapVisual.vue | 2 +- .../theme/nanjing_02/menus/dialog/rps.vue | 1 + .../theme/nanjing_02/menus/dialog/tro.vue | 1 + .../nanjing_02/menus/dialog/troDetail.vue | 3 +- .../menus/menuDialog/alarmTableHmi.vue | 12 +- src/views/newMap/displayBaSiDi/baSiDi.vue | 49 ++++++- src/views/newMap/displayBaSiDi/index.vue | 120 ++++++++++++++---- 7 files changed, 159 insertions(+), 29 deletions(-) diff --git a/src/jmapNew/theme/nanjing_02/menus/dialog/mapVisual.vue b/src/jmapNew/theme/nanjing_02/menus/dialog/mapVisual.vue index fe64b16a2..e5b9c20fe 100644 --- a/src/jmapNew/theme/nanjing_02/menus/dialog/mapVisual.vue +++ b/src/jmapNew/theme/nanjing_02/menus/dialog/mapVisual.vue @@ -12,7 +12,7 @@ import Jlmap from '@/jmapNew/map'; import { deepAssign } from '@/utils/index'; import deviceType from '@/jmapNew/constant/deviceType'; import { mapGetters } from 'vuex'; -import { parser } from '@/jmapNew/utils/parser'; +import { parser } from '@/jmapNew/parser/parser-graph'; export default { name: 'JLocalmapVisual', diff --git a/src/jmapNew/theme/nanjing_02/menus/dialog/rps.vue b/src/jmapNew/theme/nanjing_02/menus/dialog/rps.vue index 97daffd16..271fa4f24 100644 --- a/src/jmapNew/theme/nanjing_02/menus/dialog/rps.vue +++ b/src/jmapNew/theme/nanjing_02/menus/dialog/rps.vue @@ -6,6 +6,7 @@ :visible.sync="show" :fullscreen="true" :before-close="doClose" + append-to-body :z-index="2000" > diff --git a/src/jmapNew/theme/nanjing_02/menus/dialog/tro.vue b/src/jmapNew/theme/nanjing_02/menus/dialog/tro.vue index 4ce5ff99d..d725aedad 100644 --- a/src/jmapNew/theme/nanjing_02/menus/dialog/tro.vue +++ b/src/jmapNew/theme/nanjing_02/menus/dialog/tro.vue @@ -6,6 +6,7 @@ :visible.sync="show" :fullscreen="true" :before-close="doClose" + append-to-body :z-index="2000" > diff --git a/src/jmapNew/theme/nanjing_02/menus/dialog/troDetail.vue b/src/jmapNew/theme/nanjing_02/menus/dialog/troDetail.vue index bb7c8b603..06fad201f 100644 --- a/src/jmapNew/theme/nanjing_02/menus/dialog/troDetail.vue +++ b/src/jmapNew/theme/nanjing_02/menus/dialog/troDetail.vue @@ -5,6 +5,7 @@ :title="title" :visible.sync="show" :fullscreen="true" + append-to-body :before-close="doClose" :z-index="2000" > @@ -19,7 +20,7 @@ + From 5ee943a3132d5a42b4acd0b6bdbcff6b8225230a Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 20 May 2021 11:04:21 +0800 Subject: [PATCH 03/38] =?UTF-8?q?=E6=9A=82=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/graph/Train/index.js | 2 +- .../nanjing_02/menus/dialog/troDetail.vue | 44 ++++++++++++++----- src/utils/baseUrl.js | 4 +- src/views/newMap/displayBaSiDi/baSiDi.vue | 7 ++- src/views/newMap/displayBaSiDi/index.vue | 5 ++- 5 files changed, 47 insertions(+), 15 deletions(-) diff --git a/src/jmapNew/shape/graph/Train/index.js b/src/jmapNew/shape/graph/Train/index.js index db5c0e5bf..30e699a6f 100644 --- a/src/jmapNew/shape/graph/Train/index.js +++ b/src/jmapNew/shape/graph/Train/index.js @@ -357,7 +357,7 @@ export default class Train extends Group { this.setSoonerOrLater(model.dt); } if (this.style.Train.common.cbtcSpeedColor && model.runLevel === 'CBTC') { // 南京二号线 ctc列车随速度变化 列车部分颜色发生变化 - this.trainB.setSpeedColor(model.speed); + this.trainB && this.trainB.setSpeedColor(model.speed); } this.setDoorStatus(model.doorCloseLock); this.setAlarmStatus(model.alarmStatus); diff --git a/src/jmapNew/theme/nanjing_02/menus/dialog/troDetail.vue b/src/jmapNew/theme/nanjing_02/menus/dialog/troDetail.vue index 06fad201f..1fbac6ddf 100644 --- a/src/jmapNew/theme/nanjing_02/menus/dialog/troDetail.vue +++ b/src/jmapNew/theme/nanjing_02/menus/dialog/troDetail.vue @@ -11,16 +11,18 @@ >
-
-
-
+
+
+
From 4796e7f64843282545a1c2e0e155ee3b1229c5ed Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 24 May 2021 11:29:59 +0800 Subject: [PATCH 07/38] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9A=82=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/xian_01.js | 3 +- src/jmapNew/map.js | 1 - src/jmapNew/shape/graph/Psd/index.js | 12 +- src/jmapNew/shape/graph/Section/index.js | 14 +- src/jmapNew/shape/graph/Signal/index.js | 10 +- src/jmapNew/shape/graph/Station/index.js | 2 + src/jmapNew/shape/graph/Switch/index.js | 10 +- src/jmapNew/shape/graph/Train/EMouse.js | 2 +- src/jmapNew/shape/graph/Train/TrainBody.js | 8 +- .../nanjing_02/menus/dialog/mapVisual.vue | 290 ------------------ .../theme/nanjing_02/menus/dialog/rps.vue | 79 ----- .../theme/nanjing_02/menus/dialog/tro.vue | 77 ----- .../theme/nanjing_02/menus/menuBar.vue | 15 +- src/views/newMap/displayBaSiDi/baSiDi.vue | 31 +- src/views/newMap/displayBaSiDi/index.vue | 35 ++- src/views/newMap/displayBaSiDi/rps.vue | 128 ++++++++ src/views/newMap/displayBaSiDi/tro.vue | 210 +++++++++++++ .../newMap/displayBaSiDi}/troDetail.vue | 79 +++-- .../newMap/mapsystemNew/common/index.vue | 3 + 19 files changed, 479 insertions(+), 530 deletions(-) delete mode 100644 src/jmapNew/theme/nanjing_02/menus/dialog/mapVisual.vue delete mode 100644 src/jmapNew/theme/nanjing_02/menus/dialog/rps.vue delete mode 100644 src/jmapNew/theme/nanjing_02/menus/dialog/tro.vue create mode 100644 src/views/newMap/displayBaSiDi/rps.vue create mode 100644 src/views/newMap/displayBaSiDi/tro.vue rename src/{jmapNew/theme/nanjing_02/menus/dialog => views/newMap/displayBaSiDi}/troDetail.vue (52%) diff --git a/src/jmapNew/config/skinCode/xian_01.js b/src/jmapNew/config/skinCode/xian_01.js index e79502458..817304b53 100644 --- a/src/jmapNew/config/skinCode/xian_01.js +++ b/src/jmapNew/config/skinCode/xian_01.js @@ -638,6 +638,7 @@ class SkinCode extends defaultStyle { horizontalDistance: 7// 箭头三角水平高度 }; this[deviceType.Train] = { + moreTrainDetail: true, trainBody: { fontFamily: 'consolas', trainBodyLineWidth: 0, // 车身line宽 @@ -792,7 +793,7 @@ class SkinCode extends defaultStyle { }; this[deviceType.FloodGate] = {}; this[deviceType.DirectionRod] = {}; - this[deviceType.IndicatorLight] = {}; + this[deviceType.IndicatorLight] = {}; } } diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 8bd2b7f69..dd6ab80df 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -212,7 +212,6 @@ class Jlmap { this.screenFlag = false; this.$painter.updateTransform({ scaleRate: opts.scaleRate, offsetX: opts.offsetX, offsetY: opts.offsetY }); } - setUpdateScreen(opts) { this.setRecover({ scaleRate: 1, offsetX: 0, offsetY: 0 }); this.screenFlag = true; diff --git a/src/jmapNew/shape/graph/Psd/index.js b/src/jmapNew/shape/graph/Psd/index.js index 033757dc3..e2b3f0de1 100644 --- a/src/jmapNew/shape/graph/Psd/index.js +++ b/src/jmapNew/shape/graph/Psd/index.js @@ -18,7 +18,7 @@ export default class Line2 extends Group { this.isShowShape = true; this.create(); this.setState(model); - this.setShowMode(); + this.setShowMode(true); this.checkIsDrawMap(); } @@ -76,12 +76,18 @@ export default class Line2 extends Group { this.on('mouseover', () => { this.highlight.mouseover(); }); } } - setShowMode() { + setShowMode(flag) { const showMode = this.model.showMode; - if (showMode == '05') { + if (!flag) { this.eachChild(item => { item.show(); }); + this.setState(this.model); + } + if (showMode == '05') { + this.eachChild(item => { + item.hide(); + }); } } setShowStation(flag) { diff --git a/src/jmapNew/shape/graph/Section/index.js b/src/jmapNew/shape/graph/Section/index.js index be278657e..8cf5c0a88 100644 --- a/src/jmapNew/shape/graph/Section/index.js +++ b/src/jmapNew/shape/graph/Section/index.js @@ -66,7 +66,7 @@ export default class Section extends Group { this.create(); this.createMouseEvent(); this.setState(model); - this.setShowMode(); + this.setShowMode(true); } create() { @@ -434,7 +434,7 @@ export default class Section extends Group { model.preGreen && this.line.setStyle({stroke: '#00FF00'}); model.preBlue && this.line.setStyle({stroke: '#4A76B7'}); } else { - this.handleSwitchSection(model, flag); + model.showMode !== '05' && this.handleSwitchSection(model, flag); // 顺序代表优先级 /** 宁波三号线 运行线显示状态 (前端自定义状态)*/ // model.isRunLineShow && this.showRunLine(); @@ -469,7 +469,7 @@ export default class Section extends Group { model.signalDerailer && exec(DerailerMap[model.signalDerailer], this.derailer, this.style); /** 道岔区段更新岔心颜色 */ - if (model.type === '03' && model.switch) { + if (model.type === '03' && model.switch && model.showMode !== '05') { const sectionSwitch = this.mapDevice[model.switch.code]; if (sectionSwitch && sectionSwitch.sectionACode === model.code) { sectionSwitch.instance && sectionSwitch.instance.setState(sectionSwitch); @@ -573,7 +573,13 @@ export default class Section extends Group { mouseover() { this.line && this.line.setStyle({ stroke: 'rgba(255,255,255,0.8)' }); } - setShowMode() { + setShowMode(flag = false) { + if (!flag) { + this.eachChild(item => { + item.show(); + }); + this.setState(this.model); + } if (this.model.showMode === '05') { this.line.setStyle({stroke: this.style.Section.line.troColor, lineWidth: this.style.Section.line.troWidth}); this.separator && this.separator.hide(); diff --git a/src/jmapNew/shape/graph/Signal/index.js b/src/jmapNew/shape/graph/Signal/index.js index 94f09ec0f..a16533336 100644 --- a/src/jmapNew/shape/graph/Signal/index.js +++ b/src/jmapNew/shape/graph/Signal/index.js @@ -212,8 +212,8 @@ class Signal extends Group { this.createMouseEvent(); this.checkIsDrawMap(); this.transformRotation(this); - this.setShowMode(); this.setState(model); + this.setShowMode(true); // this.checkIsDrawMap(); } @@ -1143,8 +1143,14 @@ class Signal extends Group { }); } } - setShowMode() { + setShowMode(flag = false) { const showMode = this.model.showMode; + if (!flag) { + this.eachChild(item => { + item.show(); + }); + this.setState(this.model); + } if (showMode == '03') { this.lowButton && this.lowButton.show(); this.model.prdType = '01'; diff --git a/src/jmapNew/shape/graph/Station/index.js b/src/jmapNew/shape/graph/Station/index.js index f89106c23..d4507bbdc 100644 --- a/src/jmapNew/shape/graph/Station/index.js +++ b/src/jmapNew/shape/graph/Station/index.js @@ -776,6 +776,8 @@ export default class Station extends Group { setShowMode() { if (this.model.showMode === '05') { this.createTroButton(); // 创建轨道预览按钮 + } else { + this.troButton && this.troButton.hide(); } } setShowStation(flag) { diff --git a/src/jmapNew/shape/graph/Switch/index.js b/src/jmapNew/shape/graph/Switch/index.js index 8321f9a9b..143e75e98 100644 --- a/src/jmapNew/shape/graph/Switch/index.js +++ b/src/jmapNew/shape/graph/Switch/index.js @@ -31,7 +31,7 @@ export default class Switch extends Group { this.createMouseEvent(); this.setState(model); this.checkIsDrawMap(); - this.setShowMode(); + this.setShowMode(true); } createMouseEvent() { @@ -798,7 +798,13 @@ export default class Switch extends Group { this.on('mouseover', () => { this.highlight.mouseover(); }); } } - setShowMode() { + setShowMode(flag = false) { + if (!flag) { + this.eachChild(item => { + item.show(); + }); + this.setState(this.model); + } if ( this.model.showMode === '05') { this.eachChild(item => { item.hide(); diff --git a/src/jmapNew/shape/graph/Train/EMouse.js b/src/jmapNew/shape/graph/Train/EMouse.js index a84a803c9..76e77df51 100644 --- a/src/jmapNew/shape/graph/Train/EMouse.js +++ b/src/jmapNew/shape/graph/Train/EMouse.js @@ -52,7 +52,7 @@ class EMouse extends Group { if (LangStorage.getLang() == 'en') { text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${direction ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${this.device.model.hold ? 'Detained' : 'Normal'}\n \n 跳停状态: ${this.device.model.jump ? 'Skip to continue moving' : 'Normal'}Stationary: ${!this.device.model.stop ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`; } else { - if (Vue.prototype.$jlmap.lineCode == '11' || Vue.prototype.$jlmap.lineCode == '10') { + if (this.device.style.Train.moreTrainDetail) { text = `列车类型: ${trainType}\n来\0\0\0\0源:人工标记\n车\0组\0号: ${this.device.model.groupNumber}\n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n早\0晚\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车次通信: 通信车\n运行时间: \n停站时间: \n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'}\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: ${this.device.model.runLevel || 'CTC'}车\n最高信号系统控制: CTC\n驾驶模式: ${this.device.model.driveMode}模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.speed ? '关闭' : direction ? '左开右关' : '左关右开'}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折法策略: \n折返状态: \n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`; } else { text = `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.hold ? '扣车' : '正常'}\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`; diff --git a/src/jmapNew/shape/graph/Train/TrainBody.js b/src/jmapNew/shape/graph/Train/TrainBody.js index 3d1444c7d..379f6f0ed 100644 --- a/src/jmapNew/shape/graph/Train/TrainBody.js +++ b/src/jmapNew/shape/graph/Train/TrainBody.js @@ -45,10 +45,10 @@ export default class TrainBody extends Group { : model.tripNumber || style.Train.trainTarget.defaultTripNumber); // 车次号 const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (style.Train.trainTargetNumber.lineNumber || '') + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber); // 车组号 const serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.serviceNumber || model.model.specialServiceNumber || style.Train.trainServer.defaultServiceNumber);// 服务号(表号) - let targetCode = style.Train.trainNumber.targetCodePrefix + (model.destinationCode || style.Train.trainNumber.defaultTargetCode); // 目的地码 - if (Vue.prototype.$jlmap.lineCode == '09') { // 暂时先写死 后面有了删掉就好 - targetCode = '01'; - } + const targetCode = style.Train.trainNumber.targetCodePrefix + (model.destinationCode || style.Train.trainNumber.defaultTargetCode); // 目的地码 + // if (Vue.prototype.$jlmap.lineCode == '09') { // 暂时先写死 后面有了删掉就好 + // targetCode = '01'; + // } // 服务号 this.textTrainServer = new ETextName({ zlevel: model.zlevel, diff --git a/src/jmapNew/theme/nanjing_02/menus/dialog/mapVisual.vue b/src/jmapNew/theme/nanjing_02/menus/dialog/mapVisual.vue deleted file mode 100644 index 5c1e5508d..000000000 --- a/src/jmapNew/theme/nanjing_02/menus/dialog/mapVisual.vue +++ /dev/null @@ -1,290 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/nanjing_02/menus/dialog/rps.vue b/src/jmapNew/theme/nanjing_02/menus/dialog/rps.vue deleted file mode 100644 index f1b986912..000000000 --- a/src/jmapNew/theme/nanjing_02/menus/dialog/rps.vue +++ /dev/null @@ -1,79 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/nanjing_02/menus/dialog/tro.vue b/src/jmapNew/theme/nanjing_02/menus/dialog/tro.vue deleted file mode 100644 index fb0f5680e..000000000 --- a/src/jmapNew/theme/nanjing_02/menus/dialog/tro.vue +++ /dev/null @@ -1,77 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/nanjing_02/menus/menuBar.vue b/src/jmapNew/theme/nanjing_02/menus/menuBar.vue index 2798fa74d..65ca7b6e1 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuBar.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuBar.vue @@ -170,10 +170,6 @@ - - - - @@ -189,11 +185,6 @@ import BuzzerAudio from '@/assets/buzzer.mp3'; import AlarmTableHmi from './menuDialog/alarmTableHmi'; import AlarmTableLow from './menuDialog/alarmTableLow'; import TrainControl from './dialog/trainControl'; -import RpsDialog from './dialog/rps'; -import TraDialog from './dialog/tra'; - -import TroDialog from './dialog/tro'; -import TroDetailDialog from './dialog/troDetail'; import LogDetail from './menuDialog/logDetail'; export default { @@ -202,11 +193,7 @@ export default { AlarmTableLow, AlarmTableHmi, TrainControl, - LogDetail, - RpsDialog, - TroDialog, - TraDialog, - TroDetailDialog + LogDetail }, props: { selected: { diff --git a/src/views/newMap/displayBaSiDi/baSiDi.vue b/src/views/newMap/displayBaSiDi/baSiDi.vue index 9c4d84600..3b7588f32 100644 --- a/src/views/newMap/displayBaSiDi/baSiDi.vue +++ b/src/views/newMap/displayBaSiDi/baSiDi.vue @@ -5,6 +5,7 @@ :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" + z-index="1999" :modal="false" width="100%" > @@ -103,14 +104,6 @@
- - - @@ -132,17 +125,11 @@ import { mapGetters } from 'vuex'; import { timeFormat } from '@/utils/date'; import BuzzerAudio from '@/assets/buzzer.mp3'; import AlarmTableHmi from '@/jmapNew/theme/nanjing_02/menus/menuDialog/alarmTableHmi'; -import RpsDialog from '@/jmapNew/theme/nanjing_02/menus/dialog/rps'; -import TroDialog from '@/jmapNew/theme/nanjing_02/menus/dialog/tro'; -import TroDetailDialog from '@/jmapNew/theme/nanjing_02/menus/dialog/troDetail'; import { prefixIntrger } from '@/utils/date'; export default { name: 'BaSiDi', components: { - AlarmTableHmi, - RpsDialog, - TroDialog, - TroDetailDialog + AlarmTableHmi }, props: { @@ -215,6 +202,13 @@ export default { // const date = new Date(+new Date(`${new Date().toLocaleDateString()} ${timeFormat(time)}`)); // this.initDate(date); }, + // '$store.state.menuOperation.selectedCount':function(em) { + // const device = this.$store.state.menuOperation.selected; + // if (device && device._type === 'Station' && this.$store.state.menuOperation.subType === 'troButton') { + // this.$refs.troDialog.doClose(); + // setTimeout(() => { this.goTroDetail(device.code); }, 5000); + // } + // }, '$store.state.socket.simulationAlarmInfo': function(val) { (val || []).forEach(item => { if (!item.confirmed) { @@ -288,13 +282,10 @@ export default { } }, rpsClick() { - this.$refs.rpsDialog.doShow(); + this.$emit('rpsClick'); }, troClick() { - this.$refs.troDialog.doShow(); - }, - goTroDetail(deviceCode) { - this.$refs.troDetailDialog.doShow(deviceCode); + this.$emit('troClick'); }, selectBeginTime() { this.$emit('selectBeginTime'); diff --git a/src/views/newMap/displayBaSiDi/index.vue b/src/views/newMap/displayBaSiDi/index.vue index 2b6c3b408..3de58f3c6 100644 --- a/src/views/newMap/displayBaSiDi/index.vue +++ b/src/views/newMap/displayBaSiDi/index.vue @@ -4,10 +4,14 @@ ref="baSiDi" :is-disable="isDisable" :data-error="dataError" + @rpsClick="rpsClick" + @troClick="troClick" @end="end" @back="back" @selectBeginTime="selectBeginTime" /> + +
@@ -25,6 +29,8 @@ import { EventBus } from '@/scripts/event-bus'; import { getSimulationMemberList, getAllSimulationUser } from '@/api/simulation'; import { getMemberListCommon, getUserListCommon } from '@/api/rtSimulation'; import BaSiDi from './baSiDi'; +import RpsDialog from './rps'; +import TroDialog from './tro'; import parseStatus from '@/utils/parseStatus'; export default { @@ -32,7 +38,9 @@ export default { components: { // MapSystemDraft BaSiDi, - SetTime + SetTime, + RpsDialog, + TroDialog }, data() { return { @@ -49,6 +57,10 @@ export default { ...mapGetters([ 'canvasWidth' ]), + ...mapGetters('map', [ + 'stationList', + 'trainList' + ]), mode() { return this.$route.params.mode; }, @@ -113,6 +125,11 @@ export default { '$store.state.socket.memberChangeCount': function () { // 仿真成员变更 this.initMemberUserInfo(); }, + '$store.state.socket.simulationStart':function(val) { + if (val) { + this.$store.dispatch('training/simulationStart'); + } + }, $route() { if (!this.isLesson && !this.isExam) { this.initLoadData(); @@ -122,7 +139,6 @@ export default { beforeDestroy() { this.clearSubscribe(); this.clearSubscribeNew(); - // this.clearAllTimer(); clearSimulation(this.group); this.$store.dispatch('training/reset'); }, @@ -160,9 +176,12 @@ export default { this.$router.go(-1); }, async statusMessage(list) { - // await this.$store.dispatch('training/updateMapState', list); - this.$store.commit('map/updateMapDevice', list); - // console.log(this.$store.state.map.mapDevice, '000'); + if (this.$jlmap) { + await this.$store.dispatch('training/updateMapState', list); + } else { + // await this.$store.dispatch('map/updateMapDevices', list); + this.$store.commit('map/updateMapDevice', list); + } await this.$store.dispatch('socket/setEquipmentStatus'); }, async statusMessageNew(deviceStatus) { @@ -386,6 +405,12 @@ export default { }).catch(() => { this.$messageBox(this.$t('display.demon.endSimulationFail')); }); + }, + rpsClick() { + this.$refs.rpsDialog.doShow(); + }, + troClick() { + this.$refs.troDialog.doShow(); } } }; diff --git a/src/views/newMap/displayBaSiDi/rps.vue b/src/views/newMap/displayBaSiDi/rps.vue new file mode 100644 index 000000000..03b650cc4 --- /dev/null +++ b/src/views/newMap/displayBaSiDi/rps.vue @@ -0,0 +1,128 @@ + + + + diff --git a/src/views/newMap/displayBaSiDi/tro.vue b/src/views/newMap/displayBaSiDi/tro.vue new file mode 100644 index 000000000..1eba932e8 --- /dev/null +++ b/src/views/newMap/displayBaSiDi/tro.vue @@ -0,0 +1,210 @@ + + + + diff --git a/src/jmapNew/theme/nanjing_02/menus/dialog/troDetail.vue b/src/views/newMap/displayBaSiDi/troDetail.vue similarity index 52% rename from src/jmapNew/theme/nanjing_02/menus/dialog/troDetail.vue rename to src/views/newMap/displayBaSiDi/troDetail.vue index 1fbac6ddf..928c8e9c8 100644 --- a/src/jmapNew/theme/nanjing_02/menus/dialog/troDetail.vue +++ b/src/views/newMap/displayBaSiDi/troDetail.vue @@ -9,11 +9,13 @@ :before-close="doClose" :z-index="2000" > - -
-
-
-
+
+ +
+
+
+
+
@@ -23,6 +25,7 @@ import MapSystemDraft from '@/views/newMap/mapsystemNew/common/index'; import ButtonDbupIcon from '@/assets/baSiDi/dbup.png'; import ButtonRightIcon from '@/assets/baSiDi/right.png'; import ButtonLeftIcon from '@/assets/baSiDi/left.png'; +import Vue from 'vue'; export default { name: 'TRO', @@ -57,40 +60,44 @@ export default { return '轨道详览'; }, width() { - return this.$store.state.app.width - 30; + return this.$store.state.app.width - 10; }, height() { - return this.$store.state.app.height - 60; + return this.$store.state.app.height - 40; } }, watch: { - '$store.state.socket.equipmentStatus': function (val) { - if (val.length) { - this.statusMessage(val); + '$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始加载默认状态 + if (this.dialogShow) { + const trainList = []; + this.trainList.forEach(item => { + trainList.push({ code: item.groupNumber, deviceType:'TRAIN' }); + }); + const nameList = Object.keys(this.$store.state.map.map || {}); + let list = []; + nameList.forEach(item => { + if (item !== 'skinVO') { + const data = this.$store.state.map.map[item]; + if (data && data.constructor === Array) { + list = [...list, ...data]; + } + } + }); + Vue.prototype.$jlmap.updateShowMode(list, '02'); + this.$store.dispatch('training/updateMapState', trainList); } } }, methods: { doShow(deviceCode) { this.dialogShow = true; - this.$store.dispatch('config/resize', { width:this.width, height: this.height }); + // this.$store.dispatch('config/resize', { width:this.width, height: this.height }); this.deviceCode = deviceCode; this.$nextTick(function() { - this.$store.state.map.map = Object.assign({}, this.$store.state.map.map); - this.$refs.mapCanvas.setCenter(this.deviceCode); - const list = []; - this.trainList.forEach(item => { - list.push({ code: item.groupNumber, deviceType:'TRAIN' }); - }); - setTimeout(() => { - this.$store.dispatch('training/updateMapState', list); - }, 3000); + // this.$store.state.map.map = Object.assign({}, this.$store.state.map.map); + // this.$refs.mapCanvas.setCenter(this.deviceCode); }); }, - async statusMessage(list) { - await this.$store.dispatch('training/updateMapState', list); - await this.$store.dispatch('socket/setEquipmentStatus'); - }, back() {}, doClose() { this.loading = false; @@ -116,15 +123,33 @@ export default { diff --git a/src/views/newMap/displayBaSiDi/index.vue b/src/views/newMap/displayBaSiDi/index.vue index 3de58f3c6..49e6dcb65 100644 --- a/src/views/newMap/displayBaSiDi/index.vue +++ b/src/views/newMap/displayBaSiDi/index.vue @@ -6,12 +6,14 @@ :data-error="dataError" @rpsClick="rpsClick" @troClick="troClick" + @handleCarPark="handleCarPark" @end="end" @back="back" @selectBeginTime="selectBeginTime" /> +
@@ -31,6 +33,7 @@ import { getMemberListCommon, getUserListCommon } from '@/api/rtSimulation'; import BaSiDi from './baSiDi'; import RpsDialog from './rps'; import TroDialog from './tro'; +import CarPack from './carPack'; import parseStatus from '@/utils/parseStatus'; export default { @@ -40,7 +43,8 @@ export default { BaSiDi, SetTime, RpsDialog, - TroDialog + TroDialog, + CarPack }, data() { return { @@ -411,9 +415,73 @@ export default { }, troClick() { this.$refs.troDialog.doShow(); + }, + handleCarPark() { + this.$refs.carPack.doShow(); } } }; - From 46d74d30021e99772b790ac55fafbe6aa4069d96 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Wed, 26 May 2021 15:46:29 +0800 Subject: [PATCH 12/38] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9A=82=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/map.js | 1 - src/views/newMap/displayBaSiDi/index.vue | 11 +++- src/views/newMap/displayBaSiDi/rps.vue | 3 + src/views/newMap/displayBaSiDi/tro.vue | 61 +++----------------- src/views/newMap/displayBaSiDi/troDetail.vue | 35 +++++++++-- 5 files changed, 49 insertions(+), 62 deletions(-) diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 613e6ed5e..dd6ab80df 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -198,7 +198,6 @@ class Jlmap { if (device && device.instance) { var rect = createBoundingRect(device.instance); var dcenter = calculateDCenter(rect, this.$zr.getWidth() / 2); - console.log(device, dcenter); this.setOptions(dcenter); } } else { diff --git a/src/views/newMap/displayBaSiDi/index.vue b/src/views/newMap/displayBaSiDi/index.vue index 17cbc4b27..5566e30c6 100644 --- a/src/views/newMap/displayBaSiDi/index.vue +++ b/src/views/newMap/displayBaSiDi/index.vue @@ -12,7 +12,7 @@ /> - +
@@ -137,6 +137,13 @@ export default { if (!this.isLesson && !this.isExam) { this.initLoadData(); } + }, + '$store.state.menuOperation.selectedCount':function(em) { + const device = this.$store.state.menuOperation.selected; + if (device && device._type === 'Station' && this.$store.state.menuOperation.subType === 'troButton') { + this.$refs.troDialog.doClose(); + this.$refs.troDetail.doShow(device.code); + } } }, beforeDestroy() { @@ -179,12 +186,14 @@ export default { this.$router.go(-1); }, async statusMessage(list) { + // console.log(this.$jlmap, '========'); if (this.$jlmap) { await this.$store.dispatch('training/updateMapState', list); } else { // await this.$store.dispatch('map/updateMapDevices', list); this.$store.commit('map/updateMapDevice', list); } + // this.$store.commit('map/updateMapDevice', list); await this.$store.dispatch('socket/setEquipmentStatus'); }, async statusMessageNew(deviceStatus) { diff --git a/src/views/newMap/displayBaSiDi/rps.vue b/src/views/newMap/displayBaSiDi/rps.vue index 3d1d7312c..89f0b4500 100644 --- a/src/views/newMap/displayBaSiDi/rps.vue +++ b/src/views/newMap/displayBaSiDi/rps.vue @@ -56,6 +56,9 @@ export default { this.handleUpdateScreen(); this.$refs.mapCanvas && this.$refs.mapCanvas.mapViewLoaded(false); } + }, + '$store.state.app.windowSizeCount': function() { // 窗口缩放 + this.$store.dispatch('config/resize', { width:this.width, height: this.height }); } }, methods: { diff --git a/src/views/newMap/displayBaSiDi/tro.vue b/src/views/newMap/displayBaSiDi/tro.vue index cd72e60a1..fb113fa4a 100644 --- a/src/views/newMap/displayBaSiDi/tro.vue +++ b/src/views/newMap/displayBaSiDi/tro.vue @@ -8,12 +8,7 @@ :z-index="2003" >
- -
-
-
-
-
+
@@ -44,7 +39,6 @@ export default { return { dialogShow: false, mapData: null, - type: 'tro', deviceCode: '', enter: false, buttonDbup: ButtonDbupIcon, @@ -57,7 +51,7 @@ export default { return this.dialogShow && !this.$store.state.menuOperation.break; }, title() { - return this.type === 'tro' ? '轨道总览' : '轨道详览'; + return '轨道总览'; }, width() { return this.$store.state.app.width - 5; @@ -71,22 +65,13 @@ export default { }, watch: { '$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始加载默认状态 - if (this.dialogShow && this.type === 'tro') { + if (this.dialogShow) { this.showTroMode(); this.$refs.mapCanvas && this.$refs.mapCanvas.mapViewLoaded(false); - } else if (this.dialogShow && this.type === 'troDetail') { - this.showTroDetail(); - this.$refs.mapCanvas && this.$refs.mapCanvas.mapViewLoaded(false); } }, - '$store.state.menuOperation.selectedCount':function(em) { - const device = this.$store.state.menuOperation.selected; - console.log(device); - if (device && device._type === 'Station' && this.$store.state.menuOperation.subType === 'troButton') { - this.deviceCode = device.code; - this.type = 'troDetail'; - this.showTroDetail(); - } + '$store.state.app.windowSizeCount': function() { // 窗口缩放 + this.$store.dispatch('config/resize', { width:this.width, height: this.height }); } }, mounted() { @@ -103,7 +88,6 @@ export default { }); }, showTroMode() { - this.type = 'tro'; const nameList = Object.keys(this.$store.state.map.map || {}); let list = []; nameList.forEach(item => { @@ -114,32 +98,13 @@ export default { } } }); - this.handleUpdateScreen(); - this.$jlmap.updateShowMode(list, '05'); // 二次过滤 - }, - showTroDetail() { - const nameList = Object.keys(this.$store.state.map.map || {}); - let list = []; - nameList.forEach(item => { - if (item !== 'skinVO') { - const data = this.$store.state.map.map[item]; - if (data && data.constructor === Array) { - list = [...list, ...data]; - } - } - }); - - this.$jlmap.setRecover({ scaleRate: 1, offsetX: 0, offsetY: 0 }); - this.$jlmap.updateShowMode(list, '02'); // 二次过滤 const trainList = []; this.trainList.forEach(item => { trainList.push({ code: item.groupNumber, deviceType:'TRAIN' }); }); + this.handleUpdateScreen(); + this.$jlmap.updateShowMode(list, '05'); // 二次过滤 this.$store.dispatch('training/updateMapState', trainList); - console.log(this.deviceCode, '===='); - setTimeout(() => { - this.$refs.mapCanvas.setCenter(this.deviceCode); - }, 1000); }, handleUpdateScreen() { this.maskOpen = false; @@ -159,20 +124,8 @@ export default { // this.$messageBox('该线路没有大屏切割位置信息, 请前往地图绘制编辑'); } }, - changeStation(value) { - const device = this.$store.getters['map/getDeviceByCode'](this.deviceCode); - const stationSn = device.sn + value; - const station = this.stationList.find((item) => { - return item.sn === stationSn; - }); - if (station) { - this.deviceCode = station.code; - this.$refs.mapCanvas.setCenter(this.deviceCode); - } - }, back() {}, doClose() { - this.type = 'tro'; this.loading = false; this.dialogShow = false; } diff --git a/src/views/newMap/displayBaSiDi/troDetail.vue b/src/views/newMap/displayBaSiDi/troDetail.vue index 4e91de3ad..34cca89ca 100644 --- a/src/views/newMap/displayBaSiDi/troDetail.vue +++ b/src/views/newMap/displayBaSiDi/troDetail.vue @@ -10,7 +10,7 @@ >
-
+
@@ -48,7 +48,8 @@ export default { deviceCode: '', buttonDbup: ButtonDbupIcon, buttonRight: ButtonRightIcon, - buttonLeft: ButtonLeftIcon + buttonLeft: ButtonLeftIcon, + enter: false }; }, computed: { @@ -84,8 +85,12 @@ export default { }); Vue.prototype.$jlmap.updateShowMode(list, '02'); this.$store.dispatch('training/updateMapState', trainList); - this.$refs.mapCanvas.setCenter(this.deviceCode); + this.$refs.mapCanvas && this.$refs.mapCanvas.setCenter(this.deviceCode); + this.$refs.mapCanvas && this.$refs.mapCanvas.mapViewLoaded(false); } + }, + '$store.state.app.windowSizeCount': function() { // 窗口缩放 + this.$store.dispatch('config/resize', { width:this.width, height: this.height }); } }, methods: { @@ -93,9 +98,15 @@ export default { this.dialogShow = true; this.$store.dispatch('config/resize', { width:this.width, height: this.height }); this.deviceCode = deviceCode; + if (this.enter) { + this.$refs.mapCanvas && this.$refs.mapCanvas.setCenter(this.deviceCode); + } + this.$nextTick(function() { - // this.$store.state.map.map = Object.assign({}, this.$store.state.map.map); - // + if (!this.enter) { + this.$refs.mapCanvas.setMap(this.$store.state.map.map); + this.enter = true; + } }); }, back() {}, @@ -115,7 +126,7 @@ export default { }); if (station) { this.deviceCode = station.code; - this.$refs.mapCanvas.setCenter(this.deviceCode); + this.$refs.mapCanvas && this.$refs.mapCanvas.setCenter(this.deviceCode); } } } @@ -132,6 +143,7 @@ export default { /deep/ .el-dialog .el-dialog__body{ background: rgba(100, 100, 100, 1); border: 0; + padding: 0; } /deep/ .el-dialog .el-dialog__header { padding: 5px; @@ -158,4 +170,15 @@ export default { background-size: 45px 30px; background-repeat: no-repeat; } + .button-box{ + width: 150px; + height: 35px; + display: flex; + position: absolute; + bottom: 60px; + left: calc(50% - 75px); + z-index: 9999; + justify-content: space-between; + justify-items: center; + } From 7412e01b32a8c56e3fa48c7fb2fdbc9e2f0a8385 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Wed, 26 May 2021 17:18:20 +0800 Subject: [PATCH 13/38] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9A=82=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/graph/Switch/index.js | 1 - src/views/newMap/displayBaSiDi/index.vue | 3 ++ src/views/newMap/displayBaSiDi/rps.vue | 26 ++++++++++++--- src/views/newMap/displayBaSiDi/tro.vue | 18 ++++++++++ src/views/newMap/displayBaSiDi/troDetail.vue | 35 ++++++++++++-------- 5 files changed, 65 insertions(+), 18 deletions(-) diff --git a/src/jmapNew/shape/graph/Switch/index.js b/src/jmapNew/shape/graph/Switch/index.js index a2798e699..f5f2bce1c 100644 --- a/src/jmapNew/shape/graph/Switch/index.js +++ b/src/jmapNew/shape/graph/Switch/index.js @@ -676,7 +676,6 @@ export default class Switch extends Group { setState(model) { if (!this.isShowShape || model.showMode === '05') return; this.recover(); - // 只响应前端自定义类型的状态变化 if (model._free) { if (model.normalPosition) { diff --git a/src/views/newMap/displayBaSiDi/index.vue b/src/views/newMap/displayBaSiDi/index.vue index 7441f6604..d8cc7de56 100644 --- a/src/views/newMap/displayBaSiDi/index.vue +++ b/src/views/newMap/displayBaSiDi/index.vue @@ -155,6 +155,9 @@ export default { this.clearSubscribeNew(); clearSimulation(this.group); this.$store.dispatch('training/reset'); + // this.$refs.rpsDialog.destroy(); + // this.$refs.troDialog.destroy(); + // this.$refs.troDetail.destroy(); }, async mounted() { const _that = this; diff --git a/src/views/newMap/displayBaSiDi/rps.vue b/src/views/newMap/displayBaSiDi/rps.vue index 89f0b4500..1ea84e4ef 100644 --- a/src/views/newMap/displayBaSiDi/rps.vue +++ b/src/views/newMap/displayBaSiDi/rps.vue @@ -14,6 +14,7 @@ + + diff --git a/src/views/jlmap3d/railwaydrive/drivecontrol/drivecontrol.vue b/src/views/jlmap3d/railwaydrive/drivecontrol/drivecontrol.vue new file mode 100644 index 000000000..00f3ed686 --- /dev/null +++ b/src/views/jlmap3d/railwaydrive/drivecontrol/drivecontrol.vue @@ -0,0 +1,457 @@ + + + + + diff --git a/src/views/jlmap3d/railwaydrive/drivecontrol/leftpane.vue b/src/views/jlmap3d/railwaydrive/drivecontrol/leftpane.vue new file mode 100644 index 000000000..b2b31c3eb --- /dev/null +++ b/src/views/jlmap3d/railwaydrive/drivecontrol/leftpane.vue @@ -0,0 +1,442 @@ + + + + + diff --git a/src/views/jlmap3d/railwaydrive/drivecontrol/rightpane.vue b/src/views/jlmap3d/railwaydrive/drivecontrol/rightpane.vue new file mode 100644 index 000000000..9dbf2127a --- /dev/null +++ b/src/views/jlmap3d/railwaydrive/drivecontrol/rightpane.vue @@ -0,0 +1,338 @@ + + + + + diff --git a/src/views/jlmap3d/railwaydrive/drivecontrol/toprightpane.vue b/src/views/jlmap3d/railwaydrive/drivecontrol/toprightpane.vue new file mode 100644 index 000000000..bd553f0c5 --- /dev/null +++ b/src/views/jlmap3d/railwaydrive/drivecontrol/toprightpane.vue @@ -0,0 +1,537 @@ + + + + + diff --git a/src/views/jlmap3d/railwaydrive/jl3drailwaydrive.vue b/src/views/jlmap3d/railwaydrive/jl3drailwaydrive.vue new file mode 100644 index 000000000..d074bf307 --- /dev/null +++ b/src/views/jlmap3d/railwaydrive/jl3drailwaydrive.vue @@ -0,0 +1,459 @@ + + + + + diff --git a/src/views/jlmap3d/railwaydrive/sceneview/mmi.css b/src/views/jlmap3d/railwaydrive/sceneview/mmi.css new file mode 100644 index 000000000..f0532b361 --- /dev/null +++ b/src/views/jlmap3d/railwaydrive/sceneview/mmi.css @@ -0,0 +1,78 @@ +/* N区 跳停扣车显示 */ +.narea{ + left:0px;top:0; +} + +/* D区 信息设置按钮 */ +.darea{ + right:0px;top:0; +} + +/* M1区 当前驾驶模式显示 */ +.m1area{ + left:0px;top:12%; +} + +/* M2区 当前运行等级显示 */ +.m2area{ + right:0px;top:12%; +} + +/* M3区 折返状态显示 */ +.m3area{ + left:0px;top:24%; +} + +/* M4区 列车进入停车窗显示 */ +.m4area{ + right:0px;top:24%; +} + +/* M5区 车门状态及门允许侧显示 */ +.m5area{ + left:0px;top:36%; +} + +/* M6区 发车信息显示 */ +.m6area{ + right:0px;top:36%; +} + +/* M7区 客室门控制模式显示 */ +.m7area{ + left:0px;top:48%; +} + +/* M8区 屏蔽门状态显示 */ +.m8area{ + right:0px;top:48%; +} + +/* M9区 设备故障显示 */ +.m9area{ + left:0px;top:60%; +} + +/* M10区 停车场/车辆段的转换区显示 */ +.m10area{ + right:0px;top:60%; +} + +/* C1区 ATO牵引制动状态显示 */ +.c1area{ +} + +/* C2区 最高预设驾驶模式显示 */ +.c2area{ + left:70px; +} + +/* C3区 列车完整性状态显示 */ +.c3area{ + left:140px; +} + +/* C5区 列车头尾设备状态显示 */ +.c5area{ + right:0; +} diff --git a/src/views/jlmap3d/railwaydrive/sceneview/mmi.js b/src/views/jlmap3d/railwaydrive/sceneview/mmi.js new file mode 100644 index 000000000..40ae35e58 --- /dev/null +++ b/src/views/jlmap3d/railwaydrive/sceneview/mmi.js @@ -0,0 +1,127 @@ +import Vue from 'vue'; +import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js'; + +export function mmirender(dom) { + let scope = this; + + let scene = new THREE.Scene(); + scene.add( new THREE.AmbientLight( 0xffffff ) ); + // camera + + let camera = new THREE.PerspectiveCamera( 30, 360 / 200, 1, 100 ); + camera.position.set( 0, 0, 80 ); + + let renderer = new THREE.WebGLRenderer( ); + // renderer.setPixelRatio( window.devicePixelRatio ); + renderer.setSize( 360, 200 ); + + var geometry = new THREE.PlaneBufferGeometry( 80, 80, 2 ); + var material = new THREE.MeshBasicMaterial( {color: 0x000000, side: THREE.DoubleSide} ); + var plane = new THREE.Mesh( geometry, material ); + scene.add( plane ); + + + var texture = new THREE.TextureLoader().load( JL3D_LOCAL_STATIC+'/jl3d/biao.png' ); + var geometry = new THREE.PlaneBufferGeometry( 60, 60, 2 ); + var material = new THREE.MeshBasicMaterial( {map: texture, side: THREE.DoubleSide} ); + var kd = new THREE.Mesh( geometry, material ); + kd.position.x = -5; + scene.add( kd ); + + var geometry = new THREE.PlaneBufferGeometry( 2, 2, 2 ); + var material = new THREE.MeshBasicMaterial( {color: 0x000000, side: THREE.DoubleSide} ); + var zc = new THREE.Mesh( geometry, material ); + zc.position.x = 2.48; + zc.position.y = -0.34; + zc.position.z = 1; + //zc.rotation.y = Math.PI; + //0刻度-Math.PI*65.8/100 + //110刻度-Math.PI*234.8/100 + zc.rotation.z = -Math.PI*65.8/100; + scene.add( zc ); + + var geometry = new THREE.PlaneBufferGeometry( 14, 0.8, 2 ); + var material = new THREE.MeshBasicMaterial( {color: 0xffffff, side: THREE.DoubleSide} ); + var zz = new THREE.Mesh( geometry, material ); + zz.position.z = 1; + zz.position.x = 11; + zc.add( zz ); + + var geometry = new THREE.PlaneBufferGeometry( 2, 2, 2 ); + var material = new THREE.MeshBasicMaterial( {color: 0x000000, side: THREE.DoubleSide} ); + var atp = new THREE.Mesh( geometry, material ); + atp.position.x = 2.48; + atp.position.y = -0.34; + atp.position.z = 1; + //zc.rotation.y = Math.PI; + //0刻度-Math.PI*65.8/100 + //110刻度-Math.PI*234.8/100 + atp.rotation.z = -Math.PI*65.8/100; + scene.add( atp ); + + var geometry = new THREE.CircleBufferGeometry(1.5, 1 ); + var material = new THREE.MeshBasicMaterial( {color: 0xea0000, side: THREE.DoubleSide} ); + var atpmark = new THREE.Mesh( geometry, material ); + atpmark.position.z = 1; + atpmark.position.x = 21; + atpmark.rotation.y = Math.PI; + atp.add( atpmark ); + + var geometry = new THREE.PlaneBufferGeometry( 2, 2, 2 ); + var material = new THREE.MeshBasicMaterial( {color: 0x000000, side: THREE.DoubleSide} ); + var ato = new THREE.Mesh( geometry, material ); + ato.position.x = 2.48; + ato.position.y = -0.34; + ato.position.z = 1; + //zc.rotation.y = Math.PI; + //0刻度-Math.PI*65.8/100 + //110刻度-Math.PI*234.8/100 + ato.rotation.z = -Math.PI*65.8/100; + scene.add( ato ); + + var geometry = new THREE.CircleBufferGeometry(1.5, 1 ); + var material = new THREE.MeshBasicMaterial( {color: 0xEEEE00, side: THREE.DoubleSide} ); + var atomark = new THREE.Mesh( geometry, material ); + atomark.position.z = 1; + atomark.position.x = 21; + atomark.rotation.y = Math.PI; + ato.add( atomark ); + + + + dom.appendChild( renderer.domElement); + renderer.render( scene, camera ); + // animate(); + + function animate() { + //zc.rotation.z -= 0.01; + // requestAnimationFrame(animate); + } + + this.updatezz = function(speed){ + zc.rotation.z = -Math.PI*(65.8+169*speed/110)/100; + + renderer.render( scene, camera ); + } + this.updateatp = function(atpspeed){ + if(atpspeed<0){ + atp.position.x = 10000; + }else{ + atp.position.x = 2.48; + atp.rotation.z = -Math.PI*(65.8+169*atpspeed/110)/100; + } + + // renderer.render( scene, camera ); + } + + this.updateato = function(atospeed){ + if(atospeed<0){ + ato.position.x = 10000; + }else{ + ato.position.x = 2.48; + ato.rotation.z = -Math.PI*(65.8+169*atospeed/110)/100; + } + + // renderer.render( scene, camera ); + } +} diff --git a/src/views/jlmap3d/railwaydrive/sceneview/mmiimage.js b/src/views/jlmap3d/railwaydrive/sceneview/mmiimage.js new file mode 100644 index 000000000..038c7313e --- /dev/null +++ b/src/views/jlmap3d/railwaydrive/sceneview/mmiimage.js @@ -0,0 +1,98 @@ +import Vue from 'vue'; +import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js'; + +export function mmiimage() { + let scope = this; + + //n + this.n = []; + this.n['tiaoting'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/n-tiaoting.png'; + this.n['kouche'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/n-kouche.png'; + this.n['none'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/none.png'; + + //d + this.d = [] + this.d['info'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/d-info.png'; + + this.m1 = []; + this.m1['start'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/none.png'; + this.m1['am'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m1-am.png'; + this.m1['cm'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m1-cm.png'; + this.m1['rm'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m1-rm.png'; + + this.m2 = []; + this.m2['start'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/none.png'; + this.m2['il'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m2-il.png'; + this.m2['itc'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m2-itc.png'; + this.m2['cbtc'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m2-cbtc.png'; + + this.m3 = []; + this.m3['zhefan'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m3-zhefan.png'; + this.m3['zhefanzhong'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m3-zhefanzhong.png'; + this.m3['none'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/none.png'; + + this.m4 = []; + this.m4['none'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/none.png'; + this.m4['out'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m4-out.png'; + this.m4['in'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m4-in.png'; + + this.m5 = []; + this.m5['state15'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m5-15.png'; + this.m5['rightdoor'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m5-rightdoor.png'; + this.m5['leftdoor'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m5-leftdoor.png'; + this.m5['noalloffdoor'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m5-noalloffdoor.png'; + this.m5['noallondoor'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m5-noallondoor.png'; + + this.m6 = []; + this.m6['none'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/none.png'; + this.m6['fache'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m6-fache.png'; + this.m6['closedoor'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m6-closedoor.png'; + + this.m7 = []; + this.m7['momc'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m7-momc.png'; + this.m7['aomc'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m7-aomc.png'; + this.m7['aoac'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m7-aoac.png'; + this.m7['none'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/none.png'; + + this.m8 = []; + this.m8['dahua'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m8-dahua.png'; + this.m8['jinjizhidong'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m8-jinjizhidong.png'; + this.m8['doornotclose'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m8-doornotclose.png'; + this.m8['none'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/none.png'; + + this.m9 = []; + this.m9['rad'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m9-rad.png'; + this.m9['atp'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m9-atp.png'; + this.m9['ato'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m9-ato.png'; + this.m9['none'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/none.png'; + + this.m10 = []; + this.m10['jinduan'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m10-jinduan.png'; + this.m10['shiwei'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m10-shiwei.png'; + this.m10['querenxinhao'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m10-querenxinhao.png'; + this.m10['none'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/none.png'; + + this.c1 = []; + this.c1['qianyin'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/c1-qianyin.png'; + this.c1['duoxing'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/c1-duoxing.png'; + this.c1['zhidong'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/c1-zhidong.png'; + this.c1['none'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/none.png'; + + + this.c2 = []; + this.c2['rm'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m1-rm.png'; + this.c2['cmi'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/c2-cm-i.png'; + this.c2['cmc'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/c2-cm-c.png'; + this.c2['ami'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/c2-am-i.png'; + this.c2['amc'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/c2-am-c.png'; + this.c2['none'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/none.png'; + + this.c3 = []; + this.c3['normal'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/c3-normal.png'; + this.c3['lose'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/c3-lose.png'; + + this.c5 = []; + this.c5['normal'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/c5-normal.png'; + this.c5['lose'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/c5-lose.png'; + +} diff --git a/src/views/jlmap3d/railwaydrive/sceneview/mmiview.vue b/src/views/jlmap3d/railwaydrive/sceneview/mmiview.vue new file mode 100644 index 000000000..d622f7456 --- /dev/null +++ b/src/views/jlmap3d/railwaydrive/sceneview/mmiview.vue @@ -0,0 +1,647 @@ + + + + + + diff --git a/src/views/jlmap3d/railwaydrive/sceneview/tmscomponent/tmsfault.vue b/src/views/jlmap3d/railwaydrive/sceneview/tmscomponent/tmsfault.vue new file mode 100644 index 000000000..cce1a2b75 --- /dev/null +++ b/src/views/jlmap3d/railwaydrive/sceneview/tmscomponent/tmsfault.vue @@ -0,0 +1,95 @@ + + + + + + diff --git a/src/views/jlmap3d/railwaydrive/sceneview/tmsview.vue b/src/views/jlmap3d/railwaydrive/sceneview/tmsview.vue new file mode 100644 index 000000000..cc3b0e810 --- /dev/null +++ b/src/views/jlmap3d/railwaydrive/sceneview/tmsview.vue @@ -0,0 +1,57 @@ + + + + + + diff --git a/src/views/newMap/displayCity/demonMenu.vue b/src/views/newMap/displayCity/demonMenu.vue index 9edac0f87..3c1ec28f3 100644 --- a/src/views/newMap/displayCity/demonMenu.vue +++ b/src/views/newMap/displayCity/demonMenu.vue @@ -4,6 +4,8 @@
菜单
{{ jl3dmodel }} + + 司机视角 经典案例分析 规范学习 @@ -15,11 +17,14 @@ :panel-show="deviceShow" @closedevice3dview="jumpjlmap3dmodel" /> +
From 1b5da46e8048d863a36899ea168ed6197b19e3d0 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 28 May 2021 10:10:54 +0800 Subject: [PATCH 15/38] =?UTF-8?q?=E8=83=8C=E6=8A=95=E8=BD=A8=E9=81=93?= =?UTF-8?q?=E6=80=BB=E8=A7=88=E8=AF=A6=E8=A7=88=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/map.js | 5 +++ src/jmapNew/painter.js | 2 - src/views/newMap/displayBaSiDi/rps.vue | 22 +++++++--- src/views/newMap/displayBaSiDi/tro.vue | 44 ++++++++++++-------- src/views/newMap/displayBaSiDi/troDetail.vue | 15 +++---- 5 files changed, 55 insertions(+), 33 deletions(-) diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index dd6ab80df..d4a5f908c 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -653,6 +653,11 @@ class Jlmap { this.$painter.clear(); } + clearView() { + // this.mapDevice = {}; + this.$painter.clear(); + } + dispose() { this.off(this.events.Pan, this.optionsHandler); this.off(this.events.Zoom, this.optionsHandler); diff --git a/src/jmapNew/painter.js b/src/jmapNew/painter.js index 5e65739c2..e036d9ddc 100644 --- a/src/jmapNew/painter.js +++ b/src/jmapNew/painter.js @@ -146,8 +146,6 @@ class Painter { const overlapTrainList = this.checkTrainOverlap(device); overlapTrainList.forEach((item, index) => { const trainDevice = this.$jmap.getDeviceByCode(item); - trainDevice._type = deviceRender['Train']._type; - trainDevice.zlevel = deviceRender['Train'].zlevel; trainDevice.overLapIndex = index; trainDevice.instance && this.mapInstanceLevel[deviceType.Train].remove(trainDevice.instance); this.add(trainDevice); diff --git a/src/views/newMap/displayBaSiDi/rps.vue b/src/views/newMap/displayBaSiDi/rps.vue index 1ea84e4ef..ad5c2d7f6 100644 --- a/src/views/newMap/displayBaSiDi/rps.vue +++ b/src/views/newMap/displayBaSiDi/rps.vue @@ -7,7 +7,7 @@ :before-close="doClose" :z-index="2003" > - + @@ -63,6 +63,11 @@ export default { this.$store.dispatch('config/resize', { width:this.width, height: this.height }); } }, + beforeDestroy() { + if (!this.dialogShow) { + this.destroy(); + } + }, methods: { doShow() { this.dialogShow = true; @@ -73,14 +78,14 @@ export default { this.$refs.mapCanvas.setMap(this.$store.state.map.map); this.enter = true; } else { + this.$jlmap.clearTrainView(); const mapDevice = this.$store.state.map.mapDevice; const list = []; for (const key in mapDevice) { list.push(mapDevice[key]); } - this.selfJmap.updateShowMode(list, '02'); - this.selfJmap.update(list); - // this.$store.dispatch('training/updateMapState', list); + this.$jlmap.updateShowMode(list, '02'); + this.$store.dispatch('training/updateMapState', list); } }); }, @@ -102,12 +107,17 @@ export default { offsetList: offsetList }; this.$jlmap.setUpdateScreen(size); + const mapDevice = this.$store.state.map.mapDevice; + const list = []; + for (const key in mapDevice) { + list.push(mapDevice[key]); + } + this.$jlmap.updateShowMode(list, '02'); } else { this.maskOpen = true; // this.$messageBox('该线路没有大屏切割位置信息, 请前往地图绘制编辑'); } }, - back() {}, doClose() { this.loading = false; this.dialogShow = false; @@ -120,7 +130,7 @@ export default { /deep/ .el-dialog { background: rgba(100, 100, 100, 1); position: relative; - border: 2px solid rgb(144, 144, 144, 0.8); + border: 2px solid rgba(144, 144, 144, 0.8); border-radius: 6px; font-size: 14px; } diff --git a/src/views/newMap/displayBaSiDi/tro.vue b/src/views/newMap/displayBaSiDi/tro.vue index e1fd48a86..ebfe34276 100644 --- a/src/views/newMap/displayBaSiDi/tro.vue +++ b/src/views/newMap/displayBaSiDi/tro.vue @@ -76,7 +76,10 @@ export default { this.$store.dispatch('config/resize', { width:this.width, height: this.height }); } }, - mounted() { + beforeDestroy() { + if (!this.dialogShow) { + this.destroy(); + } }, methods: { doShow() { @@ -88,12 +91,12 @@ export default { this.$refs.mapCanvas.setMap(this.$store.state.map.map); this.enter = true; } else { + this.$jlmap.clearTrainView(); const mapDevice = this.$store.state.map.mapDevice; const list = []; for (const key in mapDevice) { list.push(mapDevice[key]); } - console.log(this.$jlmap, '========'); this.$jlmap.updateShowMode(list, '05'); this.$store.dispatch('training/updateMapState', list); } @@ -105,23 +108,28 @@ export default { } }, showTroMode() { - const nameList = Object.keys(this.$store.state.map.map || {}); - let list = []; - nameList.forEach(item => { - if (item !== 'skinVO') { - const data = this.$store.state.map.map[item]; - if (data && data.constructor === Array) { - list = [...list, ...data]; - } - } - }); - const trainList = []; - this.trainList.forEach(item => { - trainList.push({ code: item.groupNumber, deviceType:'TRAIN' }); - }); + // const nameList = Object.keys(this.$store.state.map.map || {}); + // let list = []; + // nameList.forEach(item => { + // if (item !== 'skinVO') { + // const data = this.$store.state.map.map[item]; + // if (data && data.constructor === Array) { + // list = [...list, ...data]; + // } + // } + // }); + // const trainList = []; + // this.trainList.forEach(item => { + // trainList.push({ code: item.groupNumber, deviceType:'TRAIN' }); + // }); + const mapDevice = this.$store.state.map.mapDevice; + const list = []; + for (const key in mapDevice) { + list.push(mapDevice[key]); + } this.handleUpdateScreen(); this.$jlmap.updateShowMode(list, '05'); // 二次过滤 - this.$store.dispatch('training/updateMapState', trainList); + // this.$store.dispatch('training/updateMapState', trainList); }, handleUpdateScreen() { this.maskOpen = false; @@ -154,7 +162,7 @@ export default { /deep/ .el-dialog { background: rgba(100, 100, 100, 1); position: relative; - border: 2px solid rgb(144, 144, 144, 0.8); + border: 2px solid rgba(144, 144, 144, 0.8); border-radius: 6px; font-size: 14px; } diff --git a/src/views/newMap/displayBaSiDi/troDetail.vue b/src/views/newMap/displayBaSiDi/troDetail.vue index a6d26ff91..d3c92f3b8 100644 --- a/src/views/newMap/displayBaSiDi/troDetail.vue +++ b/src/views/newMap/displayBaSiDi/troDetail.vue @@ -9,7 +9,7 @@ :z-index="2000" >
- +
@@ -70,10 +70,6 @@ export default { watch: { '$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始加载默认状态 if (this.dialogShow) { - const trainList = []; - this.trainList.forEach(item => { - trainList.push({ code: item.groupNumber, deviceType:'TRAIN' }); - }); const list = []; const mapDevice = this.$store.state.map.mapDevice; for (const key in mapDevice) { @@ -88,6 +84,11 @@ export default { this.$store.dispatch('config/resize', { width:this.width, height: this.height }); } }, + beforeDestroy() { + if (!this.dialogShow) { + this.destroy(); + } + }, methods: { doShow(deviceCode) { this.dialogShow = true; @@ -102,6 +103,7 @@ export default { this.$refs.mapCanvas.setMap(this.$store.state.map.map); this.enter = true; } else { + this.$jlmap.clearTrainView(); const mapDevice = this.$store.state.map.mapDevice; const list = []; for (const key in mapDevice) { @@ -112,7 +114,6 @@ export default { } }); }, - back() {}, doClose() { this.loading = false; this.dialogShow = false; @@ -145,7 +146,7 @@ export default { /deep/ .el-dialog { background: rgba(100, 100, 100, 1); position: relative; - border: 2px solid rgb(144, 144, 144, 0.8); + border: 2px solid rgba(144, 144, 144, 0.8); border-radius: 6px; font-size: 14px; } From 70ca57d26c5173b3e7bb379d84a6c82ee34699ec Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 28 May 2021 11:00:26 +0800 Subject: [PATCH 16/38] =?UTF-8?q?=E6=97=B6=E5=88=BB=E8=A1=A8=E5=88=97?= =?UTF-8?q?=E8=BD=A6=E6=80=BB=E8=A7=88=E8=AF=A6=E8=A7=88=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/displayBaSiDi/baSiDi.vue | 10 +++- src/views/newMap/displayBaSiDi/index.vue | 59 +++++-------------- .../newMap/displayBaSiDi}/tra.vue | 5 +- .../newMap/displayBaSiDi}/ttl.vue | 0 4 files changed, 26 insertions(+), 48 deletions(-) rename src/{jmapNew/theme/nanjing_02/menus/dialog => views/newMap/displayBaSiDi}/tra.vue (96%) rename src/{jmapNew/theme/nanjing_02/menus/dialog => views/newMap/displayBaSiDi}/ttl.vue (100%) diff --git a/src/views/newMap/displayBaSiDi/baSiDi.vue b/src/views/newMap/displayBaSiDi/baSiDi.vue index a62d086e7..752921696 100644 --- a/src/views/newMap/displayBaSiDi/baSiDi.vue +++ b/src/views/newMap/displayBaSiDi/baSiDi.vue @@ -37,13 +37,13 @@
车场
轨道
系统
-
列车
+
列车
联锁
列监
运图
-
时刻表
+
时刻表
编表
调度
站控
@@ -287,6 +287,12 @@ export default { troClick() { this.$emit('troClick'); }, + traClick() { + this.$emit('traClick'); + }, + ttlClick() { + this.$emit('ttlClick'); + }, // 车场 handleCarPark() { this.$emit('handleCarPark'); diff --git a/src/views/newMap/displayBaSiDi/index.vue b/src/views/newMap/displayBaSiDi/index.vue index d8cc7de56..83fb60921 100644 --- a/src/views/newMap/displayBaSiDi/index.vue +++ b/src/views/newMap/displayBaSiDi/index.vue @@ -6,6 +6,8 @@ :data-error="dataError" @rpsClick="rpsClick" @troClick="troClick" + @traClick="traClick" + @ttlClick="ttlClick" @handleCarPark="handleCarPark" @end="end" @back="back" @@ -15,6 +17,8 @@ + +
@@ -36,18 +40,21 @@ import RpsDialog from './rps'; import TroDialog from './tro'; import CarPack from './carPack'; import TroDetail from './troDetail'; +import TraDialog from './tra'; +import TtlDialog from './ttl'; import parseStatus from '@/utils/parseStatus'; export default { name: 'DisplayDraft', components: { - // MapSystemDraft BaSiDi, SetTime, RpsDialog, CarPack, TroDialog, - TroDetail + TroDetail, + TraDialog, + TtlDialog }, data() { return { @@ -179,24 +186,12 @@ export default { }, // 仿真错误时,被动退出时调用 async back() { - // if (this.isExam) { - // await this.$refs.menuExam.back(); - // } else if (this.isLesson) { - // await this.$refs.lessonMenu.back(); - // } else if (this.isDemon) { - // await this.$refs.menuDemon.back(); - // } else if (this.isScript) { - // await this.$refs.menuScript.back(); - // } else if (this.isContest) { - // await this.$refs.menuDispatherContest.back(); - // } this.$router.go(-1); }, async statusMessage(list) { if (this.$jlmap) { await this.$store.dispatch('training/updateMapState', list); } else { - // await this.$store.dispatch('map/updateMapDevices', list); this.$store.commit('map/updateMapDevice', list); } await this.$store.dispatch('socket/setEquipmentStatus'); @@ -320,34 +315,6 @@ export default { this.dataError = resp.data.dataError; } }, - // 通过showMode切换显示效果 - switchModeInner(swch) { - let showMode = '03'; - if (swch == '01') { - showMode = '03'; - } else if (swch == '02') { - showMode = '02'; - } - - const nameList = Object.keys(this.$store.state.map.map || {}); - let list = []; - nameList.forEach(item => { - if (item !== 'skinVO') { - const data = this.$store.state.map.map[item]; - if (data && data.constructor === Array) { - list = [...list, ...data]; - } - } - }); - - if (swch == '01') { - this.$jlmap.updateShowStation(list, this.$store.state.training.centerStationCode); // 显示全部元素 - } else { - this.$jlmap.updateShowStation(list, ''); // 显示全部元素 - } - - this.$jlmap.updateShowMode(list, showMode); // 二次过滤 - }, selectBeginTime() { this.$refs.setTime.doShow(); }, @@ -429,6 +396,12 @@ export default { troClick() { this.$refs.troDialog.doShow(); }, + ttlClick() { + this.$refs.ttlDialog.doShow(); + }, + traClick() { + this.$refs.traDialog.doShow(); + }, handleCarPark() { this.$refs.carPack.doShow(); } @@ -438,7 +411,7 @@ export default { From ee6dfa9df2f96e0e6fd00ba84fe1c839b1bbfb04 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 28 May 2021 15:22:23 +0800 Subject: [PATCH 19/38] =?UTF-8?q?=E5=8D=97=E4=BA=AC=E4=BA=8C=E5=88=97?= =?UTF-8?q?=E7=9B=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/baseUrl.js | 4 +-- src/views/newMap/displayBaSiDi/index.vue | 2 +- src/views/newMap/displayBaSiDi/tmt.vue | 38 +++++++++++++++--------- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index aa7bf7e1b..11702c286 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,9 +2,9 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // 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.8.107:9000'; // 袁琪 - BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线 + // BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线 // BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线 // BASE_API = 'http://192.168.3.120:9000'; // 张赛 // BASE_API = 'http://192.168.8.140:9000'; // 杜康 diff --git a/src/views/newMap/displayBaSiDi/index.vue b/src/views/newMap/displayBaSiDi/index.vue index 4b0a3bab1..25f3ab8c6 100644 --- a/src/views/newMap/displayBaSiDi/index.vue +++ b/src/views/newMap/displayBaSiDi/index.vue @@ -390,7 +390,7 @@ export default { this.$refs.troDialog.doShow(); }, handleDialogShow(type) { - this.$refs[type].doShow; + this.$refs[type].doShow(); } } }; diff --git a/src/views/newMap/displayBaSiDi/tmt.vue b/src/views/newMap/displayBaSiDi/tmt.vue index 6709b76f5..8be9a7043 100644 --- a/src/views/newMap/displayBaSiDi/tmt.vue +++ b/src/views/newMap/displayBaSiDi/tmt.vue @@ -7,7 +7,7 @@ width="900px" label-position="top" :before-close="doClose" - :z-index="2002" + :z-index="2009" :modal="false" :close-on-click-modal="false" > @@ -21,17 +21,28 @@ - + + + -
- 显示列车信息 - 修改列车资料 - 创建列车号 - 删除列车号 - 步进列车号 - 重排列车号 +
+ 显示列车信息 + 修改列车资料 + 创建列车号
+
+ 删除列车号 + 步进列车号 + 重排列车号 +
+ + + + + + +
@@ -48,12 +59,12 @@ export default { return { dialogShow: false, loading: false, - selected: null + selected: null, + tableData: [] }; }, computed: { ...mapGetters('map', [ - 'map', 'stationList' ]), show() { @@ -65,20 +76,19 @@ export default { }, methods: { loadInitData(map) { - console.log(map, 11111); + // console.log(map, 11111); }, doShow(operate, selected) { this.dialogShow = true; this.selected = selected; - this.loadInitData(this.map); + this.loadInitData(); this.$nextTick(function () { this.$store.dispatch('training/emitTipFresh'); }); }, doClose() { - this.loading = false; this.dialogShow = false; this.$store.dispatch('training/emitTipFresh'); From d11b0c6d47d67e63efaf7bdac10d1da11b7688a8 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 28 May 2021 17:18:51 +0800 Subject: [PATCH 20/38] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=97=E8=BD=A6?= =?UTF-8?q?=E6=95=85=E9=9A=9C=E6=93=8D=E4=BD=9C-=E6=8D=A2=E7=AB=AF&?= =?UTF-8?q?=E8=81=94=E9=94=81=E9=85=8D=E7=BD=AE=E9=A1=B9-CTC=E5=88=97?= =?UTF-8?q?=E8=BD=A6=E8=BF=9B=E8=B7=AF=E5=BB=B6=E7=BB=AD=E4=BF=9D=E6=8A=A4?= =?UTF-8?q?=E4=BB=85=E6=8A=98=E8=BF=94=E7=AB=99=E5=A4=84=E9=94=81=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/ningbo_01/menus/menuTrain.vue | 18 +++ src/jmapNew/theme/xian_01/menus/menuTrain.vue | 18 +++ src/scripts/cmdPlugin/CommandEnum.js | 4 +- src/views/newMap/displayBaSiDi/tmt.vue | 103 +++++++++++++++--- src/views/newMap/newMapdraft/ciConfig.vue | 5 +- 5 files changed, 127 insertions(+), 21 deletions(-) diff --git a/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue b/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue index 5fb05d72d..094ee0cf4 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue @@ -237,6 +237,10 @@ export default { { label: '开/关门', handler: this.handleOpenCloseDoor + }, + { + label: '换端', + handler: this.handlerTurnDirection } ], menuSpeed: [ @@ -396,6 +400,20 @@ export default { this.$refs.noticeInfo.doShow(); }); }, + // 列车换端 + handlerTurnDirection() { + const group = this.$route.query.group; + const param = { + commandType: 'Turn_Direction', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ + }).catch((error) => { + console.error(error); + this.$refs.noticeInfo.doShow(); + }); + }, // 限速行驶 limitSpeed() { const operate = { diff --git a/src/jmapNew/theme/xian_01/menus/menuTrain.vue b/src/jmapNew/theme/xian_01/menus/menuTrain.vue index 1c7acdc91..0ac0937e9 100644 --- a/src/jmapNew/theme/xian_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/xian_01/menus/menuTrain.vue @@ -132,6 +132,10 @@ export default { { label: '越红灯行驶', handler: this.handleOverEedLight + }, + { + label: '换端', + handler: this.handlerTurnDirection } ], menuSpeed: [ @@ -328,6 +332,20 @@ export default { this.$refs.noticeInfo.doShow(); }); }, + // 列车换端 + handlerTurnDirection() { + const group = this.$route.query.group; + const param = { + commandType: 'Turn_Direction', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ + }).catch((error) => { + console.error(error); + this.$refs.noticeInfo.doShow(); + }); + }, routeBlockRun() { // 处理显示车站列表 // const list = []; diff --git a/src/scripts/cmdPlugin/CommandEnum.js b/src/scripts/cmdPlugin/CommandEnum.js index 507304c37..adcc00007 100644 --- a/src/scripts/cmdPlugin/CommandEnum.js +++ b/src/scripts/cmdPlugin/CommandEnum.js @@ -324,7 +324,9 @@ export default { /** 列车在指定站台跳停 */ CMD_TRAIN_SKIP_STOP : { value: 'Train_Skip_Stop', label: '指定站台跳停' }, /** 列车取消指定站台的跳停 */ - CMD_TRAIN_CANCEL_SKIP_STOP : { value: 'Train_Cancel_Skip_Stop', label: '取消指定站台跳停' } + CMD_TRAIN_CANCEL_SKIP_STOP : { value: 'Train_Cancel_Skip_Stop', label: '取消指定站台跳停' }, + /** 换端 */ + CMD_TRAIN_TURN_DIRECTION: { value: 'Turn_Direction', label: '换端' } }, TrainWindow: { /** 修改列车识别号 */ diff --git a/src/views/newMap/displayBaSiDi/tmt.vue b/src/views/newMap/displayBaSiDi/tmt.vue index 8be9a7043..f50e80785 100644 --- a/src/views/newMap/displayBaSiDi/tmt.vue +++ b/src/views/newMap/displayBaSiDi/tmt.vue @@ -18,31 +18,84 @@ - + - - - + + +
- 显示列车信息 - 修改列车资料 - 创建列车号 + 显示列车信息 + 修改列车资料 + 创建列车号
- 删除列车号 - 步进列车号 - 重排列车号 + 删除列车号 + 步进列车号 + 重排列车号 +
+
+ + + + + + + +
+
+
+ + + + + +
+
+
+ 位置: + +
+
+ 新列车号: + +
+
+ 设置该列车为自动排列: + 开启 + 关闭 +
+
+ 车组号: + +
<>
+ +
+
+
+
插入位置(之前):
+ + + + + +
+
+
+
+ + + + + +
+
+
所选列车号:
+ +
- - - - - - -
@@ -60,7 +113,11 @@ export default { dialogShow: false, loading: false, selected: null, - tableData: [] + tableData: [], + sectionName: '', + trainCode: '', + operationType: 'create', + autoArrange: false }; }, computed: { @@ -96,6 +153,16 @@ export default { handleSelect(tab) { this.activeIndex = tab; }, + trainFind() { + const train = this.$store.getters['map/getDeviceByCode'](this.trainCode); + this.tableData = [train]; + }, + resetTrainCode() { + this.trainCode = ''; + }, + changeOperationType(type) { + this.operationType = type; + }, commit() { // const operate = { // send: true, diff --git a/src/views/newMap/newMapdraft/ciConfig.vue b/src/views/newMap/newMapdraft/ciConfig.vue index 6f5ba4ed4..979d94761 100644 --- a/src/views/newMap/newMapdraft/ciConfig.vue +++ b/src/views/newMap/newMapdraft/ciConfig.vue @@ -93,7 +93,7 @@ export default { 'routeNameUseEndOppositeSignalName', 'generateTbRoute', 'tbRouteNameUseEndOppositeSignalName', 'routeSignalAlwaysGreen', 'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'generateCycle', 'routeButton', 'likeHa1', 'getNearlySignal', 'overlapSettingByTrigger', 'generateFls', 'signalApproachNotPassPreSignal', - 'generateDestination' + 'generateDestination', 'ctcOverlapOnlyTurnBackStationLock' ], multipleList: ['sharingECStations'], selectList: [], @@ -126,7 +126,8 @@ export default { generateFls: '是否生成侧防:是-生成侧防,不要联动道岔,否-不生成侧防,用联动道岔', signalApproachNotPassPreSignal:'信号机接近区段不跨过前方同向信号机', generateDestination: '是否生成目的地码定义(泰雷兹)', - sharingECStations: '共享紧急关闭效果的车站' + sharingECStations: '共享紧急关闭效果的车站', + ctcOverlapOnlyTurnBackStationLock: 'CTC列车进路延续保护仅折返站处锁闭' } }; }, From d86566be126ffcf5680a8ba9080ec6a0b2e85219 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Fri, 28 May 2021 17:20:16 +0800 Subject: [PATCH 21/38] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=BB=B6=E7=BB=AD?= =?UTF-8?q?=E4=BF=9D=E6=8A=A4=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataRelation/continueProtectOperate/detail.vue | 2 ++ .../dataRelation/continueProtectOperate/protect.vue | 8 +++++++- .../dataRelation/continueProtectOperate/route.vue | 3 +++ .../newMapdraft/dataRelation/routeoperate/detail.vue | 9 +-------- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/views/newMap/newMapdraft/dataRelation/continueProtectOperate/detail.vue b/src/views/newMap/newMapdraft/dataRelation/continueProtectOperate/detail.vue index 6d9468e32..ecb0ac54a 100644 --- a/src/views/newMap/newMapdraft/dataRelation/continueProtectOperate/detail.vue +++ b/src/views/newMap/newMapdraft/dataRelation/continueProtectOperate/detail.vue @@ -15,6 +15,7 @@ // import { mapGetters } from 'vuex'; // import { listMap } from '@/api/jmap/mapdraft'; import { getContinueProtectList, delContinueProtect, putContinueProtect } from '@/api/jmap/mapdraft'; +import { EventBus } from '@/scripts/event-bus'; export default { name: 'RouteDetail', @@ -147,6 +148,7 @@ export default { handleUpload(index, row) { putContinueProtect(this.$route.params.mapId, row).then(res => { this.$message.success('更新成功'); + EventBus.$emit('successCI'); }).catch(() => { this.$messageBox('操作异常'); }); diff --git a/src/views/newMap/newMapdraft/dataRelation/continueProtectOperate/protect.vue b/src/views/newMap/newMapdraft/dataRelation/continueProtectOperate/protect.vue index 8851ffbef..59c7f6abc 100644 --- a/src/views/newMap/newMapdraft/dataRelation/continueProtectOperate/protect.vue +++ b/src/views/newMap/newMapdraft/dataRelation/continueProtectOperate/protect.vue @@ -4,6 +4,12 @@ + + + + + + 向右 @@ -164,6 +170,7 @@ export default { code: '', name: '', right: '', + setInCbtc: false, mapId: '', unlockSectionCode:'', unlockTime: 0, @@ -219,7 +226,6 @@ export default { } }, protectData(val, old) { - console.log(val, 'val'); if (val) { this.addModel = val; this.addModel.pathList && this.addModel.pathList.forEach(item => { diff --git a/src/views/newMap/newMapdraft/dataRelation/continueProtectOperate/route.vue b/src/views/newMap/newMapdraft/dataRelation/continueProtectOperate/route.vue index b15e120d9..f13ce7f26 100644 --- a/src/views/newMap/newMapdraft/dataRelation/continueProtectOperate/route.vue +++ b/src/views/newMap/newMapdraft/dataRelation/continueProtectOperate/route.vue @@ -12,6 +12,8 @@