|
|
|
|
@ -90,14 +90,14 @@ |
|
|
|
|
<el-button |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-video-camera" |
|
|
|
|
@click="handleTeachingClick(1)" |
|
|
|
|
@click="handleTeachingClick(9)" |
|
|
|
|
title="发起教学" |
|
|
|
|
v-if="currentChat.scene == ContactsScene.GROUP" |
|
|
|
|
/> |
|
|
|
|
<el-button |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-video-camera-solid" |
|
|
|
|
@click="handleTeachingClick(9)" |
|
|
|
|
@click="handleTeachingClick(1)" |
|
|
|
|
title="发起会诊" |
|
|
|
|
v-if="currentChat.scene == ContactsScene.PRIVATE" |
|
|
|
|
/> |
|
|
|
|
@ -180,6 +180,8 @@ export default { |
|
|
|
|
// 存储编辑器中的文件信息 |
|
|
|
|
editorFiles: [], |
|
|
|
|
maxQuillInitRetries: 20, |
|
|
|
|
// 字数限制警告标记 |
|
|
|
|
wordLimitWarning: false, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
@ -418,6 +420,10 @@ export default { |
|
|
|
|
// 处理文本变化,检测@符号输入 |
|
|
|
|
handleTextChange(delta) { |
|
|
|
|
try { |
|
|
|
|
// 字数限制检查(所有场景都需要) |
|
|
|
|
this.checkWordLimit(); |
|
|
|
|
|
|
|
|
|
// @提醒逻辑(只有群聊场景) |
|
|
|
|
if ( |
|
|
|
|
!this.currentChat || |
|
|
|
|
this.currentChat.scene !== ContactsScene.GROUP |
|
|
|
|
@ -441,6 +447,27 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 检查字数限制 |
|
|
|
|
checkWordLimit() { |
|
|
|
|
if (!this.quill) return; |
|
|
|
|
const text = this.quill.getText().trim(); |
|
|
|
|
const maxLength = 1000; |
|
|
|
|
const currentLength = text.length; |
|
|
|
|
|
|
|
|
|
if (currentLength > maxLength) { |
|
|
|
|
// 截断超出部分 |
|
|
|
|
this.quill.deleteText(maxLength, currentLength - maxLength); |
|
|
|
|
// 显示提示 |
|
|
|
|
if (!this.wordLimitWarning) { |
|
|
|
|
this.wordLimitWarning = true; |
|
|
|
|
this.$message.warning(`消息字数不能超过${maxLength}字`); |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.wordLimitWarning = false; |
|
|
|
|
}, 2000); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 显示@成员下拉框 |
|
|
|
|
showAtDropdown() { |
|
|
|
|
try { |
|
|
|
|
@ -542,13 +569,13 @@ export default { |
|
|
|
|
const targetMode = this.meetingModes.find( |
|
|
|
|
(item) => item.type === meetingType |
|
|
|
|
); |
|
|
|
|
console.log(targetMode); |
|
|
|
|
// 正常跳转 |
|
|
|
|
this.$router.push({ |
|
|
|
|
name: targetMode.routeName, |
|
|
|
|
query: { |
|
|
|
|
name: this.userInfo.group, |
|
|
|
|
roomId_id: this.generateRoomId(targetMode.type, this.userInfo.id), |
|
|
|
|
init_users: [this.currentChat.source_id], |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
@ -586,6 +613,13 @@ export default { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 检查字数限制 |
|
|
|
|
const maxLength = 1000; |
|
|
|
|
if (textContent.length > maxLength) { |
|
|
|
|
this.$message.warning(`消息字数不能超过${maxLength}字`); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.sending = true; |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|