|
@@ -162,7 +162,7 @@ import Row from "../CustomElement/layout/Row.vue";
|
|
import Col from "../CustomElement/layout/Col.vue";
|
|
import Col from "../CustomElement/layout/Col.vue";
|
|
import CustomForm from "../CustomElement/CustomForm/CustomForm.vue";
|
|
import CustomForm from "../CustomElement/CustomForm/CustomForm.vue";
|
|
import CustomInput from "../CustomElement/CustomForm/items/CustomInput.vue";
|
|
import CustomInput from "../CustomElement/CustomForm/items/CustomInput.vue";
|
|
-import {getChatRoomByQuery, readChatMessage, tosendInputMessage} from "@/api/common/MessageChat";
|
|
|
|
|
|
+import {getChatRoomByQuery, getUnReadTotal, readChatMessage, tosendInputMessage} from "@/api/common/MessageChat";
|
|
import ChatInput from "../CustomElement/ChatInput.vue";
|
|
import ChatInput from "../CustomElement/ChatInput.vue";
|
|
import {getPageMessageChatContent} from "@/api/common/MessageChatContent";
|
|
import {getPageMessageChatContent} from "@/api/common/MessageChatContent";
|
|
import {judgeIsBeforeNow, parseTime} from "@/utils/dateUtils";
|
|
import {judgeIsBeforeNow, parseTime} from "@/utils/dateUtils";
|
|
@@ -296,7 +296,7 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
queryChatRoom() {
|
|
queryChatRoom() {
|
|
- getChatRoomByQuery(this.queryParams).then(res => {
|
|
|
|
|
|
+ getChatRoomByQuery(this.queryParams).then(async res => {
|
|
if (200 === res.code) {
|
|
if (200 === res.code) {
|
|
this.chatRooms = res.data;
|
|
this.chatRooms = res.data;
|
|
this.activeChatRoom = this.chatRooms.find(item => item.active === '0') || this.chatRooms[0];
|
|
this.activeChatRoom = this.chatRooms.find(item => item.active === '0') || this.chatRooms[0];
|
|
@@ -306,6 +306,8 @@ export default {
|
|
if (res.data && res.data.length === 0) {
|
|
if (res.data && res.data.length === 0) {
|
|
this.messageList = [];
|
|
this.messageList = [];
|
|
}
|
|
}
|
|
|
|
+ let ress = await getUnReadTotal();
|
|
|
|
+ this.totalQty = ress.data;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
@@ -371,6 +373,8 @@ export default {
|
|
tosendInputMessage(row).then(async res => {
|
|
tosendInputMessage(row).then(async res => {
|
|
if (res && res.code === 200) {
|
|
if (res && res.code === 200) {
|
|
this.$set(this.sendMessageInfo, 'messageContent', '')
|
|
this.$set(this.sendMessageInfo, 'messageContent', '')
|
|
|
|
+ let unreadRes = await readChatMessage(this.activeChatRoom);
|
|
|
|
+ this.totalQty = unreadRes.data;
|
|
await this.handleQueryContentList(this.activeChatRoom);
|
|
await this.handleQueryContentList(this.activeChatRoom);
|
|
}
|
|
}
|
|
}).finally(() => {
|
|
}).finally(() => {
|