Commit 62c3ccfa by 吴云建

会话优化

parent a07362f4
Showing with 9 additions and 1 deletions
......@@ -63,6 +63,7 @@ import { Component, Prop, Ref, Vue } from "vue-property-decorator";
import { chatStore, ChatStore } from "@/customer-service/store/model";
import { formatTime, TimeFormatRule } from "@/customer-service/utils/time";
import { Chat as ChatType } from "@/customer-service/xim/models/chat";
import { EVENTS } from "@/EventConsts"
export function parserMessage(type: string, rawMsg: string) {
if (!type) return "";
......@@ -170,6 +171,9 @@ export default class ModelChatList extends Vue {
this.scrollbar.update();
await this.sdk.model("UniplatChat").registerOnChange(this.onTransportMessage);
await this.sdk.model("general_order").registerOnChange(this.onTransportMessage);
if (this.listName === "group_receiving" || this.listName === "group_wait") {
this.$eventHub.$on(EVENTS.ChatUpdate, this.refreshListDebounce);
}
}
onTransportMessage(e: any) {
......@@ -177,9 +181,13 @@ export default class ModelChatList extends Vue {
it.action === "createChat" ||
it.action === "csExitChat" ||
it.action === "finishChat" ||
it.action === "delete" && it.model === "general_order"
it.action === "delete" && it.model === "general_order" ||
it.action === "sendMsg" && this.listName === "group_before_handle" && this.chatList.findIndex(chat => chat.id == it.selectedList[0]) > -1
);
if (index > -1) {
if (this.listName === "group_before_handle" && e.dataUpdates.findIndex(it => it.action === "sendMsg") > -1) {
this.$eventHub.$emit(EVENTS.ChatUpdate)
}
this.refreshListDebounce();
}
}
......
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 sign in to comment