From f437f18f636894c07874ed40914b86566070dc72 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 16 Mar 2020 18:53:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8C=97=E4=BA=AC=E7=BA=BF=E7=8E=B0?= =?UTF-8?q?=E5=9C=B0=E8=BF=9B=E8=B7=AF=E5=BB=BA=E7=AB=8B=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Signal/ELowButton.js | 2 +- src/jmapNew/shape/Signal/index.js | 5 +++++ src/jmapNew/theme/beijing_01/menus/index.vue | 1 + .../theme/beijing_01/menus/menuSignal.vue | 16 ++++++++++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/jmapNew/shape/Signal/ELowButton.js b/src/jmapNew/shape/Signal/ELowButton.js index c1bc96b14..8a368f433 100644 --- a/src/jmapNew/shape/Signal/ELowButton.js +++ b/src/jmapNew/shape/Signal/ELowButton.js @@ -28,7 +28,7 @@ class ELowButton extends Group { }); this.add(this.button); - // this.hide(); + this.hide(); } // 隐藏 diff --git a/src/jmapNew/shape/Signal/index.js b/src/jmapNew/shape/Signal/index.js index e2e374cf8..c907eef41 100644 --- a/src/jmapNew/shape/Signal/index.js +++ b/src/jmapNew/shape/Signal/index.js @@ -521,6 +521,11 @@ class Signal extends Group { } else if (!model.isRouteActive && isShowThePrdType(model.prdType, '03') && this.style.Signal.lowButton.display) { this.setLowButtonRecover(); } + + /** 信号机进路按钮显示 */ + if (model.isRouteSignal) { + this.setLowButtonShow(); + } /** 信号机封锁 */ model.blockade && this.block(); /** 设置点灯类型*/ diff --git a/src/jmapNew/theme/beijing_01/menus/index.vue b/src/jmapNew/theme/beijing_01/menus/index.vue index 60e92cc34..8a313e111 100644 --- a/src/jmapNew/theme/beijing_01/menus/index.vue +++ b/src/jmapNew/theme/beijing_01/menus/index.vue @@ -83,6 +83,7 @@ export default { mounted() { this.$nextTick(() => { this.$store.dispatch('config/updateMenuBar'); + this.$refs['menuSignal'].setRouteSignal(); }); } }; diff --git a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue index 175799498..2f4090e97 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue @@ -204,6 +204,22 @@ export default { this.$refs.popMenu.close(); } }, + setRouteSignal() { + if (this.$store.state.training.prdType == '01') { + let signalList = []; + this.routeList.forEach(route=>{ + signalList.push(route.startSignalCode); + signalList.push(route.endSignalCode); + }); + signalList = Array.from(new Set(signalList)); + signalList.forEach(signal=>{ + const signalDevice = this.$store.getters['map/getDeviceByCode'](signal); + const signalModel = Object.assign({_type: 'Signal'}, signalDevice); + signalModel.isRouteSignal = true; + this.$store.dispatch('map/updateMapDevices', signalModel); + }); + } + }, operationHandler(buttonOperation, selectType) { switch (buttonOperation) { case OperationEvent.Signal.arrangementRoute.button.operation: { From 9e150eed8d9d3c884fc094a5d90e65eb7010f3d0 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Mon, 16 Mar 2020 19:08:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E6=9D=83=E8=BD=AC=E7=A7=BB=E8=AF=B7=E6=B1=82=E5=8F=82=E6=95=B0?= =?UTF-8?q?=EF=BC=8C=E8=B0=83=E6=95=B4=E5=AE=81=E6=B3=A2=E5=8C=BA=E6=AE=B5?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Section/ELines.js | 8 ++++ src/jmapNew/shape/Section/index.js | 47 ++++++++++++------- .../ningbo_01/menus/dialog/sectionControl.vue | 4 +- .../ningbo_01/menus/dialog/sectionUnLock.vue | 35 +++++++++----- .../ningbo_01/menus/dialog/stationControl.vue | 6 +-- src/utils/baseUrl.js | 4 +- 6 files changed, 67 insertions(+), 37 deletions(-) diff --git a/src/jmapNew/shape/Section/ELines.js b/src/jmapNew/shape/Section/ELines.js index 8f9c6d261..bc26f614d 100644 --- a/src/jmapNew/shape/Section/ELines.js +++ b/src/jmapNew/shape/Section/ELines.js @@ -71,6 +71,14 @@ export default class ELines extends Group { }); } + setZleve(lev) { + this.eachChild((child) => { + if (child.setStyle && child.isLine) { + child.attr('z', lev); + } + }); + } + hide() { this.eachChild((child) => { child.hide(); diff --git a/src/jmapNew/shape/Section/index.js b/src/jmapNew/shape/Section/index.js index d0fcbc824..db8ed1e42 100644 --- a/src/jmapNew/shape/Section/index.js +++ b/src/jmapNew/shape/Section/index.js @@ -38,18 +38,19 @@ export default class Section extends Group { const model = this.model; // 01:计轴区段;02逻辑区段;03道岔区段 04道岔计轴区段 this.createSectionText(); // 创建区段文字 - if ((model.type === '01' || model.type === '03') && ( - model.logicSectionNum.length <= 0 || - model.logicSectionNum.length == 1 && model.logicSectionNum[0] == 0) || - model.type === '02') { - this.createSection(); // 创建区段 - this.creatRelease(); // 创建延时释放 - this.createSeparator(); // 创建分隔符 - this.createTurnBack(); // 创建成都三号线 折返箭头 - if (model.type === '01' && model.type === '03') { - this.createAxles(); // 创建计轴 - } + // if ((model.type === '01' || model.type === '03') && ( + // model.logicSectionNum.length <= 0 || + // model.logicSectionNum.length == 1 && model.logicSectionNum[0] == 0) || + // model.type === '02') { + // if (model.type === '01' || model.type === '03') { + this.createSection(); // 创建区段 + this.creatRelease(); // 创建延时释放 + this.createSeparator(); // 创建分隔符 + this.createTurnBack(); // 创建成都三号线 折返箭头 + if (model.type === '01' && model.type === '03') { + this.createAxles(); // 创建计轴 } + // } } createMouseEvent() { @@ -70,7 +71,7 @@ export default class Section extends Group { // 创建区段 this.section = new ELines({ zlevel: this.zlevel, - z: this.z, + z: model.type == '02' ? this.z + 1 : this.z, // 逻辑区段层级降低一层 isSwitchSection: model.switchSection, isCurve: model.curve, points: model.points, @@ -574,9 +575,18 @@ export default class Section extends Group { }); } + setModelTypeLevel() { // 给含有逻辑区段的 section 层级加一 + if (this.model.type == '01' && this.model.logicSectionCodeList && this.model.logicSectionCodeList.length > 0) { + this.section.setZleve(this.z + 2); + } + } + /** 设置区段恢复默认状态*/ recover() { if (this.section) { + if (this.model.type == '01') { + this.section.setZleve(this.z); + } this.section.stopAnimation(true); this.sectionBlock && this.sectionBlock.hide(); // 因此特殊区段 this.section.setStyle({ @@ -623,6 +633,7 @@ export default class Section extends Group { stroke: this.style.Section.line.communicationOccupiedColor, lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth }); + this.setModelTypeLevel(); } } @@ -633,6 +644,7 @@ export default class Section extends Group { stroke: this.style.Section.line.unCommunicationOccupiedColor, lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth }); + this.setModelTypeLevel(); } } @@ -643,6 +655,7 @@ export default class Section extends Group { stroke: this.style.Section.line.routeLockColor, lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth }); + this.setModelTypeLevel(); } } @@ -656,12 +669,13 @@ export default class Section extends Group { lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth }); } - if (this.style.Section.block.blockGlint) { - this.section && this.section.animateStyle(true, [ + if (this.style.Section.block.blockGlint && this.section) { + this.section.animateStyle(true, [ { time: 1000, styles: { stroke: this.style.backgroundColor } }, { time: 2000, styles: { stroke: this.style.Section.line.blockColor } } ]); } + this.setModelTypeLevel(); } /** 故障锁定状态 05*/ @@ -702,6 +716,7 @@ export default class Section extends Group { stroke: this.style.Section.line.protectiveLockColor, lineWidth: this.style.Section.line.width + this.style.Section.line.beyondWidth }); + this.setModelTypeLevel(); } } @@ -751,6 +766,7 @@ export default class Section extends Group { { time: 1000, styles: { stroke: this.style.backgroundColor } }, { time: 2000, styles: { lineWidth: lineWidth } } ]); + this.setModelTypeLevel(); } } @@ -789,9 +805,6 @@ export default class Section extends Group { // 实际上就是 状态重置 必须在设置其他状态之前 设置颜色之类的 if (this.style.Switch.sectionAction.flag && model.relSwitchCode && !flag) { const switchModel = Vue.prototype.$jlmap.mapDevice[model.relSwitchCode]; - // if (switchModel.name == 'D1801' || switchModel.name == 'D1802' || switchModel.name == 'D1803' || switchModel.name == 'D1804') { - // console.log('switchModel', switchModel, switchModel.name, switchModel.normalPosition, '1 定位 0 反位'); - // } if (switchModel.normalPosition != 0) { // 定位情况 const sectionC = Vue.prototype.$jlmap.mapDevice[switchModel.sectionCCode]; sectionC && sectionC.instance && sectionC.instance.section.setStyle({ stroke: this.style.Switch.sectionAction.spareColor }); diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/sectionControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionControl.vue index ff22f21c4..9e1e4176c 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/sectionControl.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionControl.vue @@ -22,7 +22,7 @@ - + 激活 @@ -106,7 +106,7 @@ export default { this.sectionName += section.name; } } - this.sectionName += `-${selected.name}`; + this.sectionName += `${selected.name}`; const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); if (station) { diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/sectionUnLock.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionUnLock.vue index dbf186aae..730534019 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/sectionUnLock.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionUnLock.vue @@ -15,11 +15,11 @@
操作设备
- + - 确认 - + 确认 +
@@ -28,13 +28,13 @@
操作设备
- - - + + + - 确认 - + 确认 +
@@ -126,7 +126,11 @@ export default { doShow(operate, selected) { this.selected = selected; if (!this.dialogShow) { - this.messageText1 = selected.name; + this.messageText1 = `${selected.name}(${selected.code})`; + // if (selected.parentCode) { + // const parentSection = this.$store.getters['map/getDeviceByCode'](selected.parentCode); + // this.messageText1 = `${parentSection.name}${selected.name}`; + // } this.operation = operate.operation; } @@ -137,6 +141,11 @@ export default { }, doClose() { this.dialogShow = false; + this.disabledConfirm1 = false; + this.disabledConfirm2 = true; + this.timeCountConfirm = -1; + this.messageText1 = ''; + this.messageText2 = ''; this.$store.dispatch('training/emitTipFresh'); this.mouseCancelState(this.selected); }, @@ -194,10 +203,10 @@ export default { if (this.operation == OperationEvent.Section.unlock.menu.operation) { operate.operation = OperationEvent.Section.unlock.confirm2.operation; - operate.cmdType = CMD.Section.CMD_SECTION_UNBLOCK + operate.cmdType = CMD.Section.CMD_SECTION_UNBLOCK; } else if (this.operation == OperationEvent.Section.fault.menu.operation) { operate.operation = OperationEvent.Section.fault.confirm2.operation; - operate.cmdType = CMD.Section.CMD_SECTION_FAULT_UNLOCK + operate.cmdType = CMD.Section.CMD_SECTION_FAULT_UNLOCK; } this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { @@ -214,7 +223,7 @@ export default { commit() { const operate = { over: true, - operation: '', + operation: '' }; if (this.operation == OperationEvent.Section.unlock.menu.operation) { @@ -224,7 +233,7 @@ export default { } this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.doClose(); }).catch((error) => { this.doClose(); diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue index 3922cc33c..47473fd91 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue @@ -215,11 +215,11 @@ export default { } }; if (this.controlMode == 'center') { - operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL; - operate.operation = OperationEvent.StationControl.requestCentralControl.menu.operation; - } else if (this.controlMode == 'local') { operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL; operate.operation = OperationEvent.StationControl.requestStationControl.menu.operation; + } else if (this.controlMode == 'local') { + operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL; + operate.operation = OperationEvent.StationControl.requestCentralControl.menu.operation; } this.loading = true; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index d8b10d887..ae880e5e3 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,10 +3,10 @@ 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.41:9000'; // 张赛 // BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康