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
058ab68c
authored
Oct 15, 2021
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update
parent
dc8f7637
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
store/index.ts
store/index.ts
View file @
058ab68c
...
@@ -23,9 +23,8 @@ import { RootStoreState } from "@/store/model";
...
@@ -23,9 +23,8 @@ import { RootStoreState } from "@/store/model";
export
const
ns
=
ChatStore
.
ns
;
export
const
ns
=
ChatStore
.
ns
;
const
sdk
=
Chat
.
getSdk
;
const
UniplatChatModelName
=
"UniplatChat"
;
const
UniplatChatModelName
=
"UniplatChat"
;
const
model
=
()
=>
s
dk
().
model
(
UniplatChatModelName
);
const
model
=
()
=>
Chat
.
getS
dk
().
model
(
UniplatChatModelName
);
const
orgId
=
()
=>
Chat
.
getOrgId
()
as
string
;
const
orgId
=
()
=>
Chat
.
getOrgId
()
as
string
;
function
uniqueMessages
(
function
uniqueMessages
(
...
@@ -487,7 +486,7 @@ export default {
...
@@ -487,7 +486,7 @@ export default {
if
(
uniplatId
==
null
)
return
;
if
(
uniplatId
==
null
)
return
;
try
{
try
{
const
chat
=
getters
[
ChatStore
.
GETTER_CURRENT_CURRENT_CHAT
];
const
chat
=
getters
[
ChatStore
.
GETTER_CURRENT_CURRENT_CHAT
];
const
data
=
await
s
dk
()
const
data
=
await
Chat
.
getS
dk
()
.
model
(
chat
.
model_name
)
.
model
(
chat
.
model_name
)
.
chat
(
Number
(
chat
.
obj_id
),
orgId
())
.
chat
(
Number
(
chat
.
obj_id
),
orgId
())
.
sendMsg
(
params
.
msgType
,
params
.
msg
);
.
sendMsg
(
params
.
msgType
,
params
.
msg
);
...
@@ -525,7 +524,7 @@ export default {
...
@@ -525,7 +524,7 @@ export default {
{
commit
,
dispatch
},
{
commit
,
dispatch
},
params
:
Parameters
<
ChatStore
.
ACTION_CREATE_NEW_CHAT_BY_SERVICE_MAN
>
[
0
]
params
:
Parameters
<
ChatStore
.
ACTION_CREATE_NEW_CHAT_BY_SERVICE_MAN
>
[
0
]
)
{
)
{
const
{
imChatId
}
=
await
s
dk
()
const
{
imChatId
}
=
await
Chat
.
getS
dk
()
.
model
(
params
.
modelName
)
.
model
(
params
.
modelName
)
.
chat
(
+
params
.
selectedListId
,
orgId
())
.
chat
(
+
params
.
selectedListId
,
orgId
())
.
createChat
();
.
createChat
();
...
@@ -541,7 +540,7 @@ export default {
...
@@ -541,7 +540,7 @@ export default {
{
commit
,
dispatch
},
{
commit
,
dispatch
},
params
:
Parameters
<
ChatStore
.
ACTION_CREATE_NEW_CHAT_BY_CLIENT
>
[
0
]
params
:
Parameters
<
ChatStore
.
ACTION_CREATE_NEW_CHAT_BY_CLIENT
>
[
0
]
)
{
)
{
const
{
imChatId
}
=
await
s
dk
()
const
{
imChatId
}
=
await
Chat
.
getS
dk
()
.
model
(
params
.
modelName
)
.
model
(
params
.
modelName
)
.
chat
(
+
params
.
selectedListId
,
orgId
())
.
chat
(
+
params
.
selectedListId
,
orgId
())
.
createChat
(
true
);
.
createChat
(
true
);
...
@@ -632,7 +631,7 @@ export default {
...
@@ -632,7 +631,7 @@ export default {
}
}
if
(
!
state
[
ChatStore
.
STATE_CHAT_CURRENT_USER_UID
])
{
if
(
!
state
[
ChatStore
.
STATE_CHAT_CURRENT_USER_UID
])
{
const
userInfo
=
await
s
dk
().
getUserInfo
();
const
userInfo
=
await
Chat
.
getS
dk
().
getUserInfo
();
commit
(
ChatStore
.
MUTATION_SET_CURRENT_USER_UID
,
userInfo
.
id
);
commit
(
ChatStore
.
MUTATION_SET_CURRENT_USER_UID
,
userInfo
.
id
);
}
}
...
@@ -749,7 +748,7 @@ export default {
...
@@ -749,7 +748,7 @@ export default {
const
{
model_name
,
obj_id
}
=
currentChat
;
const
{
model_name
,
obj_id
}
=
currentChat
;
if
(
model_name
==
null
)
return
;
if
(
model_name
==
null
)
return
;
if
(
obj_id
==
null
)
return
;
if
(
obj_id
==
null
)
return
;
return
await
s
dk
()
return
await
Chat
.
getS
dk
()
.
model
(
model_name
)
.
model
(
model_name
)
.
chat
(
obj_id
,
orgId
())
.
chat
(
obj_id
,
orgId
())
.
startChat
()
.
startChat
()
...
@@ -761,7 +760,7 @@ export default {
...
@@ -761,7 +760,7 @@ export default {
const
{
model_name
,
obj_id
}
=
currentChat
;
const
{
model_name
,
obj_id
}
=
currentChat
;
if
(
model_name
==
null
)
return
;
if
(
model_name
==
null
)
return
;
if
(
obj_id
==
null
)
return
;
if
(
obj_id
==
null
)
return
;
return
await
s
dk
()
return
await
Chat
.
getS
dk
()
.
model
(
model_name
)
.
model
(
model_name
)
.
chat
(
obj_id
,
orgId
())
.
chat
(
obj_id
,
orgId
())
.
finishChat
()
.
finishChat
()
...
@@ -773,7 +772,7 @@ export default {
...
@@ -773,7 +772,7 @@ export default {
const
{
model_name
,
obj_id
}
=
currentChat
;
const
{
model_name
,
obj_id
}
=
currentChat
;
if
(
model_name
==
null
)
return
;
if
(
model_name
==
null
)
return
;
if
(
obj_id
==
null
)
return
;
if
(
obj_id
==
null
)
return
;
return
await
s
dk
()
return
await
Chat
.
getS
dk
()
.
model
(
model_name
)
.
model
(
model_name
)
.
chat
(
obj_id
,
orgId
())
.
chat
(
obj_id
,
orgId
())
.
userExitChat
()
.
userExitChat
()
...
@@ -785,7 +784,7 @@ export default {
...
@@ -785,7 +784,7 @@ export default {
const
{
model_name
,
obj_id
}
=
currentChat
;
const
{
model_name
,
obj_id
}
=
currentChat
;
if
(
model_name
==
null
)
return
;
if
(
model_name
==
null
)
return
;
if
(
obj_id
==
null
)
return
;
if
(
obj_id
==
null
)
return
;
return
await
s
dk
()
return
await
Chat
.
getS
dk
()
.
model
(
model_name
)
.
model
(
model_name
)
.
chat
(
obj_id
,
orgId
())
.
chat
(
obj_id
,
orgId
())
.
csExitChat
()
.
csExitChat
()
...
@@ -800,7 +799,7 @@ export default {
...
@@ -800,7 +799,7 @@ export default {
const
{
model_name
,
obj_id
}
=
currentChat
;
const
{
model_name
,
obj_id
}
=
currentChat
;
if
(
model_name
==
null
)
return
;
if
(
model_name
==
null
)
return
;
if
(
obj_id
==
null
)
return
;
if
(
obj_id
==
null
)
return
;
return
await
s
dk
()
return
await
Chat
.
getS
dk
()
.
model
(
model_name
)
.
model
(
model_name
)
.
chat
(
obj_id
,
orgId
())
.
chat
(
obj_id
,
orgId
())
.
addMember
(
uids
.
map
((
id
)
=>
Number
(
id
)))
.
addMember
(
uids
.
map
((
id
)
=>
Number
(
id
)))
...
@@ -815,7 +814,7 @@ export default {
...
@@ -815,7 +814,7 @@ export default {
const
{
model_name
,
obj_id
}
=
currentChat
;
const
{
model_name
,
obj_id
}
=
currentChat
;
if
(
model_name
==
null
)
return
;
if
(
model_name
==
null
)
return
;
if
(
obj_id
==
null
)
return
;
if
(
obj_id
==
null
)
return
;
return
await
s
dk
()
return
await
Chat
.
getS
dk
()
.
model
(
model_name
)
.
model
(
model_name
)
.
chat
(
obj_id
,
orgId
())
.
chat
(
obj_id
,
orgId
())
.
removeMember
(
uids
.
map
((
id
)
=>
Number
(
id
)))
.
removeMember
(
uids
.
map
((
id
)
=>
Number
(
id
)))
...
@@ -830,7 +829,7 @@ export default {
...
@@ -830,7 +829,7 @@ export default {
const
{
model_name
,
obj_id
}
=
currentChat
;
const
{
model_name
,
obj_id
}
=
currentChat
;
if
(
model_name
==
null
)
return
;
if
(
model_name
==
null
)
return
;
if
(
obj_id
==
null
)
return
;
if
(
obj_id
==
null
)
return
;
return
await
s
dk
()
return
await
Chat
.
getS
dk
()
.
model
(
model_name
)
.
model
(
model_name
)
.
chat
(
obj_id
,
orgId
())
.
chat
(
obj_id
,
orgId
())
.
addCs
(
uids
.
map
((
id
)
=>
Number
(
id
)))
.
addCs
(
uids
.
map
((
id
)
=>
Number
(
id
)))
...
@@ -845,7 +844,7 @@ export default {
...
@@ -845,7 +844,7 @@ export default {
const
{
model_name
,
obj_id
}
=
currentChat
;
const
{
model_name
,
obj_id
}
=
currentChat
;
if
(
model_name
==
null
)
return
;
if
(
model_name
==
null
)
return
;
if
(
obj_id
==
null
)
return
;
if
(
obj_id
==
null
)
return
;
return
await
s
dk
()
return
await
Chat
.
getS
dk
()
.
model
(
model_name
)
.
model
(
model_name
)
.
chat
(
obj_id
,
orgId
())
.
chat
(
obj_id
,
orgId
())
.
removeCs
(
uids
.
map
((
id
)
=>
Number
(
id
)))
.
removeCs
(
uids
.
map
((
id
)
=>
Number
(
id
)))
...
...
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