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
8fba672b
authored
Jul 16, 2021
by
panjiangyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改创建会话的逻辑
parent
f14d9d56
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
16 deletions
create-chat.vue
store/index.ts
store/model.ts
create-chat.vue
View file @
8fba672b
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
></el-pagination>
></el-pagination>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"hide"
>
取 消
</el-button>
<el-button
@
click=
"hide"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"createChat"
>
确
1
定
</el-button>
<el-button
type=
"primary"
@
click=
"createChat"
>
确定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
...
...
store/index.ts
View file @
8fba672b
...
@@ -72,7 +72,6 @@ async function preCacheImgs(msgs: any[]) {
...
@@ -72,7 +72,6 @@ async function preCacheImgs(msgs: any[]) {
export
default
{
export
default
{
namespaced
:
true
,
namespaced
:
true
,
state
:
()
=>
({
state
:
()
=>
({
[
ChatStore
.
STATE_CHAT_CREATOR_VISIBLE
]:
false
,
[
ChatStore
.
STATE_CHAT_DIALOG_VISIBLE
]:
false
,
[
ChatStore
.
STATE_CHAT_DIALOG_VISIBLE
]:
false
,
[
ChatStore
.
STATE_CHAT_CURRENT_CHAT_UNIPLAT_ID
]:
null
,
[
ChatStore
.
STATE_CHAT_CURRENT_CHAT_UNIPLAT_ID
]:
null
,
[
ChatStore
.
STATE_CHAT_MSG_HISTORY
]:
null
,
[
ChatStore
.
STATE_CHAT_MSG_HISTORY
]:
null
,
...
@@ -96,12 +95,6 @@ export default {
...
@@ -96,12 +95,6 @@ export default {
[
ChatStore
.
MUTATION_HIDE_CHAT
](
state
)
{
[
ChatStore
.
MUTATION_HIDE_CHAT
](
state
)
{
state
[
ChatStore
.
STATE_CHAT_DIALOG_VISIBLE
]
=
false
;
state
[
ChatStore
.
STATE_CHAT_DIALOG_VISIBLE
]
=
false
;
},
},
[
ChatStore
.
MUTATION_SHOW_CHAT_CREATOR
](
state
)
{
state
[
ChatStore
.
STATE_CHAT_CREATOR_VISIBLE
]
=
true
;
},
[
ChatStore
.
MUTATION_HIDE_CHAT_CREATOR
](
state
)
{
state
[
ChatStore
.
STATE_CHAT_CREATOR_VISIBLE
]
=
false
;
},
[
ChatStore
.
MUTATION_SAVE_CHAT_LIST
](
[
ChatStore
.
MUTATION_SAVE_CHAT_LIST
](
state
,
state
,
data
:
ChatStore
.
STATE_MY_CHAT_ROOM_LIST
data
:
ChatStore
.
STATE_MY_CHAT_ROOM_LIST
...
@@ -448,7 +441,6 @@ export default {
...
@@ -448,7 +441,6 @@ export default {
selected_list
:
[{
v
:
0
,
id
}],
selected_list
:
[{
v
:
0
,
id
}],
})
})
.
dryExecute
();
.
dryExecute
();
commit
(
ChatStore
.
MUTATION_HIDE_CHAT_CREATOR
);
await
dispatch
(
ChatStore
.
ACTION_GET_MY_CHAT_LIST
);
await
dispatch
(
ChatStore
.
ACTION_GET_MY_CHAT_LIST
);
const
roomList
=
state
[
ChatStore
.
STATE_MY_CHAT_ROOM_LIST
];
const
roomList
=
state
[
ChatStore
.
STATE_MY_CHAT_ROOM_LIST
];
if
(
roomList
==
null
)
return
;
if
(
roomList
==
null
)
return
;
...
...
store/model.ts
View file @
8fba672b
...
@@ -13,8 +13,6 @@ export enum ChatMemberType {
...
@@ -13,8 +13,6 @@ export enum ChatMemberType {
export
namespace
ChatStore
{
export
namespace
ChatStore
{
export
const
ns
=
"chatStore"
;
export
const
ns
=
"chatStore"
;
/* state */
/* state */
export
const
STATE_CHAT_CREATOR_VISIBLE
=
"创建会话弹窗显示状态"
;
export
type
STATE_CHAT_CREATOR_VISIBLE
=
boolean
export
const
STATE_CHAT_DIALOG_VISIBLE
=
"会话模块弹窗显示状态"
;
export
const
STATE_CHAT_DIALOG_VISIBLE
=
"会话模块弹窗显示状态"
;
export
type
STATE_CHAT_DIALOG_VISIBLE
=
boolean
export
type
STATE_CHAT_DIALOG_VISIBLE
=
boolean
export
const
STATE_MY_CHAT_ROOM_LIST
=
"我的会话列表"
;
export
const
STATE_MY_CHAT_ROOM_LIST
=
"我的会话列表"
;
...
@@ -84,10 +82,6 @@ export namespace ChatStore {
...
@@ -84,10 +82,6 @@ export namespace ChatStore {
export
type
GETTER_CURRENT_CHAT_PRESENT_MEMBERS
=
dto
.
ChatMembers
|
null
export
type
GETTER_CURRENT_CHAT_PRESENT_MEMBERS
=
dto
.
ChatMembers
|
null
/* mutation */
/* mutation */
export
const
MUTATION_SHOW_CHAT_CREATOR
=
"打开创建会话弹窗"
;
export
type
MUTATION_SHOW_CHAT_CREATOR
=
()
=>
void
export
const
MUTATION_HIDE_CHAT_CREATOR
=
"关闭创建会话弹窗"
;
export
type
MUTATION_HIDE_CHAT_CREATOR
=
()
=>
void
export
const
MUTATION_SHOW_CHAT
=
"打开会话弹窗"
;
export
const
MUTATION_SHOW_CHAT
=
"打开会话弹窗"
;
export
type
MUTATION_SHOW_CHAT
=
()
=>
void
export
type
MUTATION_SHOW_CHAT
=
()
=>
void
export
const
MUTATION_HIDE_CHAT
=
"关闭会话弹窗"
;
export
const
MUTATION_HIDE_CHAT
=
"关闭会话弹窗"
;
...
@@ -266,7 +260,7 @@ export namespace ChatStore {
...
@@ -266,7 +260,7 @@ export namespace ChatStore {
}
}
export
interface
ChatStoreState
{
export
interface
ChatStoreState
{
[
ChatStore
.
STATE_CHAT_CREATOR_VISIBLE
]:
ChatStore
.
STATE_CHAT_CREATOR_VISIBLE
;
[
ChatStore
.
STATE_CHAT_MSG_HISTORY
]:
ChatStore
.
STATE_CHAT_MSG_HISTORY
;
[
ChatStore
.
STATE_CHAT_MSG_HISTORY
]:
ChatStore
.
STATE_CHAT_MSG_HISTORY
;
[
ChatStore
.
STATE_CHAT_SENDING_MESSAGES
]:
ChatStore
.
STATE_CHAT_SENDING_MESSAGES
;
[
ChatStore
.
STATE_CHAT_SENDING_MESSAGES
]:
ChatStore
.
STATE_CHAT_SENDING_MESSAGES
;
[
ChatStore
.
STATE_CHAT_CURRENT_CHAT_ID
]:
ChatStore
.
STATE_CHAT_CURRENT_CHAT_ID
;
[
ChatStore
.
STATE_CHAT_CURRENT_CHAT_ID
]:
ChatStore
.
STATE_CHAT_CURRENT_CHAT_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