会话群调整
This commit is contained in:
parent
2d2f3e9fdc
commit
6d4e28a0dc
@ -511,7 +511,9 @@ export default {
|
||||
},
|
||||
Conversation: {
|
||||
CMD_Conversation_Chat_Text: {value: 'Conversation_Chat_Text', label: '发送文本消息'},
|
||||
CMD_Conversation_Chat_Audio_Base64: {value: 'Conversation_Chat_Audio_Base64', label: '发送语音消息'}
|
||||
CMD_Conversation_Chat_Audio_Base64: {value: 'Conversation_Chat_Audio_Base64', label: '发送语音消息'},
|
||||
CMD_Conversation_Group_Text_Chat: {value: 'Conversation_Group_Text_Chat', label: '发送会话群文字消息'},
|
||||
CMD_Conversation_Group_Audio_Base64: {value: 'Conversation_Group_Audio_Base64', label: '发送会话群语音消息'}
|
||||
},
|
||||
PSL: {
|
||||
CMD_PSL_PRESS_BUTTON: {value: 'PSL_PRESS_BUTTON', label: 'PSL按钮操作'}
|
||||
|
@ -41,7 +41,6 @@
|
||||
|
||||
<script>
|
||||
import RecordRTC from 'recordrtc';
|
||||
import { sendText } from '@/api/newChat';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {UserOperationType} from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
@ -105,7 +104,7 @@ export default {
|
||||
this.trainingDesign = val.trainingDesign;
|
||||
},
|
||||
lastMessage(newVal, oldVal) {
|
||||
if (newVal.id != oldVal.id) {
|
||||
if (newVal && oldVal && (newVal.id != oldVal.id)) {
|
||||
this.scrollTop();
|
||||
}
|
||||
}
|
||||
@ -163,12 +162,22 @@ export default {
|
||||
return name;
|
||||
},
|
||||
sendText() {
|
||||
sendText(this.group, {id: this.id, content:this.textContent}).then(res => {
|
||||
console.log(res, '--res--');
|
||||
this.textContent = '';
|
||||
}).catch(err => {
|
||||
console.log(err, '--err--');
|
||||
this.$message.error('发送会话文字失败:' + err.message);
|
||||
const operate = {
|
||||
over: true,
|
||||
cmdType: CMD.Conversation.CMD_Conversation_Group_Text_Chat,
|
||||
operation: OperationEvent.Conversation.Chat.menu.operation,
|
||||
userOperationType: UserOperationType.LEFTCLICK,
|
||||
param: {
|
||||
id: this.id,
|
||||
content:this.textContent
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.textContent = '';
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$message.error('发送会话文字失败:' + error.message);
|
||||
});
|
||||
},
|
||||
cancelRecording() {
|
||||
@ -191,10 +200,11 @@ export default {
|
||||
that.recorders.getDataURL(function(BaseURL) {
|
||||
const operate = {
|
||||
over: true,
|
||||
cmdType: CMD.Conversation.CMD_Conversation_Chat_Audio_Base64,
|
||||
cmdType: CMD.Conversation.CMD_Conversation_Group_Audio_Base64,
|
||||
operation: OperationEvent.Conversation.Chat.record.operation,
|
||||
userOperationType: UserOperationType.LEFTCLICK,
|
||||
param: {
|
||||
id: that.id,
|
||||
fileBase64Str: BaseURL
|
||||
}
|
||||
};
|
||||
@ -409,14 +419,14 @@ export default {
|
||||
float: left;
|
||||
margin-left: 10px;
|
||||
margin-top: 10px;
|
||||
display: inline-block;
|
||||
// display: inline-block;
|
||||
max-width: 80%;
|
||||
}
|
||||
.rightUser{
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
margin-top: 10px;
|
||||
display: inline-block;
|
||||
// display: inline-block;
|
||||
max-width: 80%;
|
||||
text-align: right;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user