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
4ef8859e
authored
Nov 02, 2021
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
move
parent
f865752b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
106 deletions
components/chat-members.vue
components/chat-members.vue
deleted
100644 → 0
View file @
f865752b
<
template
>
<div
class=
"chat-members"
>
<div
class=
"chat-member pos-rel"
v-for=
"item in chatMembers"
:key=
"item.id"
>
<span
class=
"member-name ver-mid text-truncate"
>
{{
item
.
name
||
item
.
eid
}}
</span>
<span
class=
"member-phone ver-mid text-nowrap"
>
{{
item
.
phone
}}
</span>
<span
class=
"member-type ver-mid text-nowrap"
>
{{
memberTypeStr
(
item
.
type
)
}}
</span>
<el-button
class=
"ver-mid get-out"
type=
"text"
@
click=
"getout(item)"
>
踢出
</el-button
>
</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"
;
import
{
ChatRole
}
from
"../model"
;
@
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
;
@
chatStore
.
Action
(
ChatStore
.
ACTION_CHAT_REMOVE_MEMBER
)
private
readonly
_getout
!
:
ChatStore
.
ACTION_CHAT_REMOVE_MEMBER
;
@
chatStore
.
Action
(
ChatStore
.
ACTION_CHAT_REMOVE_CS
)
private
readonly
_getoutCs
!
:
ChatStore
.
ACTION_CHAT_REMOVE_CS
;
private
async
getout
(
item
:
ChatStore
.
GETTER_CURRENT_CHAT_PRESENT_MEMBERS
[
number
]
)
{
await
this
.
$confirm
(
`确定要移除
${
item
.
name
}
?`
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
});
// xim里的eid等于uniplat里的uid
if
(
item
.
type
===
ChatRole
.
Default
)
{
// 普通成员
this
.
_getout
([
item
.
eid
]);
}
else
if
(
item
.
type
===
ChatRole
.
CustomerService
)
{
// 可否
this
.
_getoutCs
([
item
.
eid
]);
}
}
private
memberTypeStr
(
type
:
string
|
number
)
{
if
(
+
type
===
ChatRole
.
CustomerService
)
{
return
"客服"
;
}
if
(
+
type
===
ChatRole
.
Admin
)
{
return
"管理员"
;
}
return
""
;
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.chat-members
{
padding
:
20px
;
padding-bottom
:
0
;
background
:
#fff
;
.chat-member
{
display
:
flex
;
vertical-align
:
top
;
align-items
:
center
;
margin
:
10px
0
;
padding
:
10px
;
&:hover
{
background-color
:
#f5f7fa
;
.get-out
{
display
:
unset
;
}
}
}
.member-name
{
display
:
inline-block
;
min-width
:
7em
;
margin-right
:
10px
;
}
.member-type
{
margin-left
:
20px
;
}
.get-out
{
display
:
none
;
margin-left
:
auto
;
padding
:
0
;
}
}
.ver-mid
{
vertical-align
:
middle
;
}
</
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