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 332981a0
authored
Oct 08, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复一轮测试bug
1 parent
4fa2c34e
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
100 additions
and
48 deletions
src/api/modules/journeyConfig.js
src/assets/config/empty-sop.png
src/views/journeyConfig/add.vue
src/views/journeyConfig/components/CollapseItem.vue
src/views/journeyConfig/components/CollapseItemTpl.vue
src/views/journeyConfig/components/DistributionStore.vue
src/views/journeyConfig/components/StepBar.vue
src/views/journeyConfig/details.vue
src/views/journeyConfig/index.vue
src/api/modules/journeyConfig.js
View file @
332981a
...
...
@@ -62,7 +62,8 @@ const sopInstsApi = (params) => {
method
:
'POST'
,
data
:
params
,
sign
:
false
,
noSessionId
:
true
noSessionId
:
true
,
returnAll
:
true
})
}
...
...
src/assets/config/empty-sop.png
0 → 100644
View file @
332981a
1.58 KB
src/views/journeyConfig/add.vue
View file @
332981a
...
...
@@ -164,7 +164,7 @@ export default {
let
list
=
[]
for
(
let
v
of
nodes
)
{
if
(
v
.
nodeParamDef
&&
JSON
.
parse
(
v
.
nodeParamDef
).
stage
.
defaultValue
==
stages
[
k
].
value
)
{
list
.
push
({...
JSON
.
parse
(
v
.
nodeParamDef
),
nodeSkipable
:
v
.
nodeSkipable
,
nodeId
:
v
.
nodeId
,
customData
})
list
.
push
({...
JSON
.
parse
(
v
.
nodeParamDef
),
nodeSkipable
:
v
.
nodeSkipable
,
nodeId
:
v
.
nodeId
,
nodeSkip
:
'0'
,
customData
})
}
}
list
=
list
.
filter
(
item
=>
item
.
day
)
...
...
@@ -174,13 +174,14 @@ export default {
const
sopList
=
this
.
groupBy
(
list
,
'day.defaultValue'
)
configList
.
push
({
label
:
stages
[
k
].
value
,
isExpaned
:
fals
e
,
isExpaned
:
tru
e
,
conditionsList
:
stages
[
k
].
conditions
||
[],
sopList
})
}
//
console.log(configList, 'configList')
console
.
log
(
configList
,
'configList'
)
this
.
configList
=
configList
})
},
groupBy
(
list
,
name
)
{
...
...
src/views/journeyConfig/components/CollapseItem.vue
View file @
332981a
...
...
@@ -25,7 +25,7 @@
</div>
<div
class=
"collapse-item-panel"
:style=
"
{ display: stepItem.isExpaned ? 'block' : 'none' }">
<div
class=
"task-item"
>
<template
v-if=
"stepItem.conditionsList.length"
>
<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"
/>
...
...
@@ -42,6 +42,12 @@
</div>
</div>
</
template
>
<
template
v-if=
"stepItem.conditionsList.length == 0"
>
<div
class=
"empty-task"
>
<img
src=
"@/assets/config/empty-sop.png"
/>
<div
class=
"empty-text"
>
暂无进入条件
</div>
</div>
</
template
>
<
template
v-if=
"stepItem.sopList.length"
>
<div
class=
"task-item-sop flex"
>
<div
class=
"task-sop-l"
>
...
...
@@ -53,38 +59,36 @@
<div
class=
"task-item-desc"
>
(系统面向当前旅程阶段客户的营销计划)
</div>
</div>
<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"
/>
<span
v-if=
"v[0].day"
>
第
{{
v
[
0
].
day
}}
天
</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"
>
<div
class=
"step-item"
v-for=
"(v, k) in stepItem.sopList"
:key=
"k"
>
<div
class=
"step-item-day"
>
<img
src=
"@/assets/config/step-border.png"
/>
<!-- v-if="(v && v[0].day) || (k + 1)"-->
<span
v-if=
"v.length > 0"
>
第
{{
v
[
0
]
&&
v
[
0
].
day
}}
天
</span>
<span
v-else
>
第
{{
k
+
1
}}
天
</span>
</div>
<div
class=
"step-item-content"
v-if=
"v.length > 0"
>
<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>
<el-switch
v-model=
"value.nodeSkipable"
active-color=
"#5850FF"
inactive-color=
"#c6c6c6"
active-text=
"开"
inactive-text=
"关"
active-value=
"0"
inactive-value=
"1"
:disabled=
"isDisabled"
v-if=
"!isDisabled"
>
</el-switch>
</div>
<div
class=
"step-item-name"
v-if=
"value.taskType"
>
{{
value
.
customData
[
stage_prefix
[
value
.
taskType
].
key
]
}}
</div>
</div>
<!--
<div
class=
"step-detail-btn"
@
click=
"getEmpDetail"
>
详情
</div>
-->
</div>
</div>
<div
class=
"step-item-name"
v-if=
"value.taskType"
>
{{
value
.
customData
[
stage_prefix
[
value
.
taskType
].
key
]
}}
</div>
<div
v-if=
"v.length == 0"
>
<div
class=
"empty-sop"
>
<img
src=
"@/assets/config/empty-sop.png"
/>
<div
class=
"empty-text"
>
暂无sop任务
</div>
</div>
<!--
<div
class=
"step-detail-btn"
@
click=
"getEmpDetail"
>
详情
</div>
-->
</div>
</div>
</div>
</div>
</div>
<div
class=
"task-sop-calendar"
>
...
...
@@ -97,7 +101,8 @@
<div
class=
"task-item-content bg-fff"
>
<div
class=
"calendar-panel"
>
<div
class=
"calendar-item"
v-for=
"(v, k) in stepItem.sopList"
:key=
"k"
>
<div
class=
"calendar-day"
>
第
{{
k
+
1
}}
天
</div>
<div
class=
"calendar-day"
v-if=
"v.length > 0"
>
第
{{
v
[
0
]
&&
v
[
0
].
day
}}
天
</div>
<div
class=
"calendar-day"
v-else
>
第
{{
k
+
1
}}
天
</div>
<div
class=
"calendar-time flex-column-center"
v-for=
"(value, key) in v"
:key=
"key"
>
<el-popover
placement=
"top-start"
width=
"100"
trigger=
"click"
>
<div
class=
"popover-panel"
v-for=
"(t, pkey) in v"
:key=
"pkey"
>
...
...
@@ -572,4 +577,25 @@ export default {
.el-switch
.el-switch__label
{
width
:
70px
;
}
.empty-sop
{
background
:
#F9FAFE
;
text-align
:
center
;
padding
:
16px
0
;
margin-bottom
:
10px
;
.empty-text{
color
:
#666666
;
font-size
:
12px
;
}
}
.empty-task
{
background
:
#FFFFFF
;
text-align
:
center
;
padding
:
20px
0
;
margin-bottom
:
10px
;
.empty-text{
color
:
#666666
;
font-size
:
12px
;
}
}
</
style
>
src/views/journeyConfig/components/CollapseItemTpl.vue
View file @
332981a
...
...
@@ -25,7 +25,7 @@
</div>
<div
class=
"collapse-item-panel"
:style=
"
{ display: stepItem.isExpaned ? 'block' : 'none' }">
<div
class=
"task-item"
>
<template
v-if=
"stepItem.conditionsList.length"
>
<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"
/>
...
...
@@ -42,6 +42,13 @@
</div>
</div>
</
template
>
<
template
v-if=
"stepItem.conditionsList.length == 0"
>
<div
class=
"empty-task"
>
<img
src=
"@/assets/config/empty-sop.png"
/>
<div
class=
"empty-text"
>
暂无进入条件
</div>
</div>
</
template
>
<
template
v-if=
"stepItem.sopList.length"
>
<div
class=
"task-item-sop flex"
>
<div
class=
"task-sop-l"
>
...
...
@@ -67,15 +74,14 @@
des
[
value
.
taskType
.
defaultValue
]
}}
</span>
<el-switch
v-model=
"value.nodeSkip
able
"
v-model=
"value.nodeSkip"
active-color=
"#5850FF"
inactive-color=
"#c6c6c6"
active-text=
"开"
inactive-text=
"关"
active-value=
"0"
inactive-value=
"1"
:disabled=
"isDisabled"
v-if=
"!isDisabled"
:disabled=
"value.nodeSkipable == 0"
>
</el-switch>
</div>
...
...
@@ -96,23 +102,23 @@
<div
class=
"task-item-content bg-fff"
>
<div
class=
"calendar-panel"
>
<div
class=
"calendar-item"
v-for=
"(v, k) in stepItem.sopList"
:key=
"k"
>
<div
class=
"calendar-day"
>
第
{{
k
+
1
}}
天
</div>
<div
class=
"calendar-day"
>
第
{{
v
[
0
].
day
.
defaultValue
}}
天
</div>
<div
class=
"calendar-time flex-column-center"
v-for=
"(value, key) in v"
:key=
"key"
>
<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"
>
<div
class=
"flex-column-center"
v-if=
"t.nodeSkip == '0'"
>
<span>
9:00
</span>
<div
:class=
"['stage-icon', `stage-$
{t.taskType}`]">
</div>
</div>
<div
class=
"stage-desc"
>
{{
stage
[
t
.
taskType
]
}}
</div>
</div>
<div
slot=
"reference"
class=
"flex-column-center"
v-if=
"v.length
<
= 2">
<span>
9:00
</span>
<div
slot=
"reference"
class=
"flex-column-center"
v-if=
"v.length
<
= 2
&&
value.nodeSkip =='0'
">
<span>
9:00
</span>
<div
:class=
"['stage-icon', `stage-$
{value.taskType}`]">
</div>
</div>
<div
slot=
"reference"
class=
"flex-column-center"
v-if=
"v.length > 2 && key == 0"
>
<span>
{{
v
.
length
}}
个任务
</span>
<span>
{{
v
.
filter
(
item
=>
item
.
nodeSkip
==
'0'
).
length
}}
个任务
</span>
</div>
</el-popover>
</div>
...
...
@@ -122,6 +128,7 @@
</div>
</div>
</
template
>
</div>
</div>
<!-- <emp-detail v-if="empVisible" :empVisible="empVisible"></emp-detail> -->
...
...
@@ -193,9 +200,10 @@ export default {
watch
:
{
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
able
}))
Array
.
from
(
sub
,
subItem
=>
({
nodeId
:
subItem
.
nodeId
,
nodeSkip
:
subItem
.
nodeSkip
}))
)
)
;
...
...
@@ -562,4 +570,15 @@ export default {
.el-switch
.el-switch__label
{
width
:
70px
;
}
.empty-task
{
background
:
#FFFFFF
;
text-align
:
center
;
padding
:
20px
0
;
margin-bottom
:
10px
;
.empty-text{
color
:
#666666
;
font-size
:
12px
;
}
}
</
style
>
src/views/journeyConfig/components/DistributionStore.vue
View file @
332981a
...
...
@@ -139,5 +139,9 @@ export default {
/
deep
/
.el-form-item__content
{
width
:
80%
!important
;
}
.mer-des
{
color
:
#C6C6C6
;
font-size
:
12px
;
}
</
style
>
src/views/journeyConfig/components/StepBar.vue
View file @
332981a
...
...
@@ -69,14 +69,15 @@ export default {
sopTplGrants
:
this
.
sopTplGrants
,
nodes
:
this
.
nodes
}
console
.
log
(
params
)
if
(
this
.
isNext
){
this
.
$apis
.
journeyConfig
.
sopInstsApi
(
params
).
then
(
res
=>
{
if
(
res
==
'success'
){
this
.
$message
.
success
(
'创建模板成功'
)
if
(
res
.
code
==
200
){
this
.
$message
.
success
(
'创建模板
实例
成功'
)
this
.
$router
.
back
()
}
}).
catch
(
err
=>
{
console
.
log
(
err
)
console
.
log
(
err
+
'err'
)
})
}
}
...
...
src/views/journeyConfig/details.vue
View file @
332981a
...
...
@@ -136,7 +136,7 @@ export default {
});
configList
.
push
({
label
:
stages
[
k
].
value
,
isExpaned
:
fals
e
,
isExpaned
:
tru
e
,
conditionsList
:
stages
[
k
].
conditions
||
[],
sopList
})
...
...
src/views/journeyConfig/index.vue
View file @
332981a
...
...
@@ -27,19 +27,19 @@
:beforeSearchFn=
"beforeSearchFn"
>
<div
slot=
"instRemark"
slot-scope=
"scope"
style=
"display:flex"
>
<div
v-for=
"(item,index) in handleStage(scope)"
:key=
"index"
>
<div
v-if=
"index
<
= 3">
<div
v-if=
"index
<
= 3"
style="display:flex"
>
{{
item
.
name
}}
{{
getCommaSeparator
(
'less'
,
index
,
scope
)
}}
<span>
{{
getCommaSeparator
(
'less'
,
index
,
scope
)
}}
</span>
</div>
<div
v-if=
"index > 3"
>
<el-popover
placement=
"top"
width=
"600"
trigger=
"hover"
content=
"这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
>
<span
slot=
"reference"
>
...
</span>
<span
slot=
"reference"
style=
"cursor: pointer"
>
...
</span>
<div
class=
"entmicro-hover"
style=
"display:flex"
>
<div
v-for=
"(item,index) in handleStage(scope)"
:key=
"index"
>
<div
style=
"display:flex"
>
{{
item
.
name
}}
{{
getCommaSeparator
(
'more'
,
index
,
scope
)
}}
<span>
{{
getCommaSeparator
(
'more'
,
index
,
scope
)
}}
</span>
</div>
</div>
</div>
...
...
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