Commit e448ef0b authored by Zhang Xiaojie's avatar Zhang Xiaojie

Merge branch 'dev' of gitlab.33.cn:chenqikuai/fns_front_2 into dev

parents 60741681 a536eb65
<template>
<div class="navbar w-full" style="z-index: 300">
<div
class="h-full theBar flex items-center px-5 justify-center relative "
class="h-full theBar flex items-center px-5 justify-center relative"
style="background:#F7F7FA"
v-bind="$attrs"
>
......@@ -30,7 +30,7 @@
@click="$router.push(path)"
:color="iconColor"
/>
<div class="title">{{ title }}</div>
<div class="title whitespace-nowrap overflow-hidden overflow-ellipsis px-5">{{ title }}</div>
</div>
</div>
<div class="some-block" v-if="occupyPosition"></div>
......
......@@ -51,7 +51,7 @@ export const getDisplayNamesFromAddress = async (
return addressList.map((item) => {
const msg = fullList.find((i: any) => i?.addr === item)
if (msg?.out_let_name) {
return msg?.out_let_name + '客服经理'
return msg?.out_let_name + msg.user_name
} else {
return msg?.phone
}
......
......@@ -58,6 +58,7 @@ import Icon from "@/components/common/Icon.vue";
import { useRoute } from "vue-router";
import { getUserMsg } from "@/utils/userMsg";
import { eRole } from "@/types/roleType";
import ChatDBService from "@/db/ChatDBService";
export default defineComponent({
props: {
......@@ -117,7 +118,6 @@ export default defineComponent({
console.log('handle send');
const isStaff = getUserMsg()?.role === eRole.staff;
const isUser = getUserMsg()?.role === eRole.user;
console.log(isStaff, 'isStaff');
if (isUser && props.serviceShowValue === "人工服务") {
messageStore.displayNewMessage({
......@@ -131,6 +131,21 @@ export default defineComponent({
datetime: new Date().getTime(),
type: ChatMessageTypes.robot,
})
ChatDBService.getInstance().handleEveryReceive({
msg: {
content: {
content: inputText.value
},
from: getFromId() as string,
target: target,
uuid: uuidv4(),
state: 'success',
datetime: new Date().getTime(),
type: ChatMessageTypes.robot,
},
masterId: getFromId() as string,
isChattingWithTargetId: true,
})
textInputStore.clearTextMessage();
} else {
sendChatMessage({ type: 1, content: { content: inputText.value } })
......
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