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
b6afa199
Commit
b6afa199
authored
Apr 25, 2022
by
liuchenxi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 标签规则调整
parent
7b813d24
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
33 deletions
+69
-33
tag-config-options.vue
src/components/tag/tag-config-options.vue
+62
-24
index.js
src/components/tagDetail/mixin/index.js
+5
-4
memberGroupDetail.vue
src/view/memberGroup/memberGroupDetail.vue
+2
-5
No files found.
src/components/tag/tag-config-options.vue
View file @
b6afa199
...
...
@@ -4,17 +4,27 @@
<div
v-for=
"(parent, pindex) in templateData"
:key=
"pindex"
>
<!-- 1.选项控件 -->
<template
v-if=
"parent.templateCode == 'tag001'"
>
<div
class=
"m-b-20"
:key=
"'tag1' + pindex"
>
<div
class=
"checkboxOption-wrap__body__checkAll border-box tag-mode"
>
<el-checkbox
:indeterminate=
"parent.isIndeterminate"
v-model=
"parent.checkAll"
@
change=
"handleCheckAllChange($event, parent)"
>
全选
</el-checkbox>
<template
v-if=
"tagData.isMultiple"
>
<div
class=
"m-b-20"
:key=
"'tag1' + pindex"
>
<div
class=
"checkboxOption-wrap__body__checkAll border-box tag-mode"
>
<el-checkbox
:indeterminate=
"parent.isIndeterminate"
v-model=
"parent.checkAll"
@
change=
"handleCheckAllChange($event, parent)"
>
全选
</el-checkbox>
</div>
<div
class=
"checkboxOption-wrap__body__options border-box tag-options"
>
<el-checkbox-group
v-model=
"parent.checkeditems"
@
change=
"handleCheckedCitiesChange"
>
<el-checkbox
v-for=
"(item, index) in parent.options"
:label=
"item.key"
:key=
"item.key + index"
>
{{
item
.
value
}}
</el-checkbox>
</el-checkbox-group>
</div>
</div>
<div
class=
"checkboxOption-wrap__body__options border-box tag-options"
>
<!-- @change="handleCheckedChange($event, parent)" -->
<el-checkbox-group
v-model=
"parent.checkeditems"
@
change=
"handleCheckedCitiesChange"
>
<el-checkbox
v-for=
"(item, index) in parent.options"
:label=
"item.key"
:key=
"item.key + index"
>
{{
item
.
value
}}
</el-checkbox>
</el-checkbox-group>
</
template
>
<
template
v-else
>
<div
class=
"m-b-20"
:key=
"'tag1' + pindex"
>
<div
class=
"checkboxOption-wrap__body__options border-box tag-options"
>
<el-radio-group
v-model=
"parent.checkeditems"
>
<el-radio
v-for=
"(item, index) in parent.options"
:label=
"item.key"
:key=
"item.key + index"
>
{{
item
.
value
}}
</el-radio>
</el-radio-group>
</div>
</div>
</
div
>
</
template
>
</template>
<!-- 2.数字范围 -->
...
...
@@ -167,12 +177,13 @@
format=
"yyyy-MM-dd"
value-format=
"yyyyMMdd"
:picker-options=
"pickerOptions"
>
<!-- :picker-options="pickerOptions" -->
>
</el-date-picker>
<div
v-if=
"parent.fixedRecentRadio == 2"
>
<label
class=
"inline-block middle label-unit m-r-8"
>
最近
</label
><el-input
v-model=
"parent.fixedRecentTimeRecent"
placeholder=
"请输入1-730"
class=
"m-r-8"
style=
"width: 120px"
@
blur=
"value => toEditInput(value, 'fixedRecentTimeRecent', parent)"
></el-input
><label
class=
"inline-block middle label-unit"
>
天
</label>
<span
class=
"tips m-l-8"
>
(输入1则统计昨天获取的积分)
</span>
</div>
</div>
</div>
...
...
@@ -552,6 +563,7 @@
start-placeholder=
"开始时间"
end-placeholder=
"结束时间"
format=
"yyyy-MM-dd"
:picker-options=
"tag020PickerOptions(parent)"
:default-time=
"['00:00:00', '23:59:59']"
value-format=
"yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
...
...
@@ -652,7 +664,16 @@
<div
class=
"relative-range m-t-18 border-box"
v-if=
"parent.radio != 1"
>
<div>
<div>
<label
class=
"inline-block w-98 label-unit"
>
时间精度
</label>
<label
class=
"inline-block w-98 label-unit"
>
时间精度
<el-popover
placement=
"top-end"
trigger=
"hover"
>
<template>
<span
style=
"font-weight: 600"
>
选择【天】:
</span><br
/>
当天:选择相对时段为“当天”,那么统计的是当天凌晨至当前时间内的数据;
<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号的数据。
<br
/>
</
template
>
<i
slot=
"reference"
class=
"iconfont icon-QuestionCircleOutlined"
style=
"font-size: 14px"
/>
</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>
...
...
@@ -667,10 +688,9 @@
</div>
<div
class=
"m-t-20"
>
<label
class=
"inline-block w-98"
></label>
<el-checkbox
v-model=
"parent.timeAfterChecked"
></el-checkbox>
<el-select
v-model=
"parent.timeSelect"
placeholder=
"请选择"
class=
"w-86 m-l-8"
>
<el-option
label=
"最近"
value=
"1"
></el-option>
</el-select>
<el-checkbox
v-model=
"parent.timeAfterChecked"
style=
"margin-right: 6px"
></el-checkbox>
<label
class=
"inline-block middle label-unit m-r-8"
>
最近
</label>
<el-input
v-model=
"parent.timeInput"
placeholder=
"请输入"
...
...
@@ -806,8 +826,9 @@
</el-date-picker>
<div
v-if=
"parent.radio == 2"
>
<label
class=
"inline-block middle label-unit m-r-8"
>
之后
</label
><el-input
v-model=
"parent.afterday"
placeholder=
"请输入
"
class=
"w-90
m-r-8"
@
blur=
"value => toEditInput(value, 'afterday', parent)"
></el-input
><el-input
v-model=
"parent.afterday"
placeholder=
"请输入
1-365"
style=
"width: 120px"
class=
"
m-r-8"
@
blur=
"value => toEditInput(value, 'afterday', parent)"
></el-input
><label
class=
"inline-block middle label-unit"
>
天
</label>
<span
class=
"tips m-l-8"
>
(输入1则统计截止到明天23:59:59即将过期的积分)
</span>
</div>
</div>
</div>
...
...
@@ -1261,7 +1282,6 @@ export default {
disabledDate
(
time
)
{
const
getYear
=
new
Date
().
getFullYear
();
const
setYear
=
new
Date
().
setYear
(
getYear
+
1
);
console
.
log
(
time
.
getTime
(),
setYear
);
return
time
.
getTime
()
>
(
setYear
-
24
*
60
*
60
*
1000
);
}
},
...
...
@@ -1314,11 +1334,10 @@ export default {
computed
:
{
pickerOptions
()
{
return
{
disabledDate
:
(
time
)
=>
{
const
isCom009
=
this
.
hasTemplate
(
'com009'
);
if
(
isCom009
)
{
return
time
.
getTime
()
<
Date
.
now
()
-
isCom009
.
tag004DatePickerLimt
;
}
disabledDate
(
time
)
{
const
getYear
=
new
Date
().
getFullYear
();
const
setYear
=
new
Date
().
setYear
(
getYear
-
2
);
return
time
.
getTime
()
<
(
setYear
);
}
}
},
...
...
@@ -1331,6 +1350,18 @@ export default {
}
},
methods
:
{
tag020PickerOptions
(
parent
)
{
return
{
disabledDate
:
time
=>
{
if
(
!
parent
.
expandParams
)
return
false
;
const
controlJson
=
JSON
.
parse
(
parent
.
expandParams
);
const
before
=
controlJson
.
find
(
el
=>
el
.
key
===
'before'
);
const
getYear
=
new
Date
().
getFullYear
();
const
setYear
=
new
Date
().
setYear
(
getYear
-
before
.
value
);
return
time
.
getTime
()
<
setYear
;
}
}
},
hasTemplate
(
code
)
{
return
this
.
templateData
.
find
(
el
=>
el
.
templateCode
===
code
);
},
...
...
@@ -1438,6 +1469,7 @@ export default {
this
.
tagData
.
tagName
=
data
.
tagName
;
this
.
currentKey
=
data
.
columnKey
;
this
.
tagData
.
isActive
=
data
.
isActive
;
this
.
tagData
.
isMultiple
=
data
.
isMultiple
;
if
(
!!
this
.
templateObj
.
template
)
{
// 检查模板code
this
.
checkTemplageCode
(
this
.
templateObj
.
template
.
templateContent
);
...
...
@@ -1514,7 +1546,6 @@ export default {
handleFindWidgetData
(
res
){
let
data
=
res
.
result
;
for
(
let
key
in
data
)
{
console
.
log
(
key
)
if
(
data
.
templateCode
==
'com023'
)
{
this
[
data
.
templateCode
][
key
]
=
data
[
key
];
}
else
if
(
data
.
templateCode
==
'com025'
)
{
...
...
@@ -1881,7 +1912,10 @@ export default {
value
=
tagValue
.
val
[
0
].
data
.
value
.
split
(
' '
);
for
(
let
i
=
0
;
i
<
this
.
templateData
.
length
;
i
++
)
{
if
(
this
.
templateData
[
i
].
templateCode
===
'tag001'
)
{
this
.
templateData
[
i
].
checkeditems
=
value
;
if
(
this
.
tagData
.
isMultiple
)
this
.
templateData
[
i
].
checkeditems
=
value
;
else
{
this
.
templateData
[
i
].
checkeditems
=
value
.
toString
();
}
}
}
checkedCount
=
this
.
templateData
[
i
].
checkeditems
.
length
;
...
...
@@ -2628,6 +2662,10 @@ export default {
width
:
160px
;
}
}
.tips
{
color
:
#909399
;
font-size
:
14px
;
}
</
style
>
<
style
lang=
"scss"
>
.tag025-scrollbar
{
...
...
src/components/tagDetail/mixin/index.js
View file @
b6afa199
...
...
@@ -362,10 +362,13 @@ export default {
return
false
;
}
if
(
code
===
'tag001'
&&
that
.
templateData
.
length
===
1
)
{
let
value
=
that
.
templateData
[
0
].
checkeditems
;
if
(
!
Array
.
isArray
(
value
))
value
=
new
Array
(
value
);
tagValue
.
val
[
0
].
data
.
compute
=
that
.
templateData
[
0
].
postCompute
;
tagValue
.
val
[
0
].
data
.
value
=
that
.
templateData
[
0
].
checkeditems
.
join
(
' '
);
tagValue
.
val
[
0
].
data
.
value
=
value
.
join
(
' '
);
that
.
templateData
[
0
].
options
.
forEach
(
function
(
ele
,
index
)
{
if
(
that
.
templateData
[
0
].
checkeditems
.
indexOf
(
ele
.
key
)
!=
-
1
)
{
console
.
log
(
value
,
ele
);
if
(
value
.
includes
(
ele
.
key
))
{
that
.
postTemplateData
.
selectedVal
.
push
(
ele
.
value
);
}
});
...
...
@@ -541,7 +544,6 @@ export default {
if
((
code
===
'tag014'
||
code
===
'tag017'
||
code
===
'tag019'
||
code
===
'tag020'
||
code
===
'tag015'
))
{
for
(
let
k
of
this
.
templateData
)
{
console
.
log
(
k
);
if
(
!
k
.
timeChecked
&&
!
k
.
timeAfterChecked
&&
k
.
radio
==
2
)
{
let
tips
=
k
.
timeRadio
==
1
?
'天'
:
k
.
timeRadio
==
2
?
'月'
:
'年'
;
this
.
$message
.
warning
({
...
...
@@ -1265,7 +1267,6 @@ export default {
that
.
closeTagShortDialog
();
// 如果来源是 会员标签编辑的时候
// if (that.fromFlag == 'memberGroup') {
console
.
log
(
tagParams
,
JSON
.
stringify
(
tagParams
));
let
sendObj
=
{
tagId
:
that
.
tagShortId
||
this
.
tagId
,
tagValue
:
JSON
.
stringify
(
tagValue
),
...
...
src/view/memberGroup/memberGroupDetail.vue
View file @
b6afa199
...
...
@@ -233,13 +233,12 @@
</
template
>
</template>
</el-table-column>
<el-table-column
label-class-name=
"table-header__handle"
:min-width=
"120"
>
<el-table-column
label-class-name=
"table-header__handle"
:min-width=
"120"
fixed=
"right"
>
<
template
slot=
"header"
>
<span>
操作
</span>
<i
class=
"el-icon-setting"
@
click=
"showDefined"
></i>
</
template
>
<
template
slot-scope=
"scope"
>
<template
v-if=
"$getButtonLimit($buttonCode.memberTagToCheck)"
>
<
template
slot-scope=
"scope"
v-if=
"$getButtonLimit($buttonCode.memberTagToCheck)"
>
<a
rel=
"nofollow noopener noreferrer"
target=
"_blank"
...
...
@@ -258,8 +257,6 @@
class=
"el-button el-button--text"
>
查看
</a
>
</
template
>
<
template
v-else
>
--
</
template
>
</
template
>
</el-table-column>
</el-table>
...
...
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