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
88fc512e
authored
Jul 15, 2021
by
panjiangyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
会话ui
parent
be4ca619
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
35 deletions
chat.vue
chat.vue
View file @
88fc512e
<
template
>
<
template
>
<!--
<el-dialog
<!--
<el-dialog
class=
"chat-dialog-con"
class=
"chat-dialog-con"
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
:visible=
"visible"
:visible=
"visible"
@
close=
"hide"
@
close=
"hide"
>
-->
>
-->
<div
class=
"chat-con"
>
<div
class=
"chat-con"
>
<div
class=
"h-100 chat-list"
>
<div
class=
"h-100 chat-list"
>
<chat-list
/>
<chat-list
/>
</div>
</div>
<div
v-if=
"chatId != null"
class=
"h-100 chat-area"
>
<div
v-if=
"chatId != null"
class=
"h-100 chat-area"
>
<chat-room
:close=
"hide"
/>
<chat-room
:close=
"hide"
/>
</div>
</div>
<div
class=
"chat-panel h-100"
>
<div
class=
"chat-panel h-100"
>
<el-button
@
click=
"terminate"
>
结束
</el-button>
<div
class=
"buttons"
>
</div>
<el-button
class=
"button"
@
click=
"terminate"
round
>
结束会话
</el-button
>
<el-button
class=
"button"
@
click=
"terminate"
round
>
添加成员
</el-button
>
</div>
</div>
</div>
</div>
<!--
</el-dialog>
-->
<!--
</el-dialog>
-->
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Component
,
Vue
}
from
"vue-property-decorator"
;
import
{
Component
,
Vue
}
from
"vue-property-decorator"
;
...
@@ -24,51 +31,62 @@ import { Component, Vue } from "vue-property-decorator";
...
@@ -24,51 +31,62 @@ import { Component, Vue } from "vue-property-decorator";
import
ChatList
from
"./chat-list.vue"
;
import
ChatList
from
"./chat-list.vue"
;
import
ChatRoom
from
"./chat-room.vue"
;
import
ChatRoom
from
"./chat-room.vue"
;
import
MessageList
from
"./message-list.vue"
;
import
MessageList
from
"./message-list.vue"
;
import
buttonThrottle
from
"./utils/button-throttle"
;
import
{
ChatStore
,
chatStore
}
from
"@/customer-service/store/model"
;
import
{
ChatStore
,
chatStore
}
from
"@/customer-service/store/model"
;
@
Component
({
components
:
{
MessageList
,
ChatRoom
,
ChatList
}
})
@
Component
({
components
:
{
MessageList
,
ChatRoom
,
ChatList
}
})
export
default
class
Chat
extends
Vue
{
export
default
class
Chat
extends
Vue
{
@
chatStore
.
State
(
ChatStore
.
STATE_CHAT_CURRENT_CHAT_ID
)
@
chatStore
.
State
(
ChatStore
.
STATE_CHAT_CURRENT_CHAT_ID
)
private
readonly
chatId
!
:
ChatStore
.
STATE_CHAT_CURRENT_CHAT_ID
;
private
readonly
chatId
!
:
ChatStore
.
STATE_CHAT_CURRENT_CHAT_ID
;
@
chatStore
.
Mutation
(
ChatStore
.
MUTATION_HIDE_CHAT
)
@
chatStore
.
Mutation
(
ChatStore
.
MUTATION_HIDE_CHAT
)
private
readonly
hide
!
:
ChatStore
.
MUTATION_HIDE_CHAT
;
private
readonly
hide
!
:
ChatStore
.
MUTATION_HIDE_CHAT
;
@
chatStore
.
Action
(
ChatStore
.
ACTION_TERINATE_CHAT
)
@
chatStore
.
Action
(
ChatStore
.
ACTION_TERINATE_CHAT
)
private
readonly
_terminate
!
:
ChatStore
.
ACTION_TERINATE_CHAT
;
private
readonly
_terminate
!
:
ChatStore
.
ACTION_TERINATE_CHAT
;
private
terminate
()
{
@
buttonThrottle
()
this
.
_terminate
();
private
terminate
()
{
}
this
.
_terminate
();
}
}
}
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.chat-con
{
.chat-con
{
--chat-side-width
:
200px
;
--chat-list-width
:
200px
;
position
:
fixed
;
--chat-panel-width
:
350px
;
left
:
0
;
position
:
fixed
;
right
:
0
;
left
:
0
;
bottom
:
0
;
right
:
0
;
top
:
64px
;
bottom
:
0
;
z-index
:
99999
;
top
:
64px
;
background
:
#fff
;
z-index
:
99999
;
background
:
#fff
;
}
}
.chat-list
,
.chat-list
,
.chat-area
,
.chat-area
,
.chat-panel
{
.chat-panel
{
display
:
inline-block
;
display
:
inline-block
;
vertical-align
:
top
;
vertical-align
:
top
;
}
}
.chat-list
{
.chat-list
{
width
:
var
(
--chat-side
-width
);
width
:
var
(
--chat-list
-width
);
border-right
:
1px
solid
#e1e1e1
;
border-right
:
1px
solid
#e1e1e1
;
}
}
.chat-area
{
.chat-area
{
width
:
calc
(
100%
-
2
*
var
(
--chat-side
-width
)
-
2px
);
width
:
calc
(
100%
-
var
(
--chat-list-width
)
-
var
(
--chat-panel
-width
)
-
2px
);
}
}
.chat-panel
{
.chat-panel
{
width
:
var
(
--chat-side-width
);
position
:
relative
;
border-left
:
1px
solid
#e1e1e1
;
width
:
var
(
--chat-panel-width
);
border-left
:
1px
solid
#e1e1e1
;
}
.buttons
{
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
20px
;
text-align
:
center
;
}
}
</
style
>
</
style
>
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