Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_front_2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenqikuai
fns_front_2
Commits
e448ef0b
Commit
e448ef0b
authored
Oct 12, 2021
by
Zhang Xiaojie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab.33.cn:chenqikuai/fns_front_2 into dev
parents
60741681
a536eb65
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
index.vue
src/components/NavBar/index.vue
+2
-2
displayName.ts
src/utils/displayName.ts
+1
-1
ChatInput.vue
src/views/Chat/ChatInput.vue
+16
-1
No files found.
src/components/NavBar/index.vue
View file @
e448ef0b
<
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>
...
...
src/utils/displayName.ts
View file @
e448ef0b
...
@@ -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
}
}
...
...
src/views/Chat/ChatInput.vue
View file @
e448ef0b
...
@@ -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,7 +118,6 @@ export default defineComponent({
...
@@ -117,7 +118,6 @@ 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
({
...
@@ -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
}
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment