From b5788f01d436d8a7db5ed3f5c8486c6b198fac3f Mon Sep 17 00:00:00 2001 From: lVAL Date: Mon, 25 Jan 2021 15:46:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E7=8E=B0=E5=9C=B0?= =?UTF-8?q?=E8=BD=A6=E7=AB=99=E7=99=BB=E5=BD=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/theme/nanjing_02/menus/index.vue | 20 ++- .../theme/nanjing_02/menus/menuBar.vue | 146 ++++++++++++------ .../theme/nanjing_02/menus/menuButton.vue | 78 +++++++--- src/views/newMap/displayNew/menuSchema.vue | 2 +- src/views/newMap/displayNew/selectStation.vue | 14 +- 5 files changed, 180 insertions(+), 80 deletions(-) diff --git a/src/jmapNew/theme/nanjing_02/menus/index.vue b/src/jmapNew/theme/nanjing_02/menus/index.vue index 7b42fb0a5..fdcd832ae 100644 --- a/src/jmapNew/theme/nanjing_02/menus/index.vue +++ b/src/jmapNew/theme/nanjing_02/menus/index.vue @@ -1,13 +1,13 @@
- 执行 - 取消 + 执行 + 取消 关闭
@@ -208,8 +208,8 @@ @@ -237,7 +237,17 @@ export default { default() { return null; } - } + }, + loginActive: { + type: Boolean, + default() { + return false + } + }, + inputStr: { + type: String, + default: '' + } }, data() { return { @@ -316,13 +326,19 @@ export default { }, cr2ConfirmId() { return OperationEvent.Command.commandHaerbin.confrimCr2.domId; - }, - isLocal() { - return this.$store.state.training.prdType == '01'; - }, + }, + centerStation() { + return this.getCentralizedStationByInputStr(this.inputStr) || {}; + }, stationContorl() { return this.getStationControl(this.selected || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {}; - }, + }, + isLocal() { + return this.$store.state.training.prdType == '01'; + }, + isLogin() { + return this.isLocal ? this.loginActive && this.centerStation.code == this.stationContorl.code: true + }, menuPosition() { return this.$store.state.menuOperation.menuPosition; } @@ -340,8 +356,8 @@ export default { if (!val) { this.doClose(); } - }, - 'selected': function (val) { + }, + 'selected': function (val) { this.initMenus();// 初始化菜单数据 this.pushTempData([]); // 清空执行栏 this.selectedObj = this.selected; @@ -376,7 +392,8 @@ export default { }, '$store.state.map.showCentralizedStationCode': function(val) { if (!this.oldSelected) { - this.handleBasicMenu(); + this.handleBasicMenu(); + this.cancle(); } }, '$store.state.map.mapStationStateUpdateCount': function() { @@ -390,6 +407,19 @@ export default { this.handleBasicMenu(); }, methods: { + getCentralizedStationByInputStr(inputStr) { + const station = this.stationList.find(el => el.depot ? false: el.jp == this.inputStr ); + if (station) { + return this.getStationControl(station); + } + }, + interceptLogin(cb) { + return (args) => { + if (this.isLogin) { + cb(args) + } + } + }, // 高亮设备 deviceHighLight(device, flag) { if (device && device.instance && typeof device.instance.drawSelected === 'function' ) { diff --git a/src/views/newMap/displayNew/menuSchema.vue b/src/views/newMap/displayNew/menuSchema.vue index c77c561c4..4918ebf01 100644 --- a/src/views/newMap/displayNew/menuSchema.vue +++ b/src/views/newMap/displayNew/menuSchema.vue @@ -134,7 +134,7 @@ export default { if (!this.isScheduling) { this.changeOperateMode(); } - }); + }); }, methods: { loadRunData() { diff --git a/src/views/newMap/displayNew/selectStation.vue b/src/views/newMap/displayNew/selectStation.vue index 855359bc4..af6f1a2f6 100644 --- a/src/views/newMap/displayNew/selectStation.vue +++ b/src/views/newMap/displayNew/selectStation.vue @@ -6,6 +6,8 @@