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 6b97dc24
authored
Nov 26, 2021
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
下载会话问题及相关代码修整
1 parent
66f224db
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
100 additions
and
80 deletions
linkwe-ui/src/api/conversation/content.js
linkwe-ui/src/views/conversation/content/component/chatListClass.vue
linkwe-ui/src/views/conversation/content/component/chatListClassTab.vue
linkwe-ui/src/views/conversation/content/customer.vue
linkwe-ui/src/views/conversation/content/employee.vue
linkwe-ui/src/views/index.vue
linkwe-ui/src/api/conversation/content.js
View file @
6b97dc2
import
request
from
'@/utils/request'
// 外部联系人 会话列表
const
getExternalChatList
=
(
fromId
)
=>
{
export
const
getExternalChatList
=
fromId
=>
{
return
request
({
url
:
'/chat/msg/selectExternalChatList/'
+
fromId
,
method
:
'get'
...
...
@@ -9,7 +9,7 @@ const getExternalChatList = (fromId) => {
}
// 单聊 会话列表
const
selectAloneChatList
=
(
params
)
=>
{
export
const
selectAloneChatList
=
params
=>
{
return
request
({
url
:
'/chat/msg/selectAloneChatList'
,
method
:
'get'
,
...
...
@@ -18,21 +18,21 @@ const selectAloneChatList = (params) => {
}
// 内部联系人列表
const
getInternalChatList
=
(
fromId
)
=>
{
export
const
getInternalChatList
=
fromId
=>
{
return
request
({
url
:
'/chat/msg/selectInternalChatList/'
+
fromId
,
method
:
'get'
})
}
const
getGroupChatList
=
(
fromId
)
=>
{
export
const
getGroupChatList
=
fromId
=>
{
return
request
({
url
:
'/chat/msg/selectGroupChatList/'
+
fromId
,
method
:
'get'
})
}
// const chatList = (params) => {
//
export
const chatList = (params) => {
// return request({
// url: '/chat/msg/list',
// method: 'get',
...
...
@@ -40,13 +40,13 @@ const getGroupChatList = (fromId) => {
// })
// }
const
indexTable
=
()
=>
{
export
const
indexTable
=
()
=>
{
return
request
({
url
:
'/wecom/page/getCorpBasicData'
,
method
:
'get'
})
}
const
indexEchart
=
()
=>
{
export
const
indexEchart
=
()
=>
{
return
request
({
url
:
'/wecom/page/getCorpRealTimeData'
,
method
:
'get'
...
...
@@ -54,7 +54,7 @@ const indexEchart = () => {
}
// 全文检索 会话列表
export
const
getChatList
=
(
params
)
=>
{
export
const
getChatList
=
params
=>
{
return
request
({
url
:
'/chat/msg/selectFullSearchChatList'
,
method
:
'get'
,
...
...
@@ -63,7 +63,7 @@ export const getChatList = (params) => {
}
// 全文检索 导出列表
export
const
exportList
=
(
params
)
=>
{
export
const
exportList
=
params
=>
{
return
request
({
url
:
'/chat/msg/selectFullSearchChatList/export'
,
method
:
'get'
,
...
...
@@ -71,16 +71,3 @@ export const exportList = (params) => {
// responseType: 'blob'
})
}
//
export
const
content
=
{
indexEchart
,
indexTable
,
getExternalChatList
,
selectAloneChatList
,
getInternalChatList
,
getGroupChatList
,
// chatList,
getChatList
}
export
default
content
linkwe-ui/src/views/conversation/content/component/chatListClass.vue
View file @
6b97dc2
...
...
@@ -6,16 +6,8 @@
<span
class=
"fr download"
@
click=
"exportList()"
>
下载会话
</span>
</div>
</div>
<el-tabs
v-model=
"activeTab"
@
tab-click=
"(v) => opened.includes(v.name) || opened.push(v.name)"
>
<el-tab-pane
v-for=
"(item, index) of list"
:key=
"index"
:label=
"item.label"
:name=
"item.type"
>
<el-tabs
v-model=
"activeTab"
@
tab-click=
"v => opened.includes(v.name) || opened.push(v.name)"
>
<el-tab-pane
v-for=
"(item, index) of list"
:key=
"index"
:label=
"item.label"
:name=
"item.type"
>
<chatListClassTab
v-if=
"opened.includes(item.type)"
:queryChat=
"queryChat"
...
...
@@ -28,7 +20,7 @@
<
script
>
import
chatListClassTab
from
'./chatListClassTab.vue'
import
api
from
'@/api/conversation/content.js'
import
*
as
api
from
'@/api/conversation/content.js'
export
default
{
components
:
{
chatListClassTab
},
props
:
{
...
...
@@ -81,10 +73,12 @@ export default {
.
then
(()
=>
{
return
api
.
exportList
(
this
.
queryChat
)
})
.
then
(
(
response
)
=>
{
.
then
(
response
=>
{
this
.
download
(
response
.
msg
)
})
.
catch
(
function
()
{})
.
catch
(
function
(
err
)
{
console
.
log
(
err
)
})
}
}
}
...
...
linkwe-ui/src/views/conversation/content/component/chatListClassTab.vue
View file @
6b97dc2
...
...
@@ -101,7 +101,7 @@
<
script
>
import
chatList
from
'./chatList.vue'
import
api
from
'@/api/conversation/content.js'
import
*
as
api
from
'@/api/conversation/content.js'
import
Voice
from
'@/components/Voice'
export
default
{
name
:
''
,
...
...
linkwe-ui/src/views/conversation/content/customer.vue
View file @
6b97dc2
...
...
@@ -32,25 +32,15 @@
<span
style=
"line-height:40px"
>
{{
item
.
name
}}
</span>
</el-col>
<el-col
:span=
"10"
class=
"ar"
>
<span
:style=
"
{ color: item.type === 1 ? '#4bde03' : '#f9a90b' }"
<span
:style=
"
{ color: item.type === 1 ? '#4bde03' : '#f9a90b' }"
>
{{
{
1
:
'@微信'
,
2
:
'@企业微信'
}
[
item
.
type
]
}}
<
/span
>
<
i
:
class
=
"
[
'el-icon-s-custom'
,
{
1
:
'man'
,
2
:
'woman'
}
[
item
.
gender
]
]
"
></i>
<
i
:
class
=
"
[
'el-icon-s-custom'
,
{
1
:
'man'
,
2
:
'woman'
}
[
item
.
gender
]]
"></i>
</el-col>
</el-row>
<div class="
ac
mt10
mb15
"
>
{{
customerList
.
length
!=
customerTotal
?
'下拉加载更多'
:
'看到底了~'
}}
{{
customerList
.
length
!=
customerTotal
?
'下拉加载更多'
:
'看到底了~'
}}
<
/div
>
<
/template
>
<
el
-
empty
v
-
else
:
image
-
size
=
"100"
><
/el-empty
>
...
...
@@ -93,10 +83,7 @@
<
el
-
empty
v
-
else
:
image
-
size
=
"100"
description
=
"请选择客户"
><
/el-empty
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
chatListClass
v
-
show
=
"queryChat.receiveName"
:
queryChat
=
"queryChat"
><
/chatListClass
>
<
chatListClass
v
-
show
=
"queryChat.receiveName"
:
queryChat
=
"queryChat"
><
/chatListClass
>
<
el
-
empty
v
-
if
=
"!queryChat.receiveName"
...
...
@@ -111,7 +98,7 @@
import
chatListClass
from
'./component/chatListClass.vue'
import
userList
from
'./component/userList.vue'
import
grouplist
from
'./component/groupList.vue'
import
api
from
'@/api/conversation/content.js'
import
*
as
api
from
'@/api/conversation/content.js'
import
*
as
apiCustomer
from
'@/api/customer/index'
export
default
{
components
:
{
...
...
@@ -183,7 +170,7 @@ export default {
this
.
loading
=
false
this
.
personList
=
data
}
)
.
catch
(
(
err
)
=>
{
.
catch
(
err
=>
{
this
.
loading
=
false
}
)
}
else
{
...
...
@@ -193,7 +180,7 @@ export default {
this
.
loading
=
false
this
.
personList
=
data
}
)
.
catch
(
(
err
)
=>
{
.
catch
(
err
=>
{
this
.
loading
=
false
}
)
}
...
...
@@ -205,7 +192,7 @@ export default {
this
.
customerList
=
[]
}
page
&&
(
this
.
customerQuery
.
pageNum
=
page
)
apiCustomer
.
getList
(
this
.
customerQuery
).
then
(
(
res
)
=>
{
apiCustomer
.
getList
(
this
.
customerQuery
).
then
(
res
=>
{
this
.
customerList
.
push
(...
res
.
rows
)
this
.
customerTotal
=
~~
res
.
total
this
.
customerQuery
.
pageNum
++
...
...
linkwe-ui/src/views/conversation/content/employee.vue
View file @
6b97dc2
...
...
@@ -34,10 +34,22 @@
<div
class=
"name pd15"
>
{{
talkName
}}
</div>
<el-tabs
v-model=
"activeName"
@
tab-click=
"tabClick(true)"
>
<el-tab-pane
label=
"内部联系人"
name=
"0"
>
<userList
v-if=
"activeName == 0"
:personList=
"personList"
:loading=
"loading"
@
chatFn=
"chatFn"
>
</userList>
<userList
v-if=
"activeName == 0"
:personList=
"personList"
:loading=
"loading"
@
chatFn=
"chatFn"
>
</userList>
</el-tab-pane>
<el-tab-pane
label=
"外部联系人"
name=
"1"
>
<userList
v-if=
"activeName == 1"
:personList=
"personList"
:loading=
"loading"
@
chatFn=
"chatFn"
>
</userList>
<userList
v-if=
"activeName == 1"
:personList=
"personList"
:loading=
"loading"
@
chatFn=
"chatFn"
>
</userList>
</el-tab-pane>
<el-tab-pane
label=
"群聊"
name=
"2"
>
<grouplist
...
...
@@ -57,7 +69,11 @@
<el-col
:span=
"12"
>
<chatListClass
v-show=
"queryChat.receiveName"
:queryChat=
"queryChat"
></chatListClass>
<el-empty
v-if=
"!queryChat.receiveName"
description=
"请选择联系人"
:image-size=
"100"
></el-empty>
<el-empty
v-if=
"!queryChat.receiveName"
description=
"请选择联系人"
:image-size=
"100"
></el-empty>
</el-col>
</el-row>
</div>
...
...
@@ -67,7 +83,7 @@ import chatListClass from './component/chatListClass.vue'
import
userList
from
'./component/userList.vue'
import
grouplist
from
'./component/groupList.vue'
import
*
as
apiOrg
from
'@/api/organization'
import
api
from
'@/api/conversation/content.js'
import
*
as
api
from
'@/api/conversation/content.js'
export
default
{
components
:
{
...
...
@@ -141,7 +157,7 @@ export default {
this
.
loading
=
false
this
.
personList
=
data
})
.
catch
(
(
err
)
=>
{
.
catch
(
err
=>
{
this
.
loading
=
false
})
}
else
if
(
this
.
activeName
==
1
)
{
...
...
@@ -151,7 +167,7 @@ export default {
this
.
loading
=
false
this
.
personList
=
data
})
.
catch
(
(
err
)
=>
{
.
catch
(
err
=>
{
this
.
loading
=
false
})
}
else
{
...
...
@@ -161,7 +177,7 @@ export default {
this
.
loading
=
false
this
.
personList
=
data
})
.
catch
(
(
err
)
=>
{
.
catch
(
err
=>
{
this
.
loading
=
false
})
}
...
...
@@ -196,7 +212,7 @@ export default {
// data.children.push(...rows)
let
arr
=
node
.
data
.
children
?
node
.
data
.
children
.
concat
(
rows
||
[])
:
rows
||
[]
arr
.
forEach
(
(
element
)
=>
{
arr
.
forEach
(
element
=>
{
element
.
isLeaf
=
!!
element
.
userId
})
resolve
(
arr
)
...
...
linkwe-ui/src/views/index.vue
View file @
6b97dc2
...
...
@@ -9,7 +9,12 @@
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
>
<el-col
:span=
"24"
class=
"title_name"
>
数据总览
</el-col>
</el-row>
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
style=
"margin-top:35px; text-align: center;"
>
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
style=
"margin-top:35px; text-align: center;"
>
<el-col
:span=
"6"
class=
"col_style"
>
企业成员总数
</el-col>
<el-col
:span=
"6"
class=
"col_style"
>
客户总人数
</el-col>
<el-col
:span=
"6"
class=
"col_style"
>
客户群总数
</el-col>
...
...
@@ -44,7 +49,12 @@
</el-col>
</el-row>
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
style=
"margin-top:30px; text-align: center;"
>
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
style=
"margin-top:30px; text-align: center;"
>
<el-col
:span=
"6"
>
发起申请数
</el-col>
<el-col
:span=
"6"
>
新增客户数
</el-col>
<el-col
:span=
"6"
>
群新增人数
</el-col>
...
...
@@ -58,10 +68,17 @@
>
<el-col
:span=
"6"
>
{{
erchatsTable
.
newApplyCnt
}}
</el-col>
<el-col
:span=
"6"
>
{{
erchatsTable
.
newContactCnt
}}
</el-col>
<el-col
:span=
"6"
>
{{
erchatsTable
.
newMemberCnt
?
erchatsTable
.
newMemberCnt
:
0
}}
</el-col>
<el-col
:span=
"6"
>
{{
erchatsTable
.
newMemberCnt
?
erchatsTable
.
newMemberCnt
:
0
}}
</el-col>
<el-col
:span=
"6"
>
{{
erchatsTable
.
negativeFeedbackCnt
}}
</el-col>
</el-row>
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
style=
"margin-top:10px; text-align: center;"
>
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
style=
"margin-top:10px; text-align: center;"
>
<el-col
:span=
"6"
:class=
"
{
...
...
@@ -143,20 +160,34 @@
<p
class=
"p2"
>
登录时间:
{{
parseTime
(
new
Date
())
}}
</p>
<p
class=
"p1 p3 margint20"
>
LinkWechat 企业微信SCRM
</p>
<p
class=
"p2 p4"
>
版本信息:开源
<span
class=
"fr"
>
可用期限:永久
</span></p>
<el-row
:gutter=
"20"
type=
"flex"
class=
"row-bg"
justify=
"center"
style=
"text-align:center"
>
<el-row
:gutter=
"20"
type=
"flex"
class=
"row-bg"
justify=
"center"
style=
"text-align:center"
>
<el-col
:span=
"10"
class=
"flexspan"
>
<img
src=
"../assets/index/bzwd.png"
/>
<a
href=
"https://www.yuque.com/linkwechat/help"
>
帮助手册
</a>
</el-col>
<el-col
:span=
"2"
></el-col>
<el-col
:span=
"10"
class=
"flexspan"
@
click
.
native=
"msgInfo('《使用手册》正在加急上线中,敬请关注…')"
<el-col
:span=
"10"
class=
"flexspan"
@
click
.
native=
"msgInfo('《使用手册》正在加急上线中,敬请关注…')"
><img
src=
"../assets/index/kfsc.png"
/>
开发文档
</el-col
>
</el-row>
</div>
<div
class=
"inedx_r_top_bottom"
>
<span
class=
"inedx_r_top_bottomp1"
><img
src=
"../assets/index/gxrz.png"
/>
更新日志
</span>
<span
class=
"fr"
style=
"color:#0079DE"
@
click=
"msgInfo('《更新日志》正在加急上线中,敬请关注…')"
>
更多
</span>
<span
class=
"fr"
style=
"color:#0079DE"
@
click=
"msgInfo('《更新日志》正在加急上线中,敬请关注…')"
>
更多
</span
>
<ul>
<li
v-for=
"(index, i) in 3"
:key=
"i"
@
click=
"msgInfo('暂无内容')"
>
即将上线,敬请期待
<span
class=
"fr"
>
03-26
</span>
...
...
@@ -174,13 +205,17 @@
</div>
<div
class=
"inedx_r_top_bottom"
style=
"text-align:center"
>
<p
style=
"text-align:left"
>
<span
class=
"inedx_r_top_bottomp1"
>
<img
src=
"../assets/index/kfq.png"
/>
官方交流
</span>
<span
class=
"inedx_r_top_bottomp1"
>
<img
src=
"../assets/index/kfq.png"
/>
官方交流
</span
>
</p>
<img
:src=
"bossImg"
class=
"img"
/>
</div>
<div
class=
"inedx_r_top_bottom"
style=
"text-align:center"
>
<p
style=
"text-align:left"
>
<span
class=
"inedx_r_top_bottomp1"
>
<img
src=
"../assets/index/khq.png"
/>
联系客服
</span>
<span
class=
"inedx_r_top_bottomp1"
>
<img
src=
"../assets/index/khq.png"
/>
联系客服
</span
>
</p>
<img
:src=
"bossImg"
class=
"img"
/>
</div>
...
...
@@ -198,7 +233,8 @@
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
v-for=
"(index, i) in car"
:key=
"i"
>
<div
class=
"grid-content"
@
click=
"$router.push(index.url)"
>
<span
class=
"fl"
>
<img
:src=
"index.img"
alt=
""
/>
</span><span
class=
"fl craname"
>
{{
index
.
name
}}
</span>
<span
class=
"fl"
>
<img
:src=
"index.img"
alt=
""
/>
</span
><span
class=
"fl craname"
>
{{
index
.
name
}}
</span>
</div>
</el-col>
</el-row>
...
...
@@ -206,7 +242,7 @@
</div>
</
template
>
<
script
>
import
{
content
}
from
'@/api/conversation/content.js'
import
*
as
content
from
'@/api/conversation/content.js'
import
echarts
from
'echarts'
export
default
{
name
:
'Index'
,
...
...
@@ -285,12 +321,12 @@ export default {
}
},
tableInfo
()
{
content
.
indexTable
().
then
(
(
res
)
=>
{
content
.
indexTable
().
then
(
res
=>
{
this
.
table
=
res
.
data
})
},
erchatInfo
()
{
content
.
indexEchart
().
then
(
(
res
)
=>
{
content
.
indexEchart
().
then
(
res
=>
{
this
.
allData
=
res
.
data
this
.
uptime
=
res
.
data
.
updateTime
this
.
erchatsTable
=
this
.
allData
.
today
...
...
@@ -305,7 +341,7 @@ export default {
arr4
:
[],
time
:
[]
}
this
.
erchatsTable
.
dataList
.
forEach
(
(
a
)
=>
{
this
.
erchatsTable
.
dataList
.
forEach
(
a
=>
{
data
.
arr1
.
push
(
a
.
newApplyCnt
)
data
.
time
.
push
(
a
.
xtime
)
data
.
arr3
.
push
(
a
.
newMemberCnt
)
...
...
@@ -327,7 +363,7 @@ export default {
this
.
resizeArr
.
push
(
charts
)
let
resize
=
function
()
{
this
.
resizeArr
.
forEach
(
(
element
)
=>
{
this
.
resizeArr
.
forEach
(
element
=>
{
element
.
resize
()
})
}
...
...
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