diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/routeControl.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/routeControl.vue index dff94e5ba..05c2641cd 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/routeControl.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/routeControl.vue @@ -216,15 +216,15 @@ export default { // 信号封锁 lock() { const operate = { - operation: OperationEvent.Signal.lock.menu.operation, - operateNext: OperationEvent.Signal.lock.confirm.operation + over: true, + operation: OperationEvent.Signal.lock.confirm.operation, + cmdType: CMD.Signal.CMD_SIGNAL_BLOCK }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK; - this.$refs.password.doShow(operate); + this.doClose(); } }).catch(() => { }); diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/routeDetail.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/routeDetail.vue index c9323a246..875f26cd8 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/routeDetail.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/routeDetail.vue @@ -31,28 +31,35 @@ highlight-current-row :height="140" > - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -86,7 +93,11 @@ export default { selected: null, tempData: [], stationName: '', - signalName: '' + signalName: '', + controlTypeMap: { + '01': '自动', + '02': '人工' + } }; }, computed: { @@ -133,6 +144,19 @@ export default { this.$store.dispatch('training/emitTipFresh'); }); }, + handleRouteName(name) { + return name.replace(/-/, '-->'); + }, + handleDirection(signalCode) { + let signalDirection = ''; + this.signalList.some(item => { + if (item.code === signalCode) { + signalDirection = item.right; + return true; + } + }); + return ''; + }, doClose() { this.loading = false; this.dialogShow = false; diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/routeGuide.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/routeGuide.vue index 009b1d5db..061dcfc70 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/routeGuide.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/routeGuide.vue @@ -23,13 +23,34 @@
进路列表 - - - - - - - + + + + + + + + + + + +
@@ -45,7 +66,7 @@ - + @@ -53,14 +74,15 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import CancelMouseState from '@/mixin/CancelMouseState'; import NoticeInfo from './childDialog/childDialog/noticeInfo'; -import PasswordBox from './childDialog/passwordInputBox.vue'; +// import PasswordBox from './childDialog/passwordInputBox.vue'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; +import { mapGetters } from 'vuex'; export default { name: 'RouteSelection', components: { NoticeInfo, - PasswordBox + // PasswordBox }, mixins: [ CancelMouseState @@ -83,7 +105,11 @@ export default { '01': '折返', '02': '直通' }, - row: '' + row: '', + controlTypeMap: { + '01': '自动', + '02': '人工' + } }; }, computed: { @@ -108,7 +134,10 @@ export default { disabled = !this.row.canSetting; } return disabled; - } + }, + ...mapGetters('map', [ + 'signalList' + ]) }, mounted() { this.$nextTick(() => { @@ -132,6 +161,19 @@ export default { } return name; }, + handleRouteName(name) { + return name.replace(/-/, '-->'); + }, + handleDirection(signalCode) { + let signalDirection = ''; + this.signalList.some(item => { + if (item.code === signalCode) { + signalDirection = item.right; + return true; + } + }); + return ''; + }, doShow(operate, selected, tempData) { this.selected = selected; // 如果不是断点激活,而是第一次显示,则需要设置初始值 @@ -154,27 +196,6 @@ export default { this.$store.dispatch('training/emitTipFresh'); }); }, - passWordCommit(data) { - const operate = { - over: true, - operation: data.operateNext, - cmdType: data.cmdType, - val: data.val, - param: data.param - }; - - this.loading = true; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - this.loading = false; - if (valid) { - this.doClose(); - } - }).catch(() => { - this.loading = false; - this.doClose(); - this.$refs.noticeInfo.doShow(operate); - }); - }, doClose() { this.loading = false; this.dialogShow = false; @@ -200,8 +221,13 @@ export default { commit() { if (this.row && this.row.canSetting) { const operate = { - operation: OperationEvent.Signal.guide.menu.operation, - operateNext: OperationEvent.Signal.guide.confirm.operation + over: true, + operation: OperationEvent.Signal.guide.confirm.operation, + cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, + val: this.row.code, + param: { + routeCode: this.row.code + } }; this.loading = true; @@ -209,12 +235,7 @@ export default { this.loading = false; if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - operate.cmdType = CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE; - operate.val = this.row.code; - operate.param = { - Route_Code: this.row.code - }; - this.$refs.passwordBox.doShow(operate); + this.doClose(); } else { this.doClose(); this.$refs.noticeInfo.doShow(operate); diff --git a/src/jmapNew/theme/chengdu_03/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/chengdu_03/menus/dialog/routeHandControl.vue index d0ba6168a..83a6b22ef 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dialog/routeHandControl.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dialog/routeHandControl.vue @@ -15,26 +15,34 @@
- - - - - - - - - - - - + + + + + + + + + + + +
@@ -81,7 +89,11 @@ export default { signalName: '', allSelect: false, highlight: true, - row: '' + row: '', + controlTypeMap: { + '01': '自动', + '02': '人工' + } }; }, computed: { @@ -163,6 +175,19 @@ export default { this.$store.dispatch('training/emitTipFresh'); }); }, + handleRouteName(name) { + return name.replace(/-/, '-->'); + }, + handleDirection(signalCode) { + let signalDirection = ''; + this.signalList.some(item => { + if (item.code === signalCode) { + signalDirection = item.right; + return true; + } + }); + return ''; + }, doClose() { this.loading = false; this.dialogShow = false; diff --git a/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue b/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue index 5f4b0399c..c34cc55b6 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuSignal.vue @@ -7,7 +7,7 @@ - + @@ -80,6 +80,11 @@ export default { label: '进路交自动控', handler: this.atsAutoControl, cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING + }, + { + label: '进路信息', + handler: this.detail, + cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING } ], Center: [ @@ -129,9 +134,9 @@ export default { cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING }, { - label: '查询进路控制状态', + label: '进路信息', handler: this.detail, - cmdType: '' + cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING } ] }, @@ -314,7 +319,7 @@ export default { routes.push(elem); } }); - this.$refs.passwordBox.doShow({operation: step.operation, selected: this.selected, routesList: routes}); + this.$refs.passwordBox.doShow({step: step, selected: this.selected, routesList: routes}); } }); }, @@ -348,8 +353,7 @@ export default { this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); if (valid) { - this.$refs.passwordBox.doShow({operation: step.operation, selected: this.selected}); - // this.$refs.routeControl.doShow(step, this.selected); + this.$refs.passwordBox.doShow({step: step, selected: this.selected}); } }); }, @@ -420,30 +424,13 @@ export default { this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => { - const tempData = resp.data; - this.$refs.routeHandControl.doShow(step, this.selected, tempData); - }); - } - }); - }, - // 进路交自动控 - atsAutoControl() { - const step = { - start: true, - code: `${this.selected.code}`, - operation: OperationEvent.Signal.atsAutoControl.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => { - const tempData = resp.data; - this.$refs.routeHandControl.doShow(step, this.selected, tempData); + const routes = []; + this.routeList.forEach(elem => { + if (elem.startSignalCode === this.selected.code) { + routes.push(elem); + } }); + this.$refs.routeHandControl.doShow(step, this.selected, routes); } }); }, @@ -460,18 +447,45 @@ export default { this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => { - const tempData = resp.data; - this.$refs.routeDetail.doShow(step, this.selected, tempData); + const routes = []; + this.routeList.forEach(elem => { + if (elem.startSignalCode === this.selected.code) { + routes.push(elem); + } }); + this.$refs.routeDetail.doShow(step, this.selected, routes); } }); - } - }, - passWordCommit(data) { - console.log(data, '============'); - if (data.operation === OperationEvent.Signal.guide.menu.operation) { - this.$refs.routeGuide.doShow(data.operation, data.selected, data.routesList); + }, + // 进路交自动控 + atsAutoControl() { + const step = { + start: true, + code: `${this.selected.code}`, + operation: OperationEvent.Signal.atsAutoControl.menu.operation, + param: { + signalCode: `${this.selected.code}` + } + }; + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + const routes = []; + this.routeList.forEach(elem => { + if (elem.startSignalCode === this.selected.code) { + routes.push(elem); + } + }); + this.$refs.routeHandControl.doShow(step, this.selected, routes); + } + }); + }, + passWordCommit(data) { + if (data.step.operation === OperationEvent.Signal.guide.menu.operation) { + this.$refs.routeGuide.doShow(data.step.operation, data.selected, data.routesList); + } else if (data.step.operation === OperationEvent.Signal.humanTrainRoute.menu.operation) { + this.$refs.routeControl.doShow(data.step, data.selected); + } } } };