Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-scene
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 264be84d
authored
Jan 04, 2024
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
状态
1 parent
5ade0840
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
247 additions
and
142 deletions
src/api/modules/journeyConfig.js
src/mixins/config.js
src/views/journeyConfig/components/CollapseItem.vue
src/views/journeyConfig/config.vue
src/api/modules/journeyConfig.js
View file @
264be84
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-07 16:54:06
* @Date: 2023-09-07 16:54:06
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-0
3 16:11:18
* @LastEditTime: 2024-01-0
4 10:41:30
* @FilePath: \scrm-micro-journey\src\api\modules\journeyConfig.js
* @FilePath: \scrm-micro-journey\src\api\modules\journeyConfig.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -18,6 +18,16 @@ const activityPage = params => {
...
@@ -18,6 +18,16 @@ const activityPage = params => {
sign
:
true
sign
:
true
})
})
}
}
const
authorizeMerchant
=
params
=>
{
params
.
method
=
`entmicro.api.department.authorizeMerchant`
return
http
({
url
:
'rop-scrm-entmicro/router'
,
method
:
'get'
,
data
:
params
,
sign
:
true
})
}
//活动详情
//活动详情
const
getActivityDetailApi
=
params
=>
{
const
getActivityDetailApi
=
params
=>
{
params
.
method
=
`scrm.api.shopmall.activity.detail`
params
.
method
=
`scrm.api.shopmall.activity.detail`
...
@@ -177,4 +187,4 @@ const setStageData = params => {
...
@@ -177,4 +187,4 @@ const setStageData = params => {
}
}
// entmicro.api.staff.listFollowerStaffByPage 跟进专员类型查询员工
// entmicro.api.staff.listFollowerStaffByPage 跟进专员类型查询员工
export
default
{
setStageData
,
sopConditionList
,
SopTplNodeProtosList
,
getTaskList
,
updateParam
,
getStaffList
,
getFollowListType
,
querylabeltree
,
activityPage
,
byGroupIdSop
,
getInstIdDetail
,
setSopInsts
,
concatActivity
,
findMarketingTask
,
getActivityDetailApi
,
activityRelInfo
,
listDepartmentTree
}
export
default
{
authorizeMerchant
,
setStageData
,
sopConditionList
,
SopTplNodeProtosList
,
getTaskList
,
updateParam
,
getStaffList
,
getFollowListType
,
querylabeltree
,
activityPage
,
byGroupIdSop
,
getInstIdDetail
,
setSopInsts
,
concatActivity
,
findMarketingTask
,
getActivityDetailApi
,
activityRelInfo
,
listDepartmentTree
}
src/mixins/config.js
0 → 100644
View file @
264be84
export
default
{
data
()
{
return
{
journeyStatus
:
2
,
statusList
:
[],
activityType
:
{
1
:
[
{
describe
:
'步骤一:关联营销活动'
,
icon
:
'el-icon-warning'
,
isDisabled
:
false
,
status
:
[
1
],
btnName
:
'去关联'
,
clickFun
:
()
=>
{
this
.
handleConcat
()
}
},
{
describe
:
'步骤二:启用客户旅程'
,
icon
:
'el-icon-warning'
,
isDisabled
:
true
,
status
:
[
1
],
btnName
:
'去开启'
,
clickFun
:
()
=>
{
this
.
haneldOpen
()
}
},
{
describe
:
'步骤一:已关联营销活动'
,
icon
:
'el-icon-success'
,
isDisabled
:
false
,
status
:
[
2
],
btnName
:
'去查看'
,
clickFun
:
()
=>
{
this
.
concatActivity
()
}
},
{
describe
:
'步骤二:启用客户旅程'
,
icon
:
'el-icon-warning'
,
isDisabled
:
false
,
status
:
[
2
],
btnName
:
'去开启'
,
clickFun
:
()
=>
{
this
.
haneldOpen
()
}
},
{
describe
:
'步骤一:已关联营销活动'
,
icon
:
'el-icon-success'
,
isDisabled
:
false
,
status
:
[
3
],
btnName
:
'去查看'
,
clickFun
:
()
=>
{
this
.
concatActivity
()
}
},
{
describe
:
'步骤二:已启用客户旅程'
,
icon
:
'el-icon-success'
,
isDisabled
:
false
,
status
:
[
3
],
btnName
:
'去停用'
,
clickFun
:
()
=>
{
this
.
handleClose
(
-
1
)
}
},
{
describe
:
'步骤一:已关联营销活动'
,
icon
:
'el-icon-success'
,
isDisabled
:
false
,
status
:
[
4
],
btnName
:
'去查看'
,
clickFun
:
()
=>
{
this
.
concatActivity
()
}
},
{
describe
:
'步骤二:已停用客户旅程'
,
icon
:
'el-icon-success'
,
isDisabled
:
true
,
status
:
[
4
],
btnName
:
'已停用'
}
],
2
:
[
{
describe
:
'营销活动 已关联'
,
icon
:
'el-icon-success'
,
plain
:
true
,
isDisabled
:
false
,
status
:
[
2
],
btnName
:
'去查看'
,
clickFun
:
()
=>
{
this
.
concatActivity
()
}
},
{
describe
:
'客户旅程 未开启'
,
icon
:
'el-icon-warning'
,
isDisabled
:
false
,
status
:
[
1
,
2
],
btnName
:
'去启用'
,
clickFun
:
()
=>
{
this
.
haneldOpenQY
()
}
},
{
describe
:
'营销活动 已关联'
,
icon
:
'el-icon-success'
,
isDisabled
:
false
,
plain
:
true
,
status
:
[
3
],
btnName
:
'去查看'
,
clickFun
:
()
=>
{
this
.
concatActivity
()
}
},
{
describe
:
'客户旅程 已开启'
,
icon
:
'el-icon-success'
,
isDisabled
:
false
,
status
:
[
3
],
btnName
:
'去停用'
,
clickFun
:
()
=>
{
this
.
handleClose
(
-
1
)
}
},
{
describe
:
'营销活动 已关联'
,
icon
:
'el-icon-success'
,
plain
:
true
,
isDisabled
:
false
,
status
:
[
4
],
btnName
:
'去查看'
,
clickFun
:
()
=>
{
this
.
concatActivity
()
}
},
{
describe
:
'客户旅程 已停用'
,
icon
:
'el-icon-warning'
,
isDisabled
:
true
,
status
:
[
4
],
btnName
:
'已停用'
}
]
}
}
},
mounted
()
{
this
.
statusList
=
this
.
activityType
[
2
]
const
query
=
this
.
$route
.
query
this
.
query
=
query
this
.
getDetail
()
},
methods
:
{
getDetail
()
{
this
.
$apis
.
journeyConfig
.
getInstIdDetail
({
instId
:
this
.
query
.
instId
}).
then
(
res
=>
{
const
instParam
=
JSON
.
parse
(
res
.
instParam
)
const
dataTypeCode
=
instParam
.
dataTypeCode
if
(
dataTypeCode
==
'"xbpzj"'
)
{
this
.
statusList
=
this
.
activityType
[
1
]
}
else
{
this
.
statusList
=
this
.
activityType
[
2
]
}
const
stages
=
instParam
.
stages
const
instStatus
=
res
.
instStatus
this
.
activityInfo
=
instParam
.
customData
const
activityId
=
this
.
activityInfo
.
activityId
if
(
instStatus
==
0
&&
!
activityId
)
{
this
.
journeyStatus
=
1
}
if
(
instStatus
==
0
&&
activityId
)
{
this
.
journeyStatus
=
2
}
if
(
instStatus
==
1
&&
activityId
)
{
this
.
journeyStatus
=
3
}
if
(
instStatus
==
-
1
&&
activityId
)
{
this
.
journeyStatus
=
4
}
const
nodes
=
res
.
nodes
const
configList
=
[]
for
(
let
k
in
stages
)
{
let
list
=
[]
for
(
let
v
of
nodes
)
{
if
(
v
.
nodeParam
&&
JSON
.
parse
(
v
.
nodeParam
).
stage
==
stages
[
k
].
value
)
{
list
.
push
({
...
JSON
.
parse
(
v
.
nodeParam
),
nodeId
:
v
.
nodeId
})
}
}
list
=
list
.
filter
(
item
=>
item
.
day
)
list
.
sort
((
a
,
b
)
=>
{
return
a
.
day
-
b
.
day
})
const
sopList
=
this
.
groupBy
(
list
,
'day'
)
configList
.
push
({
order
:
k
,
label
:
stages
[
k
].
value
,
isExpaned
:
false
,
editable
:
stages
[
k
].
editable
,
conditionsList
:
stages
[
k
].
conditions
||
[],
sopList
})
}
this
.
configList
=
configList
})
},
async
haneldOpenQY
()
{
this
.
handleConfirm
(
'开启提示'
,
'确定开启'
,
'旅程开启后将无法修改关联的活动链接'
,
''
,
async
()
=>
{
await
this
.
$apis
.
journeyConfig
.
authorizeMerchant
({
merchantId
:
this
.
$globalState
.
session
.
merchantId
})
this
.
$apis
.
journeyConfig
.
concatActivity
({
instId
:
this
.
query
.
instId
,
data
:
{
supMerchantNo
:
this
.
$globalState
.
session
.
merchantId
}
}).
then
(
res
=>
{})
})
}
}
}
src/views/journeyConfig/components/CollapseItem.vue
View file @
264be84
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-0
3 15:52:18
* @LastEditTime: 2024-01-0
4 13:37:31
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -266,7 +266,7 @@ export default {
...
@@ -266,7 +266,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
conditionInfo
:{},
conditionInfo
:
{},
stage
:
STAGE
,
stage
:
STAGE
,
stage_icon
:
ICON
,
stage_icon
:
ICON
,
stage_info
:
STAGE_INFO
,
stage_info
:
STAGE_INFO
,
...
@@ -359,13 +359,14 @@ export default {
...
@@ -359,13 +359,14 @@ export default {
dialogClose
(
val
)
{
dialogClose
(
val
)
{
this
.
tplVisible
=
val
this
.
tplVisible
=
val
},
},
showEdit
(
v
,
k
)
{
showEdit
(
v
,
k
)
{
const
{
title
}
=
this
.
$route
.
query
,{
label
,
conditionsList
,
editable
}
=
this
.
stepItem
const
{
title
}
=
this
.
$route
.
query
,
{
label
,
conditionsList
,
editable
}
=
this
.
stepItem
this
.
conditionInfo
=
{
this
.
conditionInfo
=
{
title
,
title
,
label
,
label
,
editable
,
editable
,
conditionsList
:
conditionsList
[
k
]
conditionsList
:
conditionsList
[
k
]
}
}
this
.
conditionVisible
=
true
this
.
conditionVisible
=
true
},
},
...
@@ -384,7 +385,12 @@ export default {
...
@@ -384,7 +385,12 @@ export default {
}
}
},
},
spiltString
(
str
)
{
spiltString
(
str
)
{
const
title
=
JSON
.
parse
(
str
.
paramRemark
).
title
let
title
=
''
try
{
title
=
JSON
.
parse
(
str
.
paramRemark
).
title
}
catch
(
e
)
{
console
.
log
(
e
)
};
return
title
return
title
// return (str.split('-')[n] || '').replace('文字备注:', '')
// return (str.split('-')[n] || '').replace('文字备注:', '')
},
},
...
...
src/views/journeyConfig/config.vue
View file @
264be84
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-0
3 18:08:30
* @LastEditTime: 2024-01-0
4 11:16:15
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -10,10 +10,10 @@
...
@@ -10,10 +10,10 @@
<div
class=
"journey-main"
>
<div
class=
"journey-main"
>
<div
class=
"bg-fff pb20 journey-config"
>
<div
class=
"bg-fff pb20 journey-config"
>
<template
v-for=
"(item, index) in statusList"
>
<template
v-for=
"(item, index) in statusList"
>
<div
class=
"journey-step-config"
v-if=
"
journeyStatus == item.status
"
:key=
"index"
>
<div
class=
"journey-step-config"
v-if=
"
item.status.includes(journeyStatus)
"
:key=
"index"
>
<i
:class=
"`$
{item.icon}`">
</i>
<i
:class=
"`$
{item.icon}`">
</i>
<span>
{{
item
.
describe
}}
</span>
<span>
{{
item
.
describe
}}
</span>
<el-button
:type=
"item.isDisabled ? 'info' : 'primary'"
:size=
"size"
@
click=
"item.clickFun"
:disabled=
"item.isDisabled"
>
{{
item
.
btnName
}}
</el-button>
<el-button
:type=
"item.isDisabled ? 'info' : 'primary'"
:size=
"size"
@
click=
"item.clickFun"
:disabled=
"item.isDisabled"
:plain=
"item.plain"
>
{{
item
.
btnName
}}
</el-button>
</div>
</div>
</
template
>
</
template
>
</div>
</div>
...
@@ -33,91 +33,13 @@
...
@@ -33,91 +33,13 @@
<
script
>
<
script
>
import
CollapseItem
from
'./components/CollapseItem'
import
CollapseItem
from
'./components/CollapseItem'
import
relatedActivity
from
'./components/relatedActivity'
import
relatedActivity
from
'./components/relatedActivity'
import
config
from
'@/mixins/config'
export
default
{
export
default
{
components
:
{
CollapseItem
,
relatedActivity
},
components
:
{
CollapseItem
,
relatedActivity
},
mixins
:
[
config
],
data
()
{
data
()
{
return
{
return
{
journeyStatus
:
1
,
activityInfo
:
{},
activityInfo
:
{},
statusList
:
[
{
describe
:
'步骤一:关联营销活动'
,
icon
:
'el-icon-warning'
,
isDisabled
:
false
,
status
:
1
,
btnName
:
'去关联'
,
clickFun
:
()
=>
{
this
.
handleConcat
()
}
},
{
describe
:
'步骤二:启用客户旅程'
,
icon
:
'el-icon-warning'
,
isDisabled
:
true
,
status
:
1
,
btnName
:
'去开启'
,
clickFun
:
()
=>
{
this
.
haneldOpen
()
}
},
{
describe
:
'步骤一:已关联营销活动'
,
icon
:
'el-icon-success'
,
isDisabled
:
false
,
status
:
2
,
btnName
:
'去查看'
,
clickFun
:
()
=>
{
this
.
concatActivity
()
}
},
{
describe
:
'步骤二:启用客户旅程'
,
icon
:
'el-icon-warning'
,
isDisabled
:
false
,
status
:
2
,
btnName
:
'去开启'
,
clickFun
:
()
=>
{
this
.
haneldOpen
()
}
},
{
describe
:
'步骤一:已关联营销活动'
,
icon
:
'el-icon-success'
,
isDisabled
:
false
,
status
:
3
,
btnName
:
'去查看'
,
clickFun
:
()
=>
{
this
.
concatActivity
()
}
},
{
describe
:
'步骤二:已启用客户旅程'
,
icon
:
'el-icon-success'
,
isDisabled
:
false
,
status
:
3
,
btnName
:
'去停用'
,
clickFun
:
()
=>
{
this
.
handleClose
(
-
1
)
}
},
{
describe
:
'步骤一:已关联营销活动'
,
icon
:
'el-icon-success'
,
isDisabled
:
false
,
status
:
4
,
btnName
:
'去查看'
,
clickFun
:
()
=>
{
this
.
concatActivity
()
}
},
{
describe
:
'步骤二:已停用客户旅程'
,
icon
:
'el-icon-success'
,
isDisabled
:
true
,
status
:
4
,
btnName
:
'已停用'
}
],
configList
:
[],
configList
:
[],
configList2
:
[
configList2
:
[
{
{
...
@@ -202,57 +124,8 @@ export default {
...
@@ -202,57 +124,8 @@ export default {
]
]
}
}
},
},
mounted
()
{
mounted
()
{},
const
query
=
this
.
$route
.
query
this
.
query
=
query
this
.
getDetail
()
},
methods
:
{
methods
:
{
getDetail
()
{
this
.
$apis
.
journeyConfig
.
getInstIdDetail
({
instId
:
this
.
query
.
instId
}).
then
(
res
=>
{
const
instParam
=
JSON
.
parse
(
res
.
instParam
)
const
stages
=
instParam
.
stages
const
instStatus
=
res
.
instStatus
this
.
activityInfo
=
instParam
.
customData
const
activityId
=
this
.
activityInfo
.
activityId
if
(
instStatus
==
0
&&
!
activityId
)
{
this
.
journeyStatus
=
1
}
if
(
instStatus
==
0
&&
activityId
)
{
this
.
journeyStatus
=
2
}
if
(
instStatus
==
1
&&
activityId
)
{
this
.
journeyStatus
=
3
}
if
(
instStatus
==
-
1
&&
activityId
)
{
this
.
journeyStatus
=
4
}
const
nodes
=
res
.
nodes
const
configList
=
[]
for
(
let
k
in
stages
)
{
let
list
=
[]
for
(
let
v
of
nodes
)
{
if
(
v
.
nodeParam
&&
JSON
.
parse
(
v
.
nodeParam
).
stage
==
stages
[
k
].
value
)
{
list
.
push
({
...
JSON
.
parse
(
v
.
nodeParam
),
nodeId
:
v
.
nodeId
})
}
}
list
=
list
.
filter
(
item
=>
item
.
day
)
list
.
sort
((
a
,
b
)
=>
{
return
a
.
day
-
b
.
day
})
const
sopList
=
this
.
groupBy
(
list
,
'day'
)
configList
.
push
({
order
:
k
,
label
:
stages
[
k
].
value
,
isExpaned
:
false
,
editable
:
stages
[
k
].
editable
,
conditionsList
:
stages
[
k
].
conditions
||
[],
sopList
})
}
this
.
configList
=
configList
})
},
groupBy
(
list
,
name
)
{
groupBy
(
list
,
name
)
{
const
m
=
new
Map
()
const
m
=
new
Map
()
list
.
map
(
item
=>
{
list
.
map
(
item
=>
{
...
@@ -335,7 +208,7 @@ export default {
...
@@ -335,7 +208,7 @@ export default {
color
:
#666666
;
color
:
#666666
;
margin-left
:
5px
;
margin-left
:
5px
;
display
:
inline-block
;
display
:
inline-block
;
width
:
1
6
6px
;
width
:
1
4
6px
;
}
}
}
}
.journey-step-body
{
.journey-step-body
{
...
...
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