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
73f1b850
authored
Jul 16, 2021
by
panjiangyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
update ui
parent
e567fc6f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
76 deletions
chat-list.vue
chat-room.vue
chat.vue
components/chat-members.vue
chat-list.vue
View file @
73f1b850
...
@@ -182,6 +182,7 @@ export default class ChatList extends Vue {
...
@@ -182,6 +182,7 @@ export default class ChatList extends Vue {
private
goToChatRoom
(
data
:
Chat
)
{
private
goToChatRoom
(
data
:
Chat
)
{
if
(
this
.
currentChatUniplatId
===
data
.
uniplatId
)
{
if
(
this
.
currentChatUniplatId
===
data
.
uniplatId
)
{
this
.
showChat
();
return
;
return
;
}
}
const
wantedChatRoom
=
this
.
chatRooms
.
find
(
const
wantedChatRoom
=
this
.
chatRooms
.
find
(
...
...
chat-room.vue
View file @
73f1b850
<
template
>
<
template
>
<div
class=
"chat-room-con h-100 pos-rel"
>
<div
class=
"chat-room-con h-100 pos-rel"
>
<div
class=
"room-title d-flex justify-content-between align-items-center"
>
<div
class=
"room-title d-flex justify-content-between align-items-center"
>
<div
class=
"title"
@
click=
"showMembers"
>
<div
class=
"title"
>
{{
chatTitle
}}
{{
chatTitle
}}
<template
v-if=
"chatMembers.length"
>
<template
v-if=
"chatMembers.length"
>
<span
class=
"members-count"
>
(成员
{{
chatMembers
.
length
}}
人)
</span>
<span
class=
"members-count"
>
(成员
{{
chatMembers
.
length
}}
人)
</span>
<i
v-if=
"membersPanelVisibility"
class=
"title-right-arrow fast-service-icon-arrow-up"
/>
<i
v-else
class=
"title-right-arrow fast-service-icon-arrow-down"
/>
</
template
>
</
template
>
<
template
v-if=
"!notOnlyCheck"
>
<
template
v-if=
"!notOnlyCheck"
>
<div
v-if=
"currentChat.is_finish"
class=
"chat-status chat-done"
>
<div
v-if=
"currentChat.is_finish"
class=
"chat-status chat-done"
>
...
@@ -20,14 +15,6 @@
...
@@ -20,14 +15,6 @@
</div>
</div>
<i
v-if=
"close"
@
click=
"close"
class=
"title-close el-icon-close"
/>
<i
v-if=
"close"
@
click=
"close"
class=
"title-close el-icon-close"
/>
</div>
</div>
<div
v-if=
"membersPanelVisibility"
class=
"chat-members"
>
<div
class=
"chat-member"
v-for=
"item in chatMembers"
:key=
"item.id"
>
<avatar
shape=
"circle"
:src=
"item.avatar"
:size=
"40"
/>
<div
class=
"member-name"
>
{{ item.name || item.eid }}
</div>
</div>
</div>
<div
class=
"chat-panel"
>
<div
class=
"chat-panel"
>
<div
class=
"chat-area h-100"
>
<div
class=
"chat-area h-100"
>
<
template
v-if=
"notOnlyCheck"
>
<
template
v-if=
"notOnlyCheck"
>
...
@@ -48,28 +35,6 @@
...
@@ -48,28 +35,6 @@
<messages
/>
<messages
/>
</
template
>
</
template
>
</div>
</div>
<!-- <div class="chat-info h-100 pos-rel">
<div class="info-tabs">
<div
@click="activeTab = 'customer'"
:class="{ active: customerInfoTabShow }"
class="info-tab"
>
资料
</div>
<div
@click="activeTab = 'order'"
:class="{ active: orderInfoTabShow }"
class="info-tab"
>
订单
</div>
</div> -->
<!-- <cusomter-info v-if="customerInfoTabShow" /> -->
<!-- <div v-else class="order-info-con">
<order-info />
</div> -->
<!-- </div> -->
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -82,11 +47,8 @@ import {
...
@@ -82,11 +47,8 @@ import {
Watch
,
Watch
,
}
from
"vue-property-decorator"
;
}
from
"vue-property-decorator"
;
import
avatar
from
"@/customer-service/components/avatar.vue"
;
import
MessageInput
from
"@/customer-service/message-input.vue"
;
import
MessageInput
from
"@/customer-service/message-input.vue"
;
import
messages
from
"@/customer-service/message-list.vue"
;
import
messages
from
"@/customer-service/message-list.vue"
;
// import CusomterInfo from "./customer-info.vue"
// import OrderInfo from "./order-info.vue"
import
{
ChatStore
,
chatStore
}
from
"@/customer-service/store/model"
;
import
{
ChatStore
,
chatStore
}
from
"@/customer-service/store/model"
;
type
RoomInfoTab
=
"customer"
|
"order"
;
type
RoomInfoTab
=
"customer"
|
"order"
;
...
@@ -95,9 +57,6 @@ type RoomInfoTab = "customer" | "order";
...
@@ -95,9 +57,6 @@ type RoomInfoTab = "customer" | "order";
components
:
{
components
:
{
MessageInput
,
MessageInput
,
messages
,
messages
,
avatar
// CusomterInfo,
// OrderInfo,
},
},
})
})
export
default
class
ChatRoom
extends
Vue
{
export
default
class
ChatRoom
extends
Vue
{
...
@@ -129,12 +88,10 @@ export default class ChatRoom extends Vue {
...
@@ -129,12 +88,10 @@ export default class ChatRoom extends Vue {
@
Watch
(
"currentChatUniplatId"
)
@
Watch
(
"currentChatUniplatId"
)
private
whenCurrentChatIdChanged
(
newValue
:
string
,
oldValue
:
string
)
{
private
whenCurrentChatIdChanged
(
newValue
:
string
,
oldValue
:
string
)
{
if
(
Number
(
oldValue
)
===
Number
(
newValue
))
return
;
if
(
Number
(
oldValue
)
===
Number
(
newValue
))
return
;
this
.
hideMembers
();
this
.
clearChatMembers
();
this
.
clearChatMembers
();
}
}
private
activeTab
:
RoomInfoTab
=
"customer"
;
private
activeTab
:
RoomInfoTab
=
"customer"
;
private
membersPanelVisibility
=
false
;
private
get
getCurrentInputingPeople
()
{
private
get
getCurrentInputingPeople
()
{
return
this
.
currentInputPeople
return
this
.
currentInputPeople
...
@@ -163,14 +120,6 @@ export default class ChatRoom extends Vue {
...
@@ -163,14 +120,6 @@ export default class ChatRoom extends Vue {
return
this
.
activeTab
===
"order"
;
return
this
.
activeTab
===
"order"
;
}
}
private
showMembers
()
{
this
.
membersPanelVisibility
=
!
this
.
membersPanelVisibility
;
}
private
hideMembers
()
{
this
.
membersPanelVisibility
=
false
;
}
private
onError
(
msg
:
string
)
{
private
onError
(
msg
:
string
)
{
// eslint-disable-next-line no-console
// eslint-disable-next-line no-console
console
.
error
(
msg
);
console
.
error
(
msg
);
...
@@ -217,27 +166,7 @@ export default class ChatRoom extends Vue {
...
@@ -217,27 +166,7 @@ export default class ChatRoom extends Vue {
background
:
#c5d4e5
;
background
:
#c5d4e5
;
}
}
}
}
.chat-members
{
position
:
absolute
;
//
width
:
calc
(
100%
-
350px
);
left
:
0
;
right
:
0
;
padding
:
30px
;
padding-bottom
:
0
;
background
:
#fff
;
z-index
:
1
;
border-bottom
:
1px
solid
#f0f0f0
;
.chat-member
{
text-align
:
center
;
display
:
inline-block
;
vertical-align
:
top
;
margin-bottom
:
30px
;
margin-right
:
30px
;
}
.member-name
{
margin-top
:
10px
;
}
}
.chat-panel
{
.chat-panel
{
height
:
calc
(
100%
-
60px
);
height
:
calc
(
100%
-
60px
);
.chat-area,
.chat-area,
...
...
chat.vue
View file @
73f1b850
...
@@ -4,14 +4,23 @@
...
@@ -4,14 +4,23 @@
<chat-room
:close=
"hide"
/>
<chat-room
:close=
"hide"
/>
</div>
</div>
<div
class=
"chat-panel h-100"
>
<div
class=
"chat-panel h-100"
>
<div
class=
"buttons"
>
<
!--
<
div
class=
"buttons"
>
<el-button
class=
"button"
@
click=
"terminate"
round
<el-button
class=
"button"
@
click=
"terminate"
round
>
结束会话
</el-button
>
结束会话
</el-button
>
>
<el-button
class=
"button"
@
click=
"showAddMember"
round
<el-button
class=
"button"
@
click=
"showAddMember"
round
>
添加成员
</el-button
>
添加成员
</el-button
>
>
</div>
</div>
-->
<el-tabs
v-model=
"currentTab"
>
<el-tab-pane
label=
"数据"
name=
"one"
>
model的数据,可配置。
</el-tab-pane>
<el-tab-pane
:label=
"`成员$
{chatMembers.length}人`" name="two">
<ChatMembers
/>
</el-tab-pane>
<el-tab-pane
label=
"工作流"
name=
"three"
>
工作流
</el-tab-pane>
<el-tab-pane
label=
"备注"
name=
"four"
>
备注
</el-tab-pane>
<el-tab-pane
label=
"回复"
name=
"five"
>
回复
</el-tab-pane>
</el-tabs>
</div>
</div>
<ChatCreator
<ChatCreator
v-if=
"visible"
v-if=
"visible"
...
@@ -25,13 +34,14 @@
...
@@ -25,13 +34,14 @@
import
{
Component
,
Vue
}
from
"vue-property-decorator"
;
import
{
Component
,
Vue
}
from
"vue-property-decorator"
;
import
ChatRoom
from
"./chat-room.vue"
;
import
ChatRoom
from
"./chat-room.vue"
;
import
ChatMembers
from
"./components/chat-members.vue"
;
import
MessageList
from
"./message-list.vue"
;
import
MessageList
from
"./message-list.vue"
;
import
buttonThrottle
from
"./utils/button-throttle"
;
import
buttonThrottle
from
"./utils/button-throttle"
;
import
ChatCreator
from
"@/customer-service/create-chat.vue"
;
import
ChatCreator
from
"@/customer-service/create-chat.vue"
;
import
{
ChatStore
,
chatStore
}
from
"@/customer-service/store/model"
;
import
{
ChatStore
,
chatStore
}
from
"@/customer-service/store/model"
;
@
Component
({
components
:
{
MessageList
,
ChatRoom
,
ChatCreator
}
})
@
Component
({
components
:
{
MessageList
,
ChatRoom
,
ChatCreator
,
ChatMembers
}
})
export
default
class
Chat
extends
Vue
{
export
default
class
Chat
extends
Vue
{
@
chatStore
.
Getter
(
ChatStore
.
GETTER_CURRENT_CHAT_PRESENT_MEMBERS
)
@
chatStore
.
Getter
(
ChatStore
.
GETTER_CURRENT_CHAT_PRESENT_MEMBERS
)
private
readonly
chatMembers
!
:
ChatStore
.
GETTER_CURRENT_CHAT_PRESENT_MEMBERS
;
private
readonly
chatMembers
!
:
ChatStore
.
GETTER_CURRENT_CHAT_PRESENT_MEMBERS
;
...
@@ -48,6 +58,8 @@ export default class Chat extends Vue {
...
@@ -48,6 +58,8 @@ export default class Chat extends Vue {
@
chatStore
.
Action
(
ChatStore
.
ACTION_CHAT_ADD_MEMBERS
)
@
chatStore
.
Action
(
ChatStore
.
ACTION_CHAT_ADD_MEMBERS
)
private
readonly
_addMember
!
:
ChatStore
.
ACTION_CHAT_ADD_MEMBERS
;
private
readonly
_addMember
!
:
ChatStore
.
ACTION_CHAT_ADD_MEMBERS
;
private
currentTab
=
"one"
private
get
chatMembersId
()
{
private
get
chatMembersId
()
{
return
this
.
chatMembers
.
map
(
k
=>
+
k
.
eid
);
return
this
.
chatMembers
.
map
(
k
=>
+
k
.
eid
);
}
}
...
...
components/chat-members.vue
0 → 100644
View file @
73f1b850
<
template
>
<div
class=
"chat-members"
>
<div
class=
"chat-member"
v-for=
"item in chatMembers"
:key=
"item.id"
>
<avatar
shape=
"circle"
:src=
"item.avatar"
:size=
"40"
/>
<div
class=
"member-name"
>
{{
item
.
name
||
item
.
eid
}}
</div>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Component
,
Vue
}
from
"vue-property-decorator"
;
import
{
ChatStore
,
chatStore
}
from
"../store/model"
;
import
avatar
from
"@/customer-service/components/avatar.vue"
;
@
Component
({
components
:
{
avatar
}
})
export
default
class
ChatMembers
extends
Vue
{
@
chatStore
.
Getter
(
ChatStore
.
GETTER_CURRENT_CHAT_PRESENT_MEMBERS
)
private
readonly
chatMembers
!
:
ChatStore
.
GETTER_CURRENT_CHAT_PRESENT_MEMBERS
;
}
</
script
>
<
style
lang=
"less"
scoped
>
.chat-members
{
padding
:
30px
;
padding-bottom
:
0
;
background
:
#fff
;
white-space
:
pre-line
;
.chat-member
{
width
:
33.33%
;
text-align
:
center
;
display
:
inline-block
;
vertical-align
:
top
;
margin-bottom
:
30px
;
}
.member-name
{
margin-top
:
10px
;
}
}
</
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