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