diff --git a/src/jmapNew/config/skinCode/xian_02.js b/src/jmapNew/config/skinCode/xian_02.js index 398a2f3e9..423135776 100644 --- a/src/jmapNew/config/skinCode/xian_02.js +++ b/src/jmapNew/config/skinCode/xian_02.js @@ -163,13 +163,14 @@ class SkinCode extends defaultStyle { borderWidth: 2, // 信号灯边框线宽度 borderColor: '#3149C3', // 信号灯边框线颜色 radiusR: 5, // 信号灯半径 - blockColor: '#EF0C08', // 信号灯锁闭 + blockColor: '#C0C0C0', // 信号灯锁闭 grayColor: '#C0C0C0', // 信号灯灰色 redColor: 'red', // 信号灯红色 greenColor: 'green', // 信号灯绿色 yellowColor: 'yellow', // 信号灯黄色 whiteColor: '#FFFFFF', // 信号灯白色 - blueColor: '#0070C0' // 信号灯蓝色 + blueColor: '#0070C0', // 信号灯蓝色 + logicDisplayNone: true // 信号机上×型标识不展示 }, route: { direction: true, // 自动通过方向 @@ -184,7 +185,8 @@ class SkinCode extends defaultStyle { manualControl: '#FFFF00', // 人工控制 autoRoute: '#00FF00', // 自动进路 autoTrigger: '#FFFF00', // 自动触发 - outConflict: '#C00808' // 出车冲突 + outConflict: '#C00808', // 出车冲突, + lampstandard: true // 灯柱颜色变化 }, delay: { direction: false, // 延时解锁方向 diff --git a/src/jmapNew/shape/Signal/ESigLamp.js b/src/jmapNew/shape/Signal/ESigLamp.js index 4e3258597..c8b85f4b4 100644 --- a/src/jmapNew/shape/Signal/ESigLamp.js +++ b/src/jmapNew/shape/Signal/ESigLamp.js @@ -30,48 +30,48 @@ class ESigLamp extends Group { stroke: style.Signal.lamp.borderColor } }); - - this.lstop = new Line({ - _subType: 'SignalLamp', - _val: '3', - zlevel: model.zlevel, - z: model.z, - origin: { - x: model.originX, - y: model.originY - }, - shape: { - x1: model.x + (style.Signal.lamp.radiusR + 1) * Math.cos(Math.PI / 4), - y1: model.y + (style.Signal.lamp.radiusR + 1) * Math.sin(Math.PI / 4), - x2: model.x - (style.Signal.lamp.radiusR + 1) * Math.cos(Math.PI / 4), - y2: model.y - (style.Signal.lamp.radiusR + 1) * Math.sin(Math.PI / 4) - }, - style: { - lineWidth: style.Signal.lamp.stopWidth, - stroke: style.backgroundColor - } - }); - - this.rstop = new Line({ - _subType: 'SignalLamp', - _val: '3', - zlevel: model.zlevel, - z: model.z, - origin: { - x: model.originX, - y: model.originY - }, - shape: { - x1: model.x + (style.Signal.lamp.radiusR + 1) * Math.cos(Math.PI / 4), - y1: model.y + (style.Signal.lamp.radiusR + 1) * (Math.sin(Math.PI / 4) - Math.sqrt(2)), - x2: model.x - (style.Signal.lamp.radiusR + 1) * Math.cos(Math.PI / 4), - y2: model.y - (style.Signal.lamp.radiusR + 1) * (Math.sin(Math.PI / 4) - Math.sqrt(2)) - }, - style: { - lineWidth: style.Signal.lamp.stopWidth, - stroke: style.backgroundColor - } - }); + if ( !style.Signal.lamp.logicDisplayNone ) { + this.lstop = new Line({ + _subType: 'SignalLamp', + _val: '3', + zlevel: model.zlevel, + z: model.z, + origin: { + x: model.originX, + y: model.originY + }, + shape: { + x1: model.x + (style.Signal.lamp.radiusR + 1) * Math.cos(Math.PI / 4), + y1: model.y + (style.Signal.lamp.radiusR + 1) * Math.sin(Math.PI / 4), + x2: model.x - (style.Signal.lamp.radiusR + 1) * Math.cos(Math.PI / 4), + y2: model.y - (style.Signal.lamp.radiusR + 1) * Math.sin(Math.PI / 4) + }, + style: { + lineWidth: style.Signal.lamp.stopWidth, + stroke: style.backgroundColor + } + }); + this.rstop = new Line({ + _subType: 'SignalLamp', + _val: '3', + zlevel: model.zlevel, + z: model.z, + origin: { + x: model.originX, + y: model.originY + }, + shape: { + x1: model.x + (style.Signal.lamp.radiusR + 1) * Math.cos(Math.PI / 4), + y1: model.y + (style.Signal.lamp.radiusR + 1) * (Math.sin(Math.PI / 4) - Math.sqrt(2)), + x2: model.x - (style.Signal.lamp.radiusR + 1) * Math.cos(Math.PI / 4), + y2: model.y - (style.Signal.lamp.radiusR + 1) * (Math.sin(Math.PI / 4) - Math.sqrt(2)) + }, + style: { + lineWidth: style.Signal.lamp.stopWidth, + stroke: style.backgroundColor + } + }); + } this.add(this.lamp); if (!style.Signal.lamp.logicDisplayNone) { this.add(this.lstop); @@ -97,11 +97,11 @@ class ESigLamp extends Group { setStop(has) { if (has) { - this.lstop.show(); - this.rstop.show(); + this.lstop && this.lstop.show(); + this.rstop && this.rstop.show(); } else { - this.lstop.hide(); - this.rstop.hide(); + this.lstop && this.lstop.hide(); + this.rstop && this.rstop.hide(); } } diff --git a/src/jmapNew/shape/Signal/index.js b/src/jmapNew/shape/Signal/index.js index 1a90e4d98..d50941d52 100644 --- a/src/jmapNew/shape/Signal/index.js +++ b/src/jmapNew/shape/Signal/index.js @@ -66,8 +66,8 @@ class Signal extends Group { this.ciConfirm = new Text({ zlevel: this.zlevel, z: this.z, - silent: true, - subType: 'enabled', + silent: false, + _subType: 'enabled', style: { textBorderColor: 'red', textBorderWidth: 0, @@ -148,7 +148,13 @@ class Signal extends Group { this.add(this.insideTriangle); } if (style.Signal.sigBack) { - const signalRect = this.getBoundingRect(); + const signalRect = this.sigPost.getBoundingRect(); + this.lamps.forEach(elem => { + signalRect.union(elem.getBoundingRect()); + }); + if (this.insideTriangle) { + signalRect.union(this.insideTriangle.getBoundingRect()); + } // 信号的背景 this.sigBack = new Rect({ zlevel: this.zlevel, @@ -380,15 +386,7 @@ class Signal extends Group { this.sigName.setStyle({ textBorderWidth: 1 }); this.sigName.setColor('#fff'); } - // if (this.style.Signal.sigBack) { - // this.sigBack.show(); - // this.sigBack.animateStyle(true) - // .when(0, { fill: this.style.backgroundColor }) - // .when(1000, { fill: this.style.Signal.sigBack.color }) - // .when(2000, { fill: this.style.backgroundColor }) - // .when(3000, { fill: this.style.Signal.sigBack.color }) - // .start(); - // } + this.sigBack && this.sigBack.show(); } // 功能封锁 @@ -429,6 +427,9 @@ class Signal extends Group { if (this.style.Signal.lamp.guidName == 'haerbin_01') { this.sigName.setColor(this.style.Signal.text.ArtificialRouteColor); } + if (this.style.Signal.auto.lampstandard) { + this.sigPost.setColor(this.style.Signal.auto.manualControl); + } } // 设置自动进路模式状态类型 @@ -479,6 +480,12 @@ class Signal extends Group { .when(1000, { textFill: this.style.Signal.ciConfirm.textColor }) .when(2000, { textFill: this.style.backgroundColor }) .start(); + this.sigBack && this.sigBack.animateStyle(true) + .when(0, { fill: this.style.backgroundColor }) + .when(1000, { fill: this.style.Signal.sigBack.color }) + .when(2000, { fill: this.style.backgroundColor }) + .when(3000, { fill: this.style.Signal.sigBack.color }) + .start(); } } @@ -503,6 +510,7 @@ class Signal extends Group { this.sigPost && this.sigPost.removeTerminalOptional(); this.ciConfirm && this.ciConfirm.stopAnimation(false); this.ciConfirm && this.ciConfirm.hide(); + this.sigBack && this.sigBack.hide(); } setState(model) { diff --git a/src/jmapNew/theme/xian_02/menus/menuCancel.vue b/src/jmapNew/theme/xian_02/menus/menuCancel.vue index 7987c6401..c1eb082d8 100644 --- a/src/jmapNew/theme/xian_02/menus/menuCancel.vue +++ b/src/jmapNew/theme/xian_02/menus/menuCancel.vue @@ -215,7 +215,7 @@ export default { operation: eachCmd.operation.code, param: eachCmd.param // 请求栈中参数配置 }; - this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device.type, isCiConfirm: 1}]); + this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device._type, isCiConfirm: 1}]); } else { operate = { send: true, @@ -223,7 +223,7 @@ export default { cmdType: eachCmd.cmdType, param: eachCmd.param // 请求栈中参数配置 }; - this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device.type, isCiConfirm: 0}]); + this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device._type, isCiConfirm: 0}]); } this.$store.dispatch('menuOperation/spliceRequestList', {deviceCode:eachCmd.device.code, operateCode:eachCmd.operation.code}); this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { diff --git a/src/jmapNew/theme/xian_02/menus/menuRequest.vue b/src/jmapNew/theme/xian_02/menus/menuRequest.vue index fb4893f5c..3adb8ced1 100644 --- a/src/jmapNew/theme/xian_02/menus/menuRequest.vue +++ b/src/jmapNew/theme/xian_02/menus/menuRequest.vue @@ -110,7 +110,7 @@ export default { operation: eachCmd.operation.code, param: eachCmd.param // 请求栈中参数配置 }; - this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device.type, isCiConfirm: 1}]); + this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device._type, isCiConfirm: 1}]); } else { operate = { send: true, @@ -118,7 +118,7 @@ export default { cmdType: eachCmd.cmdType, param: eachCmd.param // 请求栈中参数配置 }; - this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device.type, isCiConfirm: 0}]); + this.$store.dispatch('training/updateMapState', [{code: eachCmd.device.code, _type: eachCmd.device._type, isCiConfirm: 0}]); } this.$store.dispatch('menuOperation/spliceRequestList', {deviceCode:eachCmd.device.code, operateCode:eachCmd.operation.code}); this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { diff --git a/src/jmapNew/theme/xian_02/menus/menuSignal.vue b/src/jmapNew/theme/xian_02/menus/menuSignal.vue index d43387beb..049063132 100644 --- a/src/jmapNew/theme/xian_02/menus/menuSignal.vue +++ b/src/jmapNew/theme/xian_02/menus/menuSignal.vue @@ -173,6 +173,20 @@ export default { } ] }, + menuEnabled: [ + { + label: '使能', + handler: this.enabledConfirm + }, + { + label: '模拟', + handler: this.undeveloped + }, + { + label: '帮助', + handler: this.undeveloped + } + ], menuForce: [ { label: '信号关灯', @@ -212,6 +226,8 @@ export default { '$store.state.menuOperation.menuCount': function (val) { if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) { this.doShow(this.$store.state.menuOperation.menuPosition); + } else if (this.selected._type === 'Signal' && this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Enabled) && !this.buttonOperation) { + this.doEnabledShow(this.$store.state.menuOperation.menuPosition); } else { this.doClose(); } @@ -405,8 +421,8 @@ export default { this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.lock.menu.operation, name: '终端信号封锁'}, - ciConfirm: true, - param: {signalCode: this.selected.code} + param: {signalCode: this.selected.code}, + cmdType: CMD.Signal.CMD_SIGNAL_BLOCK }); } else { this.$refs.noticeInfo.doShow(step); @@ -417,10 +433,27 @@ export default { }, // 信号解封 unlock() { - commitOperate(menuOperate.Signal.unlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ - if (valid) { - this.$refs.routeUnLock.doShow(operate, this.selected); + const step = { + code: `${this.selected.code}`, + operation: OperationEvent.Signal.unlock.menu.operation, + param: { + signalCode: this.selected.code } + }; + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$store.dispatch('menuOperation/pushRequestList', { + device: this.selected, + operation: { code: OperationEvent.Signal.lock.menu.operation, name: '终端信号解封'}, + ciConfirm: true, + param: {signalCode: this.selected.code} + }); + } else { + this.$refs.noticeInfo.doShow(step); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(step); }); }, // 信号关灯 @@ -548,7 +581,35 @@ export default { this.$store.dispatch('menuOperation/setRouteSelectStartSignal', { startSignalCode: '', endSignalRouteList: [] }); this.$store.dispatch('training/updateMapState', updateDeviceList); }, - undeveloped() {} + enabledConfirm() { + this.$store.dispatch('menuOperation/pushRequestList', { + device: this.selected, + operation: { code: OperationEvent.Signal.unlock.menu.operation, name: '终端信号解封'}, + cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, + param: { + signal: this.selected.code + } + }); + }, + undeveloped() { + this.doClose(); + this.$alert('实现中......', '提示', { + confirmButtonText: '确定', + callback: action => { + } + }); + }, + initMenuEnabled() { + this.menu = this.menuEnabled; + }, + doEnabledShow(point) { + this.topTip = `一级命令使能`; + this.clickEvent(); + this.initMenuEnabled(); + if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) { + this.$refs.popMenu.resetShowPosition(point); + } + } } }; diff --git a/src/jmapNew/theme/xian_02/menus/menuSwitch.vue b/src/jmapNew/theme/xian_02/menus/menuSwitch.vue index 92b395795..2046d7da4 100644 --- a/src/jmapNew/theme/xian_02/menus/menuSwitch.vue +++ b/src/jmapNew/theme/xian_02/menus/menuSwitch.vue @@ -169,7 +169,7 @@ export default { '$store.state.menuOperation.menuCount': function (val) { if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) { this.doShow(this.$store.state.menuOperation.menuPosition); - } else if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Enabled) && !this.buttonOperation) { + } else if (this.selected._type === 'Switch' && this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Enabled) && !this.buttonOperation) { this.doEnabledShow(this.$store.state.menuOperation.menuPosition); } else { this.doClose(); diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index e9046878d..7cedc6817 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.3.5:9000'; // 袁琪 - // BASE_API = 'http://192.168.3.6: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.41:9000'; // 张赛 diff --git a/src/views/system/configLine/config.vue b/src/views/system/configLine/config.vue index 63e50cfb5..636d62f49 100644 --- a/src/views/system/configLine/config.vue +++ b/src/views/system/configLine/config.vue @@ -106,7 +106,7 @@ export default { focus: false, booleanList: ['lockFirst', 'switchSingleHandle', 'signalApproachOnlyOne', 'signalApproachOnlyNpSwitch', 'routeNameUseEndOppositeSignalName', 'generateTbRoute', 'tbRouteNameUseEndOppositeSignalName', 'routeSignalAlwaysGreen', - 'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch', 'generateCycle'], + 'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch', 'generateCycle', 'overlapSettingByTrigger'], selectList: ['upDirection'], generalConfig: ['lockFirst', 'switchSingleHandle', 'upDirection'], numberList: ['overlapReleaseTime', 'routeReleaseTime'], @@ -130,7 +130,8 @@ export default { overlapSignalOppositeSwitchNpOnly: '延续保护道岔在防护信号机与所属区段方向相反时,是否只构建定位道岔', overlapReleaseTime: '默认延续保护解锁时间', routeReleaseTime: '默认进路解锁时间', - generateCycle: '是否生成自动折返' + generateCycle: '是否生成自动折返', + overlapSettingByTrigger: '延续保护的建立方式:true-通过触发建立,false-随进路建立' } }; },