Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
62c3ccfa
authored
Aug 17, 2021
by
吴云建
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
会话优化
parent
a07362f4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
components/chat-list-model.vue
components/chat-list-model.vue
View file @
62c3ccfa
...
@@ -63,6 +63,7 @@ import { Component, Prop, Ref, Vue } from "vue-property-decorator";
...
@@ -63,6 +63,7 @@ import { Component, Prop, Ref, Vue } from "vue-property-decorator";
import
{
chatStore
,
ChatStore
}
from
"@/customer-service/store/model"
;
import
{
chatStore
,
ChatStore
}
from
"@/customer-service/store/model"
;
import
{
formatTime
,
TimeFormatRule
}
from
"@/customer-service/utils/time"
;
import
{
formatTime
,
TimeFormatRule
}
from
"@/customer-service/utils/time"
;
import
{
Chat
as
ChatType
}
from
"@/customer-service/xim/models/chat"
;
import
{
Chat
as
ChatType
}
from
"@/customer-service/xim/models/chat"
;
import
{
EVENTS
}
from
"@/EventConsts"
export
function
parserMessage
(
type
:
string
,
rawMsg
:
string
)
{
export
function
parserMessage
(
type
:
string
,
rawMsg
:
string
)
{
if
(
!
type
)
return
""
;
if
(
!
type
)
return
""
;
...
@@ -170,6 +171,9 @@ export default class ModelChatList extends Vue {
...
@@ -170,6 +171,9 @@ export default class ModelChatList extends Vue {
this
.
scrollbar
.
update
();
this
.
scrollbar
.
update
();
await
this
.
sdk
.
model
(
"UniplatChat"
).
registerOnChange
(
this
.
onTransportMessage
);
await
this
.
sdk
.
model
(
"UniplatChat"
).
registerOnChange
(
this
.
onTransportMessage
);
await
this
.
sdk
.
model
(
"general_order"
).
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
)
{
onTransportMessage
(
e
:
any
)
{
...
@@ -177,9 +181,13 @@ export default class ModelChatList extends Vue {
...
@@ -177,9 +181,13 @@ export default class ModelChatList extends Vue {
it
.
action
===
"createChat"
||
it
.
action
===
"createChat"
||
it
.
action
===
"csExitChat"
||
it
.
action
===
"csExitChat"
||
it
.
action
===
"finishChat"
||
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
(
index
>
-
1
)
{
if
(
this
.
listName
===
"group_before_handle"
&&
e
.
dataUpdates
.
findIndex
(
it
=>
it
.
action
===
"sendMsg"
)
>
-
1
)
{
this
.
$eventHub
.
$emit
(
EVENTS
.
ChatUpdate
)
}
this
.
refreshListDebounce
();
this
.
refreshListDebounce
();
}
}
}
}
...
...
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