Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-peregrination
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 3ffa4bf2
authored
Jan 03, 2024
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
ac6c1403
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
595 additions
and
302 deletions
src/api/modules/journeyModel.js
src/mixins/model.js
src/setup/qiankun.js
src/store/modules/model.js
src/views/journeyConfig/components/CollapseItem.vue
src/views/journeyConfig/components/CollapseItemTpl.vue
src/views/journeyModel/add.vue
src/views/journeyModel/components/CollapseItem.vue
src/views/journeyModel/components/concatActivity.vue
src/views/journeyModel/components/condition.vue
src/views/journeyModel/components/sopItem.vue
src/api/modules/journeyModel.js
View file @
3ffa4bf
...
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-22 19:44:09
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 202
3-12-27 16:24:11
* @LastEditTime: 202
4-01-02 19:04:29
* @FilePath: \scrm-micro-peregrination\src\api\modules\journeyModel.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -29,7 +29,7 @@ const sopTplsList = params => {
//活动列表
const
getInstIdDetail
=
params
=>
{
return
http
({
url
:
'
process/sop/api/sopInst
s/'
+
params
.
instId
,
url
:
'
/process/sop/api/sopTpl
s/'
+
params
.
instId
,
method
:
'get'
,
// data: params,
sign
:
false
...
...
@@ -40,7 +40,7 @@ const SopTplNodeProtosList = params => {
return
http
({
url
:
'/process/sop/api/SopTplNodeProtos/list'
,
method
:
'get'
,
//
data: params,
data
:
params
,
sign
:
false
})
}
...
...
@@ -50,7 +50,8 @@ const sopTplsSave = params => {
url
:
'/process/sop/api/sopTpls'
,
method
:
'post'
,
data
:
params
,
sign
:
false
sign
:
false
,
noSessionId
:
true
})
}
//圈人方式全部列表
...
...
@@ -61,5 +62,14 @@ const sopDataTypesList = params => {
sign
:
false
})
}
//圈人方式全部列表
const
sopConditionList
=
params
=>
{
return
http
({
url
:
'/process/sop/api/sopData/condition/list'
,
method
:
'get'
,
data
:
params
,
sign
:
false
})
}
export
default
{
byGroupIdSop
,
sopTplsList
,
getInstIdDetail
,
SopTplNodeProtosList
,
sopTplsSave
,
sopDataTypesList
}
export
default
{
byGroupIdSop
,
sopTplsList
,
getInstIdDetail
,
SopTplNodeProtosList
,
sopTplsSave
,
sopDataTypesList
,
sopConditionList
}
src/mixins/model.js
0 → 100644
View file @
3ffa4bf
import
{
mapActions
,
mapState
}
from
'vuex'
export
default
{
data
()
{
return
{
...
mapActions
(
'model'
,
[
'setModelList'
])
}
},
computed
:
{
...
mapState
(
'model'
,
[
'modelList'
])
},
mounted
()
{
if
(
!
this
.
modelList
)
{
this
.
setModelList
()
}
},
methods
:
{
...
mapActions
(
'model'
,
[
'setModelList'
])
}
}
src/setup/qiankun.js
View file @
3ffa4bf
...
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-23 11:06:49
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 202
3-09-05 16:08:47
* @LastEditTime: 202
4-01-03 10:01:50
* @FilePath: \live\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
src/store/modules/model.js
View file @
3ffa4bf
...
...
@@ -2,23 +2,27 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-27 16:50:15
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-2
7 17:11:1
0
* @LastEditTime: 2023-12-2
8 20:29:3
0
* @FilePath: \scrm-micro-peregrination\src\store\modules\model.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
api
from
'@/api'
export
default
{
namespaced
:
true
,
state
:
{
model
:
''
,
STEP
:
''
modelList
:
null
},
mutations
:
{
// 设置模块阶段
SET_MODEL
(
state
,
data
)
{
state
.
model
=
data
},
SET_STEP
(
state
,
data
)
{
state
.
STEP
=
data
state
.
modelList
=
data
}
},
actions
:
{
// 设置分页大小
async
setModelList
({
commit
},
data
)
{
const
res
=
await
api
.
journeyModel
.
SopTplNodeProtosList
({})
commit
(
'SET_MODEL'
,
res
)
}
}
}
src/views/journeyConfig/components/CollapseItem.vue
View file @
3ffa4bf
...
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 202
3-09-23 15:28:49
* @LastEditTime: 202
4-01-03 12:33:37
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -36,9 +36,7 @@
<div
class=
"progress-item-content bg-fff"
>
<div
class=
"progress-item"
v-for=
"(v, k) in stepItem.conditionsList"
:key=
"k"
>
<span>
条件
{{
k
+
1
}}
</span>
<span>
{{
v
.
split
(
"-"
)[
0
]
}}
</span>
<img
v-show=
"v.split('-').length > 1"
src=
"@/assets/config/arrow.png"
/>
<span>
{{
v
.
split
(
"-"
)[
1
]
}}
</span>
<span>
{{
spiltString
(
v
)
}}
</span>
</div>
</div>
</
template
>
...
...
@@ -72,9 +70,7 @@
<div
v-for=
"(value, key) in v"
:key=
"key"
class=
"step-time-item flex-column-center"
>
<div
style=
"width: 100%"
>
<div
class=
"step-item-desc"
>
<span>
[
{{
stage_time
[
value
.
taskType
]
}}
]发送 |
{{
stage
[
value
.
taskType
]
}}
|
{{
des
[
value
.
taskType
]
}}
</span>
<span>
[
{{
value
.
time
}}
]发送 |
{{
stageInfo
([
value
.
taskType
]).
nodeName
}}
|
{{
stageInfo
([
value
.
taskType
]).
desc
}}
</span>
</div>
<div
class=
"step-item-name"
v-if=
"value.taskType"
>
{{
activity_name
[
value
.
taskType
]
}}
</div>
...
...
@@ -108,14 +104,14 @@
<el-popover
placement=
"top-start"
width=
"100"
trigger=
"click"
>
<div
class=
"popover-panel"
v-for=
"(t, pkey) in v"
:key=
"pkey"
>
<div
class=
"flex-column-center"
>
<span>
{{
stage_time
[
t
.
taskType
]
}}
</span>
<span>
{{
value
.
time
}}
</span>
<div
:class=
"['stage-icon', `stage-$
{t.taskType}`]">
</div>
</div>
<div
class=
"stage-desc"
>
{{
stage
[
t
.
taskType
]
}}
</div>
<div
class=
"stage-desc"
>
{{
stage
Info
([
t
.
taskType
]).
nodeName
}}
</div>
</div>
<div
slot=
"reference"
class=
"flex-column-center"
v-if=
"v.length
<
= 2">
<span>
{{
stage_time
[
value
.
taskType
]
}}
</span>
<span>
{{
value
.
time
}}
</span>
<!-- 1 => 门店助手-->
<!-- 2 => AI外呼-->
<!-- 3 => 短信-->
...
...
@@ -206,8 +202,9 @@ const STAGE_PREFIX = Object.freeze({
},
6
:
'查询内容:'
})
// import empDetail from './empDetai
l'
import
model
from
'@/mixins/mode
l'
export
default
{
mixins
:
[
model
],
components
:
{
// empDetail
},
...
...
@@ -260,6 +257,22 @@ export default {
created
()
{
},
methods
:
{
//获取sop映射字段
stageInfo
(
i
)
{
if
(
this
.
modelList
)
{
return
this
.
modelList
.
find
(
item
=>
item
.
id
==
i
)
}
else
{
return
{
nodeName
:
''
,
desc
:
''
}
}
},
spiltString
(
val
,
n
)
{
const
title
=
JSON
.
parse
(
val
.
paramRemark
).
title
return
title
// return (title.split('-')[n] || '').replace('文字备注:', '')
},
//查看详情
getEmpDetail
()
{
this
.
empVisible
=
true
...
...
src/views/journeyConfig/components/CollapseItemTpl.vue
View file @
3ffa4bf
...
...
@@ -2,15 +2,15 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 202
3-09-23 15:28:49
* @LastEditTime: 202
4-01-03 13:37:45
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<
template
>
<div
class=
"border-content"
>
<div
class=
"journey-step-info"
v-for=
"(stepItem, k) in configList"
:key=
"k"
>
<!-- v-if="stepItem.sopList.flat(Initify).length>0"-->
<div
>
<!-- v-if="stepItem.sopList.flat(Initify).length>0"-->
<div>
<div
:class=
"
{ 'collapse-item': true, 'is-active': stepItem.isExpaned }">
<div
class=
"collapse-item-tab flex-column-center pl20"
>
<i
class=
"el-icon-caret-bottom"
v-show=
"stepItem.isExpaned"
@
click=
"handleExpand(stepItem)"
></i>
...
...
@@ -18,17 +18,14 @@
<div
class=
"tab-label"
>
{{
stepItem
.
label
}}
</div>
<div
v-if=
"!isDisabled"
class=
"count-num"
>
已启用数量/全部sop数量:
{{
computedSopSet
[
k
].
flat
(
Inifity
).
filter
(
item
=>
item
.
nodeSkip
!==
"1"
).
length
}}
/
{{
stepItem
.
sopList
.
flat
(
Inifity
).
length
}}
</div>
<div
v-if=
"!isDisabled"
class=
"count-num"
>
已启用数量/全部sop数量:
{{
computedSopSet
[
k
].
flat
(
Inifity
).
filter
(
item
=>
item
.
nodeSkip
!==
'1'
).
length
}}
/
{{
stepItem
.
sopList
.
flat
(
Inifity
).
length
}}
</div>
</div>
<div
class=
"collapse-item-panel"
:style=
"
{ display: stepItem.isExpaned ? 'block' : 'none' }">
<div
class=
"task-item"
>
<template
v-if=
"stepItem.conditionsList.length > 0"
>
<div
class=
"task-item-head flex-column-center"
>
<div
class=
"task-item-icon"
>
<img
src=
"@/assets/config/log.png"
/>
<img
src=
"@/assets/config/log.png"
/>
</div>
<div
class=
"task-item-name"
>
进入条件
</div>
<div
class=
"task-item-desc"
>
(描述用户触发何种条件后,将自动变更为该旅程阶段)
</div>
...
...
@@ -36,15 +33,13 @@
<div
class=
"progress-item-content bg-fff"
>
<div
class=
"progress-item"
v-for=
"(v, k) in stepItem.conditionsList"
:key=
"k"
>
<span>
条件
{{
k
+
1
}}
</span>
<span>
{{
v
.
split
(
"-"
)[
0
]
}}
</span>
<img
v-show=
"v.split('-').length > 1"
src=
"@/assets/config/arrow.png"
/>
<span>
{{
v
.
split
(
"-"
)[
1
]
}}
</span>
<span>
{{
spiltString
(
v
)
}}
</span>
</div>
</div>
</
template
>
<
template
v-if=
"stepItem.conditionsList.length == 0"
>
<div
class=
"empty-task"
>
<img
src=
"@/assets/config/empty-sop.png"
/>
<img
src=
"@/assets/config/empty-sop.png"
/>
<div
class=
"empty-text"
>
暂无进入条件
</div>
</div>
</
template
>
...
...
@@ -54,7 +49,7 @@
<div
class=
"task-sop-l"
>
<div
class=
"task-item-head flex-column-center"
>
<div
class=
"task-item-icon"
>
<img
src=
"@/assets/config/sop.png"
/>
<img
src=
"@/assets/config/sop.png"
/>
</div>
<div
class=
"task-item-name"
>
SOP任务
</div>
<div
class=
"task-item-desc"
>
(系统面向当前旅程阶段客户的营销计划)
</div>
...
...
@@ -62,29 +57,17 @@
<div
class=
"task-item-content bg-fff"
>
<div
class=
"step-item"
v-for=
"(v, k) in stepItem.sopList"
:key=
"k"
>
<div
class=
"step-item-day"
v-if=
"v.length > 0"
>
<img
src=
"@/assets/config/step-border.png"
/>
<img
src=
"@/assets/config/step-border.png"
/>
<span
v-if=
"v[0].day"
>
第
{{
v
[
0
].
day
.
defaultValue
}}
天
</span>
</div>
<div
class=
"step-item-content"
>
<div
v-for=
"(value, key) in v"
:key=
"key"
class=
"step-time-item flex-column-center"
>
<div
style=
"width: 100%"
>
<div
class=
"step-item-desc"
v-if=
"value.taskType"
>
<span>
[
{{
stage_time
[
value
.
taskType
.
defaultValue
]
}}
]发送 |
{{
stage
[
value
.
taskType
.
defaultValue
]
}}
|
{{
des
[
value
.
taskType
.
defaultValue
]
}}
</span>
<el-switch
v-model=
"value.nodeSkip"
active-color=
"#5850FF"
inactive-color=
"#c6c6c6"
active-text=
"开"
inactive-text=
"关"
active-value=
"0"
inactive-value=
"1"
:disabled=
"value.nodeSkipable == 0"
>
</el-switch>
<span>
{{
value
.
time
.
defaultValue
}}
发送 |
{{
stageInfo
([
value
.
taskType
.
defaultValue
]).
nodeName
}}
|
{{
stageInfo
([
value
.
taskType
.
defaultValue
]).
desc
}}
</span>
<el-switch
v-model=
"value.nodeSkip"
active-color=
"#5850FF"
inactive-color=
"#c6c6c6"
active-text=
"开"
inactive-text=
"关"
active-value=
"0"
inactive-value=
"1"
:disabled=
"value.nodeSkipable == 0"
></el-switch>
</div>
<div
class=
"step-item-name"
v-if=
"value.taskType.defaultValue"
>
{{
activity_name
[
value
.
taskType
.
defaultValue
]
}}
</div>
<div
class=
"step-item-name"
v-if=
"value.taskType.defaultValue"
>
{{
activity_name
[
value
.
taskType
.
defaultValue
]
}}
</div>
</div>
</div>
</div>
...
...
@@ -94,7 +77,7 @@
<div
class=
"task-sop-calendar"
>
<div
class=
"task-item-head flex-column-center"
>
<div
class=
"task-item-icon"
>
<img
src=
"@/assets/config/calendar.png"
/>
<img
src=
"@/assets/config/calendar.png"
/>
</div>
<div
class=
"task-item-name"
>
SOP日历
</div>
</div>
...
...
@@ -106,20 +89,18 @@
<el-popover
placement=
"top-start"
width=
"100"
trigger=
"click"
>
<div
class=
"popover-panel"
v-for=
"(t, pkey) in v"
:key=
"pkey"
>
<div
class=
"flex-column-center"
v-if=
"t.nodeSkip == '0'"
>
<span>
{{
stage_time
[
value
.
taskType
.
defaultValue
]
}}
</span>
<span>
{{
value
.
time
.
defaultValue
}}
</span>
<div
:class=
"['stage-icon', `stage-$
{t.taskType.defaultValue}`]">
</div>
</div>
<div
class=
"stage-desc"
>
{{
stage
[
t
.
taskType
.
defaultValue
]
}}
</div>
<!--
<div
class=
"stage-desc"
>
{{
stageInfo
([
t
.
taskType
]).
nodeName
}}
</div>
-->
</div>
<div
slot=
"reference"
class=
"flex-column-center"
v-if=
"v.length
<
= 2
&&
value.nodeSkip =='0'">
<span>
{{
stage_time
[
value
.
taskType
.
defaultValue
]
}}
</span>
<div
slot=
"reference"
class=
"flex-column-center"
v-if=
"v.length
<
= 2
&&
value.nodeSkip ==
'0'">
<span>
{{
value
.
time
.
defaultValue
}}
</span>
<div
:class=
"['stage-icon', `stage-$
{value.taskType.defaultValue}`]">
</div>
</div>
<div
slot=
"reference"
class=
"flex-column-center"
v-if=
"v.length > 2 && key == 0"
>
<span>
{{
v
.
filter
(
item
=>
item
.
nodeSkip
==
'0'
).
length
}}
个任务
</span>
<span>
{{
v
.
filter
(
item
=>
item
.
nodeSkip
==
'0'
).
length
}}
个任务
</span>
</div>
</el-popover>
</div>
...
...
@@ -131,11 +112,10 @@
</
template
>
<div
v-if=
"stepItem.sopList.length == 0"
>
<div
class=
"empty-sop"
>
<img
src=
"@/assets/config/empty-sop.png"
/>
<img
src=
"@/assets/config/empty-sop.png"
/>
<div
class=
"empty-text"
>
暂无sop任务
</div>
</div>
</div>
</div>
</div>
<!-- <emp-detail v-if="empVisible" :empVisible="empVisible"></emp-detail> -->
...
...
@@ -143,7 +123,6 @@
</div>
</div>
</div>
</template>
<
script
>
const
STAGE_TIME
=
Object
.
freeze
({
...
...
@@ -162,7 +141,7 @@ const STAGE = {
5
:
'跟进提醒'
,
6
:
'客户信息查询'
}
const
ACTIVITY_NAME
=
{
const
ACTIVITY_NAME
=
{
4
:
'活动链接'
,
3
:
'活动链接'
,
1
:
'短信模版'
,
...
...
@@ -199,8 +178,9 @@ const STAGE_PREFIX = Object.freeze({
},
6
:
'查询内容:'
})
// import empDetail from './empDetai
l'
import
model
from
'@/mixins/mode
l'
export
default
{
mixins
:
[
model
],
components
:
{
// empDetail
},
...
...
@@ -224,15 +204,10 @@ export default {
configList
:
{
handler
(
newValue
,
oldValue
)
{
console
.
log
(
newValue
)
let
sopList
=
Array
.
from
(
newValue
,
item
=>
Array
.
from
(
item
.
sopList
,
sub
=>
Array
.
from
(
sub
,
subItem
=>
({
nodeId
:
subItem
.
nodeId
,
nodeSkip
:
subItem
.
nodeSkip
}))
)
)
;
let
sopList
=
Array
.
from
(
newValue
,
item
=>
Array
.
from
(
item
.
sopList
,
sub
=>
Array
.
from
(
sub
,
subItem
=>
({
nodeId
:
subItem
.
nodeId
,
nodeSkip
:
subItem
.
nodeSkip
}))))
this
.
computedSopSet
=
JSON
.
parse
(
JSON
.
stringify
(
sopList
))
sopList
=
sopList
.
flat
(
Infinity
)
this
.
$bus
.
$emit
(
'sopListSet'
,
{
sopList
})
this
.
$bus
.
$emit
(
'sopListSet'
,
{
sopList
})
},
deep
:
true
,
immediate
:
true
...
...
@@ -244,16 +219,34 @@ export default {
des
:
DES
,
stage_prefix
:
STAGE_PREFIX
,
stage_time
:
STAGE_TIME
,
activity_name
:
ACTIVITY_NAME
,
activity_name
:
ACTIVITY_NAME
,
empVisible
:
false
,
nodes
:
null
,
sopList
:
[],
computedSopSet
:
[]
}
},
created
()
{
},
created
()
{},
methods
:
{
stageMap
(
val
)
{
console
.
log
(
val
)
},
//获取sop映射字段
stageInfo
(
i
)
{
if
(
this
.
modelList
)
{
return
this
.
modelList
.
find
(
item
=>
item
.
id
==
i
)
}
else
{
return
{
nodeName
:
''
,
desc
:
''
}
}
},
spiltString
(
val
,
n
)
{
const
title
=
JSON
.
parse
(
val
.
paramRemark
).
title
return
title
// return (title.split('-')[n] || '').replace('文字备注:', '')
},
//查看详情
getEmpDetail
()
{
this
.
empVisible
=
true
...
...
@@ -266,8 +259,7 @@ export default {
this
.
$emit
(
'changeNode'
,
this
.
nodes
)
}
},
mounted
()
{
}
mounted
()
{}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
@@ -593,23 +585,23 @@ export default {
.el-switch
.el-switch__label
{
width
:
70px
;
}
.empty-sop
{
background
:
#
F9FAFE
;
.empty-sop
{
background
:
#
f9fafe
;
text-align
:
center
;
padding
:
16px
0
;
margin-bottom
:
10px
;
.empty-text{
.empty-text
{
color
:
#666666
;
font-size
:
12px
;
}
}
.empty-task
{
background
:
#
FFFFFF
;
.empty-task
{
background
:
#
ffffff
;
text-align
:
center
;
padding
:
20px
0
;
margin-bottom
:
10px
;
.empty-text{
.empty-text
{
color
:
#666666
;
font-size
:
12px
;
}
...
...
src/views/journeyModel/add.vue
View file @
3ffa4bf
...
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 202
3-12-27 20:38:17
* @LastEditTime: 202
4-01-03 12:27:30
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -14,13 +14,13 @@
<el-input
v-model=
"addForm.name"
></el-input>
</el-form-item>
<el-form-item
label=
"圈化人群的方式:"
:size=
"size"
>
<el-select
v-model=
"addForm.region"
placeholder=
"请选择"
>
<el-select
v-model=
"addForm.region"
placeholder=
"请选择"
@
change=
"handleSelectType"
:disabled=
"query.title"
>
<el-option
:label=
"item.name"
:value=
"item.code"
:key=
"item.code"
v-for=
"item in sopDataTypes"
></el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<div
class=
"journey-step bg-fff pb20"
>
<div
class=
"journey-step bg-fff pb20"
v-if=
"addForm.region"
>
<div
class=
"journey-step-title border-title"
>
客户旅程阶段配置
</div>
...
...
@@ -31,15 +31,15 @@
</div>
<div
class=
"journey-step-info"
v-for=
"(val, k) in configList"
:key=
"k"
>
<template
v-if=
"val.label"
>
<collapse-item
:stepItem=
"val"
:activityInfo=
"activityInfo"
@
openDrawer=
"openDrawer"
@
openCondition=
"openCondition
"
>
<el-button
type=
"text"
@
click
.
stop=
"openCondition()"
>
新增
</el-button>
<collapse-item
:stepItem=
"val"
:activityInfo=
"activityInfo"
:key=
"k"
:ref=
"`collapse_$
{k}`
">
<el-button
type=
"text"
@
click
.
stop=
"openCondition(
k
)"
>
新增
</el-button>
<el-button
type=
"text"
@
click
.
stop=
"handleEditJ(k)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click
.
stop=
"handleDelete(k)"
>
删除
</el-button>
</collapse-item>
</
template
>
<div
class=
"journey-add-panel"
v-if=
"addStatus && k == addNo"
>
<div
class=
"flex-column-center "
>
<el-input
v-model=
"modelInput.label"
></el-input>
<el-input
v-model
.
trim
=
"modelInput.label"
></el-input>
<div
class=
"mark-item"
>
<label>
手动标记:
</label>
<el-radio-group
v-model=
"modelInput.editable"
>
...
...
@@ -50,7 +50,7 @@
</div>
<div
class=
"mark-operate"
>
<el-button
type=
"text"
@
click
.
stop=
"saveStep"
>
保存
</el-button>
<el-button
type=
"text"
@
click
.
stop=
"
addStatus = false
"
>
取消
</el-button>
<el-button
type=
"text"
@
click
.
stop=
"
cancelStep
"
>
取消
</el-button>
</div>
</div>
</div>
...
...
@@ -64,23 +64,20 @@
<el-button
size=
"small"
type=
"primary"
@
click
.
stop=
"cancelModel"
>
取消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click
.
stop=
"saveModel"
>
确认
</el-button>
</div>
<concatActivity
:activityVisible=
"activityVisible"
v-if=
"activityVisible"
@
closeActivity=
"closeActivity"
></concatActivity>
<sop-item
:drawerVisible=
"drawerVisible"
@
closeDrawer=
"closeDrawer"
></sop-item>
</div>
</template>
<
script
>
import
CollapseItem
from
'./components/CollapseItem'
import
concatActivity
from
'./components/concatActivity'
import
sopItem
from
'./components/sopItem'
export
default
{
components
:
{
CollapseItem
,
concatActivity
,
sopItem
CollapseItem
// concatActivity
//
sopItem
},
data
()
{
return
{
drawerVisible
:
false
,
dataTypeCode
:
''
,
sopDataTypes
:
[],
activityVisible
:
false
,
addStatus
:
false
,
...
...
@@ -88,46 +85,77 @@ export default {
activityInfo
:
{},
configList
:
[],
modelInput
:
{},
query
:
{},
addForm
:
{
name
:
''
name
:
''
,
region
:
''
},
rules
:
{
name
:
[{
required
:
true
,
message
:
'请输入旅程名称'
,
trigger
:
'blur'
}]
}
}
},
provide
()
{
return
{
stepList
:
this
.
stepList
,
app
:
this
}
},
mounted
()
{
const
query
=
this
.
$route
.
query
this
.
query
=
query
this
.
addForm
.
name
=
query
.
title
if
(
this
.
query
.
instId
)
this
.
getDetail
()
this
.
query
=
this
.
$route
.
query
||
{}
if
(
this
.
query
.
title
)
{
this
.
addForm
.
name
=
this
.
query
.
title
this
.
getDetail
()
}
this
.
sopDataTypesList
()
},
watch
:
{
'addForm.region'
(
val
)
{
this
.
dataTypeCode
=
val
this
.
$apis
.
journeyModel
.
sopConditionList
({
dataTypeCode
:
val
}).
then
(
res
=>
{
this
.
stepList
=
res
})
}
},
computed
:
{
journeyList
()
{
return
this
.
configList
.
map
(
i
=>
i
.
label
)
}
},
methods
:
{
openDrawer
()
{
this
.
drawerVisible
=
true
},
closeDrawer
(
val
)
{
if
(
val
)
{
const
time
=
new
Date
(
val
.
time
).
toLocaleTimeString
()
}
this
.
drawerVisible
=
false
showError
(
message
)
{
this
.
$message
({
type
:
'error'
,
message
})
},
closeActivity
()
{
this
.
activityVisible
=
false
},
openCondition
()
{
console
.
log
(
888
)
this
.
activityVisible
=
true
openCondition
(
k
)
{
this
.
$refs
[
`collapse_
${
k
}
`
][
0
].
activityVisible
=
true
},
//保存模板
saveModel
()
{
const
stage
=
this
.
configList
.
map
((
item
,
k
)
=>
{
return
{
[
'stage'
+
(
k
+
1
)]:
{
editable
:
item
.
editable
,
conditions
:
[],
value
:
''
}
if
(
!
this
.
addForm
.
name
)
{
return
this
.
showError
(
'请输入旅程旅程名称!'
)
}
if
(
!
this
.
addForm
.
region
)
{
return
this
.
showError
(
'请选择圈化人群的方式'
)
}
if
(
this
.
configList
.
length
==
0
)
{
return
this
.
showError
(
'请配置客户旅程阶段'
)
}
if
(
!
this
.
configList
[
0
].
label
)
{
return
this
.
showError
(
'请配置客户旅程阶段'
)
}
let
stage
=
{}
this
.
configList
.
forEach
((
item
,
k
)
=>
{
stage
[
'stage'
+
(
k
+
1
)]
=
{
editable
:
item
.
editable
,
conditions
:
item
.
conditionsList
,
value
:
item
.
label
}
})
const
nodes
=
[]
...
...
@@ -136,12 +164,10 @@ export default {
days
.
forEach
(
k
=>
{
nodes
.
push
({
nodeParamDef
:
JSON
.
stringify
({
stage
:
{
defaultValue
:
k
.
stage
,
day
:
{
defaultValue
:
k
.
day
},
time
:
{
defaultValue
:
k
.
time
}
stage
:
{
defaultValue
:
k
.
stage
},
day
:
{
defaultValue
:
k
.
day
},
time
:
{
defaultValue
:
k
.
time
}
}),
nodeProtoId
:
k
.
taskType
...
...
@@ -150,7 +176,7 @@ export default {
})
})
const
dataTypeCode
=
{
d
efaultValue
:
this
.
addForm
.
region
,
d
ataTypeCode
:
{
defaultValue
:
this
.
addForm
.
region
}
,
stages
:
{
defaultValue
:
stage
}
...
...
@@ -158,16 +184,21 @@ export default {
let
params
=
{
tplId
:
this
.
query
.
instId
,
tpl
I
ame
:
this
.
addForm
.
name
,
tpl
N
ame
:
this
.
addForm
.
name
,
tplParamDef
:
JSON
.
stringify
(
dataTypeCode
),
nodes
}
console
.
log
(
params
)
this
.
$apis
.
journeyModel
.
sopTplsSave
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
)
{
this
.
$router
.
go
(
-
1
)
}
})
},
cancelStep
()
{
this
.
$router
.
go
(
-
1
)
},
handleDelete
(
k
)
{
this
.
$confirm
(
'是否确定提交?'
,
'提示'
,
{
confirmButtonText
:
'是'
,
...
...
@@ -183,9 +214,17 @@ export default {
})
.
catch
(()
=>
{})
},
//保存客户旅程阶段配置
saveStep
()
{
const
len
=
this
.
addNo
,
{
label
,
editable
}
=
this
.
modelInput
if
(
!
label
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请输入旅程阶段名称!'
})
return
}
Object
.
assign
(
this
.
configList
[
len
],
{
label
,
editable
})
this
.
addStatus
=
false
},
...
...
@@ -197,6 +236,7 @@ export default {
editable
:
this
.
configList
[
i
].
editable
}
},
//添加客户旅程阶段配置
addStep
()
{
this
.
addStatus
=
true
this
.
modelInput
=
{
...
...
@@ -211,55 +251,77 @@ export default {
})
this
.
addNo
=
this
.
configList
.
length
-
1
},
//获取圈化人群的方式
sopDataTypesList
()
{
this
.
$apis
.
journeyModel
.
sopDataTypesList
({}).
then
(
res
=>
{
this
.
sopDataTypes
=
res
})
},
//获取详情
getDetail
()
{
this
.
$apis
.
journeyModel
.
getInstIdDetail
({
instId
:
'xblc7'
}).
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
}
this
.
$apis
.
journeyModel
.
getInstIdDetail
({
instId
:
this
.
query
.
instId
}).
then
(
res
=>
{
const
instParam
=
JSON
.
parse
(
res
.
tplParamDef
)
this
.
addForm
.
region
=
instParam
.
dataTypeCode
.
defaultValue
const
stages
=
Object
.
values
(
instParam
.
stages
.
defaultValue
)
const
nodes
=
res
.
nodes
const
configList
=
[]
for
(
let
k
in
stages
)
{
for
(
let
i
=
0
;
i
<
stages
.
length
;
i
++
)
{
const
s
=
stages
[
i
]
if
(
!
s
)
continue
let
list
=
[]
for
(
let
v
of
nodes
)
{
if
(
v
.
nodeParam
&&
JSON
.
parse
(
v
.
nodeParam
).
stage
==
stages
[
k
].
value
)
{
list
.
push
(
JSON
.
parse
(
v
.
nodeParam
))
console
.
log
(
v
.
nodeParamDef
&&
JSON
.
parse
(
v
.
nodeParamDef
).
stage
,
'v.nodeParamDef && JSON.parse(v.nodeParamDef).stage'
)
if
(
v
.
nodeParamDef
&&
JSON
.
parse
(
v
.
nodeParamDef
).
stage
.
defaultValue
==
s
.
value
)
{
const
nodeParamDef
=
JSON
.
parse
(
v
.
nodeParamDef
)
list
.
push
({
day
:
nodeParamDef
.
day
?.
defaultValue
,
stage
:
nodeParamDef
.
stage
?.
defaultValue
,
taskType
:
v
.
nodeProtoId
,
stageid
:
nodeParamDef
.
stageid
?.
defaultValue
,
time
:
nodeParamDef
.
time
?.
defaultValue
})
}
}
list
=
list
.
filter
(
item
=>
item
.
day
)
list
.
sort
((
a
,
b
)
=>
{
return
a
.
day
-
b
.
day
})
console
.
log
(
list
,
'list'
)
const
sopList
=
this
.
groupBy
(
list
,
'day'
)
configList
.
push
({
label
:
s
tages
[
k
]
.
value
,
label
:
s
.
value
,
isExpaned
:
false
,
editable
:
s
tages
[
k
].
valu
e
,
conditionsList
:
s
tages
[
k
]
.
conditions
||
[],
editable
:
s
.
editabl
e
,
conditionsList
:
s
.
conditions
||
[],
sopList
})
}
this
.
configList
=
configList
})
},
//清空sop任务
clearSop
()
{
this
.
configList
.
forEach
(
item
=>
{
item
.
conditionsList
=
[]
item
.
sopList
=
[]
})
},
//修改圈化人群的方式
handleSelectType
(
e
)
{
const
code
=
this
.
dataTypeCode
if
(
!
code
)
return
this
.
$confirm
(
'该操作将清空进入条件及SOP任务,是否确认修改?'
,
'提示'
,
{
confirmButtonText
:
'是'
,
cancelButtonText
:
'否'
,
type
:
'warning'
})
.
then
(()
=>
{
this
.
clearSop
()
})
.
catch
(()
=>
{
this
.
addForm
.
region
=
code
})
},
groupBy
(
list
,
name
)
{
const
m
=
new
Map
()
list
.
map
(
item
=>
{
...
...
src/views/journeyModel/components/CollapseItem.vue
View file @
3ffa4bf
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-22 20:36:05
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-03 12:32:18
* @FilePath: \scrm-micro-peregrination\src\views\journeyModel\components\CollapseItem.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 202
3-12-27 20:33:10
* @LastEditTime: 202
4-01-03 10:53:58
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -28,12 +36,15 @@
</div>
<div
class=
"progress-item-content bg-fff"
v-if=
"stepItem.conditionsList.length"
>
<div
class=
"progress-item"
v-for=
"(v, k) in stepItem.conditionsList"
:key=
"k"
>
<span>
条件
{{
k
+
1
}}
</span>
<span>
{{
spiltString
(
v
,
0
)
}}
</span>
<img
src=
"@/assets/config/arrow.png"
v-if=
"spiltString(v, 1)"
/>
<span>
{{
spiltString
(
v
,
1
)
}}
</span>
<div
class=
"progress-item-num"
>
<span>
条件
{{
k
+
1
}}
</span>
<span>
{{
spiltString
(
v
)
}}
</span>
</div>
<div
class=
"progress-edit"
>
<el-button
type=
"text"
@
click
.
stop=
"showEditCondition(v, k)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click
.
stop=
"handleDeleteCondition(k)"
>
删除
</el-button>
</div>
</div>
<div
class=
"progress-edit"
@
click
.
stop=
"showEdit"
>
编辑
</div>
</div>
<div
class=
"empty-panel"
v-else
>
<div
class=
"empty-img"
>
...
...
@@ -59,18 +70,21 @@
</div>
<div
class=
"task-item-content bg-fff"
v-if=
"stepItem.sopList.length"
>
<div
class=
"step-item"
v-for=
"(v, k) in stepItem.sopList"
:key=
"k"
>
<div
class=
"step-item-day"
>
<div
class=
"step-item-day"
v-if=
"v.length"
>
<img
src=
"@/assets/config/step-border.png"
/>
<span
v-if=
"v.length"
>
第
{{
v
[
0
].
day
}}
天
</span>
<span>
第
{{
v
[
0
].
day
}}
天
</span>
</div>
<div
class=
"step-item-content"
>
<div
class=
"step-item-content"
v-if=
"v.length"
>
<div
v-for=
"(value, key) in v"
:key=
"key"
class=
"step-time-item flex-column-center"
>
<div>
<div
class=
"step-item-desc"
>
<span>
[
{{
stage_time
[
value
.
taskType
]
}}
]发送 |
{{
stage
[
value
.
taskType
]
}}
|
{{
stage_info
[
value
.
taskType
]
}}
</span>
</div>
<div
class=
"step-item-name flex-column-center "
v-if=
"value.taskType"
>
<div
class=
"task-type"
>
{{
stage_prefix
[
value
.
taskType
].
key
?
activityInfo
[
stage_prefix
[
value
.
taskType
].
key
]
:
remind
(
stage_prefix
[
value
.
taskType
],
k
)
}}
</div>
<div
class=
"step-item-desc flex-column-center"
>
<div
class=
"step-item_node"
>
<span>
[
{{
value
.
time
}}
]发送 |
{{
stageInfo
([
value
.
taskType
]).
nodeName
}}
|
{{
stageInfo
([
value
.
taskType
]).
desc
}}
</span>
</div>
<div
class=
"step-item_btn"
>
<el-button
type=
"text"
@
click
.
stop=
"handleEdit(value, v, key)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click
.
stop=
"handleDelete(v, key)"
>
删除
</el-button>
</div>
</div>
</div>
<!--
<div
class=
"step-detail-btn"
@
click=
"getEmpDetail"
>
详情
</div>
-->
...
...
@@ -102,14 +116,14 @@
<el-popover
placement=
"top-start"
width=
"100"
trigger=
"click"
>
<div
class=
"popover-panel"
v-for=
"(t, pkey) in v"
:key=
"pkey"
>
<div
class=
"flex-column-center"
>
<span>
{{
stage_time
[
t
.
taskType
]
}}
</span>
<span>
{{
value
.
time
}}
</span>
<div
:class=
"['stage-icon', `stage-$
{stage_icon[t.taskType]}`]">
</div>
</div>
<div
class=
"stage-desc"
>
{{
stage
[
t
.
taskType
]
}}
</div>
<div
class=
"stage-desc"
>
{{
stage
Info
([
t
.
taskType
]).
nodeName
}}
</div>
</div>
<div
slot=
"reference"
class=
"flex-column-center"
v-if=
"v.length
<
= 2">
<span>
{{
stage_time
[
value
.
taskType
]
}}
</span>
<span>
{{
value
.
time
}}
</span>
<div
:class=
"['stage-icon', `stage-$
{stage_icon[value.taskType]}`]">
</div>
</div>
<div
slot=
"reference"
class=
"flex-column-center"
v-if=
"v.length > 2 && key == 0"
>
...
...
@@ -126,6 +140,8 @@
</div>
</div>
<stat-dialog
v-if=
"statVisible"
:statVisible=
"statVisible"
></stat-dialog>
<sop-item
:drawerVisible=
"drawerVisible"
@
closeDrawer=
"closeDrawer"
ref=
"sopForm"
></sop-item>
<concatActivity
:activityVisible=
"activityVisible"
v-if=
"activityVisible"
@
closeActivity=
"closeActivity"
ref=
"activityForm"
></concatActivity>
</div>
</template>
<
script
>
...
...
@@ -184,11 +200,15 @@ const STAGE_PREFIX = Object.freeze({
})
// import editCondition from './editCondition'
import
{
mapMutations
,
mapState
}
from
'vuex'
import
sopItem
from
'./sopItem'
import
concatActivity
from
'./concatActivity'
import
model
from
'@/mixins/model'
export
default
{
mixins
:
[
model
],
components
:
{
// sopItem
// statDialog,
sopItem
,
concatActivity
// editCondition
},
props
:
{
...
...
@@ -203,6 +223,7 @@ export default {
},
data
()
{
return
{
sopIndex
:
[],
stage
:
STAGE
,
stage_icon
:
ICON
,
stage_info
:
STAGE_INFO
,
...
...
@@ -211,62 +232,109 @@ export default {
empVisible
:
false
,
statVisible
:
false
,
conditionVisible
:
false
,
activityVisible
:
false
,
drawerVisible
:
false
}
},
created
()
{},
computed
:
{
...
mapState
(
'model'
,
[
'STEP'
,
'model'
])
},
watch
:
{
STEP
:
{
handler
(
val
)
{
if
(
this
.
model
==
this
.
stepItem
.
label
)
{
this
.
addSopList
(
val
)
}
},
deep
:
true
}
},
methods
:
{
...
mapMutations
(
'model'
,
[
'SET_MODEL'
]),
//获取sop映射字段
stageInfo
(
i
)
{
if
(
this
.
modelList
)
{
return
this
.
modelList
.
find
(
item
=>
item
.
id
==
i
)
}
else
{
return
{
nodeName
:
''
,
desc
:
''
}
}
},
//删除sop任务
handleDelete
(
val
,
k
)
{
val
.
splice
(
k
,
1
)
},
//新增条件
closeActivity
(
val
)
{
if
(
!
val
)
{
this
.
activityVisible
=
false
return
}
const
idx
=
val
.
condition_i
if
(
idx
===
null
)
{
this
.
stepItem
.
conditionsList
.
push
(
val
.
conditionList
)
}
else
{
this
.
stepItem
.
conditionsList
[
idx
]
=
val
.
conditionList
}
this
.
activityVisible
=
false
},
closeDrawer
(
val
)
{
if
(
val
)
this
.
addSopList
(
val
)
this
.
drawerVisible
=
false
},
handleEdit
(
val
,
k1
,
k2
)
{
this
.
sopIndex
=
[
k1
,
k2
]
this
.
drawerVisible
=
true
this
.
$refs
.
sopForm
.
setForm
(
val
)
},
//显示sop弹框
addSop
()
{
this
.
SET_MODEL
(
this
.
stepItem
.
label
)
this
.
$emit
(
'openDrawer'
)
this
.
sopIndex
=
[]
this
.
drawerVisible
=
true
// this.SET_MODEL(this.stepItem.label)
// this.$emit('openDrawer')
},
//显示sop任务
addSopList
(
val
)
{
console
.
log
(
val
,
this
.
stepItem
,
'33333'
)
if
(
this
.
sopIndex
.
length
)
{
const
[
i
,
j
]
=
this
.
sopIndex
i
.
splice
(
j
,
1
)
}
const
i
=
this
.
stepItem
.
sopList
.
findIndex
(
i
=>
{
console
.
log
(
i
,
'i'
)
if
(
i
&&
i
[
0
])
return
i
[
0
].
day
==
val
.
day
}),
model
=
{
day
:
val
.
day
,
stage
:
this
.
model
,
stage
:
this
.
stepItem
.
label
,
time
:
val
.
time
,
taskType
:
val
.
nodeProtoId
}
if
(
i
>
-
1
)
{
this
.
stepItem
.
sopList
[
i
].
push
(
model
)
}
else
{
this
.
stepItem
.
sopList
.
push
([
model
])
}
this
.
stepItem
.
sopList
=
this
.
stepItem
.
sopList
.
filter
(
i
=>
i
[
0
])
this
.
stepItem
.
sopList
.
sort
((
a
,
b
)
=>
a
[
0
].
day
-
b
[
0
].
day
)
},
showEdit
()
{
this
.
$emit
(
'openCondition'
)
showEditCondition
(
val
,
index
)
{
this
.
activityVisible
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
.
activityForm
.
$refs
.
conditionForm
.
setCondition
(
val
,
index
)
})
},
handleDeleteCondition
(
k
)
{
this
.
$confirm
(
'是否确定提交?'
,
'提示'
,
{
confirmButtonText
:
'是'
,
cancelButtonText
:
'否'
,
type
:
'warning'
})
.
then
(()
=>
{
this
.
stepItem
.
conditionsList
.
splice
(
k
,
1
)
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
})
})
.
catch
(()
=>
{})
},
showStat
()
{
this
.
statVisible
=
true
},
remind
(
v
,
k
)
{
if
(
typeof
v
==
'string'
)
return
v
if
(
this
.
stepItem
.
label
==
'保费报价'
)
{
return
v
[
this
.
stepItem
.
label
][
k
]
}
else
{
return
v
[
this
.
stepItem
.
label
]
}
},
spiltString
(
str
,
n
)
{
return
(
str
.
split
(
'-'
)[
n
]
||
''
).
replace
(
'文字备注:'
,
''
)
spiltString
(
val
,
n
)
{
const
title
=
JSON
.
parse
(
val
.
paramRemark
).
title
return
title
// return (title.split('-')[n] || '').replace('文字备注:', '')
},
//查看详情
getEmpDetail
()
{
...
...
@@ -291,6 +359,10 @@ export default {
width
:
48px
;
height
:
30px
;
margin
:
10px
auto
4px
;
img
{
width
:
100%
;
height
:
100%
;
}
}
}
.collapse-item
{
...
...
@@ -360,9 +432,6 @@ export default {
.progress-item-content
{
padding
:
16px
;
margin
:
10px
0px
;
display
:
grid
;
grid-template-columns
:
50%
50%
;
row-gap
:
20px
;
position
:
relative
;
.progress-edit
{
position
:
absolute
;
...
...
@@ -376,10 +445,12 @@ export default {
.progress-item
{
position
:
relative
;
padding-left
:
20px
;
min-width
:
50%
;
height
:
32px
;
display
:
flex
;
align-items
:
center
;
&-num
{
flex
:
1
;
}
img
{
width
:
32px
;
height
:
4px
;
...
...
@@ -392,7 +463,6 @@ export default {
width
:
48px
;
}
&
:last-child
{
width
:
80px
;
}
}
&
::before
{
...
...
@@ -426,8 +496,12 @@ export default {
.step-item
{
.step-time-item
{
width
:
100%
;
padding
:
12px
16px
;
background
:
#f9fafe
;
>
div
{
width
:
100%
;
}
.step-detail-btn
{
margin-left
:
auto
;
font-size
:
14px
;
...
...
@@ -452,6 +526,13 @@ export default {
.step-item-desc
{
font-size
:
14px
;
color
:
#c6c6c6
;
width
:
100%
;
.step-item_node
{
width
:
calc
(
100%
-
100px
);
}
.step-item_btn
{
width
:
100px
;
}
}
.step-item-name
{
font-size
:
14px
;
...
...
src/views/journeyModel/components/concatActivity.vue
View file @
3ffa4bf
...
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-27 11:29:17
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 202
3-12-27 20:44:45
* @LastEditTime: 202
4-01-03 10:23:21
* @FilePath: \scrm-micro-scene\src\views\journeyConfig\components\relatedActivity.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -17,9 +17,13 @@
<label>
旅程阶段:
</label>
<span>
意向客户
</span>
</div>
<condition></condition>
<div
class=
"condition-item flex"
>
<label>
进入条件:
</label>
<condition
ref=
"conditionForm"
></condition>
</div>
<!--
<div
class=
"condition-item flex"
>
<label>
进入条件:
</label>
<div
class=
"condition-panel"
v-if=
"status == 1"
>
<el-select
v-model=
"value"
placeholder=
"请选择"
:size=
"size"
>
<el-option
v-for=
"item in typeOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
...
...
@@ -63,7 +67,7 @@
</div>
</div>
</div>
</div>
</div>
-->
</div>
</GLDialog>
</
template
>
...
...
@@ -78,6 +82,7 @@ export default {
},
data
()
{
return
{
conditionInfo
:
''
,
status
:
1
,
typeOptions
:
[
{
...
...
@@ -128,22 +133,9 @@ export default {
id
:
this
.
conditionList
.
length
})
},
// 成员弹窗
handleConfirm
()
{
console
.
log
(
this
.
$refs
.
membersForm
.
innerTags
)
if
(
this
.
$refs
.
membersForm
.
innerTags
.
length
)
{
// this.basicForm.userList = this.$refs.membersForm.innerTags
this
.
$set
(
this
.
basicForm
,
'userList'
,
this
.
$refs
.
membersForm
.
innerTags
)
this
.
selectData
=
this
.
basicForm
.
userList
this
.
openMembers
()
this
.
isUpdate
=
true
this
.
editStatus
=
true
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
'请选择成员'
})
}
handleSure
()
{
const
{
conditionList
,
condition_i
}
=
this
.
$refs
.
conditionForm
;
this
.
$emit
(
'closeActivity'
,
{
conditionList
,
condition_i
})
},
handleAddEmp
()
{
this
.
membersVisible
=
true
...
...
src/views/journeyModel/components/condition.vue
View file @
3ffa4bf
...
...
@@ -2,75 +2,179 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-25 13:34:43
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 202
3-12-25 15:12:16
* @LastEditTime: 202
4-01-03 10:19:09
* @FilePath: \scrm-micro-peregrination\src\views\journeyModel\components\condition.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<
template
>
<div>
<div
class=
"condition-select flex"
>
<el-select
v-model=
"step"
placeholder=
"请选择"
:size=
"size"
@
change=
"selectStep"
>
<el-option
v-for=
"item in stepList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
<div
class=
"flex"
>
<el-select
v-model=
"conditionIndex"
placeholder=
"请选择"
:size=
"size"
class=
"m-r-10"
v-if=
"this.conditionList.conditions && this.conditionList.conditions.length > 1"
>
<el-option
v-for=
"(item, index) in this.conditionList.conditions"
:key=
"index"
:label=
"item.name"
:value=
"index"
></el-option>
</el-select>
<template
v-if=
"condition && condition.operators && condition.operators.length"
>
<el-select
v-model=
"operators"
@
change=
"condition.operators[operators].value = ''"
placeholder=
"请选择"
:size=
"size"
class=
"m-r-10"
>
<el-option
v-for=
"(item, index) in condition.operators"
:key=
"index"
:label=
"item.name"
:value=
"index"
></el-option>
</el-select>
<div
class=
"condition-input"
v-if=
"condition.operators[operators]"
>
<el-input
v-model=
"condition.operators[operators].value"
></el-input>
</div>
<span>
天
切换到此旅程阶段
</span>
</
template
>
</div>
</div>
<div
class=
"condition-more"
v-if=
"condition && condition.subConditions"
>
<div>
<
template
>
<div
class=
"flex-column-center m-t-10"
v-for=
"(item, k) in condition.subConditions"
:key=
"item.id"
>
<label>
并且满足
</label>
<el-select
v-model=
"item.name"
placeholder=
"请选择"
:size=
"size"
class=
"condition-1"
v-if=
"item.operators"
>
<el-option
v-for=
"itm in [item.name]"
:key=
"itm"
:label=
"itm"
:value=
"itm"
></el-option>
</el-select>
<el-select
v-model=
"item.value"
@
change=
"item.operators[item.value].value = ''"
placeholder=
"请选择"
:size=
"size"
class=
"condition-1"
v-if=
"item.operators"
>
<el-option
v-for=
"(itm, i) in item.operators"
:key=
"i"
:label=
"itm.name"
:value=
"i"
></el-option>
</el-select>
<div
class=
"condition-input"
v-if=
"item.operators[item.value].style == 'input'"
>
<el-input
v-model=
"item.operators[item.value].value"
></el-input>
</div>
<el-select
v-model=
"item.operators[item.value].value"
placeholder=
"请选择"
:size=
"size"
class=
"condition-2"
v-if=
"item.operators[item.value].style == 'select'"
>
<el-option
v-for=
"i in journeyList"
:key=
"i"
:label=
"i"
:value=
"i"
></el-option>
</el-select>
<i
class=
"el-icon-delete"
@
click=
"delCondition(condition.subConditions, k)"
></i>
</div>
<div
class=
"condition-add"
@
click=
"addCondition(condition.subConditions)"
>
<i
class=
"el-icon-circle-plus-outline"
></i>
添加条件
</div>
</
template
>
</div>
</div>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
conditionList
:
[
{
conditions
:
[
{
actionId
:
5
,
id
:
1
,
name
:
'进入旅程'
,
operators
:
[
{
id
:
1
,
name
:
'等于'
,
value
:
'='
},
{
id
:
2
,
name
:
'不等于'
,
value
:
'<>'
}
]
},
{
actionId
:
5
,
id
:
2
,
name
:
'排除以下旅程阶段的客户'
,
operators
:
[{
id
:
8
,
name
:
'不包含'
,
value
:
'nin'
}]
}
],
id
:
5
,
name
:
'进入旅程'
,
type
:
1
},
{
conditions
:
[
{
actionId
:
6
,
id
:
3
,
name
:
'进入旅程'
,
value
:
''
,
operators
:
[{
id
:
1
,
name
:
'等于'
,
value
:
'='
}]
},
{
actionId
:
6
,
id
:
4
,
name
:
'排除以下旅程阶段的客户'
,
operators
:
[{
id
:
8
,
name
:
'不包含'
,
value
:
'nin'
}]
}
],
id
:
6
,
name
:
'进入旅程'
,
type
:
2
},
{
conditions
:
[{
actionId
:
8
,
id
:
5
,
name
:
'成功续保导入系统的客户'
,
operators
:
[]
}],
id
:
8
,
name
:
'基于国任业务'
,
type
:
2
},
{
conditions
:
[
{
type
:
'select'
,
value
:
7
,
operators
:
[
{
actionId
:
9
,
id
:
6
,
name
:
'页面停留'
,
operators
:
[]
},
{
actionId
:
9
,
id
:
7
,
name
:
'页面点击'
,
conditions
:
[{
type
:
'input'
,
unit
:
'秒'
,
value
:
1
},{
type
:
'input'
,
unit
:
'秒'
,
value
:
2
}]
}
]
}
],
id
:
9
,
name
:
'基于页面行为'
,
type
:
2
},
{
conditions
:
[],
id
:
1
,
name
:
'在膨胀金活动种导入的客户'
,
type
:
1
},
{
conditions
:
[],
id
:
2
,
name
:
'在膨胀金活动中下订的客户'
,
type
:
1
},
{
conditions
:
[],
id
:
3
,
name
:
'在膨胀金关联的AI电话中回复高意向的客户'
,
type
:
1
},
{
conditions
:
[],
id
:
4
,
name
:
'查看膨胀金活动的客户'
,
type
:
1
},
{
conditions
:
[],
id
:
7
,
name
:
'添加企微好友'
,
type
:
2
}
],
type
:
1
step
:
''
,
condition_i
:
null
,
conditionIndex
:
0
,
conditionList
:
[],
condition
:
''
,
journeyList
:
[],
stepList
:
[],
operators
:
0
}
},
render
()
{
const
conditionType
=
(
<
el
-
select
v
-
model
=
{
this
.
type
}
placeholder
=
"请选择"
size
=
"small"
class
=
"condition-1"
>
{
this
.
conditionList
.
map
(
item
=>
{
return
<
el
-
option
key
=
{
item
.
id
}
label
=
{
item
.
name
}
value
=
{
item
.
id
}
><
/el-option
>
})}
<
/el-select
>
)
return
<
div
class
=
"condition-panel"
>
{
conditionType
}
<
/div
>
inject
:
[
'stepList'
,
'app'
],
mounted
()
{
const
stepList
=
this
.
app
.
stepList
||
[]
stepList
.
forEach
(
item
=>
{
item
.
conditions
.
forEach
(
i
=>
{
if
(
i
.
subConditions
)
i
.
subConditions
.
forEach
(
j
=>
{
j
.
value
=
0
})
})
})
this
.
stepList
=
stepList
this
.
journeyList
=
this
.
app
.
journeyList
},
watch
:
{
conditionIndex
(
i
)
{
this
.
condition
=
this
.
conditionList
.
conditions
[
i
]
}
},
methods
:
{
setCondition
(
val
,
index
)
{
this
.
step
=
val
.
id
this
.
conditionList
=
this
.
$common
.
utils
.
deepClone
(
val
)
this
.
condition_i
=
index
this
.
condition
=
this
.
conditionList
.
conditions
&&
this
.
conditionList
.
conditions
[
0
]
},
delCondition
(
val
,
k
)
{
val
.
splice
(
k
,
1
)
},
addCondition
(
val
)
{
const
l
=
val
.
length
,
prop
=
this
.
$common
.
utils
.
deepClone
(
val
[
l
-
1
])
prop
.
id
++
val
.
push
(
prop
)
},
selectStep
(
e
)
{
const
conditions
=
this
.
stepList
.
find
(
item
=>
{
return
item
.
id
==
e
})
this
.
conditionList
=
this
.
$common
.
utils
.
deepClone
(
conditions
)
this
.
condition
=
this
.
conditionList
.
conditions
[
0
]
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.dialog-body
{
padding
:
0px
50px
;
}
.require
{
color
:
red
;
}
.condition-item
{
line-height
:
30px
;
font-size
:
14px
;
color
:
#666666
;
.condition-more
{
background
:
#f9f9f9
;
padding
:
20px
;
margin-top
:
10px
;
.condition-1
{
width
:
136px
;
margin
:
0
10px
;
}
.condition-2
{
width
:
136px
;
}
i
{
color
:
#999999
;
margin-left
:
10px
;
cursor
:
pointer
;
}
.condition-add
{
display
:
flex
;
align-items
:
center
;
margin-top
:
10px
;
cursor
:
pointer
;
i
{
font-size
:
20px
;
margin-right
:
6px
;
color
:
#5850ff
;
}
font-size
:
12px
;
color
:
#5850ff
;
}
}
.condition-input
{
a
{
color
:
#5850ff
;
}
/
deep
/
{
.el-input
{
width
:
136px
;
margin
:
0px
4px
;
}
.el-input__inner
{
height
:
32px
;
line-height
:
32px
;
}
}
}
span
{
color
:
#333333
;
}
}
</
style
>
src/views/journeyModel/components/sopItem.vue
View file @
3ffa4bf
...
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-25 14:31:26
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 202
3-12-27 17:00:33
* @LastEditTime: 202
4-01-02 17:59:48
* @FilePath: \scrm-micro-peregrination\src\views\journeyModel\components\sopItem.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AEVid
-->
...
...
@@ -21,10 +21,9 @@
<label>
*
</label>
<span>
请选择触达方式:
</span>
<div
class=
"select-panel"
>
<div
class=
"select-item"
v-for=
"item in
l
ist"
:key=
"item.id"
>
<div
class=
"select-item"
v-for=
"item in
modelL
ist"
:key=
"item.id"
>
<div
class=
"select-value"
>
<el-radio
v-model=
"nodeKey"
:label=
"item.id"
></el-radio>
<span>
{{
item
.
nodeName
}}
</span>
<el-radio
v-model=
"nodeKey"
:label=
"item.id"
>
{{
item
.
nodeName
}}
</el-radio>
</div>
<div
class=
"select-desc"
>
{{
item
.
desc
}}
...
...
@@ -40,32 +39,49 @@
</el-drawer>
</
template
>
<
script
>
import
{
mapMutations
}
from
'vuex'
export
default
{
props
:
{
drawerVisible
:
Boolean
drawerVisible
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{
nodeKey
:
''
,
day
:
0
,
time
:
''
,
list
:
[]
list
:
[],
modelList
:
[]
}
},
mounted
()
{
this
.
SopTplNodeProtosList
()
inject
:
[
'app'
],
watch
:{
drawerVisible
(
val
)
{
if
(
val
)
{
this
.
getModelList
()
}
}
},
methods
:
{
...
mapMutations
(
'model'
,
[
'SET_STEP'
]),
getModelList
()
{
this
.
$apis
.
journeyModel
.
SopTplNodeProtosList
({
dataTypeCode
:
this
.
app
.
dataTypeCode
}).
then
(
res
=>
{
this
.
modelList
=
res
})
},
saveForm
()
{
const
model
=
{
time
:
this
.
time
,
time
:
new
Date
(
this
.
time
).
toLocaleTimeString
().
substring
(
0
,
5
)
,
day
:
this
.
day
,
nodeProtoId
:
this
.
nodeKey
}
this
.
$emit
(
'closeDrawer'
,
model
)
this
.
SET_STEP
(
model
)
},
setForm
(
val
)
{
const
{
day
,
time
,
taskType
}
=
val
this
.
day
=
day
this
.
time
=
time
this
.
nodeKey
=
taskType
},
handleClose
()
{
this
.
$emit
(
'closeDrawer'
)
...
...
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