From 71d3ff5d8708ee2f8c76e8f93b274063b96ac661 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 30 Jul 2020 15:58:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A9=BE=E9=A9=B6?= =?UTF-8?q?=E7=BB=88=E7=AB=AF=E8=BF=9B=E5=85=A5=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/jointTrainingNew/index.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/newMap/jointTrainingNew/index.vue b/src/views/newMap/jointTrainingNew/index.vue index 4a4ceb173..57525c191 100644 --- a/src/views/newMap/jointTrainingNew/index.vue +++ b/src/views/newMap/jointTrainingNew/index.vue @@ -192,6 +192,8 @@ export default { this.deviceShow = true; } if (this.$route.query.type === 'DRIVE') { + this.$store.dispatch('training/setPrdType', '04'); + this.$store.dispatch('training/setRoles', 'DRIVER'); this.hidepanel(); } }, From 0a7d3d97bd092bd2053764de40fc167f0513e862 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 30 Jul 2020 16:33:08 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=89=A7=E6=9C=AC?= =?UTF-8?q?=E4=BC=9A=E8=AF=9D@?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../displayNew/chatView/chatContent.vue | 40 +++++-------------- .../jointTrainingNew/chatView/chatContent.vue | 18 +-------- 2 files changed, 11 insertions(+), 47 deletions(-) diff --git a/src/views/newMap/displayNew/chatView/chatContent.vue b/src/views/newMap/displayNew/chatView/chatContent.vue index 3f270bb4f..40184eb64 100644 --- a/src/views/newMap/displayNew/chatView/chatContent.vue +++ b/src/views/newMap/displayNew/chatView/chatContent.vue @@ -47,38 +47,16 @@ export default { formatTime(time) { return /\d{2}:\d{2}:\d{2}/.exec(time)[0] || time; }, - covertName(data) { - if (data != 'All') { - if (data instanceof Array) { - let result = ''; - data.forEach(each=>{ - result += this.covertEachName(each); - }); - return result; - } else { - const userInfoName = this.covertEachName(data); - return userInfoName.slice(0, userInfoName.length - 1); - } - } else { - return '@All'; + covertName(memberId) { + let name = ''; + const member = this.$store.state.training.memberData[memberId]; + if (member && member.userId) { + const user = this.simulationUsers[member.userId]; + name = member.label + '(' + user.nickName + ')'; + } else if (member) { + name = member.label; } - }, - covertEachName(data) { - let deviceName = ''; - if (data.deviceCode) { - const device = this.$store.getters['map/getDeviceByCode'](data.deviceCode); - if (device) { - if (device._type == 'Train') { - deviceName = device.groupNumber; - } else { - deviceName = device.name; - } - } else { - deviceName = data.deviceCode; - } - } - const memberName = data.name ? '-' + data.name : ''; - return data.type + deviceName + memberName + ','; + return name; }, playAudio(audioUrl) { document.querySelector('#audioPlay').src = audioUrl; diff --git a/src/views/newMap/jointTrainingNew/chatView/chatContent.vue b/src/views/newMap/jointTrainingNew/chatView/chatContent.vue index 0db60b95f..a3d85e945 100644 --- a/src/views/newMap/jointTrainingNew/chatView/chatContent.vue +++ b/src/views/newMap/jointTrainingNew/chatView/chatContent.vue @@ -4,7 +4,7 @@