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 2dcd1ebd
authored
Sep 25, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
联调完成
1 parent
9bd5a2e8
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
287 additions
and
209 deletions
src/api/modules/journeyConfig.js
src/config/index.js
src/setup/qiankun.js
src/views/journeyConfig/add.vue
src/views/journeyConfig/components/CollapseItem.vue
src/views/journeyConfig/components/StepBar.vue
src/views/journeyConfig/components/selJourneyTemplate.vue
src/views/journeyConfig/config/table-config.js
src/views/journeyConfig/details.vue
src/views/journeyConfig/index.vue
src/api/modules/journeyConfig.js
View file @
2dcd1eb
...
...
@@ -18,7 +18,7 @@ import { http, http_tag } from '@/main'
const
getListApi
=
params
=>
{
// params.method = '/sop/sopTpls'
return
http
({
url
:
'/process/sop/api/sop
Tpl
s'
,
url
:
'/process/sop/api/sop
Inst
s'
,
method
:
'get'
,
data
:
params
,
sign
:
true
...
...
@@ -46,18 +46,30 @@ const getSOPDetailsApi = (params) => {
})
}
const
getInsDetailsApi
=
(
params
)
=>
{
// params.method = '/sop/sopTpls'
return
http
({
url
:
'/process/sop/api/sopInsts/'
+
params
.
instId
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
const
sopInstsApi
=
(
params
)
=>
{
return
http
({
url
:
'/process/sop/api/sopInsts'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
sign
:
false
,
noNeed
:
true
})
}
export
default
{
getListApi
,
getSOPDetailsApi
,
getInsDetailsApi
,
getTplList
,
sopInstsApi
}
src/config/index.js
View file @
2dcd1eb
...
...
@@ -13,6 +13,7 @@ import { Http } from 'glsx-common'
let
timeout
=
30000
//超时时间
export
const
fetchConfig
=
function
(
common
)
{
let
params
=
{
moduleName
:
'peregrination'
,
mockUrl
:
'https://oss-config.glsx.com.cn/mock/63c12a2e28a427953783403b/peregrination/config'
,
httpOptions
:
{
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}
}
console
.
log
(
common
.
utils
.
getConfig
(
params
))
return
common
.
utils
.
getConfig
(
params
)
}
export
const
config
=
{
...
...
src/setup/qiankun.js
View file @
2dcd1eb
...
...
@@ -22,7 +22,7 @@ Vue.use(ElementUI)
Vue
.
use
(
GLTable
)
export
async
function
bootstrap
({
history
,
common
,
messenger
,
globalState
})
{
const
{
response
,
request
,
sign
,
secret
,
sign_common
,
request_common
,
request_merchant
}
=
await
fetchConfig
(
common
)
const
{
response
,
request
,
sign
,
secret
,
sign_common
,
request_common
,
request_merchant
,
response_sop
}
=
await
fetchConfig
(
common
)
Vue
.
prototype
.
$history
=
history
Vue
.
prototype
.
$messenger
=
messenger
Vue
.
prototype
.
$globalState
=
globalState
...
...
@@ -30,7 +30,7 @@ export async function bootstrap({history, common, messenger, globalState}) {
Vue
.
prototype
.
$message
=
message
Vue
.
prototype
.
$messageBox
=
messageBox
Vue
.
prototype
.
$http
=
new
common
.
Http
({
response
,
response
:
response_sop
,
request
,
sign
,
secret
,
...
...
src/views/journeyConfig/add.vue
View file @
2dcd1eb
...
...
@@ -142,15 +142,19 @@ export default {
}
},
mounted
()
{
const
query
=
this
.
$route
.
query
||
'XBLC'
this
.
getDetail
(
query
)
// this.$bus.$off('whetherToProceedNext')
this
.
$bus
.
$on
(
'whetherToProceedNext'
,
(
data
)
=>
{
const
query
=
data
.
tplId
this
.
getDetail
(
query
)
})
},
methods
:
{
changeIndex
(
currentInex
)
{
this
.
currentIndex
=
currentInex
},
getDetail
(
val
)
{
this
.
$apis
.
journeyConfig
.
getSOPDetailsApi
({
tplId
:
'XBLC'
}).
then
(
res
=>
{
this
.
$apis
.
journeyConfig
.
getSOPDetailsApi
({
tplId
:
val
}).
then
(
res
=>
{
const
stages
=
JSON
.
parse
(
res
.
tplParamDef
).
stages
.
defaultValue
const
nodes
=
res
.
nodes
...
...
@@ -174,7 +178,7 @@ export default {
sopList
})
}
console
.
log
(
configList
,
'configList'
)
//
console.log(configList, 'configList')
this
.
configList
=
configList
})
},
...
...
@@ -224,7 +228,8 @@ export default {
changeNode
(
val
){
console
.
log
(
val
)
}
}
},
}
</
script
>
...
...
src/views/journeyConfig/components/CollapseItem.vue
View file @
2dcd1eb
...
...
@@ -9,119 +9,122 @@
<
template
>
<div
class=
"border-content"
>
<div
class=
"journey-step-info"
v-for=
"(stepItem, k) in configList"
:key=
"k"
>
<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>
<i
class=
"el-icon-caret-right"
v-show=
"!stepItem.isExpaned"
@
click=
"handleExpand(stepItem)"
></i>
<div
class=
"tab-label"
>
{{
stepItem
.
label
}}
<div
v-if=
"stepItem.sopList.flat(Initify).length>0"
>
<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>
<i
class=
"el-icon-caret-right"
v-show=
"!stepItem.isExpaned"
@
click=
"handleExpand(stepItem)"
></i>
<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>
<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"
>
<div
class=
"task-item-head flex-column-center"
>
<div
class=
"task-item-icon"
>
<img
src=
"@/assets/config/log.png"
/>
</div>
<div
class=
"task-item-name"
>
进入条件
</div>
<div
class=
"task-item-desc"
>
(描述用户触发何种条件后,将自动变更为该旅程阶段)
</div>
</div>
<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
src=
"@/assets/config/arrow.png"
/>
<span>
{{
v
.
split
(
"-"
)[
1
]
}}
</span>
<div
class=
"collapse-item-panel"
:style=
"
{ display: stepItem.isExpaned ? 'block' : 'none' }">
<div
class=
"task-item"
>
<template
v-if=
"stepItem.conditionsList.length"
>
<div
class=
"task-item-head flex-column-center"
>
<div
class=
"task-item-icon"
>
<img
src=
"@/assets/config/log.png"
/>
</div>
<div
class=
"task-item-name"
>
进入条件
</div>
<div
class=
"task-item-desc"
>
(描述用户触发何种条件后,将自动变更为该旅程阶段)
</div>
</div>
</div>
</
template
>
<
template
v-if=
"stepItem.sopList.length"
>
<div
class=
"task-item-sop flex"
>
<div
class=
"task-sop-l"
>
<div
class=
"task-item-head flex-column-center"
>
<div
class=
"task-item-icon"
>
<img
src=
"@/assets/config/sop.png"
/>
</div>
<div
class=
"task-item-name"
>
SOP任务
</div>
<div
class=
"task-item-desc"
>
(系统面向当前旅程阶段客户的营销计划)
</div>
<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
src=
"@/assets/config/arrow.png"
/>
<span>
{{
v
.
split
(
"-"
)[
1
]
}}
</span>
</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"
>
<img
src=
"@/assets/config/step-border.png"
/>
<span>
第
{{
v
[
0
].
day
}}
天
</span>
</div>
</
template
>
<
template
v-if=
"stepItem.sopList.length"
>
<div
class=
"task-item-sop flex"
>
<div
class=
"task-sop-l"
>
<div
class=
"task-item-head flex-column-center"
>
<div
class=
"task-item-icon"
>
<img
src=
"@/assets/config/sop.png"
/>
</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"
>
<span>
[
{{
value
.
time
}}
]发送 |
{{
stage
[
value
.
taskType
]
}}
|
{{
<div
class=
"task-item-name"
>
SOP任务
</div>
<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"
>
<span>
[ 9:00 ]发送 |
{{
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"
>
</el-switch>
<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"
>
活动名称
</div>
</div>
<
div
class=
"step-item-name"
>
活动名称
</div
>
<
!--
<div
class=
"step-detail-btn"
@
click=
"getEmpDetail"
>
详情
</div>
--
>
</div>
<!--
<div
class=
"step-detail-btn"
@
click=
"getEmpDetail"
>
详情
</div>
-->
</div>
</div>
</div>
</div>
</div>
<div
class=
"task-sop-calendar"
>
<div
class=
"task-item-head flex-column-center"
>
<div
class=
"task-item-icon"
>
<img
src=
"@/assets/config/calendar.png"
/>
<div
class=
"task-sop-calendar"
>
<div
class=
"task-item-head flex-column-center"
>
<div
class=
"task-item-icon"
>
<img
src=
"@/assets/config/calendar.png"
/>
</div>
<div
class=
"task-item-name"
>
SOP日历
</div>
</div>
<div
class=
"task-item-
name"
>
SOP日历
</div
>
</div
>
<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-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"
>
<
span>
{{
t
.
time
}}
</span
>
<div
:class=
"['stage-icon', `stage-$
{t.taskType}`]">
</div>
<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-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=
"p
key"
>
<div
class=
"flex-column-center
"
>
<span>
9:00
</span
>
<div
:class=
"['stage-icon', `stage-$
{t.taskType}`]">
</div
>
<
/div
>
<div
class=
"stage-desc"
>
{{
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>
{{
value
.
time
}}
</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>
3条内容
</span>
</div>
</el-popover>
<div
slot=
"reference"
class=
"flex-column-center"
v-if=
"v.length
<
= 2">
<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>
</div>
</el-popover>
</div>
</div>
</div>
</div>
</div>
</div>
</
div
>
</
template
>
</
template
>
</
div
>
</div>
<!-- <emp-detail v-if="empVisible" :empVisible="empVisible"></emp-detail> -->
</div>
<!-- <emp-detail v-if="empVisible" :empVisible="empVisible"></emp-detail> -->
</div>
</div>
</div>
...
...
@@ -169,10 +172,11 @@ export default {
configList
:
{
handler
(
newValue
,
oldValue
)
{
let
sopList
=
Array
.
from
(
newValue
,
item
=>
Array
.
from
(
item
.
sopList
,
sub
=>
Array
.
from
(
sub
,
subItem
=>
({
nodeId
:
subItem
.
nodeId
,
nodeSkip
:
subItem
.
nodeSkipable
}))
Array
.
from
(
item
.
sopList
,
sub
=>
Array
.
from
(
sub
,
subItem
=>
({
nodeId
:
subItem
.
nodeId
,
nodeSkip
:
subItem
.
nodeSkipable
}))
)
)
)
;
;
this
.
computedSopSet
=
JSON
.
parse
(
JSON
.
stringify
(
sopList
))
sopList
=
sopList
.
flat
(
Infinity
)
this
.
$bus
.
$emit
(
'sopListSet'
,
{
sopList
})
...
...
@@ -498,13 +502,16 @@ export default {
.stage-7
{
background
:
url('../../../assets/config/calendar-icon.png')
-10px
-166px
;
}
::v-deep
.el-switch
{
::v-deep
.el-switch
{
float
:
right
;
right
:
10px
;
}
::v-deep
.el-switch__core
{
::v-deep
.el-switch__core
{
width
:
50px
!important
;
}
::v-deep
.el-switch__label
{
position
:
absolute
;
display
:
none
;
...
...
src/views/journeyConfig/components/StepBar.vue
View file @
2dcd1eb
...
...
@@ -69,10 +69,14 @@ export default {
sopTplGrants
:
this
.
sopTplGrants
,
nodes
:
this
.
nodes
}
console
.
log
(
params
)
if
(
this
.
isNext
){
this
.
$apis
.
journeyConfig
.
sopInstsApi
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
==
'success'
){
this
.
$message
.
success
(
'创建模板成功'
)
this
.
$router
.
back
()
}
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
}
}
...
...
src/views/journeyConfig/components/selJourneyTemplate.vue
View file @
2dcd1eb
...
...
@@ -45,6 +45,9 @@ export default {
getTplList
()
{
this
.
$apis
.
journeyConfig
.
getTplList
().
then
(
res
=>
{
this
.
templateArr
=
res
if
(
res
.
length
==
1
){
this
.
tplList
.
tplId
=
res
[
0
].
tplId
}
})
}
}
...
...
src/views/journeyConfig/config/table-config.js
View file @
2dcd1eb
...
...
@@ -2,47 +2,51 @@ const tableConfig = {
data
()
{
return
{
getListApi
:
this
.
$apis
.
journeyConfig
.
getListApi
,
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum
ber
'
,
totalCount
:
'total'
},
tableParams
:
{
listName
:
'list'
,
tableOption
:
true
,
tableColumns
:
[
{
label
:
'模板ID'
,
prop
:
'
accountName
'
,
prop
:
'
instId
'
,
},
{
label
:
'旅程模板名称'
,
prop
:
''
,
prop
:
'
instName
'
,
},
{
label
:
'旅程阶段'
,
prop
:
''
,
prop
:
'instRemark'
,
addHtml
:
'instRemark'
,
width
:
250
},
{
label
:
'分发门店数'
,
prop
:
''
,
label
:
'门店名称'
,
prop
:
'sopTplGrant'
,
formatter
:
cellValue
=>
{
return
cellValue
.
sopTplGrant
.
groupName
}
},
{
label
:
'创建时间'
,
prop
:
''
,
prop
:
'
createTime
'
,
},
{
label
:
'修改时间'
,
prop
:
''
,
prop
:
'
updateTime
'
,
}
],
},
tableButtonList
:
[
{
type
:
'el-button'
,
name
:
'模板详情'
,
name
:
'模板
实例
详情'
,
attrs
:
{
type
:
'text'
},
listeners
:
{
click
:
row
=>
this
.
gotoDetails
(
row
.
tpl
Id
)
click
:
row
=>
this
.
gotoDetails
(
row
.
inst
Id
)
}
}
...
...
src/views/journeyConfig/details.vue
View file @
2dcd1eb
...
...
@@ -21,112 +21,116 @@ export default {
data
()
{
return
{
configList
:
[
{
label
:
'可报价'
,
isExpaned
:
false
,
taskList
:
[
{
status
:
[
1
,
2
],
name
:
'进入条件'
,
desc
:
'描述用户触发何种条件后,将自动变更为该旅程阶'
,
progressList
:
[
{
name
:
'33'
},
{
name
:
'33'
},
{
name
:
'33'
}
]
}
]
},
{
label
:
'有意向'
,
isExpaned
:
false
,
taskList
:
[
{
status
:
[
1
,
2
],
name
:
'进入条件'
,
desc
:
'描述用户触发何种条件后,将自动变更为该旅程阶'
,
progressList
:
[
{
name
:
'33'
}
],
sopList
:
[
{
day
:
'第一天'
,
times
:
[
{
time
:
'7:00'
,
process
:
1
},
{
time
:
'8:00'
,
process
:
2
},
{
time
:
'9:00'
,
process
:
3
}
]
},
{
day
:
'第二天'
,
times
:
[
{
time
:
'7:00'
,
process
:
1
},
{
time
:
'8:00'
,
process
:
2
}
]
},
{
day
:
'第三天'
},
{
day
:
'第四天'
},
{
day
:
'第五天'
}
]
}
]
}
//
{
//
label: '可报价',
//
isExpaned: false,
//
taskList: [
//
{
//
status: [1, 2],
//
name: '进入条件',
//
desc: '描述用户触发何种条件后,将自动变更为该旅程阶',
//
progressList: [
//
{
//
name: '33'
//
},
//
{
//
name: '33'
//
},
//
{
//
name: '33'
//
}
//
]
//
}
//
]
//
},
//
{
//
label: '有意向',
//
isExpaned: false,
//
taskList: [
//
{
//
status: [1, 2],
//
name: '进入条件',
//
desc: '描述用户触发何种条件后,将自动变更为该旅程阶',
//
progressList: [
//
{
//
name: '33'
//
}
//
],
//
sopList: [
//
{
//
day: '第一天',
//
times: [
//
{
//
time: '7:00',
//
process: 1
//
},
//
{
//
time: '8:00',
//
process: 2
//
},
//
{
//
time: '9:00',
//
process: 3
//
}
//
]
//
},
//
{
//
day: '第二天',
//
times: [
//
{
//
time: '7:00',
//
process: 1
//
},
//
{
//
time: '8:00',
//
process: 2
//
}
//
]
//
},
//
{
//
day: '第三天'
//
},
//
{
//
day: '第四天'
//
},
//
{
//
day: '第五天'
//
}
//
]
//
}
//
]
//
}
],
isDisabled
:
true
}
},
mounted
()
{
const
query
=
this
.
$route
.
query
||
'
XBLC
'
this
.
getDetail
(
query
)
const
query
=
this
.
$route
.
query
||
''
this
.
getDetail
(
query
.
id
)
},
methods
:
{
getDetail
(
val
)
{
this
.
$apis
.
journeyConfig
.
getSOPDetailsApi
({
tplId
:
'XBLC'
}).
then
(
res
=>
{
const
stages
=
JSON
.
parse
(
res
.
tplParamDef
).
stages
.
defaultValue
this
.
$apis
.
journeyConfig
.
getInsDetailsApi
({
instId
:
val
}).
then
(
res
=>
{
const
stages
=
JSON
.
parse
(
res
.
instParam
).
stages
.
defaultValue
const
nodes
=
res
.
nodes
const
configList
=
[]
for
(
let
k
in
stages
)
{
let
list
=
[]
for
(
let
v
of
nodes
)
{
if
(
v
.
nodeParam
Def
&&
JSON
.
parse
(
v
.
nodeParamDef
).
stage
==
stages
[
k
].
value
)
{
list
.
push
({...
JSON
.
parse
(
v
.
nodeParam
Def
),
nodeSkipable
:
v
.
nodeSkipable
,
nodeId
:
v
.
nodeId
})
if
(
v
.
nodeParam
&&
JSON
.
parse
(
v
.
nodeParam
).
stage
==
stages
[
k
].
value
)
{
list
.
push
({...
JSON
.
parse
(
v
.
nodeParam
),
nodeSkipable
:
v
.
nodeSkip
,
nodeId
:
v
.
nodeId
})
}
}
list
=
list
.
filter
(
item
=>
item
.
day
)
list
.
sort
((
a
,
b
)
=>
{
return
a
.
day
-
b
.
day
})
const
sopList
=
this
.
groupBy
(
list
,
'day'
)
let
sopList
=
this
.
groupBy
(
list
,
'day'
)
sopList
=
sopList
.
map
(
function
(
arr
)
{
return
arr
.
filter
(
function
(
obj
)
{
return
obj
.
nodeSkipable
==
0
;
});
});
configList
.
push
({
label
:
stages
[
k
].
value
,
isExpaned
:
false
,
...
...
@@ -150,6 +154,7 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
.setHeight
{
height
:
calc
(
100vh
-
120px
);
min-height
:
calc
(
100vh
-
120px
);
padding-bottom
:
20px
;
}
</
style
>
src/views/journeyConfig/index.vue
View file @
2dcd1eb
...
...
@@ -15,18 +15,41 @@
</GLCombiForm>
<div
class=
"operate-wrap"
>
<span
class=
"table-title"
>
旅程列表
</span>
<span
class=
"table-title"
>
旅程
模板实例
列表
</span>
<div>
<el-button
class=
"operate-btn"
type=
"primary"
size=
"small"
@
click=
"createJourneyTemplate"
plain
>
创建
</el-button>
<div
@
click=
"gotoDetails"
>
详情
</div>
</div>
</div>
<GLTable
ref=
"memberCenterRef"
@
setTableFinishFun=
"setTableFinishFun"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
>
<!--
<GLTableButton
:buttonList=
"tableButtonList"
:buttonItem=
"scope.scope"
:buttonNum=
"3"
></GLTableButton>
-->
<div
slot=
"instRemark"
slot-scope=
"scope"
style=
"display:flex"
>
<div
v-for=
"(item,index) in handleStage(scope)"
:key=
"index"
>
<div
v-if=
"index
<
= 4">
{{
item
.
name
}}
{{
getCommaSeparator
(
'less'
,
index
,
scope
)
}}
</div>
<div
v-if=
"index > 4"
>
<el-popover
placement=
"top"
width=
"600"
trigger=
"hover"
content=
"这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
>
<span
slot=
"reference"
>
...
</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
)
}}
</div>
</div>
</div>
</el-popover>
</div>
</div>
</div>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<GLTableButton
:buttonList=
"tableButtonList"
:buttonItem=
"scope.scope"
:buttonNum=
"3"
></GLTableButton>
</div>
</GLTable>
</div>
...
...
@@ -59,6 +82,20 @@ export default {
handleReset
()
{
this
.
tableSearchForm
=
{},
this
.
$refs
.
memberCenterRef
.
refreshTable
()
},
getCommaSeparator
(
lessOrMore
,
index
,
scope
)
{
return
lessOrMore
==
'less'
?
index
<
this
.
handleStage
(
scope
).
length
-
1
&&
index
!==
3
?
'、'
:
''
:
index
<
this
.
handleStage
(
scope
).
length
-
1
?
'、'
:
''
},
handleStage
(
scope
)
{
let
stages
=
JSON
.
parse
(
scope
.
scope
.
instParam
).
stages
.
defaultValue
let
list
=
[]
for
(
let
k
in
stages
)
{
list
.
push
({
name
:
stages
[
k
].
value
})
}
return
list
}
}
}
...
...
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