Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6c2a7ef0
authored
Jan 21, 2021
by
qiyeqing
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
客户聊天列表
1 parent
f9baa0dc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
15 deletions
linkwe-ui/src/views/conversation/component/customerList.vue
linkwe-ui/src/views/conversation/page/userTest.vue
linkwe-ui/src/views/conversation/component/customerList.vue
0 → 100644
View file @
6c2a7ef
<
template
>
<div
class=
"list"
v-loading=
"loading"
>
<div
v-if=
"personList.length>=1"
>
<ul>
<li
v-for=
"(item,index) in personList"
:key=
"index"
@
click=
"liClick(item)"
>
<el-row
style=
"padding:10px"
>
<el-col
:span=
"3"
><img
:src=
"item.receiveWeUser.avatarMediaid"
></el-col>
<el-col
:span=
"21"
>
<p>
{{
item
.
receiveWeUser
.
name
}}
<span
class=
"fr gray"
>
{{
parseTime
(
item
.
finalChatContext
.
msgtime
)
}}
</span></p>
<p
class=
"gray padt10"
v-if=
"item.finalChatContext.text"
>
{{
item
.
finalChatContext
.
text
.
content
}}
</p>
</el-col>
</el-row>
</li>
</ul>
</div>
<div
v-else
></div>
</div>
</
template
>
<
script
>
import
{
parseTime
}
from
'@/utils/common.js'
export
default
{
props
:
{
personList
:
{
type
:
Array
,
defluat
:
()
=>
[]
},
loading
:
{
type
:
Boolean
,
defluat
:
false
},
},
data
()
{
return
{
loadings
:
true
}
},
methods
:{
liClick
(
e
){
this
.
$emit
(
'chatFn'
,
e
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
*
{
padding
:
0
;
margin
:
0
;}
.list
{
overflow-y
:
scroll
;
height
:
708px
;
::-webkit-scrollbar
{
display
:
none
;
}
/
deep
/
.el-loading-spinner
{
margin-top
:
20px
;}
.fr
{
float
:
right
;}
.gray
{
color
:
#999
;}
.padt10
{
padding-top
:
10px
;}
ul
li
{
padding
:
10px
;
overflow
:
hidden
;
border-bottom
:
1px
solid
#efefef
;
cursor
:
pointer
;
p{
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;}
:hover
{
background
:
#efefef
;}
img
{
width
:
40px
;
height
:
40px
;
float
:
left
}
}
}
</
style
>
\ No newline at end of file
\ No newline at end of file
linkwe-ui/src/views/conversation/page/userTest.vue
View file @
6c2a7ef
...
@@ -32,24 +32,21 @@
...
@@ -32,24 +32,21 @@
<el-input
placeholder=
"搜索聊天记录"
prefix-icon=
"el-icon-search"
v-model=
"employName"
>
<el-input
placeholder=
"搜索聊天记录"
prefix-icon=
"el-icon-search"
v-model=
"employName"
>
</el-input>
</el-input>
</div>
</div>
</div>
</div>
<div
class=
"hd_tabs"
>
<div
class=
"hd_tabs"
>
<el-tabs
v-model=
"activeName"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"getChatList()"
>
<el-tab-pane
label=
"单聊"
name=
"0"
>
<el-tab-pane
label=
"单聊"
name=
"0"
>
<div
class=
"hd_tabs_content"
>
<div
class=
"hd_tabs_content"
>
<
!--
<
list
v-if=
"activeName==0"
:personList=
"personList"
:loading=
"loading"
>
<list
v-if=
"activeName==0"
:personList=
"personList"
:loading=
"loading"
>
</list>
-->
</list>
</div>
</div>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"群聊"
name=
"2"
>
<el-tab-pane
label=
"群聊"
name=
"2"
>
<
list
v-if=
"activeName==2"
:personList=
"personList"
:loading=
"loading"
@
chatFn=
"chatFn
"
>
<
grouplist
v-if=
"activeName==2"
:personList=
"personList"
:loading=
"loading
"
>
</list>
</
group
list>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
</div>
</div>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<div
class=
"hd_box"
>
<div
class=
"hd_box"
>
...
@@ -163,8 +160,10 @@
...
@@ -163,8 +160,10 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
list
from
'../component/curList.vue'
import
list
from
'../component/cu
stome
rList.vue'
import
chat
from
'../component/chat.vue'
import
chat
from
'../component/chat.vue'
import
grouplist
from
'../component/groupList.vue'
import
{
import
{
content
content
}
from
'@/api/content.js'
}
from
'@/api/content.js'
...
@@ -173,7 +172,7 @@ import {
...
@@ -173,7 +172,7 @@ import {
}
from
'@/utils/common.js'
}
from
'@/utils/common.js'
export
default
{
export
default
{
components
:{
components
:{
list
,
chat
list
,
chat
,
grouplist
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -227,17 +226,17 @@ import {
...
@@ -227,17 +226,17 @@ import {
if
(
flag
)
{
if
(
flag
)
{
this
.
loading
=
true
this
.
loading
=
true
}
}
this
.
personList
=
[]
content
.
getTree
({
content
.
getTree
({
fromId
:
this
.
employId
,
fromId
:
this
.
employId
,
searchType
:
this
.
activeName
searchType
:
this
.
activeName
}).
then
(({
}).
then
(({
rows
rows
})
=>
{
})
=>
{
console
.
log
(
rows
)
this
.
loading
=
false
this
.
loading
=
false
this
.
personList
=
rows
this
.
personList
=
rows
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
activeNameThreeClick
(
page
){
activeNameThreeClick
(
page
){
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment