Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-scene
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8a0d9b78
authored
Jan 05, 2024
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
9ef590bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
150 additions
and
60 deletions
src/views/journeyConfig/components/editCondition.vue
src/views/journeyConfig/components/editCondition.vue
View file @
8a0d9b7
...
@@ -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-05 1
6:09:39
* @LastEditTime: 2024-01-05 1
7:44:56
* @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
-->
-->
...
@@ -15,13 +15,13 @@
...
@@ -15,13 +15,13 @@
<span
v-else-if=
"item.getName"
>
{{
item
.
getName
(
conditionInfo
[
item
.
name
])
}}
</span>
<span
v-else-if=
"item.getName"
>
{{
item
.
getName
(
conditionInfo
[
item
.
name
])
}}
</span>
<span
v-else
>
{{
conditionInfo
[
item
.
name
]
}}
</span>
<span
v-else
>
{{
conditionInfo
[
item
.
name
]
}}
</span>
</div>
</div>
<div
class=
"condition-panel"
v-if=
"configInfo.length == 2"
>
<div
class=
"condition-panel"
v-if=
"configInfo
List
.length == 2"
>
<div
class=
"flex"
>
<div
class=
"flex"
>
<label
class=
"condition-label"
style=
"line-height: revert;"
>
企微成员范围:
</label>
<label
class=
"condition-label"
style=
"line-height: revert;"
>
企微成员范围:
</label>
<div
class=
"condition-select"
>
<div
class=
"condition-select"
>
<div
class=
"m-b-10"
>
<div
class=
"m-b-10"
>
<el-radio-group
v-model=
"empType"
>
<el-radio-group
v-model=
"empType"
>
<el-radio
:label=
"index"
v-for=
"(item, index) in configInfo"
:key=
"item.id"
>
{{
item
.
name
}}
</el-radio>
<el-radio
:label=
"index"
v-for=
"(item, index) in configInfo
List
"
:key=
"item.id"
>
{{
item
.
name
}}
</el-radio>
</el-radio-group>
</el-radio-group>
</div>
</div>
<template
v-if=
"empType == 0"
>
<template
v-if=
"empType == 0"
>
...
@@ -42,49 +42,46 @@
...
@@ -42,49 +42,46 @@
</div>
</div>
</div>
</div>
<
template
v-if=
"conditionsList"
>
<
template
v-if=
"conditionsList"
>
<div
class=
"condition-
panel"
v-if=
"conditionsList.name != '页面停留'
"
>
<div
class=
"condition-
select flex
"
>
<div
class=
"flex"
>
<div
class=
"flex"
>
<
label
class=
"condition-label"
>
进入条件:
</label
>
<
el-select
v-model=
"conditionList.flag"
placeholder=
"请选择"
:size=
"size"
class=
"m-r-10"
v-if=
"conditionList && conditionList.conditions && conditionList.conditions.length > 1"
>
<div
class=
"condition-select"
>
<el-option
v-for=
"item in conditionList.conditions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option
>
<div
class=
"condition-input"
v-if=
"conditionsList.operators"
>
</el-select
>
<el-input
:value=
"conditionsList.name"
></el-input
>
<template
v-if=
"condition && condition.operators && condition.operators.length"
>
<template
v-if=
"conditionsList.operators[0]
"
>
<el-select
v-model=
"operators"
@
change=
"condition.operators[operators].value = ''"
placeholder=
"请选择"
:size=
"size"
class=
"m-r-10
"
>
<el-input
:value=
"conditionsList.operators[0].name"
></el-input
>
<el-option
v-for=
"(item, index) in condition.operators"
:key=
"index"
:label=
"item.name"
:value=
"index"
></el-option
>
<el-input
:value=
"conditionsList.operators[0].value"
></el-inpu
t>
</el-selec
t>
<span>
天后自动切换到此旅程阶段
</span
>
<div
class=
"condition-input"
v-if=
"condition.operators[operators]"
>
<
/
template
>
<
el-input
v-model=
"condition.operators[operators].value"
></el-input
>
</div>
</div>
<div
class=
"condition-input"
v-for=
"item in conditionsList.subConditions"
:key=
"item.id"
>
<span>
天
切换到此旅程阶段
</span>
<span>
并且满足 {{ item.name }}
</span>
</
template
>
<el-input
:value=
"item.operators[item.value].name"
></el-input>
<el-input
:value=
"item.operators[item.value].value"
></el-input>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"condition-panel"
>
<div
class=
"condition-more"
v-if=
"condition && condition.subConditions"
>
<div
class=
"flex"
v-if=
"conditionsList.name == '页面停留'"
>
<div>
<label
class=
"condition-label"
>
进入条件:
</label>
<
template
>
<div
class=
"condition-select"
>
<div
class=
"flex-column-center m-t-10"
v-for=
"(item, k) in condition.subConditions"
:key=
"item.id"
>
<div
class=
"condition-input"
v-for=
"item in conditionsList.subConditions"
:key=
"item.id"
>
<label>
并且满足
</label>
<span>
并且满足
</span>
<el-select
v-model=
"item.name"
placeholder=
"请选择"
:size=
"size"
class=
"condition-1"
v-if=
"item.operators"
>
<span>
页面停留时长
</span>
<el-option
v-for=
"itm in [item.name]"
:key=
"itm"
:label=
"itm"
:value=
"itm"
></el-option>
<el-input
:value=
"item.operators[item.value].name"
></el-input>
</el-select>
<el-input
:value=
"item.operators[item.value].value"
></el-input>
<el-select
v-model=
"item.value"
@
change=
"item.operators[item.value].value = ''"
placeholder=
"请选择"
:size=
"size"
class=
"condition-1"
v-if=
"item.operators"
>
<span>
秒
</span>
<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>
</div>
<div
class=
"condition-add"
@
click=
"addCondition(condition.subConditions)"
>
</div>
<i
class=
"el-icon-circle-plus-outline"
></i>
<div
class=
"flex-column-center"
v-if=
"configInfo.length == 1"
>
添加条件
<label
class=
"require"
>
*
</label>
<label
class=
"condition-label"
>
页面配置:
</label>
<div
class=
"condition-select"
>
<div
class=
"condition-input"
>
<span>
当前页面营销活动为
</span>
<el-input
style=
"width: 284px;"
v-model=
"activityName"
></el-input>
<a
@
click=
"typeVisible = true"
>
编辑页面
</a>
</div>
</div>
</
div
>
</
template
>
</div>
</div>
</div>
</div>
</template>
</template>
...
@@ -120,8 +117,10 @@ export default {
...
@@ -120,8 +117,10 @@ export default {
return
{
return
{
typeName
:
''
,
typeName
:
''
,
empType
:
0
,
empType
:
0
,
operators
:
0
,
userList
:
[],
userList
:
[],
conditionsList
:
[],
conditionsList
:
[],
condition
:
[],
materialList
:
{
materialList
:
{
name
:
'素材'
,
name
:
'素材'
,
type
:
'material'
,
type
:
'material'
,
...
@@ -208,7 +207,7 @@ export default {
...
@@ -208,7 +207,7 @@ export default {
membersVisible
:
false
,
membersVisible
:
false
,
typeVisible
:
false
,
typeVisible
:
false
,
selectData
:
[],
selectData
:
[],
configInfo
:
[],
configInfo
List
:
[],
conditionItem
:
[
conditionItem
:
[
{
{
label
:
'客户旅程'
,
label
:
'客户旅程'
,
...
@@ -237,24 +236,37 @@ export default {
...
@@ -237,24 +236,37 @@ export default {
},
},
computed
:
{
computed
:
{
activityName
()
{
activityName
()
{
if
(
this
.
configInfo
.
length
&&
this
.
configInfo
[
0
].
operators
)
{
if
(
this
.
configInfo
List
.
length
&&
this
.
configInfoList
[
0
].
operators
)
{
if
(
this
.
configInfo
[
0
].
operators
[
0
].
value
.
match
(
/
\d
+
\+\d
+
\+(
.+
)
/
))
return
this
.
configInfo
[
0
].
operators
[
0
].
value
.
match
(
/
\d
+
\+\d
+
\+(
.+
)
/
)[
1
]
if
(
this
.
configInfo
List
[
0
].
operators
[
0
].
value
.
match
(
/
\d
+
\+\d
+
\+(
.+
)
/
))
return
this
.
configInfoList
[
0
].
operators
[
0
].
value
.
match
(
/
\d
+
\+\d
+
\+(
.+
)
/
)[
1
]
}
}
return
''
return
''
}
}
},
},
watch
:
{
'conditionList.flag'
(
val
)
{
if
(
!
val
)
{
;(
val
=
this
.
conditionList
.
conditions
[
0
]),
(
this
.
conditionList
.
flag
=
val
.
id
)
}
this
.
condition
=
this
.
conditionList
.
conditions
.
find
(
i
=>
i
.
id
==
val
)
}
},
mounted
()
{
mounted
()
{
const
{
index
}
=
this
.
conditionInfo
,
const
{
index
}
=
this
.
conditionInfo
,
{
dataTypeCode
,
conditions
,
flag
,
name
}
=
this
.
conditionInfo
.
conditionsList
[
index
]
,
{
dataTypeCode
,
conditions
,
flag
,
name
}
=
this
.
$common
.
utils
.
deepClone
(
this
.
conditionInfo
.
conditionsList
[
index
])
,
condition
=
conditions
.
filter
(
i
=>
i
.
isHide
)
condition
=
conditions
.
filter
(
i
=>
i
.
isHide
)
this
.
configInfo
=
condition
this
.
configInfo
List
=
this
.
$common
.
utils
.
deepClone
(
condition
)
this
.
typeName
=
name
this
.
typeName
=
name
const
conditionsList
=
conditions
.
filter
(
i
=>
!
i
.
isHide
),
// const conditionsList = conditions.filter(i => !i.isHide),
idx
=
conditionsList
.
findIndex
(
i
=>
i
.
id
==
flag
)
// idx = conditionsList.findIndex(i => i.id == flag)
this
.
conditionsList
=
conditionsList
[
idx
>
-
1
?
idx
:
0
]
// this.conditionsList = conditionsList[idx > -1 ? idx : 0]
if
(
this
.
configInfo
.
length
==
2
)
{
this
.
conditionList
=
this
.
$common
.
utils
.
deepClone
(
this
.
conditionInfo
.
conditionsList
[
index
])
this
.
conditionListAll
=
this
.
$common
.
utils
.
deepClone
(
this
.
conditionList
)
// this.conditionList.flag = flag
if
(
this
.
conditionList
.
conditions
)
this
.
conditionList
.
conditions
=
this
.
conditionList
.
conditions
.
filter
(
i
=>
!
i
.
isHide
)
this
.
condition
=
this
.
conditionList
.
conditions
[
0
]
if
(
this
.
configInfoList
.
length
==
2
)
{
this
.
empType
=
1
this
.
empType
=
1
this
.
configInfo
.
forEach
(
i
=>
{
this
.
configInfo
List
.
forEach
(
i
=>
{
const
desc
=
i
.
operators
[
0
]
&&
i
.
operators
[
0
].
desc
const
desc
=
i
.
operators
[
0
]
&&
i
.
operators
[
0
].
desc
if
(
desc
)
{
if
(
desc
)
{
this
.
empType
=
0
this
.
empType
=
0
...
@@ -277,12 +289,12 @@ export default {
...
@@ -277,12 +289,12 @@ export default {
},
},
handleMaterialConfirm
(
val
)
{
handleMaterialConfirm
(
val
)
{
const
{
objectId
,
objectName
}
=
val
const
{
objectId
,
objectName
}
=
val
this
.
configInfo
[
0
].
operators
[
0
].
value
=
`8+
${
objectId
}
+
${
objectName
}
`
this
.
configInfo
List
[
0
].
operators
[
0
].
value
=
`8+
${
objectId
}
+
${
objectName
}
`
},
},
selectActivity
(
val
)
{
selectActivity
(
val
)
{
const
{
marketingName
,
marketingId
,
miniType
}
=
val
const
{
marketingName
,
marketingId
,
miniType
}
=
val
console
.
log
(
marketingName
,
marketingId
,
miniType
)
console
.
log
(
marketingName
,
marketingId
,
miniType
)
this
.
configInfo
[
0
].
operators
[
0
].
value
=
`
${
miniType
}
+
${
marketingId
}
+
${
marketingName
}
`
this
.
configInfo
List
[
0
].
operators
[
0
].
value
=
`
${
miniType
}
+
${
marketingId
}
+
${
marketingName
}
`
},
},
// 成员弹窗
// 成员弹窗
handleConfirm
()
{
handleConfirm
()
{
...
@@ -298,7 +310,7 @@ export default {
...
@@ -298,7 +310,7 @@ export default {
}
}
},
},
handleSure
()
{
handleSure
()
{
if
(
this
.
configInfo
.
length
==
2
)
{
if
(
this
.
configInfo
List
.
length
==
2
)
{
if
(
this
.
empType
==
0
)
{
if
(
this
.
empType
==
0
)
{
const
userId
=
this
.
userList
.
map
(
i
=>
i
.
userId
),
const
userId
=
this
.
userList
.
map
(
i
=>
i
.
userId
),
staffName
=
this
.
userList
.
map
(
i
=>
i
.
staffName
),
staffName
=
this
.
userList
.
map
(
i
=>
i
.
staffName
),
...
@@ -306,16 +318,34 @@ export default {
...
@@ -306,16 +318,34 @@ export default {
for
(
let
i
=
0
;
i
<
userId
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
userId
.
length
;
i
++
)
{
desc
[
userId
[
i
]]
=
staffName
[
i
]
desc
[
userId
[
i
]]
=
staffName
[
i
]
}
}
this
.
configInfo
[
0
].
operators
[
0
].
value
=
userId
.
join
(
','
)
this
.
configInfo
List
[
0
].
operators
[
0
].
value
=
userId
.
join
(
','
)
this
.
configInfo
[
0
].
operators
[
0
].
desc
=
desc
this
.
configInfo
List
[
0
].
operators
[
0
].
desc
=
desc
}
else
{
}
else
{
this
.
configInfo
[
1
].
operators
=
[]
this
.
configInfo
List
[
1
].
operators
=
[]
this
.
configInfo
[
0
].
operators
[
0
].
value
=
''
this
.
configInfo
List
[
0
].
operators
[
0
].
value
=
''
this
.
configInfo
[
0
].
operators
[
0
].
desc
=
''
this
.
configInfo
List
[
0
].
operators
[
0
].
desc
=
''
}
}
}
}
const
{
editable
,
label
,
order
}
=
this
.
$parent
.
stepItem
const
{
instId
}
=
this
.
$route
.
query
,
this
.
conditionList
.
conditions
.
forEach
(
i
=>
{
this
.
conditionListAll
.
conditions
.
forEach
(
j
=>
{
if
(
i
.
id
==
j
.
id
)
{
j
.
operators
=
i
.
operators
j
.
subConditions
=
i
.
subConditions
}
})
})
this
.
configInfoList
.
forEach
(
i
=>
{
this
.
conditionListAll
.
conditions
.
forEach
(
j
=>
{
if
(
i
.
id
==
j
.
id
)
{
j
.
operators
=
i
.
operators
j
.
subConditions
=
i
.
subConditions
}
})
})
this
.
conditionInfo
.
conditionsList
[
this
.
conditionInfo
.
index
]
=
{
...
this
.
conditionListAll
,
flag
:
this
.
conditionList
.
flag
}
const
{
editable
,
label
,
order
}
=
this
.
$parent
.
stepItem
,
{
instId
}
=
this
.
$route
.
query
,
data
=
{
data
=
{
[
`
${
order
}
`
]:
{
[
`
${
order
}
`
]:
{
conditions
:
this
.
conditionInfo
.
conditionsList
,
conditions
:
this
.
conditionInfo
.
conditionsList
,
...
@@ -340,6 +370,15 @@ export default {
...
@@ -340,6 +370,15 @@ export default {
},
},
handleAddEmp
()
{
handleAddEmp
()
{
this
.
membersVisible
=
true
this
.
membersVisible
=
true
},
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
)
}
}
}
}
}
}
...
@@ -356,6 +395,57 @@ export default {
...
@@ -356,6 +395,57 @@ export default {
align-items
:
center
;
align-items
:
center
;
//
width
:
50%
;
//
width
:
50%
;
}
}
.condition-select
{
margin-left
:
70px
;
line-height
:
32px
;
}
.condition-more
{
margin-left
:
70px
;
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
;
}
}
}
.input-tag-wrapper
{
.input-tag-wrapper
{
max-height
:
75px
;
max-height
:
75px
;
width
:
500px
;
width
:
500px
;
...
...
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