From 5a072c72365e838c065ae49a5a7f6eb6406ec7f5 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Wed, 3 Aug 2022 14:13:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9B=E8=B7=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataRelation/bigroutingoperate/route.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/route.vue b/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/route.vue index 39d8d1590..16a257d8f 100644 --- a/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/route.vue +++ b/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/route.vue @@ -423,7 +423,16 @@ export default { api(newModel, that.mapInfo.id, newModel.code).then(res=>{ that.$message.success(that.$t(this.isModify ? 'tip.updateSuccessfully' : 'tip.creatingSuccessful')); that.loading = false; - if (!this.isModify && !newModel.multiRoute) { that.routeList.push({code:newModel.code, name:newModel.name, stationCode: newModel.stationCode || ''}); } + if (!this.isModify && !newModel.multiRoute) { + let sCode = newModel.stationCode; + if (!sCode && newModel.startSignalCode) { + const startSignalObj = that.signalList.find(item => { + return item.code == newModel.startSignalCode; + }); + sCode = startSignalObj ? startSignalObj.stationCode : ''; + } + that.routeList.push({code:newModel.code, name:newModel.name, stationCode: sCode || ''}); + } that.clear(); }).catch(() => { that.$messageBox(that.$t(this.isModify ? 'tip.updateFailed' : 'tip.operationAbnormal')); From 5c63dafaa4b44eec01611ffa3d949d92675d2561 Mon Sep 17 00:00:00 2001 From: fan Date: Wed, 3 Aug 2022 14:37:59 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=B0=BF=E5=86=8C=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=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 | 7 +++++++ src/views/newMap/displayNew/index.vue | 1 + src/views/newMap/displayNew/menuSchema.vue | 1 + .../scriptDisplay/scriptPreview/scriptButtonGroup.vue | 6 +++++- src/views/newMap/displayNew/selectStation.vue | 1 + src/views/newMap/jointTrainingNew/index.vue | 2 ++ src/views/newMap/jointTrainingNew/menuSchema.vue | 6 +++++- 7 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/store/modules/training.js b/src/store/modules/training.js index 746f36542..dbe085976 100644 --- a/src/store/modules/training.js +++ b/src/store/modules/training.js @@ -39,6 +39,7 @@ const training = { memberList: [], // 综合仿真成员列表 memberData: {}, // 综合仿真成员列表 simulationUserList: [], // 综合仿真用户列表 + userRole: '', // 本人仿真成员角色 orignalUserRoleId:'', // 设置旧的角色的id scriptQuitCount: 0, // 主动退出剧本 scriptOperationType: '', // 剧本操作类型 @@ -297,6 +298,9 @@ const training = { /** 运行线 (宁波三号线) */ setRunPathSelected: (state, runPathList) => { state.runPathList = runPathList; + }, + setUserRole: (state, userRole) => { + state.userRole = userRole; } }, @@ -655,6 +659,9 @@ const training = { /** 运行线 (宁波三号线) */ setRunPathSelected: ({ commit }, runPathList) => { commit('setRunPathSelected', runPathList); + }, + setUserRole: ({ commit }, userRole) => { + commit('setUserRole', userRole); } } }; diff --git a/src/views/newMap/displayNew/index.vue b/src/views/newMap/displayNew/index.vue index f186447c0..dd3314885 100644 --- a/src/views/newMap/displayNew/index.vue +++ b/src/views/newMap/displayNew/index.vue @@ -141,6 +141,7 @@ export default { beforeDestroy() { clearSimulation(this.group); this.$store.dispatch('training/setSimulationUserList', []); + this.$store.dispatch('training/setUserRole', ''); this.$store.dispatch('training/reset'); // this.$store.dispatch('map/mapClear'); }, diff --git a/src/views/newMap/displayNew/menuSchema.vue b/src/views/newMap/displayNew/menuSchema.vue index cceacf564..42a45ff62 100644 --- a/src/views/newMap/displayNew/menuSchema.vue +++ b/src/views/newMap/displayNew/menuSchema.vue @@ -326,6 +326,7 @@ export default { if ((item.messageType === 'PLAY_CHANGE' || item.messageType === 'ONLINE' ) && item.userId == this.userId && stationRoleList.includes(item.type)) { // this.userRole = item.type || 'AUDIENCE'; this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode); + this.$store.dispatch('training/setUserRole', item.type); this.deviceCode = item.deviceCode; // this.setShowStation(item.deviceCode); this.setShowStation(item.deviceCode); diff --git a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue index 7e82ce5fa..ee6c39ddb 100644 --- a/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue +++ b/src/views/newMap/displayNew/scriptDisplay/scriptPreview/scriptButtonGroup.vue @@ -30,7 +30,7 @@ {{ $t('display.schema.selectRoles') }} 车务终端 路票 - 簿册 + 簿册 调度台 {{ $t('display.schema.previewRunDiagram') }} @@ -166,6 +166,10 @@ export default { { value: 4, label: '4倍速' }, { value: 5, label: '5倍速' } ]; + }, + showRegisterBookBtn() { + const roleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_SIGNALER', 'STATION_SWITCH_MAN', 'STATION_MASTER', 'STATION_WORKER', 'DEVICE_MANAGER']; + return this.$route.query.lineCode === '16' && roleList.includes(this.$store.state.training.userRole); } }, watch:{ diff --git a/src/views/newMap/displayNew/selectStation.vue b/src/views/newMap/displayNew/selectStation.vue index 317a2968f..051072f03 100644 --- a/src/views/newMap/displayNew/selectStation.vue +++ b/src/views/newMap/displayNew/selectStation.vue @@ -173,6 +173,7 @@ export default { list.push(mapDevice[key]); } this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode); + this.$store.dispatch('training/setUserRole', item.type); this.$jlmap.updateShowStation(list, showStationCode || item.deviceCode); this.setCenter(showStationCode); } diff --git a/src/views/newMap/jointTrainingNew/index.vue b/src/views/newMap/jointTrainingNew/index.vue index 6eb2a050a..38c2811ca 100644 --- a/src/views/newMap/jointTrainingNew/index.vue +++ b/src/views/newMap/jointTrainingNew/index.vue @@ -300,6 +300,7 @@ export default { await this.$store.dispatch('training/reset'); await this.$store.dispatch('map/mapClear'); await this.$store.dispatch('menuOperation/resetRequestList'); + this.$store.dispatch('training/setUserRole', ''); Message.closeAll(); }, methods: { @@ -782,6 +783,7 @@ export default { } else if (item.messageType === 'PLAY_CHANGE' && item.userId == this.userId) { this.userRole = item.type || 'AUDIENCE'; this.$store.dispatch('training/setRoleDeviceCode', item.deviceCode); + this.$store.dispatch('training/setUserRole', this.userRole); this.deviceCode = item.deviceCode; this.setSimulationPrdType(this.centralizedStationMap[item.deviceCode]); this.$nextTick(() => { diff --git a/src/views/newMap/jointTrainingNew/menuSchema.vue b/src/views/newMap/jointTrainingNew/menuSchema.vue index f29728324..a8e99ea2a 100644 --- a/src/views/newMap/jointTrainingNew/menuSchema.vue +++ b/src/views/newMap/jointTrainingNew/menuSchema.vue @@ -15,7 +15,7 @@ 车务终端 路票 - 簿册 + 簿册 调度台 IBP盘 大屏 @@ -169,6 +169,10 @@ export default { ibpShow() { const lineCodeList = ['08', '16']; return this.userRole === 'STATION_SUPERVISOR' && !this.$route.query.projectDevice && !lineCodeList.includes(this.$route.query.lineCode); + }, + showRegisterBookBtn() { + const roleList = ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_SIGNALER', 'STATION_SWITCH_MAN', 'STATION_MASTER', 'STATION_WORKER', 'DEVICE_MANAGER']; + return this.$route.query.lineCode === '16' && roleList.includes(this.$store.state.training.userRole); } }, watch: { From ae5d53e9e0c8a902ce14a80c46f8b4b9b2301274 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Wed, 3 Aug 2022 15:33:03 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newMapdraft/dataRelation/bigroutingoperate/route.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/route.vue b/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/route.vue index 16a257d8f..b366b2839 100644 --- a/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/route.vue +++ b/src/views/newMap/newMapdraft/dataRelation/bigroutingoperate/route.vue @@ -98,7 +98,7 @@ >{{ $t('map.activate') }} - +