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 ca79ced2
authored
Jan 20, 2021
by
qiyeqing
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
客户列表修改
1 parent
2fe63995
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
116 additions
and
13 deletions
linkwe-ui/src/api/content.js
linkwe-ui/src/views/conversation/component/chat.vue
linkwe-ui/src/views/conversation/component/groupList.vue
linkwe-ui/src/views/conversation/component/list.vue
linkwe-ui/src/views/conversation/page/employeeTest.vue
linkwe-ui/src/views/conversation/page/userTest.vue
linkwe-ui/src/api/content.js
View file @
ca79ced
...
...
@@ -16,7 +16,7 @@ const getTree=(params)=>{
}
const
listByCustomer
=
(
params
)
=>
{
return
request
({
url
:
'/
chat/mapping/listByCustomer
'
,
url
:
'/
wecom/customer/list
'
,
method
:
'get'
,
params
,
})
...
...
linkwe-ui/src/views/conversation/component/chat.vue
View file @
ca79ced
...
...
@@ -8,7 +8,8 @@
{{
item
.
text
.
content
}}
</div>
<div
v-else-if=
"item.msgtype=='image'"
class=
"msgtypeimg"
>
<img
:src=
"item.image.attachment"
>
<img
src=
"http://146.56.222.200/api/profile/upload/2021/01/14/544c8259-b3b6-4a49-8a53-b5eeac476384.png"
>
<!-- http://146.56.222.200:8080 -->
</div>
<div
v-else-if=
"item.msgtype=='file'"
class=
"msgtypefile"
@
click=
"down(item.file)"
>
{{
item
.
file
.
filename
}}
...
...
@@ -124,8 +125,10 @@
width
:
100px
;
height
:
80px
;
margin
:
10px
;
img{
width
:
100px
;
height
:
80px
;}
}
.msgtypecard
{
width
:
300px
;
height
:
140px
;
...
...
linkwe-ui/src/views/conversation/component/groupList.vue
0 → 100644
View file @
ca79ced
<
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"
v-if=
"item.finalChatContext.msgtype=='text'"
>
<el-col
:span=
"3"
>
<img
:src=
"item.finalChatContext.fromInfo.avatar"
></el-col>
<el-col
:span=
"21"
>
<p>
{{
item
.
roomInfo
.
groupName
}}
<span
class=
"fr gray"
>
{{
parseTime
(
item
.
finalChatContext
.
fromInfo
.
updateTime
)
}}
</span></p>
<p
class=
"gray padt10"
v-if=
"item.finalChatContext.fromInfo"
>
{{
item
.
finalChatContext
.
fromInfo
.
name
}}
:
{{
item
.
finalChatContext
.
text
.
content
}}
</p>
</el-col>
</el-row>
<el-row
style=
"padding:10px"
v-if=
"item.finalChatContext.msgtype=='file'"
>
<el-col
:span=
"3"
>
</el-col>
<el-col
:span=
"21"
>
<p><span
class=
"fr gray"
>
{{
parseTime
(
item
.
finalChatContext
.
msgtime
)
}}
</span></p>
<p
class=
"gray padt10"
>
{{
item
.
finalChatContext
.
from
}}
:
<span
v-if=
"item.finalChatContext.file.fileext=='mp4'"
>
[视频]
</span>
</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
linkwe-ui/src/views/conversation/component/list.vue
View file @
ca79ced
...
...
@@ -4,10 +4,10 @@
<ul>
<li
v-for=
"(item,index) in personList"
:key=
"index"
@
click=
"liClick(item)"
>
<el-row
style=
"padding:10px"
>
<el-col
:span=
"
4
"
>
<img
:src=
"item.receiveWeCustomer.avatar"
></el-col>
<el-col
:span=
"2
0
"
>
<el-col
:span=
"
3
"
>
<img
:src=
"item.receiveWeCustomer.avatar"
></el-col>
<el-col
:span=
"2
1
"
>
<p>
{{
item
.
receiveWeCustomer
.
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>
<p
class=
"gray padt10"
v-if=
"item.finalChatContext.text"
>
{{
item
.
finalChatContext
.
text
.
content
}}
</p>
</el-col>
</el-row>
</li>
...
...
linkwe-ui/src/views/conversation/page/employeeTest.vue
View file @
ca79ced
...
...
@@ -32,7 +32,8 @@
</list>
</el-tab-pane>
<el-tab-pane
label=
"群聊"
name=
"2"
>
<grouplist
v-if=
"activeName==2"
:personList=
"personList"
:loading=
"loading"
@
chatFn=
'chatFn'
>
</grouplist>
</el-tab-pane>
</el-tabs>
...
...
@@ -151,6 +152,7 @@
<
script
>
import
list
from
'../component/list.vue'
import
chat
from
'../component/chat.vue'
import
grouplist
from
'../component/groupList.vue'
import
*
as
api
from
'@/api/organization'
import
{
content
...
...
@@ -160,7 +162,7 @@
}
from
'@/utils/common.js'
export
default
{
components
:
{
list
,
list
,
grouplist
,
chat
},
data
()
{
...
...
linkwe-ui/src/views/conversation/page/userTest.vue
View file @
ca79ced
...
...
@@ -11,7 +11,6 @@
</div>
<div
class=
"ct_box ct_boxFirst"
>
<ul>
<!-- -->
<li
v-for=
"(i,t) in CList"
:key=
"t"
@
click=
"personCheck(i,t)"
:class=
"
{'liActive':t==personIndex}">
<el-row
:gutter=
"20"
style=
" padding: 10px 0;margin:0"
>
<el-col
:span=
"4"
>
...
...
@@ -287,10 +286,22 @@ import {
})
},
customerList
(){
content
.
listByCustomer
().
then
(
res
=>
{
res
.
rows
=
res
.
rows
.
filter
((
a
,
b
)
=>
{
return
a
&&
a
.
name
})
this
.
CList
=
res
.
rows
this
.
employAmount
=
res
.
total
;
let
querys
=
{
pageNum
:
1
,
pageSize
:
999
,
name
:
this
.
employName
,
userId
:
''
,
tagIds
:
''
,
beginTime
:
''
,
endTime
:
''
,
status
:
''
,
isOpenChat
:
'1'
}
content
.
listByCustomer
(
querys
).
then
(
res
=>
{
console
.
log
(
res
)
res
.
rows
=
res
.
rows
.
filter
((
a
,
b
)
=>
{
return
a
&&
a
.
name
})
this
.
CList
=
res
.
rows
this
.
employAmount
=
res
.
total
;
})
}
},
...
...
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