From a4525be99ead6c83ee8ec227918c8c5888c820e5 Mon Sep 17 00:00:00 2001 From: fan Date: Thu, 11 May 2023 15:13:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/training.js | 1 + src/utils/baseUrl.js | 2 +- src/views/newMap/display/index.vue | 2 +- .../display/simulationMenu/simulationMenu.vue | 39 +- src/views/newMap/display/terminals/index.vue | 64 ++- .../newMap/display/terminals/localWork.vue | 34 +- .../newMap/display/terminals/terminalMenu.vue | 485 ++++++++---------- .../publish/publishMap/editSubsystem.vue | 2 - .../publishMap/mapFunctionTemplate/edit.vue | 2 - 9 files changed, 302 insertions(+), 329 deletions(-) diff --git a/src/store/modules/training.js b/src/store/modules/training.js index 547888a91..c581fda2d 100644 --- a/src/store/modules/training.js +++ b/src/store/modules/training.js @@ -192,6 +192,7 @@ const training = { state.prdType = prdType; }, setRoles: (state, roles) => { + console.log(roles, '***********'); state.roles = roles; }, setCenterStationCode:(state, centerStationCode) => { diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 88ca6c631..6151b9016 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -31,7 +31,7 @@ export function handlerUrl() { // BASE_API = 'http://192.168.3.94:9000'; // 旭强 // BASE_API = 'http://192.168.3.15:9000'; // 张赛 // BASE_API = 'http://192.168.3.5:9000'; // 夏增彬 - BASE_API = 'http://192.168.3.37:9000'; // 卫志宏 + // BASE_API = 'http://192.168.3.37:9000'; // 卫志宏 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 diff --git a/src/views/newMap/display/index.vue b/src/views/newMap/display/index.vue index 7484bdcbe..0ae87264f 100644 --- a/src/views/newMap/display/index.vue +++ b/src/views/newMap/display/index.vue @@ -98,7 +98,7 @@ export default { this.hasVoice = val.hasVoice; this.hasTraining = val.hasTraining; this.trainingDesign = val.trainingDesign; - this.$refs.simulationMenu.handleMenuShow(); + // this.$refs.simulationMenu.handleMenuShow(); } }, async mounted() { diff --git a/src/views/newMap/display/simulationMenu/simulationMenu.vue b/src/views/newMap/display/simulationMenu/simulationMenu.vue index 52de8e999..c52de88ce 100644 --- a/src/views/newMap/display/simulationMenu/simulationMenu.vue +++ b/src/views/newMap/display/simulationMenu/simulationMenu.vue @@ -63,19 +63,13 @@ export default { { label: '设备管理', name: 'deviceManage', click: this.deviceManage, isDisabled: () => { return false; }, isShow: () => { return (this.$store.state.training.domConfig.hasDeviceManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER) || (this.$route.query.client === 'interlockWork' && this.$route.query.projectDevice === 'ILW'); } }, { label: '联系方式', name: 'contectUs', click: this.contectUs, isDisabled: () => { return false; }, isShow: () => { return true; } }, { label: '生成仿真号', name: 'generateQrCode', click: this.generateQrCode, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.joint && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } }, - { label: '切换客流数据', name: 'changeFlowData', click: this.changeFlowData, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasLpf && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } }, + { label: '切换客流数据', name: 'changeFlowData', click: this.changeFlowData, isDisabled: () => { return false; }, isShow: this.isShowLpf}, { label: '成员管理', name: 'memberManage', click: this.memberManage, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasMemberManage && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } }, { label: '考试', name: 'exam', click: this.goExam, isDisabled: () => { return false; }, isShow: () => { return this.$store.state.training.domConfig.hasExam && this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; } }, { label: '按计划行车', name: 'drivingPlan', click: this.drivingPlan, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, - isShow: () => { - return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && - (this.$route.query.client !== 'diagramEdit' || (this.$route.query.client == 'diagramEdit' && this.$store.state.map.picture == 'testRunplan')); - } }, + isShow: () => this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && this.$store.state.map.picture !== 'diagramEdit' }, { label: '初始化', name: 'initialize', click: this.initializeSim, isDisabled: () => { return this.$store.state.trainingNew.trainingSwitch; }, - isShow: () => { - return this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && - (this.$route.query.client !== 'diagramEdit' || (this.$route.query.client == 'diagramEdit' && this.$store.state.map.picture == 'testRunplan')); - } }, + isShow: () => this.$store.state.training.simulationUserType === SimulationUserType.TEACHER && this.$store.state.map.picture !== 'diagramEdit' }, { label: '退出', name: 'quit', click: this.exitSim, isDisabled: () => { return false; }, isShow: () => { return true; } } ] }; @@ -95,17 +89,6 @@ export default { } }, watch: { - '$store.state.ibp.moreScreen': function (val) { - this.handleMenuShow(); - }, - '$store.state.training.simulationUserType': function (val) { - this.handleMenuShow(); - }, - '$store.state.map.picture': function (val) { - if (val == 'testRunplan') { - this.handleMenuShow(); - } - }, '$store.state.socket.simulationOver':function(val) { this.back(); }, @@ -124,6 +107,21 @@ export default { window.removeEventListener('click', this.hideMenuList); }, methods: { + isShowLpf() { + let flag = this.$store.state.training.simulationUserType === SimulationUserType.TEACHER; + if (flag) { + const clientIdList = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.clientList || [] : []; + const mapClientMap = this.$store.state.map.map ? this.$store.state.map.map.mapClientVOMap : {}; + const mapClientList = mapClientMap ? mapClientMap[this.$route.query.simType] : []; + flag = false; + mapClientList.forEach(client => { + if (client.type === 'largePassengerView' && clientIdList.includes(client.id)) { + flag = true; + } + }); + } + return flag; + }, switchOffset() { EventBus.$emit('switchOffset'); }, @@ -141,6 +139,7 @@ export default { }, showMenuList(event) { event.stopPropagation(); + this.handleMenuShow(); this.isShowMenuList = !this.isShowMenuList; this.active = -1; }, diff --git a/src/views/newMap/display/terminals/index.vue b/src/views/newMap/display/terminals/index.vue index 47bb888e4..96f09db33 100644 --- a/src/views/newMap/display/terminals/index.vue +++ b/src/views/newMap/display/terminals/index.vue @@ -1,7 +1,7 @@