Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 7343b481
authored
Mar 17, 2022
by
wuwx
Committed by
杨北旺
Mar 19, 2022
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
sop分析-完成率,触达率
1 parent
9c0c897b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
52 deletions
src/api/modules/sop.js
src/views/sop/index.vue
src/views/sop/sopAnalysis/completeList.vue
src/views/sop/sopAnalysis/touchList.vue
src/api/modules/sop.js
View file @
7343b48
...
...
@@ -33,6 +33,17 @@ const getSopBaseInfoApi = params => {
})
}
//sop分析-触达率-筛选框
const
getEventListApi
=
params
=>
{
params
.
method
=
'scrm.api.sop.sopEvent.listWithPage'
return
http
({
url
:
'rop-scrm-sop/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
// sop分析-触达率列表
const
getSopCustomerStatisticsListApi
=
params
=>
{
params
.
method
=
'scrm.api.sop.sopCustomer.listStatisticsWithPage'
...
...
@@ -100,4 +111,4 @@ const getSopInfoDetailApi = params => {
})
}
export
default
{
getCustomerByTagListApi
,
getSopInfoListApi
,
getSopBaseInfoApi
,
getSopCustomerStatisticsListApi
,
getSopStaffTaskListApi
,
parseEventCountApi
,
insertOrUpdateSopEventApi
,
insertOrUpdateSopApi
,
getSopInfoDetailApi
}
export
default
{
getCustomerByTagListApi
,
getSopInfoListApi
,
getSopBaseInfoApi
,
get
EventListApi
,
get
SopCustomerStatisticsListApi
,
getSopStaffTaskListApi
,
parseEventCountApi
,
insertOrUpdateSopEventApi
,
insertOrUpdateSopApi
,
getSopInfoDetailApi
}
src/views/sop/index.vue
View file @
7343b48
...
...
@@ -140,7 +140,7 @@ export default {
pageSize
:
999999
}
this
.
$apis
.
sop
.
getSopInfoListApi
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
//
console.log(res)
this
.
sopList
=
res
.
list
this
.
dealListData
()
this
.
$nextTick
(()
=>
{
...
...
src/views/sop/sopAnalysis/completeList.vue
View file @
7343b48
...
...
@@ -44,7 +44,6 @@
import
*
as
echarts
from
'echarts'
import
*
as
dayjs
from
'dayjs'
import
url
from
'@/assets/empty.png'
import
{
aToExport
}
from
'@/common/constant'
import
{
pieOption
}
from
'./pieOption'
export
default
{
name
:
'completeList'
,
...
...
@@ -63,7 +62,7 @@ export default {
tableColumns
:
[
{
label
:
'营销事件'
,
prop
:
'
n
ame'
prop
:
'
sopN
ame'
},
{
label
:
'营销渠道'
,
...
...
src/views/sop/sopAnalysis/touchList.vue
View file @
7343b48
...
...
@@ -4,7 +4,7 @@
<div
class=
"container"
>
<div
class=
"title m-b-20"
>
SOP名称:
<span>
这是某次营销sop
</span>
<span>
{{
sopInfo
.
sopName
}}
</span>
</div>
<div>
...
...
@@ -21,20 +21,20 @@
客户总数
<img
src=
"@/assets/sop/customer-total.png"
/>
</div>
<p
class=
"analysis-num"
>
20
</p>
<p
class=
"analysis-num"
>
{{
sopInfo
.
customerCount
||
'-'
}}
</p>
</div>
<div
class=
"analysis-block"
>
<div
class=
"analysis-title-block m-b-20"
>
已触达客户数
<img
src=
"@/assets/sop/touch-customer.png"
/>
</div>
<p
class=
"analysis-num"
>
12
</p>
<p
class=
"analysis-num"
>
{{
selectedEventInfo
.
eventStatistics
?
selectedEventInfo
.
eventStatistics
.
reachCustomerCount
:
'-'
}}
</p>
</div>
<div
class=
"analysis-block"
>
<div
class=
"analysis-title-block m-b-20"
>
触达率
</div>
<p
class=
"analysis-num"
>
60%
</p>
<p
class=
"analysis-num"
>
{{
sopInfo
.
touchPercent
+
'%'
}}
</p>
<div
id=
"completePie"
class=
"chart-pie"
></div>
</div>
</div>
...
...
@@ -42,7 +42,7 @@
<p
class=
"m-b-10"
>
客户触达明细
</p>
<!-- 表格区域 开始 -->
<GLTable
ref=
"
gift
ListRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<GLTable
ref=
"
touch
ListRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<GLButton
type=
"text"
fn=
"编辑"
@
click=
"handleEdit('edit', scope.scope)"
>
编辑
</GLButton>
<GLButton
type=
"text"
fn=
"删除"
@
click=
"handleDelete(scope.scope)"
>
删除
</GLButton>
...
...
@@ -66,16 +66,24 @@ export default {
size
:
'small'
,
url
:
url
,
searchForm
:
{
sopName
:
''
sopId
:
''
,
eventId
:
''
},
sopInfo
:
{},
selectedEventInfo
:
{
eventStatistics
:
{}
},
// tableSearchForm: {},
// 搜索
searchFormData
:
[
{
label
:
'营销事件'
,
name
:
'
sopName
'
,
name
:
'
eventId
'
,
type
:
'select'
,
width
:
'415px'
width
:
'415px'
,
optionList
:
[],
optionId
:
'id'
,
optionLabel
:
'confName'
,
optionsName
:
'sopEventList'
}
],
// 表格
...
...
@@ -110,16 +118,7 @@ export default {
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
baseData
:
{
commentStatusList
:
[
{
confId
:
'0'
,
confName
:
'未发布'
},
{
confId
:
'1'
,
confName
:
'已发布'
}
]
sopEventList
:
[]
}
}
},
...
...
@@ -132,25 +131,47 @@ export default {
},
mounted
()
{
this
.
drawPie
()
this
.
getOptionsList
(
'searchFormData'
)
this
.
getBaseData
()
},
methods
:
{
getParams
()
{
var
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
if
(
this
.
searchForm
.
createDate
.
length
)
{
params
.
startTime
=
new
Date
(
this
.
searchForm
.
createDate
[
0
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 00:00:00'
params
.
endTime
=
new
Date
(
this
.
searchForm
.
createDate
[
1
]).
toLocaleDateString
().
replace
(
/
\/
/g
,
'-'
)
+
' 23:59:59'
getBaseInfo
()
{
this
.
$apis
.
sop
.
getSopBaseInfoApi
({
sopId
:
this
.
sopId
}).
then
(
res
=>
{
this
.
sopInfo
=
res
this
.
sopInfo
.
touchPercent
=
Math
.
round
((
this
.
selectedEventInfo
.
eventStatistics
.
reachCustomerCount
/
this
.
sopInfo
.
customerCount
)
*
100
).
toFixed
(
0
)
})
},
getBaseData
()
{
var
params
=
{
sopId
:
this
.
sopId
,
pageNum
:
1
,
pageSize
:
999999
}
delete
params
.
createDate
return
params
var
pushChannelTypeList
=
{
1
:
'企业微信'
,
2
:
'短信'
,
3
:
'微信朋友圈'
}
this
.
$apis
.
sop
.
getEventListApi
(
params
).
then
(
res
=>
{
this
.
baseData
.
sopEventList
=
res
.
list
console
.
log
(
res
)
this
.
baseData
.
sopEventList
.
forEach
(
item
=>
{
item
.
confName
=
item
.
eventStartDate
+
(
item
.
repeatFlag
==
'Y'
?
'-'
+
item
.
eventEndDate
:
''
)
+
' '
+
item
.
eventTime
+
' '
+
pushChannelTypeList
[
item
.
pushChannelType
]
})
this
.
getOptionsList
(
'searchFormData'
,
false
)
this
.
searchForm
.
eventId
=
this
.
baseData
.
sopEventList
[
0
].
id
this
.
selectedEventInfo
=
this
.
baseData
.
sopEventList
[
0
]
this
.
getBaseInfo
()
this
.
drawPie
()
this
.
$refs
.
touchListRef
.
refreshTable
()
})
},
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
(
resolve
,
reject
)
=>
{
this
.
searchForm
.
sopId
=
this
.
sopId
// this.tableSearchForm = this.getParams()
resolve
()
this
.
baseData
.
sopEventList
.
length
?
resolve
()
:
reject
()
})
},
...
...
@@ -168,7 +189,7 @@ export default {
})
if
(
res
.
code
==
'0'
)
{
fn
&&
fn
()
this
.
handleSearch
()
//
this.handleSearch()
}
})
}
...
...
@@ -176,13 +197,6 @@ export default {
})
},
handleExport
()
{
var
params
=
this
.
getParams
()
this
.
$apis
.
giftBag
.
giftExportApi
(
params
).
then
(
res
=>
{
aToExport
(
res
)
})
},
handleDelete
(
row
)
{
this
.
secondConfirm
(
'删除'
,
'是否确认删除该礼包?'
,
'giftBag'
,
'deleteGiftApi'
,
{
id
:
row
.
id
})
},
...
...
@@ -237,7 +251,7 @@ export default {
},
setTableFinishFun
()
{
//接收到的数据为空
this
.
$refs
.
giftListRef
.
data
.
length
?
(
this
.
$refs
.
giftListRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
gift
ListRef
.
setTableHeightFun
()
this
.
$refs
.
touchListRef
.
data
.
length
?
(
this
.
$refs
.
touchListRef
.
tableHeightValues
=
''
)
:
this
.
$refs
.
touch
ListRef
.
setTableHeightFun
()
},
drawPie
()
{
...
...
@@ -245,15 +259,16 @@ export default {
let
myChart
=
echarts
.
init
(
chartDom
)
let
option
=
JSON
.
parse
(
JSON
.
stringify
(
pieOption
))
// option.series[0].name = item.sopName
console
.
log
(
this
.
selectedEventInfo
)
option
.
series
[
0
].
data
=
[
{
value
:
60
,
name
:
'已触
发的营销事件
'
value
:
this
.
selectedEventInfo
.
eventStatistics
.
reachCustomerCount
,
name
:
'已触
达的客户数
'
},
{
value
:
40
,
name
:
'未触
发的营销事件
'
value
:
this
.
sopInfo
.
customerCount
-
this
.
selectedEventInfo
.
eventStatistics
.
reachCustomerCount
,
name
:
'未触
达的客户数
'
}
]
...
...
@@ -262,9 +277,9 @@ export default {
option
&&
myChart
.
setOption
(
option
)
},
handleSearch
()
{
this
.
$refs
.
gift
ListRef
.
refreshTable
()
}
//
handleSearch() {
// this.$refs.touch
ListRef.refreshTable()
//
}
}
}
</
script
>
...
...
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