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
47d535b7
Commit
47d535b7
authored
Aug 09, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 关联渠道标签
parent
6fd77b26
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
150 additions
and
13 deletions
+150
-13
tag-config-options.vue
src/components/tag/tag-config-options.vue
+28
-3
index.js
src/components/tagDetail/mixin/index.js
+122
-10
No files found.
src/components/tag/tag-config-options.vue
View file @
47d535b7
...
@@ -653,8 +653,7 @@
...
@@ -653,8 +653,7 @@
start-placeholder=
"开始时间"
start-placeholder=
"开始时间"
end-placeholder=
"结束时间"
end-placeholder=
"结束时间"
format=
"yyyy-MM-dd"
format=
"yyyy-MM-dd"
:default-time=
"['00:00:00', '23:59:59']"
value-format=
"yyyy-MM-dd"
>
value-format=
"yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-date-picker>
</div>
</div>
<!-- 相对时段 -->
<!-- 相对时段 -->
...
@@ -2234,9 +2233,35 @@ export default {
...
@@ -2234,9 +2233,35 @@ export default {
break
;
break
;
case
'tag050'
:
case
'tag050'
:
for
(
let
i
=
0
;
i
<
this
.
templateData
.
length
;
i
++
)
{
if
(
this
.
templateData
[
i
].
templateCode
===
'tag050'
)
{
let
templateDate
=
tagParams
.
template
[
0
];
// 判断是那个时间段
// 固定时段
this
.
templateData
[
i
].
radio
=
templateDate
.
radio
;
// 时段
if
(
this
.
templateData
[
i
].
radio
==
1
)
{
if
(
templateDate
.
dateRangeValue
&&
templateDate
.
dateRangeValue
.
length
)
{
this
.
templateData
[
i
].
dateRangeValue
=
templateDate
.
dateRangeValue
;
}
else
{
this
.
templateData
[
i
].
dateRangeValue
=
tagValue
.
val
[
0
].
data
.
value
.
split
(
','
);
}
}
else
{
// 相对时段
this
.
templateData
[
i
].
timeRadio
=
templateDate
.
timeRadio
;
// 天 月 年
this
.
templateData
[
i
].
timeAfterChecked
=
templateDate
.
timeAfterChecked
;
this
.
templateData
[
i
].
timeChecked
=
templateDate
.
timeChecked
;
this
.
templateData
[
i
].
dateRangeValue
=
[];
}
// 如果有最近选项必有 timeInput
if
(
this
.
templateData
[
i
].
timeAfterChecked
)
{
this
.
templateData
[
i
].
timeInput
=
tagValue
.
time
[
0
].
value
;
}
}
}
break
;
case
'tag020'
:
case
'tag020'
:
for
(
let
i
=
0
;
i
<
this
.
templateData
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
templateData
.
length
;
i
++
)
{
if
(
this
.
templateData
[
i
].
templateCode
===
'tag020'
||
this
.
templateData
[
i
].
templateCode
===
'tag050'
)
{
if
(
this
.
templateData
[
i
].
templateCode
===
'tag020'
)
{
let
templateDate
=
tagParams
.
template
[
0
];
let
templateDate
=
tagParams
.
template
[
0
];
// 判断是那个时间段
// 判断是那个时间段
// 固定时段
// 固定时段
...
...
src/components/tagDetail/mixin/index.js
View file @
47d535b7
...
@@ -564,16 +564,128 @@ export default {
...
@@ -564,16 +564,128 @@ export default {
}
}
}
}
}
}
if
(
code
==
'tag050'
&&
that
.
templateData
.
length
>
0
&&
that
.
templateData
[
0
].
radio
==
0
)
{
if
(
code
==
'tag050'
&&
that
.
templateData
.
length
>
0
)
{
if
(
that
.
currentComputeType
==
2
)
{
switch
(
Number
(
that
.
templateData
[
0
].
radio
))
{
tagValue
.
val
[
0
].
data
.
compute
=
'between'
;
case
0
:
}
else
{
tagValue
.
time
[
0
].
compute
=
'all'
;
tagValue
.
val
[
0
].
data
.
compute
=
that
.
templateData
[
0
].
postCompute
;
tagValue
.
time
[
0
].
value
=
''
;
that
.
postTemplateData
.
selectedVal
.
push
(
'所有时间'
);
break
;
case
1
:
tagValue
.
time
[
0
].
compute
=
'between'
;
tagValue
.
time
[
0
].
value
=
that
.
templateData
[
0
].
dateRangeValue
.
join
(
','
)
that
.
postTemplateData
.
selectedVal
.
push
(
that
.
templateData
[
0
].
dateRangeValue
[
0
].
split
(
' '
)[
0
]
+
'至'
+
that
.
templateData
[
0
].
dateRangeValue
[
1
].
split
(
' '
)[
0
]);
break
;
case
2
:
// tagValue.time[0].compute = 'lastday';
// tagValue.time[0].value = that.templateData[0].dateRangeValue
// 天
// timeAfterChecked 最近/之后
// timeChecked 当天/年/月
if
(
that
.
templateData
[
0
].
timeRadio
==
1
)
{
/** 同时选择
* lastdayHasToday 最近几天包含今天
* afterdayHasToday 之后几天包含今天
*/
if
(
that
.
templateData
[
0
].
timeChecked
&&
that
.
templateData
[
0
].
timeAfterChecked
)
{
if
(
that
.
templateData
[
0
].
timeSelect
==
1
)
{
tagValue
.
time
[
0
].
compute
=
'lastdayHasToday'
;
tagValue
.
time
[
0
].
value
=
String
(
that
.
templateData
[
0
].
timeInput
);
that
.
postTemplateData
.
selectedVal
.
push
(
`最近
${
that
.
templateData
[
0
].
timeInput
}
天包含当天`
);
that
.
templateData
[
0
].
timeInput
=
''
;
}
that
.
postTemplateData
.
template
=
that
.
templateData
;
tagParams
=
that
.
postTemplateData
;
}
//天 当天
if
(
that
.
templateData
[
0
].
timeChecked
&&
!
that
.
templateData
[
0
].
timeAfterChecked
)
{
tagValue
.
time
[
0
].
compute
=
'today'
tagValue
.
time
[
0
].
value
=
'1'
;
that
.
postTemplateData
.
selectedVal
.
push
(
'当天'
);
that
.
templateData
[
0
].
timeInput
=
''
;
}
if
(
that
.
templateData
[
0
].
timeAfterChecked
&&
!
that
.
templateData
[
0
].
timeChecked
)
{
if
(
that
.
templateData
[
0
].
timeSelect
==
1
)
{
// 最近
tagValue
.
time
[
0
].
compute
=
'lastday'
;
tagValue
.
time
[
0
].
value
=
String
(
that
.
templateData
[
0
].
timeInput
);
that
.
postTemplateData
.
selectedVal
.
push
(
`最近
${
that
.
templateData
[
0
].
timeInput
}
天`
);
}
}
}
// 月
if
(
that
.
templateData
[
0
].
timeRadio
==
2
)
{
/**
* lastmonthHasCurrentMonth 最近几月包含当月
* aftermonthHasCurrentMonth 之后几月包含当月
*/
if
(
that
.
templateData
[
0
].
timeChecked
&&
that
.
templateData
[
0
].
timeAfterChecked
)
{
if
(
that
.
templateData
[
0
].
timeSelect
==
1
)
{
tagValue
.
time
[
0
].
compute
=
'lastmonthHasCurrentMonth'
;
tagValue
.
time
[
0
].
value
=
String
(
that
.
templateData
[
0
].
timeInput
);
that
.
postTemplateData
.
selectedVal
.
push
(
`最近
${
that
.
templateData
[
0
].
timeInput
}
月包含当月`
);
that
.
templateData
[
0
].
timeInput
=
''
;
}
that
.
postTemplateData
.
template
=
that
.
templateData
;
tagParams
=
that
.
postTemplateData
;
}
//月 当月
if
(
that
.
templateData
[
0
].
timeChecked
&&
!
that
.
templateData
[
0
].
timeAfterChecked
)
{
tagValue
.
time
[
0
].
compute
=
'currentMonth'
;
tagValue
.
time
[
0
].
value
=
'1'
;
that
.
postTemplateData
.
selectedVal
.
push
(
'当月'
);
that
.
templateData
[
0
].
timeInput
=
''
;
}
// 最近/之后
if
(
that
.
templateData
[
0
].
timeAfterChecked
&&
!
that
.
templateData
[
0
].
timeChecked
)
{
if
(
that
.
templateData
[
0
].
timeSelect
==
1
)
{
// 最近
tagValue
.
time
[
0
].
compute
=
'lastmonth'
;
tagValue
.
time
[
0
].
value
=
String
(
that
.
templateData
[
0
].
timeInput
);
that
.
postTemplateData
.
selectedVal
.
push
(
`最近
${
that
.
templateData
[
0
].
timeInput
}
月`
);
}
}
}
// 年
if
(
that
.
templateData
[
0
].
timeRadio
==
3
)
{
/**
* lastyearHasCurrentYear 最近几年包含当年
* afteryearHasCurrentYear 之后几年包含当年
*/
if
(
that
.
templateData
[
0
].
timeChecked
&&
that
.
templateData
[
0
].
timeAfterChecked
)
{
if
(
that
.
templateData
[
0
].
timeSelect
==
1
)
{
tagValue
.
time
[
0
].
compute
=
'lastyearHasCurrentYear'
;
tagValue
.
time
[
0
].
value
=
String
(
that
.
templateData
[
0
].
timeInput
);
that
.
postTemplateData
.
selectedVal
.
push
(
`最近
${
that
.
templateData
[
0
].
timeInput
}
年包含当年`
);
that
.
templateData
[
0
].
timeInput
=
''
;
}
that
.
postTemplateData
.
template
=
that
.
templateData
;
tagParams
=
that
.
postTemplateData
;
}
//年 当年
if
(
that
.
templateData
[
0
].
timeChecked
&&
!
that
.
templateData
[
0
].
timeAfterChecked
)
{
tagValue
.
time
[
0
].
compute
=
'currentYear'
;
tagValue
.
time
[
0
].
value
=
'1'
;
that
.
postTemplateData
.
selectedVal
.
push
(
'当年'
);
that
.
templateData
[
0
].
timeInput
=
''
;
}
// 最近/之后
if
(
that
.
templateData
[
0
].
timeAfterChecked
&&
!
that
.
templateData
[
0
].
timeChecked
)
{
if
(
that
.
templateData
[
0
].
timeSelect
==
1
)
{
// 最近
tagValue
.
time
[
0
].
compute
=
'lastyear'
;
tagValue
.
time
[
0
].
value
=
String
(
that
.
templateData
[
0
].
timeInput
);
that
.
postTemplateData
.
selectedVal
.
push
(
`最近
${
that
.
templateData
[
0
].
timeInput
}
年`
);
}
}
}
break
;
}
}
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
((
code
===
'tag014'
||
code
===
'tag017'
||
code
===
'tag019'
||
code
===
'tag020'
||
code
===
'tag015'
)
&&
that
.
templateData
.
length
>
0
&&
that
.
templateData
[
0
].
radio
==
1
)
{
if
(
that
.
currentComputeType
==
2
)
{
if
(
that
.
currentComputeType
==
2
)
{
tagValue
.
val
[
0
].
data
.
compute
=
'between'
;
tagValue
.
val
[
0
].
data
.
compute
=
'between'
;
}
else
{
}
else
{
...
@@ -581,7 +693,7 @@ export default {
...
@@ -581,7 +693,7 @@ export default {
}
}
tagValue
.
val
[
0
].
data
.
value
=
that
.
templateData
[
0
].
dateRangeValue
.
join
(
','
);
tagValue
.
val
[
0
].
data
.
value
=
that
.
templateData
[
0
].
dateRangeValue
.
join
(
','
);
that
.
templateData
[
0
].
timeInput
=
''
;
that
.
templateData
[
0
].
timeInput
=
''
;
if
(
code
===
'tag019'
||
code
===
'tag020'
||
code
===
'tag015'
||
code
==
'tag050'
)
{
if
(
code
===
'tag019'
||
code
===
'tag020'
||
code
===
'tag015'
)
{
// 兼容后端,先使用硬编码
// 兼容后端,先使用硬编码
if
(
that
.
tagData
.
tagId
==
'f75b8053fe744b2a9a366886bc40612a'
)
{
if
(
that
.
tagData
.
tagId
==
'f75b8053fe744b2a9a366886bc40612a'
)
{
tagValue
.
val
[
0
].
data
.
value
=
that
.
templateData
[
0
].
dateRangeValue
.
map
(
el
=>
{
tagValue
.
val
[
0
].
data
.
value
=
that
.
templateData
[
0
].
dateRangeValue
.
map
(
el
=>
{
...
@@ -599,7 +711,7 @@ export default {
...
@@ -599,7 +711,7 @@ export default {
that
.
postTemplateData
.
selectedVal
.
push
(
that
.
templateData
[
0
].
dateRangeValue
[
0
].
split
(
' '
)[
0
]
+
'至'
+
that
.
templateData
[
0
].
dateRangeValue
[
1
].
split
(
' '
)[
0
]);
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'
||
code
==
'tag050'
)
&&
that
.
templateData
.
length
>
0
&&
that
.
templateData
[
0
].
radio
==
2
)
{
if
((
code
===
'tag014'
||
code
===
'tag017'
||
code
===
'tag019'
||
code
===
'tag020'
||
code
===
'tag015'
)
&&
that
.
templateData
.
length
>
0
&&
that
.
templateData
[
0
].
radio
==
2
)
{
// 天
// 天
// timeAfterChecked 最近/之后
// timeAfterChecked 最近/之后
// timeChecked 当天/年/月
// timeChecked 当天/年/月
...
...
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