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
e1d8abd8
Commit
e1d8abd8
authored
Apr 13, 2019
by
member
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-dingdang' into dev
parents
2b676e87
fe7d1dae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
13 deletions
+25
-13
memberGroupEdit.vue
src/view/memberGroup/memberGroupEdit.vue
+10
-2
tags-group-list.vue
src/view/memberGroup/tags-group-list.vue
+15
-11
No files found.
src/view/memberGroup/memberGroupEdit.vue
View file @
e1d8abd8
...
...
@@ -10,7 +10,14 @@
已选标签
<span
class=
"color-c0c4cc font-14"
>
(同一个输入框内标签关系为且)
</span>
</div>
<tags-group-list
:selectedTagsData=
"ruleForm.selectedTags"
:tagsGroupRelation=
"ruleForm.tagsGroupRelation"
:showAddMenu=
"true"
@
addTags=
"addTags"
@
editTags=
"editTags"
/>
<tags-group-list
:selectedTagsData=
"ruleForm.selectedTags"
:tagsGroupRelation=
"ruleForm.tagsGroupRelation"
:activeTagsGroupIndex
.
sync=
"activeTagsGroupIndex"
:showAddMenu=
"true"
@
addTags=
"addTags"
@
editTags=
"editTags"
/>
</el-form-item>
<el-form-item
label=
""
prop=
"groupName"
class=
"w-220"
>
<div>
分组名称
</div>
...
...
@@ -129,6 +136,7 @@ export default {
updateDay
:
''
,
effectiveStatus
:
1
},
activeTagsGroupIndex
:
0
,
// 有效期时间选择器的配置
pickerOptions
:
{
disabledDate
(
time
)
{
...
...
@@ -228,7 +236,7 @@ export default {
// 添加标签
addTags
(
data
)
{
console
.
log
(
`添加标签,标签组的索引是
${
data
.
t
agsGroupIndex
}
`
);
console
.
log
(
`添加标签,标签组的索引是
${
this
.
activeT
agsGroupIndex
}
`
);
},
// 编辑标签
...
...
src/view/memberGroup/tags-group-list.vue
View file @
e1d8abd8
...
...
@@ -8,7 +8,7 @@
:tagsGroupIndex=
"index"
:tagsRelation=
"tagsGroupRelation[index]"
:showAddMenu=
"showAddMenu"
:active=
"activeTagsGroup === index"
:active=
"activeTagsGroup
Index
=== index"
@
addTags=
"addTags"
@
delTags=
"delTags"
@
editTags=
"editTags"
...
...
@@ -69,6 +69,11 @@ import { getMemberTagCount } from '@/request/memberGroup.js';
export
default
{
name
:
'tags-detail'
,
props
:
{
// 标签组选中状态的索引
activeTagsGroupIndex
:
{
type
:
Number
,
default
:
0
},
// 标签数据
selectedTagsData
:
Array
,
// 标签组之间的关系
...
...
@@ -91,8 +96,6 @@ export default {
tagsList
:
[],
// 一组标签的数据
tagsGroupList
:
[],
// 标签组选中状态的索引
activeTagsGroup
:
0
,
// 分页相关
pageNum
:
1
,
...
...
@@ -108,39 +111,40 @@ export default {
this
.
selectedTagsData
.
length
>
1
&&
this
.
tagsGroupRelation
.
push
(
'or'
);
}
// this.$emit('addTagsGroup');
this
.
activeTagsGroup
=
this
.
selectedTagsData
.
length
-
1
;
this
.
checkTagsGroup
({
tagsGroupIndex
:
this
.
selectedTagsData
.
length
-
1
})
;
},
// 删除一个标签组
delTagsGroup
(
data
)
{
this
.
tagsGroupRelation
.
splice
(
data
.
tagsGroupIndex
===
this
.
selectedTagsData
.
length
-
1
?
data
.
tagsGroupIndex
-
1
:
data
.
tagsGroupIndex
,
1
);
this
.
selectedTagsData
.
splice
(
data
.
tagsGroupIndex
,
1
);
this
.
activeTagsGroup
=
0
;
this
.
checkTagsGroup
({
tagsGroupIndex
:
0
})
;
},
// 添加标签
addTags
(
data
)
{
// 添加之前先判断已选中的标签中是否存在即将添加的标签
this
.
activeTagsGroup
=
data
.
tagsGroupIndex
;
this
.
showAddTagPop
=
true
;
this
.
$emit
(
'addTags'
,
{
tagsGroupIndex
:
this
.
activeTagsGroup
});
this
.
checkTagsGroup
({
tagsGroupIndex
:
data
.
tagsGroupIndex
});
this
.
$emit
(
'addTags'
);
},
// 删除标签
delTags
(
data
)
{
this
.
selectedTagsData
[
data
.
tagsGroupIndex
].
splice
(
data
.
tagIndex
,
1
);
this
.
activeTagsGroup
=
data
.
tagsGroupIndex
;
this
.
checkTagsGroup
({
tagsGroupIndex
:
data
.
tagsGroupIndex
})
;
},
// 编辑一个标签
editTags
(
data
)
{
// 保存之前先判断已选中的标签中是否存在即将添加的标签
this
.
activeTagsGroup
=
data
.
tagsGroupIndex
;
this
.
checkTagsGroup
({
tagsGroupIndex
:
data
.
tagsGroupIndex
})
;
this
.
$emit
(
'editTags'
,
{
tagsGroupIndex
:
data
.
tagsGroupIndex
,
tagIndex
:
data
.
tagIndex
});
},
// 修改两个标签组之间的关系
changeTagsGroupRelation
(
data
)
{
this
.
tagsGroupRelation
[
data
.
relationIndex
]
=
this
.
tagsGroupRelation
[
data
.
relationIndex
]
===
'or'
?
'andNot'
:
'or'
;
},
//
点击标签组
切换标签组的选中状态
// 切换标签组的选中状态
checkTagsGroup
(
data
)
{
this
.
activeTagsGroup
=
data
.
tagsGroupIndex
;
this
.
activeTagsGroupIndex
=
data
.
tagsGroupIndex
;
this
.
$emit
(
'update:activeTagsGroupIndex'
,
data
.
tagsGroupIndex
);
},
// 获取标签分类
getTagsList
()
{
...
...
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