From 57ffa8545190426a552b05447dd38b0a79999ee7 Mon Sep 17 00:00:00 2001
From: joylink_cuiweidong <364937672@qq.com>
Date: Tue, 21 Jul 2020 10:49:01 +0800
Subject: [PATCH] =?UTF-8?q?=E5=89=A7=E6=9C=AC=E9=A2=84=E8=A7=88=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
---
.../newMap/displayNew/chatView/chatBox.vue | 1 +
.../jointTrainingNew/chatView/chatBox.vue | 63 +++++++++++++++++++
2 files changed, 64 insertions(+)
diff --git a/src/views/newMap/displayNew/chatView/chatBox.vue b/src/views/newMap/displayNew/chatView/chatBox.vue
index e0de06626..d73ffd7a3 100644
--- a/src/views/newMap/displayNew/chatView/chatBox.vue
+++ b/src/views/newMap/displayNew/chatView/chatBox.vue
@@ -714,6 +714,7 @@ export default {
border-radius: 5px;
font-size: 14px;
color: #000000;
+ z-index: 2;
}
.scriptTip::after{
content: '';
diff --git a/src/views/newMap/jointTrainingNew/chatView/chatBox.vue b/src/views/newMap/jointTrainingNew/chatView/chatBox.vue
index d64ac018e..867c3643b 100644
--- a/src/views/newMap/jointTrainingNew/chatView/chatBox.vue
+++ b/src/views/newMap/jointTrainingNew/chatView/chatBox.vue
@@ -38,6 +38,7 @@
{{ userString }}
+ {{ scriptTip }}
@@ -79,6 +80,7 @@
+
{{ scriptTip }}
@@ -97,6 +99,7 @@
import ChatSetting from './chatSetting';
import ChatTooltip from './chatTooltip';
import ChatContent from './chatContent';
+import CMD from '@/scripts/cmdPlugin/CommandEnum';
import ChatMemberList from './chatMemberList';
import RecordRTC from 'recordrtc';
import {sendSimulationConversition, startConversition, overSimulationConversition, getAllConversition} from '@/api/chat';
@@ -135,6 +138,7 @@ export default {
language:'zh',
sex:'1'
},
+ scriptTip:'',
treeData: [],
defaultProps: {
children: 'children',
@@ -197,6 +201,7 @@ export default {
});
},
'$store.state.socket.createConversition':function(val) {
+ debugger;
const member = this.memberData[val.creatorId];
if (member.userId == this.$store.state.user.id) {
const memberList = [];
@@ -211,6 +216,37 @@ export default {
this.privateMemberList = memberList;
this.commonConversation = false;
}
+ this.conversitionId = val.id;
+ },
+ '$store.state.socket.simulationScriptTip':function(val, old) {
+ if (val) {
+ if (val.type == 'Conversation') {
+ // const target = this.$refs.chatMemberList.getMember(val.targetId);
+ // if (target && target.length > 0) {
+ this.scriptTip = '请说:' + val.content;
+ // }
+ } else if (val.type == 'Command') {
+ const commandName = val.operationType;
+ let device = val.operationType.split('_')[0];
+ if (device == 'CM') {
+ device = 'ControlConvertMenu';
+ }
+ const operateName = Object.values(CMD[device]).find(res=>{ return res.value == commandName; });
+ this.$messageBox('请执行【' + operateName.label + '】操作');
+ } else if (val.type == 'Over_Conversation') {
+ this.scriptTip = '请结束当前会话';
+ } else if (val.type == 'Start_Conversation' ) {
+ debugger;
+ const inviteMember = [];
+ val.conversationMemberIds.forEach(id=>{
+ if (val.memberId != id) {
+ // const userName = memberList.find(elem=>{ return elem.id == id; });
+ inviteMember.push(this.memberData[id].label);
+ }
+ });
+ this.scriptTip = '请创建会话,选择' + inviteMember.toString();
+ }
+ }
},
'$store.state.socket.scriptFinish':function(val, old) {
this.$message('剧本执行完成');
@@ -309,6 +345,7 @@ export default {
},
mounted() {
this.firstClick = true;
+ this.scriptTip = '';
},
methods:{
handleMinimality(data) {
@@ -346,6 +383,7 @@ export default {
},
// 语音录制开始
startRecording() {
+ this.scriptTip = '';
const that = this;
if (!this.recordSending && !this.recorders && !this.microphone) {
this.$refs.chatSetting.doClose();
@@ -477,6 +515,7 @@ export default {
},
quitConversition() {
this.quitLoading = true;
+ this.scriptTip = '';
overSimulationConversition(this.group, this.conversitionId).then(resp => {
this.conversitionId = '';
this.conversitionMemberList = [];
@@ -849,4 +888,28 @@ export default {
}
}
+.scriptTip{
+ position: absolute;
+ width: 260px;
+ padding: 10px;
+ background: rgb(250, 246, 3);
+ right: 89px;
+ bottom:45px;
+ border-radius: 5px;
+ font-size: 14px;
+ color: #000000;
+ z-index:2;
+}
+.scriptTip::after{
+ content: '';
+ position: absolute;
+ width: 0;
+ height: 0;
+ border-left: 10px solid transparent;
+ border-right: 10px solid transparent;
+ border-top: 8px solid #faf603;
+ right: 16px;
+ bottom: -7px;
+}
+