Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
memberTag-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
memberTag
memberTag-web
Commits
1cc8afad
Commit
1cc8afad
authored
Jul 27, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 关联渠道
parent
3676a073
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
153 additions
and
6 deletions
+153
-6
tag-config-options.vue
src/components/tag/tag-config-options.vue
+135
-1
index.js
src/components/tagDetail/mixin/index.js
+18
-5
No files found.
src/components/tag/tag-config-options.vue
View file @
1cc8afad
...
...
@@ -629,6 +629,107 @@
</div>
</div>
</template>
<
template
v-if=
"parent.templateCode == 'tag050'"
>
<div
class=
"m-b-20"
:key=
"'tag17' + pindex"
>
<label
class=
"inline-block m-r-20 label-unit"
style=
"width: 108px;text-align: right"
>
最近关联时间
<el-tooltip
placement=
"top"
open-delay=
"100"
>
<div
slot=
"content"
>
客户与各渠道最近关联的时间,如解除之后再重新关联,最近关联时间会更新
</div>
<i
class=
"iconfont icon-xinxixianshi m-l-4"
style=
"font-size: 14px;color: #909399"
></i>
</el-tooltip>
</label>
<el-radio-group
v-model=
"parent.radio"
@
change=
"timeRadioChange($event,parent)"
>
<el-radio
label=
"0"
>
所有时间
</el-radio>
<el-radio
label=
"1"
>
固定时段
</el-radio>
<el-radio
label=
"2"
>
相对时间
</el-radio>
</el-radio-group>
<!-- 固定时段 -->
<div
class=
"m-t-18 w-438 p-20 border-box bg-f3f6f9"
v-if=
"parent.radio == 1"
>
<el-date-picker
v-model=
"parent.dateRangeValue"
type=
"daterange"
:editable=
"false"
range-separator=
"至"
start-placeholder=
"开始时间"
end-placeholder=
"结束时间"
format=
"yyyy-MM-dd"
:default-time=
"['00:00:00', '23:59:59']"
value-format=
"yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</div>
<!-- 相对时段 -->
<div
class=
"relative-range m-t-18 border-box"
v-if=
"parent.radio == 2"
>
<div>
<div>
<label
class=
"inline-block w-98 label-unit"
>
时间精度
<el-popover
placement=
"top"
open-delay=
"100"
trigger=
"hover"
>
<div
>
<template
v-if=
"tagData.isActive == 1 "
>
<span
style=
"font-weight: 600"
>
选择【天】:
</span><br
/>
当天:选择相对时段为“当天”,那么统计的是当天凌晨至当前时间内的数据;
<br
/>
最近X天:选择相对时间段为“最近2天”,那么系统在8月1号统计的是7.30-7.31号的数据;系统在8月5号统计的是8.3-8.4号的数据;
<br/>
<span
style=
"font-weight: 600"
>
选择【月】:
</span><br
/>
当月:选择相对时段为“当月”,那么统计的是当月1号至当前时间的数据;
<br
/>
最近X月:选择相对时间段为“最近2月”,那么系统在8月统计的是6.1-7.31号的数据;系统在9月统计的是7.1-8.31号的数据;
<br
/>
<span
style=
"font-weight: 600"
>
选择【年】:
</span><br
/>
当年:选择相对时段为“当年”,那么统计的是当年1号至当前时间的数据;
<br
/>
最近X年:选择相对时间段为“最近1年”,那么系统统计的是去年1.1-12.31号的数据。
</
template
>
<
template
v-else
>
<span
style=
"font-weight: 600"
>
选择【天】:
</span><br
/>
最近X天:选择相对时段为“最近2天”,那么系统在5号凌晨统计3-4号的数据;系统在6号凌晨统计时,统计的是4-5号的数据;
<br
/>
<span
style=
"font-weight: 600"
>
选择【月】:
</span><br
/>
当月:选择相对时间段为“当月”,那么系统在8月5号凌晨进行统计时,统计的是在8.1-8.4号的数据;系统在6号凌晨统计时,统计的是在8.1-8.5号的数据;
<br
/>
最近X月:选择相对时间段为“最近2月”,那么系统在8月5号凌晨进行统计时,统计的是6.1-7.31号的数据;系统在6号凌晨统计时,统计的还是6.1-7.31号的数据;
<br
/>
<span
style=
"font-weight: 600"
>
选择【年】:
</span><br
/>
当年:选择相对时间段为“当年”,那么系统在8月5号凌晨进行统计时,统计的是在当年1.1-8.4号的数据;系统在6号凌晨统计时,统计的是在当年1.1-8.5号的数据;
<br
/>
最近X年:选择相对时间段为“最近1年”,那么系统在8月5号凌晨进行统计时,统计的是在去年1.1-12.31号的数据;系统在6号凌晨统计时,统计的还是在去年1.1-12.31号的数据。
</
template
>
</div>
<i
slot=
"reference"
class=
"iconfont icon-tishi"
style=
"color: #909399"
></i>
</el-popover>
</label>
<el-radio-group
v-model=
"parent.timeRadio"
@
change=
"timeRadioChange($event, parent)"
>
<el-radio
label=
"1"
>
天
</el-radio>
<el-radio
label=
"2"
>
月
</el-radio>
<el-radio
label=
"3"
>
年
</el-radio>
</el-radio-group>
</div>
<
template
v-if=
"['haobanWechatRelatedTime','onceCostTime'].includes(currentKey)"
>
<div
class=
"m-t-20"
v-if=
"parent.timeRadio!=='1'"
>
<label
class=
"inline-block w-98"
></label>
<el-checkbox
v-model=
"parent.timeChecked"
@
change=
"currentDayChange($event, parent)"
>
当
{{
parent
.
timeRadio
==
2
?
'月'
:
'年'
}}
</el-checkbox>
</div>
</
template
>
<div
class=
"m-t-20"
v-else
>
<label
class=
"inline-block w-98"
></label>
<el-checkbox
v-model=
"parent.timeChecked"
@
change=
"currentDayChange($event, parent)"
>
当{{ parent.timeRadio == 1 ? '天' : parent.timeRadio == 2 ? '月' : '年' }}
</el-checkbox>
</div>
<div
class=
"m-t-20"
>
<label
class=
"inline-block w-98"
></label>
<el-checkbox
v-model=
"parent.timeAfterChecked"
style=
"margin-right: 7px"
>
</el-checkbox>
<span>
最近
</span>
<!-- <el-select v-model="parent.timeSelect" placeholder="请选择" class="w-86 m-l-8" disabled>
<el-option label="最近" value="1" style="color: #303133"></el-option>
</el-select> -->
<el-input
v-model=
"parent.timeInput"
placeholder=
"请输入"
class=
"w-90"
@
blur=
"value => toEditDateInput(value, parent.timeRadio, parent)"
></el-input>
<
template
v-if=
"parent.timeRadio == 1"
>
<label
class=
"inline-block middle label-unit m-l-8"
>
天
</label>
<label
class=
"inline-block middle label-tip"
>
正整数,最大730
</label>
</
template
>
<
template
v-if=
"parent.timeRadio == 2"
>
<label
class=
"inline-block middle label-unit m-l-8"
>
月
</label>
<label
class=
"inline-block middle label-tip"
>
正整数,最大24
</label>
</
template
>
<
template
v-if=
"parent.timeRadio == 3"
>
<label
class=
"inline-block middle label-unit m-l-8"
>
年
</label>
<label
class=
"inline-block middle label-tip"
>
正整数,最大2
</label>
</
template
>
</div>
</div>
</div>
</div>
</template>
<!-- 17.时间属性(年月日-年月日 + 最近) -->
<
template
v-if=
"parent.templateCode == 'tag017'"
>
...
...
@@ -899,6 +1000,18 @@
</div>
</div>
</template>
<
template
v-if=
"parent.templateCode == 'tag040'"
>
<label
class=
"inline-block m-r-20 label-unit"
style=
"width: 108px;text-align: right"
>
关联渠道
<el-tooltip
placement=
"top"
open-delay=
"100"
>
<div
slot=
"content"
>
关联渠道为当前客户关联的线上渠道,根据关联状态实时变化
</div>
<i
class=
"iconfont icon-xinxixianshi m-l-4"
style=
"font-size: 14px;color: #909399"
></i>
</el-tooltip>
</label>
<el-radio-group
v-model=
"parent.radioType"
>
<el-radio
v-for=
"item in parent.options"
:key=
"item.key"
:label=
"item.key"
>
{{
item
.
value
}}
</el-radio>
</el-radio-group>
</
template
>
<!-- 会员标签嵌入卡券选择器 com024 -->
<!-- v-if="parent.templateCode == 'com024'" -->
...
...
@@ -1233,6 +1346,18 @@ export default {
timeSelect
:
'1'
,
// 最近/之后
timeInput
:
''
},
tag050
:
{
radio
:
'0'
,
dateRangeValue
:
[],
// 相对时间
timeRadio
:
'1'
,
// 年月日
timeChecked
:
false
,
timeAfterChecked
:
false
,
// timeCheckedTwo: false,
timeSelect
:
'1'
,
// 最近/之后
timeInput
:
''
},
// 会员分层
tag021
:
{
checkeditems
:
[],
...
...
@@ -1299,6 +1424,10 @@ export default {
recentValue
:
null
,
checkGroup
:
[]
},
// 关联渠道
tag040
:
{
radioType
:
'1100'
,
},
cardListData
:
[],
com024
:
{},
com025
:
{},
...
...
@@ -2104,9 +2233,10 @@ export default {
}
break
;
case
'tag050'
:
case
'tag020'
:
for
(
let
i
=
0
;
i
<
this
.
templateData
.
length
;
i
++
)
{
if
(
this
.
templateData
[
i
].
templateCode
===
'tag020'
)
{
if
(
this
.
templateData
[
i
].
templateCode
===
'tag020'
||
this
.
templateData
[
i
].
templateCode
===
'tag050'
)
{
let
templateDate
=
tagParams
.
template
[
0
];
// 判断是那个时间段
// 固定时段
...
...
@@ -2277,6 +2407,10 @@ export default {
getTag030Data
.
checkGroup
=
params
.
checkGroup
;
}
break
;
case
'tag040'
:
value
=
tagValue
.
val
[
0
].
data
.
value
;
this
.
templateData
[
i
].
radioType
=
value
;
break
;
case
'tag024'
:
const
getTag024Data
=
this
.
hasTemplate
(
'tag024'
);
...
...
src/components/tagDetail/mixin/index.js
View file @
1cc8afad
...
...
@@ -531,7 +531,7 @@ export default {
}
/* 固定/相对 年月日+最近+之后 年月日+最近 年月日时分秒-年月日时分秒 */
if
((
code
===
'tag014'
||
code
===
'tag017'
||
code
===
'tag019'
||
code
===
'tag020'
||
code
===
'tag015'
)
&&
that
.
templateData
[
0
].
radio
==
1
)
{
if
((
code
===
'tag014'
||
code
===
'tag017'
||
code
===
'tag019'
||
code
===
'tag020'
||
code
===
'tag015'
||
code
==
'tag050'
)
&&
that
.
templateData
[
0
].
radio
==
1
)
{
if
(
!
that
.
templateData
[
0
].
dateRangeValue
||
!
that
.
templateData
[
0
].
dateRangeValue
.
length
)
{
that
.
$message
.
error
({
message
:
'请选择值'
});
return
false
;
...
...
@@ -542,7 +542,7 @@ export default {
}
}
if
((
code
===
'tag014'
||
code
===
'tag017'
||
code
===
'tag019'
||
code
===
'tag020'
||
code
===
'tag015'
))
{
if
((
code
===
'tag014'
||
code
===
'tag017'
||
code
===
'tag019'
||
code
===
'tag020'
||
code
===
'tag015'
||
code
==
'tag050'
))
{
for
(
let
k
of
this
.
templateData
)
{
if
(
!
k
.
timeChecked
&&
!
k
.
timeAfterChecked
&&
k
.
radio
==
2
)
{
let
tips
=
k
.
timeRadio
==
1
?
'天'
:
k
.
timeRadio
==
2
?
'月'
:
'年'
;
...
...
@@ -564,7 +564,16 @@ export default {
}
}
}
if
((
code
===
'tag014'
||
code
===
'tag017'
||
code
===
'tag019'
||
code
===
'tag020'
||
code
===
'tag015'
)
&&
that
.
templateData
.
length
===
1
&&
that
.
templateData
[
0
].
radio
==
1
)
{
if
(
code
==
'tag050'
&&
that
.
templateData
.
length
>
0
&&
that
.
templateData
[
0
].
radio
==
0
)
{
if
(
that
.
currentComputeType
==
2
)
{
tagValue
.
val
[
0
].
data
.
compute
=
'between'
;
}
else
{
tagValue
.
val
[
0
].
data
.
compute
=
that
.
templateData
[
0
].
postCompute
;
}
tagValue
.
val
[
0
].
data
.
value
=
that
.
templateData
[
0
].
radio
;
that
.
postTemplateData
.
selectedVal
.
push
(
'所有时间'
);
}
if
((
code
===
'tag014'
||
code
===
'tag017'
||
code
===
'tag019'
||
code
===
'tag020'
||
code
===
'tag015'
||
code
==
'tag050'
)
&&
that
.
templateData
.
length
>
0
&&
that
.
templateData
[
0
].
radio
==
1
)
{
if
(
that
.
currentComputeType
==
2
)
{
tagValue
.
val
[
0
].
data
.
compute
=
'between'
;
}
else
{
...
...
@@ -572,7 +581,7 @@ export default {
}
tagValue
.
val
[
0
].
data
.
value
=
that
.
templateData
[
0
].
dateRangeValue
.
join
(
','
);
that
.
templateData
[
0
].
timeInput
=
''
;
if
(
code
===
'tag019'
||
code
===
'tag020'
||
code
===
'tag015'
)
{
if
(
code
===
'tag019'
||
code
===
'tag020'
||
code
===
'tag015'
||
code
==
'tag050'
)
{
// 兼容后端,先使用硬编码
if
(
that
.
tagData
.
tagId
==
'f75b8053fe744b2a9a366886bc40612a'
)
{
tagValue
.
val
[
0
].
data
.
value
=
that
.
templateData
[
0
].
dateRangeValue
.
map
(
el
=>
{
...
...
@@ -590,7 +599,7 @@ export default {
that
.
postTemplateData
.
selectedVal
.
push
(
that
.
templateData
[
0
].
dateRangeValue
[
0
].
split
(
' '
)[
0
]
+
'至'
+
that
.
templateData
[
0
].
dateRangeValue
[
1
].
split
(
' '
)[
0
]);
}
if
((
code
===
'tag014'
||
code
===
'tag017'
||
code
===
'tag019'
||
code
===
'tag020'
||
code
===
'tag015'
)
&&
that
.
templateData
.
length
===
1
&&
that
.
templateData
[
0
].
radio
==
2
)
{
if
((
code
===
'tag014'
||
code
===
'tag017'
||
code
===
'tag019'
||
code
===
'tag020'
||
code
===
'tag015'
||
code
==
'tag050'
)
&&
that
.
templateData
.
length
>
0
&&
that
.
templateData
[
0
].
radio
==
2
)
{
// 天
// timeAfterChecked 最近/之后
// timeChecked 当天/年/月
...
...
@@ -1039,6 +1048,10 @@ export default {
that
.
postTemplateData
.
selectedVal
.
push
(
`时间范围为之后
${
ele
.
afterday
}
天`
);
}
}
if
(
ele
.
templateCode
==
'tag040'
)
{
tagValue
.
val
[
0
].
data
.
value
=
ele
.
radioType
;
that
.
postTemplateData
.
selectedVal
.
push
(
ele
.
options
.
find
(
item
=>
item
.
key
==
ele
.
radioType
).
value
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment