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 81d36165
authored
Jun 25, 2023
by
ext.wangyuman1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
朋友圈模块
1 parent
511eafef
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
190 additions
and
67 deletions
vue3-lw-pc/src/api/circle.js
vue3-lw-pc/src/config.js
vue3-lw-pc/src/views/friendCircle/components/Custom.vue
vue3-lw-pc/src/views/friendCircle/components/Interaction.vue
vue3-lw-pc/src/views/friendCircle/components/Record.vue
vue3-lw-pc/src/views/friendCircle/components/Staff.vue
vue3-lw-pc/src/views/friendCircle/list.vue
vue3-lw-pc/src/api/circle.js
View file @
81d3616
...
...
@@ -104,7 +104,7 @@ export function getCustomerList(data) {
params
:
data
,
})
}
//
互动
记录导出
//
客户
记录导出
export
function
exportCustomer
(
data
)
{
return
request
({
url
:
service
+
'/moments/statistic/customer/export'
,
...
...
vue3-lw-pc/src/config.js
View file @
81d3616
...
...
@@ -64,8 +64,8 @@ let config = {
services
:
{
wecom
:
'/open'
,
//
system: env.SYSTEM_API,
system
:
'http://192.168.1.90
:6180'
,
system
:
env
.
SYSTEM_API
,
// system: 'http://192.168.4.168
:6180',
common
:
'/common'
,
},
...
...
vue3-lw-pc/src/views/friendCircle/components/Custom.vue
View file @
81d3616
...
...
@@ -15,13 +15,14 @@
placeholder=
"请选择成员"
/>
<el-select
v-model=
"query.
surveyState
"
v-model=
"query.
deliveryStatus
"
placeholder=
"请选择状态"
style=
"width: 150px; margin-right: 20px"
v-if=
"type !== 3"
>
<el-option
label=
"未执行"
:value=
"0"
></el-option>
<el-option
label=
"已执行"
:value=
"1"
></el-option>
<el-option
label=
"已送达"
:value=
"0"
></el-option>
<el-option
label=
"未送达"
:value=
"1"
></el-option>
<el-option
label=
"送达失败"
:value=
"2"
></el-option>
</el-select>
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
@
click=
"resetQuery"
>
清空
</el-button>
...
...
@@ -47,7 +48,7 @@
<el-table-column
label=
"送达状态"
align=
"center"
prop=
"timeOutNum"
show-overflow-tooltip
>
<template
#
default=
"
{ row }">
<div>
{{
row
}}
{{
dealStatus
(
row
.
deliveryStatus
)
}}
</div>
</
template
>
</el-table-column>
...
...
@@ -71,8 +72,8 @@
import
ChartBar
from
'@/components/ChartBar.vue'
import
ChartLine
from
'@/components/ChartLine.vue'
import
SelectDept
from
'@/components/SelectDept'
import
{
getTableTotal
}
from
'@/api/contentCenter/common.js
'
import
{
statisticCustomer
}
from
'@/api/circle'
import
{
dateFormat
}
from
'@/utils/index
'
import
{
statisticCustomer
,
getCustomerList
,
exportCustomer
}
from
'@/api/circle'
export
default
{
name
:
'scene-statistics-scene'
,
...
...
@@ -83,7 +84,7 @@ export default {
},
data
()
{
return
{
deptArray
:
[],
//
deptArray: [],
dialogVisible
:
false
,
userArray
:
[],
userName
:
''
,
...
...
@@ -123,25 +124,42 @@ export default {
query
:
{
pageSize
:
10
,
pageNum
:
1
,
beginTime
:
''
,
endTime
:
''
,
deptIds
:
''
,
userIds
:
''
,
weUserIds
:
''
,
deliveryStatus
:
''
,
},
tableSearch
:
{},
id
:
undefined
,
type
:
undefined
,
// 朋友圈类型 1:非同步型 2:企业同步型 3:个人同步型
name
:
''
,
}
},
mounted
()
{
this
.
type
=
this
.
$route
.
query
.
type
this
.
id
=
this
.
$route
.
query
.
id
this
.
name
=
this
.
$route
.
query
.
name
if
(
this
.
type
===
3
)
{
this
.
cardData
.
shift
()
}
this
.
getTabTotalFn
()
this
.
getTableChangeSize
()
},
methods
:
{
dealStatus
(
type
)
{
switch
(
type
)
{
case
0
:
return
'已送达'
break
case
1
:
return
'未送达'
break
case
2
:
return
'送达失败'
break
default
:
break
}
},
getTabTotalFn
()
{
statisticCustomer
(
this
.
id
).
then
((
res
)
=>
{
this
.
cardData
[
0
].
value
=
res
.
data
.
predictSend
...
...
@@ -161,20 +179,21 @@ export default {
})
.
then
(()
=>
{
this
.
exportLoading
=
true
return
getTableExport
(
this
.
id
,
Object
.
assign
({},
this
.
query
))
this
.
query
.
weMomentsTaskId
=
this
.
id
return
exportCustomer
(
Object
.
assign
({},
this
.
query
))
})
.
then
((
res
)
=>
{
if
(
!
res
)
return
const
blob
=
new
Blob
([
res
],
{
type
:
'application/vnd.ms-excel'
})
// 构造一个blob对象来处理数据,并设置文件类型
if
(
window
.
navigator
.
msSaveOrOpenBlob
)
{
//兼容IE10
navigator
.
msSaveBlob
(
blob
,
'
质检详情
'
)
navigator
.
msSaveBlob
(
blob
,
'
客户统计
'
)
}
else
{
const
href
=
URL
.
createObjectURL
(
blob
)
//创建新的URL表示指定的blob对象
const
a
=
document
.
createElement
(
'a'
)
//创建a标签
a
.
style
.
display
=
'none'
a
.
href
=
href
// 指定下载链接
a
.
download
=
dateFormat
(
new
Date
(),
'YYYY-MM-DD'
)
+
'-
质检详情
.xlsx'
//指定下载文件名
a
.
download
=
dateFormat
(
new
Date
(),
'YYYY-MM-DD'
)
+
'-
'
+
this
.
name
+
'-客户统计
.xlsx'
//指定下载文件名
a
.
click
()
//触发下载
URL
.
revokeObjectURL
(
a
.
href
)
//释放URL对象
}
...
...
@@ -193,7 +212,7 @@ export default {
return
obj
.
name
})
.
join
(
','
)
this
.
query
.
u
serIds
=
this
.
userArray
this
.
query
.
weU
serIds
=
this
.
userArray
.
map
(
function
(
obj
,
index
)
{
return
obj
.
userId
})
...
...
@@ -207,8 +226,10 @@ export default {
// },
getTableChangeSize
()
{
this
.
loading
=
true
getTableTotal
(
this
.
query
).
then
((
res
)
=>
{
this
.
tableList
=
res
.
data
this
.
query
.
weMomentsTaskId
=
this
.
id
getCustomerList
(
this
.
query
).
then
((
res
)
=>
{
this
.
tableList
=
res
.
rows
this
.
total
=
+
res
.
total
this
.
loading
=
false
})
},
...
...
@@ -216,14 +237,12 @@ export default {
this
.
query
=
{
pageSize
:
10
,
pageNum
:
1
,
beginTime
:
''
,
endTime
:
''
,
deptIds
:
''
,
userIds
:
''
,
weUserIds
:
''
,
deliveryStatus
:
''
,
}
this
.
userArray
=
[]
this
.
userName
=
''
this
.
deptArray
=
[]
//
this.deptArray = []
this
.
getTableChangeSize
()
},
handleSearch
()
{
...
...
@@ -231,12 +250,11 @@ export default {
},
},
created
()
{
this
.
getTableChangeSize
()
this
.
$store
.
setBusininessDesc
(
`
<div>全部素材发送与查看情况数据统计与分析</div>
`
)
// this.$store.setBusininessDesc(
// `
// <div>全部素材发送与查看情况数据统计与分析</div>
// `
// )
},
}
</
script
>
...
...
vue3-lw-pc/src/views/friendCircle/components/Interaction.vue
View file @
81d3616
...
...
@@ -2,11 +2,11 @@
<div>
<CardGroupIndex
:data=
"cardData"
></CardGroupIndex>
<div
class=
"g-card"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
v-if=
"this.type === 1"
>
<
!--
<
el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
v-if=
"this.type === 1"
>
<el-tab-pane
label=
"互动记录"
name=
"first"
><Record
/></el-tab-pane>
<el-tab-pane
label=
"查看明细"
name=
"second"
><ViewDetail
/></el-tab-pane>
</el-tabs>
<Record
v-else
/>
</el-tabs>
-->
<Record
/>
</div>
</div>
</
template
>
...
...
@@ -51,7 +51,7 @@ export default {
}
},
mounted
()
{
this
.
type
=
this
.
$route
.
query
.
type
this
.
type
=
+
this
.
$route
.
query
.
type
this
.
id
=
this
.
$route
.
query
.
id
if
(
this
.
type
!==
1
)
{
...
...
vue3-lw-pc/src/views/friendCircle/components/Record.vue
View file @
81d3616
...
...
@@ -4,6 +4,7 @@
<div
style=
"display: flex; align-items: center"
>
<el-date-picker
v-model=
"dateRange"
value-format=
"YYYY-MM-DD HH:mm:ss"
type=
"datetimerange"
range-separator=
"-"
start-placeholder=
"开始时间"
...
...
@@ -38,7 +39,7 @@
<el-table-column
label=
"客户名称"
align=
"center"
prop=
"
us
erName"
prop=
"
custom
erName"
min-width=
"100"
show-overflow-tooltip
></el-table-column>
...
...
@@ -49,17 +50,17 @@
min-width=
"100"
show-overflow-tooltip
></el-table-column>
<el-table-column
label=
"互动类型"
align=
"center"
prop=
"t
imeOutNum
"
show-overflow-tooltip
>
<el-table-column
label=
"互动类型"
align=
"center"
prop=
"t
ype
"
show-overflow-tooltip
>
<template
#
default=
"
{ row }">
<div>
{{
row
}}
{{
row
.
type
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"互动时间"
align=
"center"
prop=
"
timeOutNum
"
prop=
"
interactTime
"
show-overflow-tooltip
></el-table-column>
</el-table>
...
...
@@ -69,23 +70,96 @@
v-model:limit=
"query.pageSize"
@
pagination=
"getList()"
/>
<SelectUser
v-model:visible=
"dialogVisible"
title=
"组织架构"
:defaultValues=
"userArray"
@
success=
"getSelectUser"
></SelectUser>
</div>
</template>
<
script
>
import
{
dateFormat
}
from
'@/utils/index'
import
{
getInteractList
,
exportInteract
}
from
'@/api/circle'
export
default
{
data
()
{
return
{
dateRange
:
[],
query
:
{
pageNum
:
1
,
pageSize
:
10
,
pageNum
:
1
,
beginTime
:
''
,
endTime
:
''
,
status
:
''
,
weUserIds
:
[],
},
loading
:
false
,
tableList
:
[],
userName
:
''
,
userArray
:
[],
dialogVisible
:
false
,
id
:
undefined
,
type
:
undefined
,
// 朋友圈类型 1:非同步型 2:企业同步型 3:个人同步型
name
:
''
,
total
:
0
,
exportLoading
:
false
,
}
},
mounted
()
{
this
.
type
=
this
.
$route
.
query
.
type
this
.
id
=
this
.
$route
.
query
.
id
this
.
name
=
this
.
$route
.
query
.
name
this
.
getList
()
},
methods
:
{
getSelectUser
(
data
)
{
this
.
userArray
=
data
this
.
userName
=
this
.
userArray
.
map
(
function
(
obj
,
index
)
{
return
obj
.
name
})
.
join
(
','
)
this
.
query
.
weUserIds
=
this
.
userArray
.
map
(
function
(
obj
,
index
)
{
return
obj
.
userId
})
.
join
(
','
)
},
exportFn
()
{
this
.
$confirm
(
'确认导出吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
.
then
(()
=>
{
this
.
exportLoading
=
true
this
.
query
.
weMomentsTaskId
=
this
.
id
return
exportInteract
(
Object
.
assign
({},
this
.
query
))
})
.
then
((
res
)
=>
{
if
(
!
res
)
return
const
blob
=
new
Blob
([
res
],
{
type
:
'application/vnd.ms-excel'
})
// 构造一个blob对象来处理数据,并设置文件类型
if
(
window
.
navigator
.
msSaveOrOpenBlob
)
{
//兼容IE10
navigator
.
msSaveBlob
(
blob
,
'互动统计'
)
}
else
{
const
href
=
URL
.
createObjectURL
(
blob
)
//创建新的URL表示指定的blob对象
const
a
=
document
.
createElement
(
'a'
)
//创建a标签
a
.
style
.
display
=
'none'
a
.
href
=
href
// 指定下载链接
a
.
download
=
dateFormat
(
new
Date
(),
'YYYY-MM-DD'
)
+
'-'
+
this
.
name
+
'-互动统计.xlsx'
//指定下载文件名
a
.
click
()
//触发下载
URL
.
revokeObjectURL
(
a
.
href
)
//释放URL对象
}
})
.
catch
((
error
)
=>
{
console
.
error
(
error
)
})
.
finally
(()
=>
{
this
.
exportLoading
=
false
})
},
getList
()
{
if
(
this
.
dateRange
)
{
this
.
query
.
beginTime
=
this
.
dateRange
[
0
]
...
...
@@ -95,17 +169,28 @@ export default {
this
.
query
.
endTime
=
''
}
this
.
loading
=
true
getTableTotal
(
this
.
query
).
then
((
res
)
=>
{
this
.
tableList
=
res
.
data
this
.
query
.
weMomentsTaskId
=
this
.
id
getInteractList
(
this
.
query
).
then
((
res
)
=>
{
this
.
tableList
=
res
.
rows
this
.
total
=
+
res
.
total
this
.
loading
=
false
})
},
handleSearch
()
{
this
.
getList
()
},
resetQuery
()
{
this
.
query
=
{
pageSize
:
10
,
pageNum
:
1
,
beginTime
:
''
,
endTime
:
''
,
interactType
:
''
,
weUserIds
:
''
,
}
this
.
userName
=
''
this
.
dateRange
=
[]
this
.
userArray
=
[]
this
.
getList
()
},
},
...
...
vue3-lw-pc/src/views/friendCircle/components/Staff.vue
View file @
81d3616
...
...
@@ -22,7 +22,7 @@
placeholder=
"请选择部门"
/>
<el-select
v-model=
"query.s
urveyState
"
v-model=
"query.s
tatus
"
placeholder=
"请选择状态"
style=
"width: 150px; margin-right: 20px"
>
...
...
@@ -51,17 +51,17 @@
prop=
"deptName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label=
"执行状态"
align=
"center"
prop=
"
timeOutNum
"
show-overflow-tooltip
>
<el-table-column
label=
"执行状态"
align=
"center"
prop=
"
executeStatus
"
show-overflow-tooltip
>
<template
#
default=
"
{ row }">
<div>
{{
row
}}
{{
dealStatus
(
row
.
executeStatus
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"提醒执行次数"
align=
"center"
prop=
"
timeOutNum
"
prop=
"
executeCount
"
show-overflow-tooltip
></el-table-column>
</el-table>
...
...
@@ -88,8 +88,8 @@
</template>
<
script
>
import
SelectDept
from
'@/components/SelectDept'
import
{
getTableTotal
}
from
'@/api/contentCenter/common.js
'
import
{
reminderMoments
,
statisticMoments
}
from
'@/api/circle'
import
{
dateFormat
}
from
'@/utils/index
'
import
{
reminderMoments
,
statisticMoments
,
getRecordList
,
exportUser
}
from
'@/api/circle'
export
default
{
name
:
'scene-statistics-scene'
,
...
...
@@ -140,22 +140,38 @@ export default {
query
:
{
pageSize
:
10
,
pageNum
:
1
,
beginTime
:
''
,
endTime
:
''
,
// beginTime: '',
// endTime: '',
status
:
''
,
deptIds
:
''
,
userIds
:
''
,
weUserIds
:
[]
,
},
tableSearch
:
{},
id
:
undefined
,
type
:
undefined
,
// 朋友圈类型 1:非同步型 2:企业同步型 3:个人同步型
name
:
''
,
}
},
mounted
()
{
this
.
type
=
this
.
$route
.
query
.
type
this
.
id
=
this
.
$route
.
query
.
id
this
.
name
=
this
.
$route
.
query
.
name
this
.
getTabTotalFn
()
this
.
getTableChangeSize
()
},
methods
:
{
dealStatus
(
type
)
{
switch
(
type
)
{
case
0
:
return
'未执行'
break
case
1
:
return
'已执行'
break
default
:
break
}
},
getTabTotalFn
()
{
statisticMoments
(
this
.
id
).
then
((
res
)
=>
{
this
.
cardData
[
0
].
value
=
res
.
data
.
targetExecute
...
...
@@ -187,20 +203,21 @@ export default {
})
.
then
(()
=>
{
this
.
exportLoading
=
true
return
getTableExport
(
this
.
id
,
Object
.
assign
({},
this
.
query
))
this
.
query
.
weMomentsTaskId
=
this
.
id
return
exportUser
(
Object
.
assign
({},
this
.
query
))
})
.
then
((
res
)
=>
{
if
(
!
res
)
return
const
blob
=
new
Blob
([
res
],
{
type
:
'application/vnd.ms-excel'
})
// 构造一个blob对象来处理数据,并设置文件类型
if
(
window
.
navigator
.
msSaveOrOpenBlob
)
{
//兼容IE10
navigator
.
msSaveBlob
(
blob
,
'
质检详情
'
)
navigator
.
msSaveBlob
(
blob
,
'
客户统计
'
)
}
else
{
const
href
=
URL
.
createObjectURL
(
blob
)
//创建新的URL表示指定的blob对象
const
a
=
document
.
createElement
(
'a'
)
//创建a标签
a
.
style
.
display
=
'none'
a
.
href
=
href
// 指定下载链接
a
.
download
=
dateFormat
(
new
Date
(),
'YYYY-MM-DD'
)
+
'-
质检详情
.xlsx'
//指定下载文件名
a
.
download
=
dateFormat
(
new
Date
(),
'YYYY-MM-DD'
)
+
'-
'
+
this
.
name
+
'-员工统计
.xlsx'
//指定下载文件名
a
.
click
()
//触发下载
URL
.
revokeObjectURL
(
a
.
href
)
//释放URL对象
}
...
...
@@ -219,7 +236,7 @@ export default {
return
obj
.
name
})
.
join
(
','
)
this
.
query
.
u
serIds
=
this
.
userArray
this
.
query
.
weU
serIds
=
this
.
userArray
.
map
(
function
(
obj
,
index
)
{
return
obj
.
userId
})
...
...
@@ -232,7 +249,7 @@ export default {
return
obj
.
deptName
})
.
join
(
','
)
this
.
query
.
deptIds
=
this
.
user
Array
this
.
query
.
deptIds
=
this
.
dept
Array
.
map
(
function
(
obj
,
index
)
{
return
obj
.
deptId
})
...
...
@@ -246,8 +263,10 @@ export default {
// },
getTableChangeSize
()
{
this
.
loading
=
true
getTableTotal
(
this
.
query
).
then
((
res
)
=>
{
this
.
tableList
=
res
.
data
this
.
query
.
weMomentsTaskId
=
this
.
id
getRecordList
(
this
.
query
).
then
((
res
)
=>
{
this
.
tableList
=
res
.
rows
this
.
total
=
+
res
.
total
this
.
loading
=
false
})
},
...
...
@@ -255,10 +274,11 @@ export default {
this
.
query
=
{
pageSize
:
10
,
pageNum
:
1
,
beginTime
:
''
,
endTime
:
''
,
// beginTime: '',
// endTime: '',
status
:
''
,
deptIds
:
''
,
u
serIds
:
''
,
weU
serIds
:
''
,
}
this
.
userArray
=
[]
this
.
userName
=
''
...
...
@@ -271,12 +291,11 @@ export default {
},
},
created
()
{
this
.
getTableChangeSize
()
this
.
$store
.
setBusininessDesc
(
`
<div>全部素材发送与查看情况数据统计与分析</div>
`
)
// this.$store.setBusininessDesc(
// `
// <div>全部素材发送与查看情况数据统计与分析</div>
// `
// )
},
}
</
script
>
...
...
vue3-lw-pc/src/views/friendCircle/list.vue
View file @
81d3616
...
...
@@ -273,6 +273,7 @@ export default {
query
:
{
type
,
id
:
row
.
id
,
name
:
row
.
name
},
})
},
...
...
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