From 786a37ee2cd5baaf4078fbfa733092faec3cd197 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Wed, 8 Jan 2020 14:59:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=81=E6=B3=A2=E4=B8=80?= =?UTF-8?q?=E5=8F=B7=E7=BA=BF=E6=8E=A7=E5=88=B6=E6=9D=83=E8=BD=AC=E7=A7=BB?= 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/ningbo_01.js | 6 +- src/jmapNew/shape/Station/index.js | 18 +- .../ningbo_01/menus/dialog/stationControl.vue | 255 ++++++++++++++++++ src/jmapNew/theme/ningbo_01/menus/index.vue | 3 + .../theme/ningbo_01/menus/menuSection.vue | 1 - .../ningbo_01/menus/menuStationControl.vue | 150 +++++++++++ .../theme/ningbo_01/menus/menuSwitch.vue | 3 +- src/scripts/ConstConfig.js | 2 +- src/scripts/cmdPlugin/MenuContextHandler.js | 4 +- src/utils/baseUrl.js | 4 +- .../newMap/mapsystemNew/common/index.vue | 8 + 15 files changed, 452 insertions(+), 14 deletions(-) create mode 100644 src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue create mode 100644 src/jmapNew/theme/ningbo_01/menus/menuStationControl.vue diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index 4723f37a5..c6d99901f 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -318,7 +318,8 @@ class SkinCode extends defaultStyle { emergencyControlShow: true, // 紧急站控显示 centerControlShow: true, // 中控显示 substationControlShow: true, // 站控按钮显示 - interconnectedControlShow: false // 联锁控显示 + interconnectedControlShow: false, // 联锁控显示 + centerControlButtonShow: false // 中控显示 }, arrow: { show: false // 控制模式箭头显隐 diff --git a/src/jmapNew/config/skinCode/chengdu_01.js b/src/jmapNew/config/skinCode/chengdu_01.js index 39bf29e52..e2bf82dcd 100644 --- a/src/jmapNew/config/skinCode/chengdu_01.js +++ b/src/jmapNew/config/skinCode/chengdu_01.js @@ -318,7 +318,8 @@ class SkinCode extends defaultStyle { emergencyControlShow: true, // 紧急站控显示 centerControlShow: true, // 中控显示 substationControlShow: true, // 站控按钮显示 - interconnectedControlShow: false // 联锁控显示 + interconnectedControlShow: false, // 联锁控显示 + centerControlButtonShow: false // 中控显示 }, arrow: { show: false // 控制模式箭头显隐 diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index 35a3b7cc2..da0b7a4fd 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -321,7 +321,8 @@ class SkinCode extends defaultStyle { emergencyControlShow: true, // 紧急站控显示 centerControlShow: true, // 中控显示 substationControlShow: true, // 站控按钮显示 - interconnectedControlShow: true // 联锁控显示 + interconnectedControlShow: true, // 联锁控显示 + centerControlButtonShow: false // 中控显示 }, arrow: { show: false // 控制模式箭头显隐 diff --git a/src/jmapNew/config/skinCode/fuzhou_01.js b/src/jmapNew/config/skinCode/fuzhou_01.js index 907f9461c..e2fb84818 100644 --- a/src/jmapNew/config/skinCode/fuzhou_01.js +++ b/src/jmapNew/config/skinCode/fuzhou_01.js @@ -301,7 +301,8 @@ class SkinCode extends defaultStyle { emergencyControlShow: false, // 紧急站控显示 centerControlShow: true, // 中控显示 substationControlShow: true, // 站控按钮显示 - interconnectedControlShow: false // 联锁控显示 + interconnectedControlShow: false, // 联锁控显示 + centerControlButtonShow: false // 中控显示 }, arrow: { show: true // 控制模式箭头显隐 diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 39bf29e52..69eb9ee40 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -299,7 +299,8 @@ class SkinCode extends defaultStyle { fontWeight: 'normal', // 字体粗细 textAlign: 'middle', // 字体水平对齐 textVerticalAlign: 'top', // 字体垂直对齐 - centerControlText: '中控', // 中控文字内容 + centerControlButton: '站遥控按钮', // 中控文字内容 + centerControlText: '遥控', // 中控文字内容 substationControlText: '站控', // 站控文字内容 emergencyControlText:'紧急站控', // 紧急站控文字内容 interconnectedControlText:'连锁控' // 连锁控文字内容 @@ -318,7 +319,8 @@ class SkinCode extends defaultStyle { emergencyControlShow: true, // 紧急站控显示 centerControlShow: true, // 中控显示 substationControlShow: true, // 站控按钮显示 - interconnectedControlShow: false // 联锁控显示 + interconnectedControlShow: false, // 联锁控显示 + centerControlButtonShow: true // 中控显示 }, arrow: { show: false // 控制模式箭头显隐 diff --git a/src/jmapNew/shape/Station/index.js b/src/jmapNew/shape/Station/index.js index e2dea5f08..dbde1d155 100644 --- a/src/jmapNew/shape/Station/index.js +++ b/src/jmapNew/shape/Station/index.js @@ -221,6 +221,22 @@ export default class Station extends Group { }); this.add(this.arrowsControl); } + // 中控按钮 + if (this.style.Station.StationControl.lamp.centerControlButtonShow) { + this.centerControlButton = new ESingleControl({ + _subType: 'button', + style: this.style, + zlevel: this.zlevel, + z: this.z, + point: { + x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 3 / -2 + this.style.Station.StationControl.lamp.offset.x, + y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y + }, + context: this.style.Station.StationControl.text.centerControlButton, + pop: false + }); + this.add(this.centerControlButton); + } } this.setState(model); @@ -244,7 +260,7 @@ export default class Station extends Group { this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor); this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); break; - case '03': // 紧急站控 + case 'Emergency': // 紧急站控 this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.redColor); this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue new file mode 100644 index 000000000..cdf775262 --- /dev/null +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue @@ -0,0 +1,255 @@ + + + diff --git a/src/jmapNew/theme/ningbo_01/menus/index.vue b/src/jmapNew/theme/ningbo_01/menus/index.vue index 42d00e5ed..ba21bc6aa 100644 --- a/src/jmapNew/theme/ningbo_01/menus/index.vue +++ b/src/jmapNew/theme/ningbo_01/menus/index.vue @@ -5,6 +5,7 @@ + > @@ -24,6 +25,7 @@ import MenuCancel from './menuCancel'; import MenuSignal from './menuSignal'; import MenuButton from './menuButton'; import MenuStationStand from './menuStationStand'; +import MenuStationControl from './menuStationControl'; import MenuSwitch from './menuSwitch'; import MenuSection from './menuSection'; import MenuTrain from './menuTrain'; @@ -44,6 +46,7 @@ export default { MenuSwitch, MenuSection, MenuStationStand, + MenuStationControl, MenuStation, MenuTrain, MenuLimit, diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue index f838cc4ff..7db67c490 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSection.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSection.vue @@ -138,7 +138,6 @@ export default { initMenu() { // 编辑模式菜单列表 this.menu = MenuContextHandler.covert(this.menuNormal); - // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { this.menu = this.menuForce; diff --git a/src/jmapNew/theme/ningbo_01/menus/menuStationControl.vue b/src/jmapNew/theme/ningbo_01/menus/menuStationControl.vue new file mode 100644 index 000000000..01cff4223 --- /dev/null +++ b/src/jmapNew/theme/ningbo_01/menus/menuStationControl.vue @@ -0,0 +1,150 @@ + + + diff --git a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue index 177db9e33..b51ab3540 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuSwitch.vue @@ -149,7 +149,6 @@ export default { initMenu() { // 编辑模式菜单列表 this.menu = MenuContextHandler.covert(this.menuNormal); - // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { this.menu = this.menuForce; @@ -215,6 +214,7 @@ export default { locate() { const operate = { start: true, + code: this.selected.code, operation: OperationEvent.Switch.locate.menu.operation, param: { Switch_Code: this.selected.code @@ -231,6 +231,7 @@ export default { reverse() { const operate = { start: true, + code: this.selected.code, operation: OperationEvent.Switch.reverse.menu.operation, param: { Switch_Code: this.selected.code diff --git a/src/scripts/ConstConfig.js b/src/scripts/ConstConfig.js index 49e1ea086..31d3b9617 100644 --- a/src/scripts/ConstConfig.js +++ b/src/scripts/ConstConfig.js @@ -136,7 +136,7 @@ export default { { label: '信号机', value: 'Signal' }, { label: '站台', value: 'Stand' }, { label: '车站', value: 'Station' }, - // { label: '控制模式', value: 'ControlConvertMenu' }, + { label: '控制模式', value: 'ControlConvertMenu' }, { label: '车次窗', value: 'TrainWindow' } ], // 新版的产品类型枚举 diff --git a/src/scripts/cmdPlugin/MenuContextHandler.js b/src/scripts/cmdPlugin/MenuContextHandler.js index fc93b9eec..930ab6753 100644 --- a/src/scripts/cmdPlugin/MenuContextHandler.js +++ b/src/scripts/cmdPlugin/MenuContextHandler.js @@ -90,8 +90,8 @@ class MenuContextHandler { if (control) { if ( this.getPrdType() != '') { const type = State2SimulationMap[this.getPrdType()]; - // const status = State2ControlMap[control.status]; // 缺少车站控制模式字段 - const status = State2ControlMap['01']; // 缺少车站控制模式字段 + const status = State2ControlMap[control.status]; // 缺少车站控制模式字段 + // const status = State2ControlMap['01']; // 缺少车站控制模式字段 menu = [...menuList[type]]; if (menu.constructor === Array) { menu.forEach(elem => { diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 79d1c6346..1e9afea51 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,11 +3,11 @@ 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.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 - BASE_API = 'http://192.168.3.82:9000'; // 杜康 + // BASE_API = 'http://192.168.3.82:9000'; // 杜康 } else { BASE_API = process.env.VUE_APP_BASE_API; } diff --git a/src/views/newMap/mapsystemNew/common/index.vue b/src/views/newMap/mapsystemNew/common/index.vue index e94a7b2e2..352cc2b8f 100644 --- a/src/views/newMap/mapsystemNew/common/index.vue +++ b/src/views/newMap/mapsystemNew/common/index.vue @@ -113,6 +113,14 @@ export default { if (em.subType === 'TrainWindow') { device = { _type: deviceType.Train, code: em.deviceCode }; this.$store.dispatch('map/setTrainWindowShow', true); + } else if (em.subType == 'button' && em.deviceType == 'Station') { // 宁波一号线右键显示控制模式 + const equipment = this.getDeviceByEm(em); + this.$store.dispatch('menuOperation/setSelected', equipment); + menu = getDeviceMenuByDeviceType('StationControl'); + this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu }); + this.$store.dispatch('training/emitTipFresh'); + // console.log(equipment, em, '控制模式'); + return; } else if (em.deviceCode && !this.isScreen) { device = this.getDeviceByEm(em); }