diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 3651e1826..4c04cbd03 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -484,7 +484,7 @@ class SkinCode extends defaultStyle { lamp: { fill: 'rgba(0,0,0,0)', // 填充色 radiusR: 6, // 控制灯大小 - controlColor: '#b5b3b3' // 控制灯颜色 (灰色) + controlColor: 'red' // 控制灯颜色 (灰色) } }; diff --git a/src/jmapNew/shape/Automactic/index.js b/src/jmapNew/shape/Automactic/index.js index 459e1faee..683cab687 100644 --- a/src/jmapNew/shape/Automactic/index.js +++ b/src/jmapNew/shape/Automactic/index.js @@ -104,9 +104,16 @@ export default class Automactic extends Group { this.add(this.text); } + recover() { + this.control && this.control.setStyle({ fill: this.style.AutoTurnBack.lamp.controlColor }); + } + handleSignal() { + this.control.setStyle({ fill: 'green' }); + } // 设置状态 setState(model) { - // model.show && this.handleSignal(); + this.recover(); + model.green && this.handleSignal(); } createMouseEvent() { diff --git a/src/jmapNew/shape/AxleReset/index.js b/src/jmapNew/shape/AxleReset/index.js index a961fa6a0..d1c85dfbf 100644 --- a/src/jmapNew/shape/AxleReset/index.js +++ b/src/jmapNew/shape/AxleReset/index.js @@ -40,7 +40,8 @@ export default class AxleReset extends Group { r: this.style.AxleReset.lamp.radiusR }, style: { - lineWidth: 0, + stroke: '##b5b3b3', + lineWidth: 1.5, fill: this.style.AxleReset.lamp.controlColor } }); diff --git a/src/jmapNew/shape/Signal/index.js b/src/jmapNew/shape/Signal/index.js index f4b9bae80..205ccb0ba 100644 --- a/src/jmapNew/shape/Signal/index.js +++ b/src/jmapNew/shape/Signal/index.js @@ -362,7 +362,7 @@ class Signal extends Group { // 引导 guid() { - if (this.style.Signal.lamp.guidName == 'ningbo_01' && this.count == 1) { + if (this.style.Signal.lamp.guidName == 'ningbo_01') { this.lamps[1].show(); } if (this.count == 2 && !this.model.lightType && this.style.Signal.lamp.guidName != 'chengdu_03') { // 双灯 物理点灯 允许引导信号 @@ -485,7 +485,7 @@ class Signal extends Group { if (this.style.Signal.lamp.guidName == 'chengdu_03') { this.lamps[0].setStyle({ lineWidth: this.style.Signal.lamp.borderWidth }); } - if (this.style.Signal.lamp.guidName == 'ningbo_01' && this.count == 1) { + if (this.style.Signal.lamp.guidName == 'ningbo_01') { this.lamps[1].hide(); } } diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/childDialog/passwordInputBox.vue b/src/jmapNew/theme/beijing_01/menus/dialog/childDialog/passwordInputBox.vue new file mode 100644 index 000000000..db2edcba8 --- /dev/null +++ b/src/jmapNew/theme/beijing_01/menus/dialog/childDialog/passwordInputBox.vue @@ -0,0 +1,198 @@ + + + + diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/sectionCmdControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/sectionCmdControl.vue deleted file mode 100644 index 7f7cd65b0..000000000 --- a/src/jmapNew/theme/beijing_01/menus/dialog/sectionCmdControl.vue +++ /dev/null @@ -1,455 +0,0 @@ - - diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/sectionControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/sectionControl.vue index ec4708039..1cfc2f0b5 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/sectionControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/sectionControl.vue @@ -22,7 +22,7 @@ - + 激活 @@ -63,7 +63,8 @@ export default { operation: '', stationName: '', sectionName: '', - radio: '' + radio: '', + isDisplay: false }; }, computed: { @@ -78,11 +79,13 @@ export default { }, title() { if (this.operation == OperationEvent.Section.split.menu.operation) { - this.radio = '2'; return '区段控制'; } else if (this.operation == OperationEvent.Section.active.menu.operation) { - this.radio = '1'; return '区段控制'; + } else if (this.operation == OperationEvent.Section.fault.menu.operation) { + return '区故解'; + } else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) { + return '计轴复位'; } else { return ''; } @@ -97,6 +100,17 @@ export default { doShow(operate, selected) { this.selected = selected; if (!this.dialogShow) { + if (this.operation == OperationEvent.Section.split.menu.operation) { + this.radio = '2'; + this.isDisplay = true; + } else if (this.operation == OperationEvent.Section.active.menu.operation) { + this.radio = '1'; + this.isDisplay = true; + } else if (this.operation == OperationEvent.Section.fault.menu.operation) { + this.isDisplay = false; + } else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) { + this.isDisplay = false; + } this.sectionName = ''; this.stationName = ''; if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) { @@ -133,8 +147,32 @@ export default { } else if (this.operation == OperationEvent.Section.active.menu.operation) { /** 轨道区段激活*/ this.active(); + } else if (this.operation == OperationEvent.Section.fault.menu.operation) { + /** 区故解*/ + this.faultUnlock(); + } else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) { + /** 计轴预复位*/ + this.axlePreReset(); } }, + // 区故解 + faultUnlock() { + const operate = { + over: true, + operation: OperationEvent.Section.fault.menu.operation, + cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK + }; + this.sendCommand(operate); + }, + // 计轴预复位 + axlePreReset() { + const operate = { + over: true, + operation: OperationEvent.Section.axlePreReset.menu.operation, + cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET + }; + this.sendCommand(operate); + }, // 轨道区段切除 split() { const operate = { diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/switchControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/switchControl.vue index ff9e5b6df..11c52d10e 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/switchControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/switchControl.vue @@ -95,7 +95,7 @@ export default { } else if (this.operation == OperationEvent.Switch.active.menu.operation) { return '区段控制'; } else if (this.operation == OperationEvent.Switch.unlock.menu.operation) { - return '道岔单解'; + return '道岔解锁'; } else { return ''; } diff --git a/src/jmapNew/theme/beijing_01/menus/menuButton.vue b/src/jmapNew/theme/beijing_01/menus/menuButton.vue index 4f022b0f6..e8aaf7fd9 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuButton.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuButton.vue @@ -224,7 +224,7 @@ + @@ -244,11 +245,15 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import Handler from '@/scripts/cmdPlugin/Handler'; +import CMD from '@/scripts/cmdPlugin/CommandEnum'; // import { deepAssign } from '@/utils/index'; -// import PasswordBox from './dialog/childDialog/passwordInputBox.vue'; +import PasswordBox from './dialog/childDialog/passwordInputBox.vue'; export default { name: 'MapButtonMenu', + components: { + PasswordBox + }, data() { return { point: { @@ -345,33 +350,126 @@ export default { } }); }, - selectedChange() { - // 按钮按下时 - if (this.$store.state.menuOperation.buttonOperation) { - const model = this.$store.state.menuOperation.selected; - if (model && model._type) { - // const deviceType = MapDeviceType[model._type]; - const operate = { - send: true, - model: model, - code: model.code, - // type: deviceType.type, - operation: this.$store.state.menuOperation.buttonOperation, - tempData: this.tempData - }; - - this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { - if (valid) { - if (response) { - this.tempData = response.data; - } - } - }); - } else { - Handler.clear(); - this.$store.dispatch('menuOperation/setButtonOperation', null); + passWordCommit(data) { + const operate = { + operation: data.operation, + over:true, + cmdType:data.cmdType + }; + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + }, + selectedChange() { + const model = this.$store.state.menuOperation.selected; + if (model && model._type) { + switch (this.$store.state.menuOperation.buttonOperation) { + case OperationEvent.Station.guideLock.button.operation : { + if (model && model._type == 'GuideLock') { + const operate = { + start: true, + over: true, + operation: OperationEvent.Station.guideLock.button.operation, + param:{ + stationCode:model.stationCode + } + }; + this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + if (model.setting) { + operate.cmdType = CMD.Station.CMD_STATION_CANCEL_MASTER_GUIDE_LOCK; + } else { + operate.cmdType = CMD.Station.CMD_STATION_SET_MASTER_GUIDE_LOCK; + } + this.$refs.password.doShow(operate); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + + } + break; + } + case OperationEvent.MixinCommand.functionButton.button.operation : { + if (model && model._type == 'AutoTurnBack' && !model.setting) { + const operate = { + start: true, + over: true, + operation: OperationEvent.Station.guideLock.button.operation, + param:{ + cycleCode:model.cycleCode + }, + cmdType : CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK + }; + this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + } + break; + } + case OperationEvent.MixinCommand.totalCancel.button.operation: { + if (model && model._type == 'AutoTurnBack' && model.setting) { + const operate = { + start: true, + over: true, + operation: OperationEvent.Station.guideLock.button.operation, + param:{ + cycleCode:model.cycleCode, + cancelRoute:false + }, + cmdType : CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK + }; + this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(operate); + }); + } + break; + } + } + } else { + Handler.clear(); + this.$store.dispatch('menuOperation/setButtonOperation', null); } + + // 按钮按下时 + // if (this.$store.state.menuOperation.buttonOperation) { + // const model = this.$store.state.menuOperation.selected; + // if (model && model._type) { + // // const deviceType = MapDeviceType[model._type]; + // const operate = { + // send: true, + // model: model, + // code: model.code, + // // type: deviceType.type, + // operation: this.$store.state.menuOperation.buttonOperation, + // tempData: this.tempData + // }; + + // this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { + // if (valid) { + // if (response) { + // this.tempData = response.data; + // } + // } + // }); + // } else { + // Handler.clear(); + // this.$store.dispatch('menuOperation/setButtonOperation', null); + // } + // } } } }; diff --git a/src/jmapNew/theme/beijing_01/menus/menuSection.vue b/src/jmapNew/theme/beijing_01/menus/menuSection.vue index a341ad35a..28e1338fb 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSection.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSection.vue @@ -2,7 +2,6 @@
- @@ -14,7 +13,6 @@ diff --git a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue index ed1b72216..705823436 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue @@ -2,14 +2,241 @@
- + + + + + + + + + +
diff --git a/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue b/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue index 609545c0b..6de9e9a6e 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuSignal.vue @@ -25,7 +25,7 @@ import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import { mapGetters } from 'vuex'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; -import { querySignalStatus } from '@/api/simulation'; +// import { querySignalStatus } from '@/api/simulation'; export default { name: 'SignalMenu', diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/sectionAlxeReset.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionAlxeReset.vue new file mode 100644 index 000000000..33a16f85a --- /dev/null +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/sectionAlxeReset.vue @@ -0,0 +1,157 @@ + + + diff --git a/src/jmapNew/theme/ningbo_01/menus/index.vue b/src/jmapNew/theme/ningbo_01/menus/index.vue index 1694aab05..e80fc73b5 100644 --- a/src/jmapNew/theme/ningbo_01/menus/index.vue +++ b/src/jmapNew/theme/ningbo_01/menus/index.vue @@ -4,6 +4,7 @@