From c7bd3214463140de0ede48a3de0102ccdcf55c39 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 17 Aug 2020 18:47:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=A7=E6=9C=AC=E5=BD=95=E5=88=B6=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/script.js | 8 + src/store/modules/training.js | 12 +- src/views/newMap/displayNew/designIndex.vue | 13 +- .../newMap/displayNew/scriptPreviewChat.vue | 6 +- src/views/scriptManage/addScriptMember.vue | 81 ++++++ src/views/scriptManage/allScriptRole.vue | 236 ++++++++++++++++++ src/views/scriptManage/tipScriptRecord.vue | 191 +++++++------- 7 files changed, 440 insertions(+), 107 deletions(-) create mode 100644 src/views/scriptManage/addScriptMember.vue create mode 100644 src/views/scriptManage/allScriptRole.vue diff --git a/src/api/script.js b/src/api/script.js index 51f3414b0..22dfb5386 100644 --- a/src/api/script.js +++ b/src/api/script.js @@ -119,3 +119,11 @@ export function changeScriptRole(group, memberId) { }); } +/** 获取所有选取过的成员 接口(剧本录制) */ +export function getAllSelectedScriptRole(group) { + return request({ + url: `/api/scriptSimulation/${group}/allSelectedMembers`, + method: 'get' + }); +} + diff --git a/src/store/modules/training.js b/src/store/modules/training.js index a2d7e25c6..8ab4d8fb6 100644 --- a/src/store/modules/training.js +++ b/src/store/modules/training.js @@ -238,17 +238,21 @@ const training = { } } }, - updateMemberListInScript:(state, {oldMemberId, newMemberId, userId, name}) => { + updateMemberListInScript:(state, {oldMemberId, newMember, userId, name}) => { if (oldMemberId) { // 重置旧数据 delete state.memberData[oldMemberId].userId; delete state.memberData[oldMemberId].name; state.memberData[oldMemberId].disabled = false; } + if (!state.memberData[newMember.id]) { + state.memberData[newMember.id] = newMember; + } // 更新新数据 - state.memberData[newMemberId].userId = userId; - state.memberData[newMemberId].name = name; - state.memberData[newMemberId].disabled = true; + state.memberData[newMember.id].userId = userId; + state.memberData[newMember.id].name = name; + state.memberData[newMember.id].disabled = true; + }, updateMemberAndUser: (state, {simulationUserList, userId}) => { diff --git a/src/views/newMap/displayNew/designIndex.vue b/src/views/newMap/displayNew/designIndex.vue index 3b58c7e15..9843d4a21 100644 --- a/src/views/newMap/displayNew/designIndex.vue +++ b/src/views/newMap/displayNew/designIndex.vue @@ -23,6 +23,9 @@ {{ faultMode?'切换到普通模式':'切换到故障模式' }} + + + @@ -227,16 +230,16 @@ export default { } }); let prdType; - if (this.userRole == '行值') { + if (role.type == '行值') { prdType = '01'; this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR'); this.$store.dispatch('training/setRoleDeviceCode', role.deviceCode); - } else if (this.userRole == '行调') { + } else if (role.type == '行调') { prdType = '02'; this.$store.dispatch('training/setRoles', 'DISPATCHER'); - } else if (this.userRole == '司机') { + } else if (role.type == '司机') { prdType = '04'; - } else if (this.userRole == '通号') { + } else if (role.type == '通号') { prdType = ''; const routeData = this.$router.resolve({ path:'/jlmap3d/maintainer', @@ -248,7 +251,7 @@ export default { noPreLogout: true } }); - this.openWindow = window.open(routeData.href); + window.open(routeData.href); } else { prdType = ''; } diff --git a/src/views/newMap/displayNew/scriptPreviewChat.vue b/src/views/newMap/displayNew/scriptPreviewChat.vue index 33e53c5cc..c37fab6b1 100644 --- a/src/views/newMap/displayNew/scriptPreviewChat.vue +++ b/src/views/newMap/displayNew/scriptPreviewChat.vue @@ -70,7 +70,7 @@ export default { watch:{ // 创建会话 '$store.state.socket.createConversition':function(val) { - debugger; + // debugger; if (this.memberData.length > 0) { const member = this.memberData.find(member=>{ return member.id == val.creatorId; }); if (member && member.userId == this.$store.state.user.id) { @@ -183,6 +183,7 @@ export default { clearAllData() { this.resetCoversition(); this.createCoversition = false; + this.$refs.scriptTip.resetScriptTip(); }, resetCoversition() { this.conversitionId = ''; @@ -196,6 +197,9 @@ export default { }, allowCreatCoversition() { this.createCoversition = true; + }, + resetScriptTip() { + this.$refs.scriptTip.resetScriptTip(); } } diff --git a/src/views/scriptManage/addScriptMember.vue b/src/views/scriptManage/addScriptMember.vue new file mode 100644 index 000000000..8de8cbbca --- /dev/null +++ b/src/views/scriptManage/addScriptMember.vue @@ -0,0 +1,81 @@ + + + diff --git a/src/views/scriptManage/allScriptRole.vue b/src/views/scriptManage/allScriptRole.vue new file mode 100644 index 000000000..11deb8bc1 --- /dev/null +++ b/src/views/scriptManage/allScriptRole.vue @@ -0,0 +1,236 @@ + + + diff --git a/src/views/scriptManage/tipScriptRecord.vue b/src/views/scriptManage/tipScriptRecord.vue index e10c3c736..dd4cce263 100644 --- a/src/views/scriptManage/tipScriptRecord.vue +++ b/src/views/scriptManage/tipScriptRecord.vue @@ -1,50 +1,81 @@