Commit a0ce4755 authored by yaya's avatar yaya

feat: 优化

parent fc64df05
......@@ -7,8 +7,8 @@
</el-menu>-->
<el-container v-loading="loading" style="width: 100%;height: 100%; border: 1px solid #eee">
<el-aside style="width: 20%;background-color: white;padding: 0;min-width: 240px">
<div class="top-tabs" style="background: white;position: fixed; width: 19%;min-width: 200px">
<el-tabs style="padding: 10px 10px 0;" @tab-click="handleClick">
<div class="top-tabs" style="background: white;position: fixed; width: 20%;min-width: 240px">
<el-tabs style="padding: 5px 10px 0;min-width: 240px" @tab-click="handleClick">
<el-tab-pane v-for="(item) in customerList" :key="item.code" >
<div slot="label">
<div class="span-box">
......@@ -123,7 +123,7 @@ export default {
},
computed: {
sendDisabled() {
return !this.messageContent || this.messageContent.length === 0 || !this.chatUserInfo.intervened || !this.currentConversationItem.conversationID
return !this.messageContent.trim() || this.messageContent.trim().length === 0 || !this.chatUserInfo.intervened || !this.currentConversationItem.conversationID
},
serviceTip() {
if (!this.chatUserInfo.aiAssistant) {
......@@ -536,6 +536,9 @@ export default {
const topList = []
if (list && list.length > 0) {
imResponse.data.messageList.map((item) => {
if (!item.payload.text.trim()) {
return
}
const object = {
id: item.ID,
messageContent: item.payload.text,
......@@ -580,6 +583,21 @@ export default {
* 发送消息
* */
sendMessage() {
if (!this.currentConversationItem.conversationID) {
this.$message.error('请选择会话')
this.messageContent = this.messageContent.trim()
return
}
if (this.messageContent.length > 0 && !this.messageContent.trim()) {
this.$message.error('请勿输入空格')
this.messageContent = ''
return
}
if (!this.chatUserInfo.intervened) {
this.$message.error('请先人工介入')
return
}
let reqId = genID()
if (this.messageList && this.messageList.length > 0) {
reqId = this.messageList[this.messageList.length - 1].reqId || genID()
......@@ -778,7 +796,7 @@ export default {
height: 100%;
.chat-message-top {
height: 50px;
height: 58px;
background: white;
padding: 8px;
}
......
......@@ -65,7 +65,7 @@ export default {
},
methods: {
handleBlur() {
if (this.chatUserInfo && this.chatUserInfo.user && this.chatUserInfo.user.remark && this.chatUserInfo.user.remark !== this.preRemark) {
if (this.chatUserInfo.user.remark !== this.preRemark) {
const params = {
user: this.chatUserInfo.user.id,
remark: this.chatUserInfo.user.remark
......
......@@ -82,6 +82,7 @@ export default {
},
methods: {
handleReset() {
this.value2 = ''
this.listQuery = {
page: 1,
limit: 20
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment