diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/sectionControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/sectionControl.vue index 1cfc2f0b5..fdd03f18f 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/sectionControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/sectionControl.vue @@ -79,8 +79,10 @@ 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 '区故解'; diff --git a/src/jmapNew/theme/beijing_01/menus/dialog/speedLimitControl.vue b/src/jmapNew/theme/beijing_01/menus/dialog/speedLimitControl.vue index 18bf1c290..27d62b79e 100644 --- a/src/jmapNew/theme/beijing_01/menus/dialog/speedLimitControl.vue +++ b/src/jmapNew/theme/beijing_01/menus/dialog/speedLimitControl.vue @@ -1,78 +1,104 @@ - - - - 命令信息 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{message}} - - - 下达({{timeCountCommand}}) - - - 确认1 - - - - 确认2({{timeCountConfirm}}) - - - 中止 - - - 关闭 - - - - - + + + + 命令信息 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ message }} + + + 下达({{ timeCountCommand }}) + + + 确认1 + + + + 确认2({{ timeCountConfirm }}) + + + 中止 + + + 关闭 + + + + + \ No newline at end of file +}; + diff --git a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue index bf35a12d4..b15abc755 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue @@ -333,13 +333,7 @@ export default { // 设置进路 arrangementRoute() { commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then((data)=>{ - const routes = []; - this.routeList.forEach(elem => { - if (elem.startSignalCode === this.selected.code) { - routes.push(elem); - } - }); - this.$refs.routeSelection.doShow(data.operate, this.selected, routes); + this.$refs.routeSelection.doShow(data.operate, this.selected, this.getRouteList(this.selected)); }); }, // 现地设置进路 @@ -399,25 +393,13 @@ export default { // 进路交人工控 humanControl() { commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then((data)=>{ - const routes = []; - this.routeList.forEach(elem => { - if (elem.startSignalCode === this.selected.code) { - routes.push(elem); - } - }); - this.$refs.routeHandControl.doShow(data.operate, this.selected, routes); + this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected)); }); }, // 进路交自动控 atsAutoControl() { commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then((data)=>{ - const routes = []; - this.routeList.forEach(elem => { - if (elem.startSignalCode === this.selected.code) { - routes.push(elem); - } - }); - this.$refs.routeHandControl.doShow(data.operate, this.selected, routes); + this.$refs.routeHandControl.doShow(data.operate, this.selected, this.getRouteList(this.selected)); }); }, // 设置通过模式 @@ -437,15 +419,19 @@ export default { // 查询进路状态 detail() { commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then((data)=>{ - const routes = []; - this.routeList.forEach(elem => { - if (elem.startSignalCode === this.selected.code) { - routes.push(elem); - } - }); - this.$refs.routeDetail.doShow(data.operate, this.selected, routes); + this.$refs.routeDetail.doShow(data.operate, this.selected, this.getRouteList(this.selected)); }); }, + // 获取进路列表 + getRouteList(selectType) { + const routes = []; + this.routeList.forEach(elem => { + if (elem.startSignalCode === selectType.code) { + routes.push(elem); + } + }); + return routes; + }, passWordCommit(data) { const operate = { operation: data.operation, diff --git a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue index 928db10dd..ae5053bd7 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue @@ -23,6 +23,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { mouseCancelState } from './utils/menuItemStatus'; +import {menuOperate, commitOperate} from './utils/menuOperate'; export default { name: 'SwitchMenu', @@ -237,167 +238,63 @@ export default { }, // 道岔单锁 lock(selectType) { - const operate = { - start: true, - over: true, - operation: OperationEvent.Switch.lock.menu.operation, - param: { - switchCode: selectType.code - }, - cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } - }).catch(error => { - this.$refs.noticeInfo.doShow(operate, error.message); + commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then((data)=>{ + }).catch(error=>{ + this.$refs.noticeInfo.doShow({}, error.message); }); }, // 道岔解锁 unlock(selectType) { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.unlock.menu.operation, - param: { - switchCode: selectType.code - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchControl.doShow(operate, selectType); - } - }).catch(error => { - this.$refs.noticeInfo.doShow(operate, error.message); + commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 0).then((data)=>{ + this.$refs.switchControl.doShow(data.operate, selectType); + }).catch(error=>{ + this.$refs.noticeInfo.doShow({}, error.message); }); }, - // 现地道岔强扳 switchTurnoutForce(selectType) { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.turnoutForce.menu.operation, - param:{ - switchCode:selectType.code - } - }; - this.$store.dispatch('training/next', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchControl.doShow(operate, this.selected); - } + commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 0).then((data)=>{ + this.$refs.switchControl.doShow(data.operate, selectType); + }).catch(error=>{ + this.$refs.noticeInfo.doShow({}, error.message); }); }, - // 单操到定位 locate(selectType) { - const operate = { - start: true, - over: true, - operation: OperationEvent.Switch.locate.menu.operation, - param: { - switchCode: selectType.code - }, - cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } - }).catch(error => { - this.$refs.noticeInfo.doShow(operate, error.message); + commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then((data)=>{ + }).catch(error=>{ + this.$refs.noticeInfo.doShow({}, error.message); }); }, - // 单操到反位 reverse(selectType) { - const operate = { - start: true, - over: true, - operation: OperationEvent.Switch.reverse.menu.operation, - param: { - switchCode: selectType.code - }, - cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } - }).catch(error => { - this.$refs.noticeInfo.doShow(operate, error.message); + commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then((data)=>{ + }).catch(error=>{ + this.$refs.noticeInfo.doShow({}, error.message); }); }, - // 区段切除 split() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.split.menu.operation, - param: { - switchCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchControl.doShow(operate, this.selected); - } + commitOperate(menuOperate.Switch.split, {switchCode:this.selected.code}, 0).then((data)=>{ + this.$refs.switchControl.doShow(data.operate, this.selected); }); }, // 区段激活 active() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.active.menu.operation, - param: { - switchCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.switchControl.doShow(operate, this.selected); - } + commitOperate(menuOperate.Switch.active, {switchCode:this.selected.code}, 0).then((data)=>{ + this.$refs.switchControl.doShow(data.operate, this.selected); }); }, // 设置临时限速 setSpeed() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.setSpeed.menu.operation, - param: { - switchCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.speedLimitControl.doShow(operate, this.selected); - } + commitOperate(menuOperate.Switch.setSpeed, {switchCode:this.selected.code}, 0).then((data)=>{ + this.$refs.speedLimitControl.doShow(data.operate, this.selected); }); }, // 确认计轴有效 alxeEffective() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Switch.alxeEffective.menu.operation, - param: { - switchCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.alxeEffective.doShow(operate, this.selected); - } + commitOperate(menuOperate.Switch.alxeEffective, {switchCode:this.selected.code}, 0).then((data)=>{ + this.$refs.alxeEffective.doShow(data.operate, this.selected); }); }, undeveloped() { diff --git a/src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js b/src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js index b6936687f..349e7a566 100644 --- a/src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js +++ b/src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js @@ -8,37 +8,31 @@ export const menuOperate = { active:{ // 区段激活 operation: OperationEvent.Section.active.menu.operation, - param:['sectionCode'], cmdType: CMD.Section.CMD_SECTION_ACTIVE }, alxeEffective:{ // 确认计轴有效 operation: OperationEvent.Section.alxeEffective.menu.operation, - param:['sectionCode'], cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE }, split:{ // 区段切除 operation: OperationEvent.Section.split.menu.operation, - param:['sectionCode'], cmdType: CMD.Section.CMD_SECTION_CUT_OFF }, setSpeed:{ // 设置速度 operation: OperationEvent.Section.setSpeed.menu.operation, - param:['sectionCode'], cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED }, axlePreReset:{ // 区段计轴预复位 operation: OperationEvent.Section.axlePreReset.menu.operation, - param:['sectionCode'], cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET }, fault:{ // 区段故障解锁 operation: OperationEvent.Section.fault.menu.operation, - param:['sectionCode'], cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK } }, @@ -92,6 +86,56 @@ export const menuOperate = { // 查询进路状态 operation: OperationEvent.Signal.detail.menu.operation } + }, + Switch:{ + lock:{ + // 道岔单锁 + operation: OperationEvent.Switch.lock.menu.operation, + cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK + }, + unlock:{ + // 道岔解锁 + operation: OperationEvent.Switch.unlock.menu.operation, + cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK + }, + turnoutForce:{ + // 道岔强扳 + operation: OperationEvent.Switch.turnoutForce.menu.operation + }, + locate:{ + // 单操到定位 + operation: OperationEvent.Switch.locate.menu.operation, + cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION + }, + reverse:{ + // 单操到反位 + operation: OperationEvent.Switch.reverse.menu.operation, + cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION + }, + split:{ + // 区段切除 + operation: OperationEvent.Switch.split.menu.operation, + cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF + }, + active:{ + // 区段激活 + operation: OperationEvent.Switch.active.menu.operation, + cmdType: CMD.Switch.CMD_SWITCH_ACTIVE + }, + setSpeed:{ + // 设置临时限速 + operation: OperationEvent.Switch.setSpeed.menu.operation, + cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED + }, + alxeEffective:{ + // 确认计轴有效 + operation: OperationEvent.Switch.alxeEffective.menu.operation, + cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE + } + + }, + Stand:{ + } }; @@ -102,8 +146,8 @@ export function commitOperate(operate, paramList, over) { param:{} }; step.param = paramList; - // isOnce 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作 - if (over != 0) { + // over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作 + if (over != 0 && over != 3) { delete step.start; } if (over == 2 || over == 3) {