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 bfd52cba
authored
Jan 09, 2024
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug修复
1 parent
30076dbf
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
145 additions
and
130 deletions
src/mixins/model.js
src/views/journeyConfig/add.vue
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/mixins/model.js
View file @
bfd52cb
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2024-01-03 12:23:36
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-09 15:35:11
* @FilePath: \scrm-micro-peregrination\src\mixins\model.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
{
mapActions
,
mapState
}
from
'vuex'
import
{
mapActions
,
mapState
}
from
'vuex'
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -14,6 +22,46 @@ export default {
...
@@ -14,6 +22,46 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
...
mapActions
(
'model'
,
[
'setModelList'
])
...
mapActions
(
'model'
,
[
'setModelList'
]),
spiltString
(
data
,
n
)
{
let
title
=
''
try
{
title
+=
JSON
.
parse
(
data
.
paramRemark
).
title
}
catch
(
error
)
{
console
.
log
(
error
)
}
if
(
!
data
.
flag
)
{
return
data
.
name
}
const
val
=
data
.
conditions
.
find
(
i
=>
i
.
id
==
data
.
flag
)
try
{
title
+=
JSON
.
parse
(
val
.
paramRemark
).
title
let
day
=
''
if
(
val
.
operators
&&
val
.
operators
.
length
)
{
val
.
operators
.
forEach
(
item
=>
{
if
(
item
.
value
)
{
day
=
[
item
.
name
,
item
.
value
]
}
})
}
console
.
log
(
val
.
operators
,
day
,
'dat'
)
if
(
/
\[
.*
\]
/
.
test
(
title
)
&&
day
.
length
==
2
)
{
title
=
title
.
replace
(
/
\[
.*
?\]
/
,
day
[
0
]).
replace
(
/
\[
.*
?\]
/
,
day
[
1
])
}
}
catch
(
error
)
{
console
.
log
(
error
)
}
val
&&
val
.
subConditions
&&
val
.
subConditions
.
length
&&
val
.
subConditions
.
forEach
(
i
=>
{
i
.
operators
.
forEach
(
o
=>
{
if
(
o
.
value
)
{
title
+=
`并且满足
${
i
.
name
}${
o
.
name
}${
o
.
value
}
`
}
})
})
return
title
}
}
}
}
}
src/views/journeyConfig/add.vue
View file @
bfd52cb
...
@@ -12,8 +12,7 @@
...
@@ -12,8 +12,7 @@
<div
v-if=
"currentIndex == '1'"
>
<div
v-if=
"currentIndex == '1'"
>
<!--
<div
class=
"journey-step-info"
v-for=
"(val, k) in configList"
:key=
"k"
>
-->
<!--
<div
class=
"journey-step-info"
v-for=
"(val, k) in configList"
:key=
"k"
>
-->
<!-- configList-->
<!-- configList-->
<collapse-item-tpl
ref=
"collapseRef"
:configList=
"configList"
<collapse-item-tpl
ref=
"collapseRef"
:configList=
"configList"
:isDisabled=
"isDisabled"
></collapse-item-tpl>
:isDisabled=
"isDisabled"
></collapse-item-tpl>
<!--
</div>
-->
<!--
</div>
-->
</div>
</div>
<DistributionStore
v-if=
"currentIndex == '2'"
></DistributionStore>
<DistributionStore
v-if=
"currentIndex == '2'"
></DistributionStore>
...
@@ -22,15 +21,14 @@
...
@@ -22,15 +21,14 @@
</
template
>
</
template
>
</step-bar>
</step-bar>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
StepBar
from
'./components/StepBar.vue'
import
StepBar
from
'./components/StepBar.vue'
import
CollapseItemTpl
from
'./components/CollapseItemTpl'
import
CollapseItemTpl
from
'./components/CollapseItemTpl'
import
SelJourneyTemplate
from
"./components/selJourneyTemplate"
;
import
SelJourneyTemplate
from
'./components/selJourneyTemplate'
import
DistributionStore
from
"./components/DistributionStore"
;
import
DistributionStore
from
'./components/DistributionStore'
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -39,7 +37,7 @@ export default {
...
@@ -39,7 +37,7 @@ export default {
CollapseItemTpl
,
CollapseItemTpl
,
DistributionStore
DistributionStore
},
},
name
:
"add"
,
name
:
'add'
,
data
()
{
data
()
{
return
{
return
{
ruleForm
:
{
ruleForm
:
{
...
@@ -47,9 +45,7 @@ export default {
...
@@ -47,9 +45,7 @@ export default {
region
:
''
region
:
''
},
},
rules
:
{
rules
:
{
region
:
[
region
:
[{
required
:
true
,
message
:
'请选择活动区域'
,
trigger
:
'change'
}]
{
required
:
true
,
message
:
'请选择活动区域'
,
trigger
:
'change'
}
],
},
},
titleConfig
:
{
titleConfig
:
{
'0'
:
'旅程模板'
,
'0'
:
'旅程模板'
,
...
@@ -144,18 +140,17 @@ export default {
...
@@ -144,18 +140,17 @@ export default {
},
},
mounted
()
{
mounted
()
{
// this.$bus.$off('whetherToProceedNext')
// this.$bus.$off('whetherToProceedNext')
this
.
$bus
.
$on
(
'whetherToProceedNext'
,
(
data
)
=>
{
this
.
$bus
.
$on
(
'whetherToProceedNext'
,
data
=>
{
const
query
=
data
.
tplId
const
query
=
data
.
tplId
this
.
getDetail
(
query
)
this
.
getDetail
(
query
)
})
})
},
},
methods
:
{
methods
:
{
changeIndex
(
currentInex
)
{
changeIndex
(
currentInex
)
{
this
.
currentIndex
=
currentInex
this
.
currentIndex
=
currentInex
},
},
getDetail
(
val
)
{
getDetail
(
val
)
{
this
.
$apis
.
journeyConfig
.
getSOPDetailsApi
({
tplId
:
val
}).
then
(
res
=>
{
this
.
$apis
.
journeyConfig
.
getSOPDetailsApi
({
tplId
:
val
}).
then
(
res
=>
{
const
tplParamDef
=
JSON
.
parse
(
res
.
tplParamDef
)
const
tplParamDef
=
JSON
.
parse
(
res
.
tplParamDef
)
const
stages
=
tplParamDef
.
stages
.
defaultValue
const
stages
=
tplParamDef
.
stages
.
defaultValue
const
customData
=
tplParamDef
.
customData
.
defaultValue
const
customData
=
tplParamDef
.
customData
.
defaultValue
...
@@ -168,9 +163,10 @@ export default {
...
@@ -168,9 +163,10 @@ export default {
list
.
push
({
list
.
push
({
...
JSON
.
parse
(
v
.
nodeParamDef
),
...
JSON
.
parse
(
v
.
nodeParamDef
),
nodeSkipable
:
v
.
nodeSkipable
,
nodeSkipable
:
v
.
nodeSkipable
,
nodeProtoId
:
v
.
nodeProtoId
,
nodeId
:
v
.
nodeId
,
nodeId
:
v
.
nodeId
,
nodeSkip
:
'0'
,
nodeSkip
:
'0'
,
nodeVisible
:
v
.
nodeVisible
,
// nodeVisible 0 节点不可见 1 可见
nodeVisible
:
v
.
nodeVisible
,
// nodeVisible 0 节点不可见 1 可见
customData
customData
})
})
}
}
...
@@ -180,12 +176,12 @@ export default {
...
@@ -180,12 +176,12 @@ export default {
return
a
.
day
.
defaultValue
-
b
.
day
.
defaultValue
return
a
.
day
.
defaultValue
-
b
.
day
.
defaultValue
})
})
let
sopList
=
this
.
groupBy
(
list
,
'day.defaultValue'
)
let
sopList
=
this
.
groupBy
(
list
,
'day.defaultValue'
)
sopList
=
sopList
.
map
(
function
(
arr
)
{
sopList
=
sopList
.
map
(
function
(
arr
)
{
return
arr
.
filter
(
function
(
obj
)
{
return
arr
.
filter
(
function
(
obj
)
{
// nodeVisible 0 节点不可见 1 可见
// nodeVisible 0 节点不可见 1 可见
return
obj
.
nodeVisible
==
1
;
return
obj
.
nodeVisible
==
1
})
;
})
})
;
})
configList
.
push
({
configList
.
push
({
label
:
stages
[
k
].
value
,
label
:
stages
[
k
].
value
,
isExpaned
:
true
,
isExpaned
:
true
,
...
@@ -195,7 +191,6 @@ export default {
...
@@ -195,7 +191,6 @@ export default {
}
}
console
.
log
(
configList
,
'configList'
)
console
.
log
(
configList
,
'configList'
)
this
.
configList
=
configList
this
.
configList
=
configList
})
})
},
},
groupBy
(
list
,
name
)
{
groupBy
(
list
,
name
)
{
...
@@ -222,11 +217,10 @@ export default {
...
@@ -222,11 +217,10 @@ export default {
customClass
,
customClass
,
type
:
'warning'
type
:
'warning'
})
})
.
then
(()
=>
{
.
then
(()
=>
{
callback
()
callback
()
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{})
})
},
},
//开启
//开启
haneldOpen
()
{
haneldOpen
()
{
...
@@ -245,8 +239,7 @@ export default {
...
@@ -245,8 +239,7 @@ export default {
changeNode
(
val
)
{
changeNode
(
val
)
{
console
.
log
(
val
)
console
.
log
(
val
)
}
}
},
}
}
}
</
script
>
</
script
>
...
...
src/views/journeyConfig/components/CollapseItem.vue
View file @
bfd52cb
...
@@ -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
8 13:55:46
* @LastEditTime: 2024-01-0
9 15:34:19
* @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
-->
-->
...
@@ -258,29 +258,6 @@ export default {
...
@@ -258,29 +258,6 @@ export default {
}
}
}
}
},
},
spiltString
(
data
,
n
)
{
if
(
!
data
.
flag
)
{
return
data
.
name
}
const
val
=
data
.
conditions
.
find
(
i
=>
i
.
id
==
data
.
flag
)
let
title
=
''
try
{
title
+=
JSON
.
parse
(
val
.
paramRemark
).
title
}
catch
(
error
)
{
console
.
log
(
error
)
}
val
&&
val
.
subConditions
&&
val
.
subConditions
.
length
&&
val
.
subConditions
.
forEach
(
i
=>
{
i
.
operators
.
forEach
(
o
=>
{
if
(
o
.
value
)
{
title
+=
`并且满足
${
i
.
name
}${
o
.
name
}${
o
.
value
}
`
}
})
})
return
title
},
//查看详情
//查看详情
getEmpDetail
()
{
getEmpDetail
()
{
this
.
empVisible
=
true
this
.
empVisible
=
true
...
...
src/views/journeyConfig/components/CollapseItemTpl.vue
View file @
bfd52cb
...
@@ -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-08 1
3:55:00
* @LastEditTime: 2024-01-08 1
7:59:32
* @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
-->
-->
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
<div
v-for=
"(value, key) in v"
:key=
"key"
class=
"step-time-item flex-column-center"
>
<div
v-for=
"(value, key) in v"
:key=
"key"
class=
"step-time-item flex-column-center"
>
<div
style=
"width: 100%"
>
<div
style=
"width: 100%"
>
<div
class=
"step-item-desc"
v-if=
"value.taskType"
>
<div
class=
"step-item-desc"
v-if=
"value.taskType"
>
<span>
{{
value
.
time
.
defaultValue
}}
发送 |
{{
stageInfo
([
value
.
taskType
.
defaultValue
]).
nodeName
}}
|
{{
stageInfo
([
value
.
taskType
.
defaultValue
]).
desc
}}
</span>
<span>
{{
value
.
time
.
defaultValue
}}
发送 |
{{
stageInfo
([
value
.
nodeProtoId
]).
nodeName
}}
|
{{
stageInfo
([
value
.
nodeProtoId
]).
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>
<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>
<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>
...
@@ -242,30 +242,6 @@ export default {
...
@@ -242,30 +242,6 @@ export default {
}
}
}
}
},
},
spiltString
(
data
,
n
)
{
console
.
log
(
data
,
8
)
if
(
!
data
.
flag
)
{
return
data
.
name
}
const
val
=
data
.
conditions
.
find
(
i
=>
i
.
id
==
data
.
flag
)
let
title
=
''
try
{
title
+=
JSON
.
parse
(
val
.
paramRemark
).
title
}
catch
(
error
)
{
console
.
log
(
error
)
}
val
&&
val
.
subConditions
&&
val
.
subConditions
.
length
&&
val
.
subConditions
.
forEach
(
i
=>
{
i
.
operators
.
forEach
(
o
=>
{
if
(
o
.
value
)
{
title
+=
`并且满足
${
i
.
name
}${
o
.
name
}${
o
.
value
}
`
}
})
})
return
title
},
//查看详情
//查看详情
getEmpDetail
()
{
getEmpDetail
()
{
this
.
empVisible
=
true
this
.
empVisible
=
true
...
...
src/views/journeyModel/add.vue
View file @
bfd52cb
...
@@ -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 14:47:20
* @LastEditTime: 2024-01-0
9 14:02:39
* @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
-->
-->
...
@@ -31,15 +31,15 @@
...
@@ -31,15 +31,15 @@
</div>
</div>
<div
class=
"journey-step-info"
v-for=
"(val, k) in configList"
:key=
"k"
>
<div
class=
"journey-step-info"
v-for=
"(val, k) in configList"
:key=
"k"
>
<template
v-if=
"val.label"
>
<template
v-if=
"val.label"
>
<collapse-item
:stepItem=
"val"
:activity
Info=
"activityInfo
"
:key=
"k"
:ref=
"`collapse_$
{k}`">
<collapse-item
:stepItem=
"val"
:activity
Name=
"addForm.name
"
:key=
"k"
:ref=
"`collapse_$
{k}`">
<el-button
type=
"text"
@
click
.
stop=
"openCondition(k)"
>
新增条件
</el-button>
<el-button
type=
"text"
@
click
.
stop=
"openCondition(k
, val
)"
>
新增条件
</el-button>
<el-button
type=
"text"
@
click
.
stop=
"handleEditJ(k)"
>
编辑名称
</el-button>
<el-button
type=
"text"
@
click
.
stop=
"handleEditJ(k)"
>
编辑名称
</el-button>
<el-button
type=
"text"
@
click
.
stop=
"handleDelete(k)"
>
删除阶段
</el-button>
<el-button
type=
"text"
@
click
.
stop=
"handleDelete(k)"
>
删除阶段
</el-button>
</collapse-item>
</collapse-item>
</
template
>
</
template
>
<div
class=
"journey-add-panel"
v-if=
"addStatus && k == addNo"
>
<div
class=
"journey-add-panel"
v-if=
"addStatus && k == addNo"
>
<div
class=
"flex-column-center "
>
<div
class=
"flex-column-center "
>
<el-input
v-model
.
trim=
"modelInput.label"
></el-input>
<el-input
v-model
.
trim=
"modelInput.label"
maxLength=
"20"
></el-input>
<div
class=
"mark-item"
>
<div
class=
"mark-item"
>
<label>
手动标记:
</label>
<label>
手动标记:
</label>
<el-radio-group
v-model=
"modelInput.editable"
>
<el-radio-group
v-model=
"modelInput.editable"
>
...
@@ -76,6 +76,7 @@ export default {
...
@@ -76,6 +76,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
isEdit
:
false
,
drawerVisible
:
false
,
drawerVisible
:
false
,
dataTypeCode
:
''
,
dataTypeCode
:
''
,
sopDataTypes
:
[],
sopDataTypes
:
[],
...
@@ -133,8 +134,9 @@ export default {
...
@@ -133,8 +134,9 @@ export default {
closeActivity
()
{
closeActivity
()
{
this
.
activityVisible
=
false
this
.
activityVisible
=
false
},
},
openCondition
(
k
)
{
openCondition
(
k
,
val
)
{
this
.
$refs
[
`collapse_
${
k
}
`
][
0
].
activityVisible
=
true
this
.
$refs
[
`collapse_
${
k
}
`
][
0
].
activityVisible
=
true
this
.
$refs
[
`collapse_
${
k
}
`
][
0
].
activityConfig
=
{
...
val
,
name
:
this
.
addForm
.
name
}
},
},
//保存模板
//保存模板
saveModel
()
{
saveModel
()
{
...
@@ -144,12 +146,6 @@ export default {
...
@@ -144,12 +146,6 @@ export default {
if
(
!
this
.
addForm
.
region
)
{
if
(
!
this
.
addForm
.
region
)
{
return
this
.
showError
(
'请选择圈化人群的方式'
)
return
this
.
showError
(
'请选择圈化人群的方式'
)
}
}
if
(
this
.
configList
.
length
==
0
)
{
return
this
.
showError
(
'请配置客户旅程阶段'
)
}
if
(
!
this
.
configList
[
0
].
label
)
{
return
this
.
showError
(
'请配置客户旅程阶段'
)
}
let
stage
=
{}
let
stage
=
{}
this
.
configList
.
forEach
((
item
,
k
)
=>
{
this
.
configList
.
forEach
((
item
,
k
)
=>
{
stage
[
'stage'
+
(
k
+
1
)]
=
{
stage
[
'stage'
+
(
k
+
1
)]
=
{
...
@@ -175,6 +171,7 @@ export default {
...
@@ -175,6 +171,7 @@ export default {
})
})
})
})
})
})
const
dataTypeCode
=
{
const
dataTypeCode
=
{
dataTypeCode
:
{
defaultValue
:
this
.
addForm
.
region
},
dataTypeCode
:
{
defaultValue
:
this
.
addForm
.
region
},
stages
:
{
stages
:
{
...
@@ -188,8 +185,7 @@ export default {
...
@@ -188,8 +185,7 @@ export default {
tplParamDef
:
JSON
.
stringify
(
dataTypeCode
),
tplParamDef
:
JSON
.
stringify
(
dataTypeCode
),
nodes
nodes
}
}
console
.
log
(
params
)
console
.
log
(
params
,
7
)
this
.
$apis
.
journeyModel
.
sopTplsSave
(
params
).
then
(
res
=>
{
this
.
$apis
.
journeyModel
.
sopTplsSave
(
params
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
this
.
$router
.
go
(
-
1
)
this
.
$router
.
go
(
-
1
)
...
@@ -197,10 +193,18 @@ export default {
...
@@ -197,10 +193,18 @@ export default {
})
})
},
},
cancelModel
()
{
cancelModel
()
{
this
.
$router
.
go
(
-
1
)
this
.
$confirm
(
'内容尚未保存,是否确认返回到列表'
,
'提示'
,
{
confirmButtonText
:
'是'
,
cancelButtonText
:
'否'
,
type
:
'warning'
})
.
then
(()
=>
{
this
.
$router
.
go
(
-
1
)
})
.
catch
(()
=>
{})
},
},
handleDelete
(
k
)
{
handleDelete
(
k
)
{
this
.
$confirm
(
'
是否确定提交
?'
,
'提示'
,
{
this
.
$confirm
(
'
删除旅程阶段不影响已经下发的旅程实例
?'
,
'提示'
,
{
confirmButtonText
:
'是'
,
confirmButtonText
:
'是'
,
cancelButtonText
:
'否'
,
cancelButtonText
:
'否'
,
type
:
'warning'
type
:
'warning'
...
@@ -230,10 +234,12 @@ export default {
...
@@ -230,10 +234,12 @@ export default {
},
},
cancelStep
()
{
cancelStep
()
{
this
.
addStatus
=
false
this
.
addStatus
=
false
if
(
this
.
isEdit
)
return
this
.
configList
.
splice
(
this
.
addNo
,
1
)
this
.
configList
.
splice
(
this
.
addNo
,
1
)
},
},
handleEditJ
(
i
)
{
handleEditJ
(
i
)
{
this
.
addNo
=
i
this
.
addNo
=
i
this
.
isEdit
=
true
this
.
addStatus
=
true
this
.
addStatus
=
true
this
.
modelInput
=
{
this
.
modelInput
=
{
label
:
this
.
configList
[
i
].
label
,
label
:
this
.
configList
[
i
].
label
,
...
@@ -242,10 +248,11 @@ export default {
...
@@ -242,10 +248,11 @@ export default {
},
},
//添加客户旅程阶段配置
//添加客户旅程阶段配置
addStep
()
{
addStep
()
{
this
.
isEdit
=
false
this
.
addStatus
=
true
this
.
addStatus
=
true
this
.
modelInput
=
{
this
.
modelInput
=
{
label
:
''
,
label
:
''
,
editable
:
fals
e
editable
:
tru
e
}
}
this
.
configList
.
push
({
this
.
configList
.
push
({
label
:
''
,
label
:
''
,
...
...
src/views/journeyModel/components/CollapseItem.vue
View file @
bfd52cb
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-22 20:36:05
* @Date: 2023-12-22 20:36:05
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-0
8 13:47:39
* @LastEditTime: 2024-01-0
9 14:50:35
* @FilePath: \scrm-micro-peregrination\src\views\journeyModel\components\CollapseItem.vue
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
</div>
</div>
<div
class=
"task-item-name"
>
进入条件
</div>
<div
class=
"task-item-name"
>
进入条件
</div>
<div
class=
"task-item-desc"
>
(描述用户触发何种条件后,将自动变更为该旅程阶段)
</div>
<div
class=
"task-item-desc"
>
(描述用户触发何种条件后,将自动变更为该旅程阶段)
</div>
<div
class=
"task-item-mark"
v-if=
"stepItem.editable"
>
该旅程阶段支持手动标记
</div>
</div>
</div>
<div
class=
"progress-item-content bg-fff"
v-if=
"stepItem.conditionsList.length"
>
<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"
>
<div
class=
"progress-item"
v-for=
"(v, k) in stepItem.conditionsList"
:key=
"k"
>
...
@@ -141,7 +142,7 @@
...
@@ -141,7 +142,7 @@
</div>
</div>
<stat-dialog
v-if=
"statVisible"
:statVisible=
"statVisible"
></stat-dialog>
<stat-dialog
v-if=
"statVisible"
:statVisible=
"statVisible"
></stat-dialog>
<sop-item
:drawerVisible=
"drawerVisible"
@
closeDrawer=
"closeDrawer"
ref=
"sopForm"
></sop-item>
<sop-item
:drawerVisible=
"drawerVisible"
@
closeDrawer=
"closeDrawer"
ref=
"sopForm"
></sop-item>
<concatActivity
:activityVisible=
"activityVisible"
v-if=
"activityVisible"
@
closeActivity=
"closeActivity"
ref=
"activityForm"
></concatActivity>
<concatActivity
:activityVisible=
"activityVisible"
:activityConfig=
"activityConfig"
v-if=
"activityVisible"
@
closeActivity=
"closeActivity"
ref=
"activityForm"
></concatActivity>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -216,13 +217,11 @@ export default {
...
@@ -216,13 +217,11 @@ export default {
type
:
Object
,
type
:
Object
,
default
:
()
=>
{}
default
:
()
=>
{}
},
},
activityInfo
:
{
activityName
:
String
type
:
Object
,
default
:
()
=>
{}
}
},
},
data
()
{
data
()
{
return
{
return
{
activityConfig
:
{},
sopIndex
:
[],
sopIndex
:
[],
stage
:
STAGE
,
stage
:
STAGE
,
stage_icon
:
ICON
,
stage_icon
:
ICON
,
...
@@ -307,6 +306,10 @@ export default {
...
@@ -307,6 +306,10 @@ export default {
this
.
stepItem
.
sopList
.
sort
((
a
,
b
)
=>
a
[
0
].
day
-
b
[
0
].
day
)
this
.
stepItem
.
sopList
.
sort
((
a
,
b
)
=>
a
[
0
].
day
-
b
[
0
].
day
)
},
},
showEditCondition
(
val
,
index
)
{
showEditCondition
(
val
,
index
)
{
this
.
activityConfig
=
{
label
:
this
.
stepItem
.
label
,
name
:
this
.
activityName
}
this
.
activityVisible
=
true
this
.
activityVisible
=
true
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
activityForm
.
$refs
.
conditionForm
.
setCondition
(
val
,
index
)
this
.
$refs
.
activityForm
.
$refs
.
conditionForm
.
setCondition
(
val
,
index
)
...
@@ -331,29 +334,7 @@ export default {
...
@@ -331,29 +334,7 @@ export default {
showStat
()
{
showStat
()
{
this
.
statVisible
=
true
this
.
statVisible
=
true
},
},
spiltString
(
data
,
n
)
{
if
(
!
data
.
flag
)
{
return
data
.
name
}
const
val
=
data
.
conditions
.
find
(
i
=>
i
.
id
==
data
.
flag
)
let
title
=
''
try
{
title
+=
JSON
.
parse
(
val
.
paramRemark
).
title
}
catch
(
error
)
{
console
.
log
(
error
)
}
val
&&
val
.
subConditions
&&
val
.
subConditions
.
length
&&
val
.
subConditions
.
forEach
(
i
=>
{
i
.
operators
.
forEach
(
o
=>
{
if
(
o
.
value
)
{
title
+=
`并且满足
${
i
.
name
}${
o
.
name
}${
o
.
value
}
`
}
})
})
return
title
},
//查看详情
//查看详情
getEmpDetail
()
{
getEmpDetail
()
{
this
.
empVisible
=
true
this
.
empVisible
=
true
...
@@ -435,6 +416,11 @@ export default {
...
@@ -435,6 +416,11 @@ export default {
color
:
#999999
;
color
:
#999999
;
font-size
:
12px
;
font-size
:
12px
;
}
}
.task-item-mark
{
color
:
#999999
;
font-size
:
12px
;
margin-left
:
auto
;
}
.task-item-add
{
.task-item-add
{
margin-left
:
auto
;
margin-left
:
auto
;
}
}
...
...
src/views/journeyModel/components/concatActivity.vue
View file @
bfd52cb
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-27 11:29:17
* @Date: 2023-09-27 11:29:17
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-0
8 12:27:57
* @LastEditTime: 2024-01-0
9 13:39:49
* @FilePath: \scrm-micro-scene\src\views\journeyConfig\components\relatedActivity.vue
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -11,11 +11,11 @@
...
@@ -11,11 +11,11 @@
<div
class=
"dialog-body"
>
<div
class=
"dialog-body"
>
<div
class=
"condition-item"
>
<div
class=
"condition-item"
>
<label>
客户旅程:
</label>
<label>
客户旅程:
</label>
<span>
续保招揽旅程
</span>
<span>
{{
activityConfig
.
name
}}
</span>
</div>
</div>
<div
class=
"condition-item"
>
<div
class=
"condition-item"
>
<label>
旅程阶段:
</label>
<label>
旅程阶段:
</label>
<span>
意向客户
</span>
<span>
{{
activityConfig
.
label
}}
</span>
</div>
</div>
<div
class=
"condition-item flex"
>
<div
class=
"condition-item flex"
>
<label>
进入条件:
</label>
<label>
进入条件:
</label>
...
@@ -78,7 +78,12 @@ export default {
...
@@ -78,7 +78,12 @@ export default {
condition
condition
},
},
props
:
{
props
:
{
activityVisible
:
Boolean
activityVisible
:
Boolean
,
activityConfig
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
},
data
()
{
data
()
{
return
{
return
{
...
...
src/views/journeyModel/components/condition.vue
View file @
bfd52cb
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-25 13:34:43
* @Date: 2023-12-25 13:34:43
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-0
8 13:33:3
8
* @LastEditTime: 2024-01-0
9 14:29:1
8
* @FilePath: \scrm-micro-peregrination\src\views\journeyModel\components\condition.vue
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<el-option
v-for=
"(item, index) in condition.operators"
:key=
"index"
:label=
"item.name"
:value=
"index"
></el-option>
<el-option
v-for=
"(item, index) in condition.operators"
:key=
"index"
:label=
"item.name"
:value=
"index"
></el-option>
</el-select>
</el-select>
<div
class=
"condition-input"
v-if=
"condition.operators[operators]"
>
<div
class=
"condition-input"
v-if=
"condition.operators[operators]"
>
<el-input
v-model=
"condition.operators[operators].value"
></el-input>
<el-input
v-model=
"condition.operators[operators].value"
maxLength=
"3"
onKeypress=
"return(/^[0-9]*$/.test(String.fromCharCode(event.keyCode)))"
></el-input>
</div>
</div>
<span>
天
切换到此旅程阶段
</span>
<span>
天
切换到此旅程阶段
</span>
</
template
>
</
template
>
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
<el-select
v-model=
"item.operators[item.value].value"
placeholder=
"请选择"
:size=
"size"
class=
"condition-2"
v-if=
"item.operators[item.value].style == 'select'"
>
<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-option
v-for=
"i in journeyList"
:key=
"i"
:label=
"i"
:value=
"i"
></el-option>
</el-select>
</el-select>
<span>
{{
item
.
operators
[
item
.
value
].
unit
}}
</span>
<i
class=
"el-icon-delete"
@
click=
"delCondition(condition.subConditions, k)"
></i>
<i
class=
"el-icon-delete"
@
click=
"delCondition(condition.subConditions, k)"
></i>
</div>
</div>
<div
class=
"condition-add"
@
click=
"addCondition(condition.subConditions)"
>
<div
class=
"condition-add"
@
click=
"addCondition(condition.subConditions)"
>
...
@@ -62,6 +63,7 @@ export default {
...
@@ -62,6 +63,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
step
:
''
,
step
:
''
,
addInfo
:
{},
condition_i
:
null
,
condition_i
:
null
,
conditionIndex
:
0
,
conditionIndex
:
0
,
operators
:
0
,
operators
:
0
,
...
@@ -129,12 +131,18 @@ export default {
...
@@ -129,12 +131,18 @@ export default {
this
.
condition_i
=
index
this
.
condition_i
=
index
this
.
condition
=
this
.
conditionList
.
conditions
&&
this
.
conditionList
.
conditions
[
0
]
this
.
condition
=
this
.
conditionList
.
conditions
&&
this
.
conditionList
.
conditions
[
0
]
},
},
// 保存最后一项用于新增
delCondition
(
val
,
k
)
{
delCondition
(
val
,
k
)
{
if
(
val
.
length
==
1
)
{
this
.
addInfo
=
this
.
$common
.
utils
.
deepClone
(
val
[
0
])
}
val
.
splice
(
k
,
1
)
val
.
splice
(
k
,
1
)
},
},
// 新增条件
addCondition
(
val
)
{
addCondition
(
val
)
{
cons
t
l
=
val
.
length
,
le
t
l
=
val
.
length
,
prop
=
this
.
$common
.
utils
.
deepClone
(
val
[
l
-
1
])
prop
=
this
.
$common
.
utils
.
deepClone
(
val
[
l
-
1
])
if
(
!
prop
)
prop
=
this
.
addInfo
prop
.
id
++
prop
.
id
++
val
.
push
(
prop
)
val
.
push
(
prop
)
},
},
...
...
src/views/journeyModel/components/sopItem.vue
View file @
bfd52cb
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-25 14:31:26
* @Date: 2023-12-25 14:31:26
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-0
4 10:57:42
* @LastEditTime: 2024-01-0
9 15:19:18
* @FilePath: \scrm-micro-peregrination\src\views\journeyModel\components\sopItem.vue
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AEVid
-->
-->
...
@@ -69,7 +69,22 @@ export default {
...
@@ -69,7 +69,22 @@ export default {
this
.
modelList
=
res
this
.
modelList
=
res
})
})
},
},
showError
(
message
)
{
this
.
$message
({
type
:
'error'
,
message
})
},
saveForm
()
{
saveForm
()
{
if
(
!
this
.
day
)
{
return
this
.
showError
(
'请设置营销时间'
)
}
if
(
!
this
.
time
)
{
return
this
.
showError
(
'请设置营销时间'
)
}
if
(
!
this
.
nodeKey
)
{
return
this
.
showError
(
'请选择触达方式'
)
}
const
model
=
{
const
model
=
{
time
:
this
.
time
,
time
:
this
.
time
,
day
:
this
.
day
,
day
:
this
.
day
,
...
...
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