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
7542caa0
Commit
7542caa0
authored
Apr 13, 2019
by
member
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加标签
parent
e1d8abd8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
18 deletions
+38
-18
tag-config-options.vue
src/components/tag/tag-config-options.vue
+3
-0
index.js
src/components/tagDetail/mixin/index.js
+1
-0
member-tag.vue
src/view/platformTag/member-tag.vue
+29
-13
platformTagDetail.vue
src/view/platformTag/platformTagDetail.vue
+3
-4
tag-container.vue
src/view/platformTag/tag-container.vue
+2
-1
No files found.
src/components/tag/tag-config-options.vue
View file @
7542caa0
...
...
@@ -548,6 +548,7 @@
<
script
>
import
qs
from
'qs'
;
import
tagDetails
from
'@/components/tagDetail/mixin/index'
;
import
GicSelect
from
'./birth-select'
;
import
{
getTagType
,
findWidget
,
findOndJson
}
from
'@/request/tagConfig'
;
...
...
@@ -566,6 +567,8 @@ export default {
tagId
:
String
},
mixins
:
[
tagDetails
],
data
()
{
return
{
templateData
:
[],
...
...
src/components/tagDetail/mixin/index.js
View file @
7542caa0
...
...
@@ -629,6 +629,7 @@ export default {
that
.
closeTagShortDialog
();
// 如果来源是 会员标签编辑的时候
// if (that.fromFlag == 'memberGroup') {
console
.
log
(
this
.
tagData
);
let
sendObj
=
{
tagId
:
that
.
tagShortId
||
this
.
tagId
,
tagValue
:
JSON
.
stringify
(
tagValue
),
...
...
src/view/platformTag/member-tag.vue
View file @
7542caa0
...
...
@@ -37,9 +37,9 @@
</div>
<!-- 我的标签 -->
<div
class=
"my-pop-tagbox"
v-if=
"
selectedTags.length
> 0"
@
click=
"expendsGroupList"
>
<div
class=
"my-pop-tagbox"
v-if=
"
groupListNumber
> 0"
@
click=
"expendsGroupList"
>
<p
class=
"txt"
>
已选标签
</p>
<p
class=
"number-txt"
>
{{
selectedTags
.
length
}}
</p>
<p
class=
"number-txt"
>
{{
groupListNumber
}}
</p>
</div>
</div>
</div>
...
...
@@ -50,9 +50,9 @@
<vue-gic-footer></vue-gic-footer>
</div>
<div
class=
"grouo-right-list"
v-show=
"groupShow &&
selectedTags.length
"
>
<div
class=
"grouo-right-list"
v-show=
"groupShow &&
groupListNumber
"
>
<el-collapseTransition>
<tags-group-list
:selectedTagsData=
"selectedTags"
:tagsGroupRelation=
"tagsGroupRelation"
@
addTags=
"addTags"
@
editTags=
"editTags"
/>
<tags-group-list
:selectedTagsData=
"selectedTags"
:tagsGroupRelation=
"tagsGroupRelation"
@
addTags=
"addTags"
@
editTags=
"editTags"
:activeTagsGroupIndex
.
sync=
"activeTagsGroupIndex"
/>
</el-collapseTransition>
</div>
</div>
...
...
@@ -83,9 +83,10 @@ export default {
data
()
{
return
{
activeTagsGroupIndex
:
0
,
groupShow
:
false
,
selectedTags
:
[],
tagsGroupRelation
:
[
[]
],
selectedTags
:
[
[]
],
tagsGroupRelation
:
[],
// 面包屑参数
navpath
:
[
{
...
...
@@ -114,18 +115,33 @@ export default {
};
},
computed
:
{
groupListNumber
()
{
return
this
.
selectedTags
.
reduce
((
curr
,
el
)
=>
{
return
curr
+
el
.
length
;
},
0
);
}
},
methods
:
{
expendsGroupList
()
{
if
(
this
.
selectedTags
&&
this
.
selectedTags
.
length
)
{
this
.
groupShow
=
true
;
}
//
if (this.selectedTags && this.selectedTags.length) {
this
.
groupShow
=
true
;
//
}
},
returnTagData
(
list
)
{
console
.
log
(
this
.
selectedTags
);
// 如果存在id
let
index
=
this
.
selectedTags
.
findIndex
(
el
=>
el
.
tagId
===
list
.
tagId
);
// 把添加的标签数据加到显示组件中 activeTagsGroupIndex
// 判断是否已经存在于当前二维数组里面
let
middleList
=
this
.
selectedTags
.
reduce
((
curr
,
el
)
=>
{
return
curr
.
concat
(
el
);
},
[]);
let
index
=
middleList
.
findIndex
(
el
=>
el
.
tagId
===
list
.
tagId
);
// 不存在这个元素
if
(
index
<
0
)
{
this
.
selectedTags
.
push
(
list
);
this
.
selectedTags
[
this
.
activeTagsGroupIndex
].
push
(
list
);
}
else
{
// 否则就是修改
}
},
editTags
()
{
...
...
src/view/platformTag/platformTagDetail.vue
View file @
7542caa0
...
...
@@ -985,10 +985,9 @@ export default {
* 确定添加
*/
addTemporary
:
_debounce
(
function
()
{
const
that
=
this
;
that
.
addTemporaryPost
();
},
500
),
addTemporary
()
{
this
.
addTemporaryPost
();
},
/* eslint-disable */
async
addTemporaryPost
()
{
...
...
src/view/platformTag/tag-container.vue
View file @
7542caa0
...
...
@@ -32,7 +32,7 @@
<el-dialog
title=
"添加标签"
:visible
.
sync=
"dialogVisible"
width=
"540"
:before-close=
"handleClose"
>
<div
class=
"dialog-box"
>
<p
class=
"tag-name"
>
{{
dialo
gData.tagName }}
</p>
<p
class=
"tag-name"
>
{{
ta
gData.tagName }}
</p>
<p
class=
"tag-desc"
>
根据会员信息扩展字段统计而来
</p>
<p
class=
"tag-desc"
>
标签值设置
</p>
<!-- 所有标签的配置项 -->
...
...
@@ -125,6 +125,7 @@ export default {
// 添加标签 弹框里面操作
addTag
(
list
)
{
this
.
dialogData
=
list
;
this
.
tagData
=
list
;
this
.
middleList
=
list
;
if
(
list
.
tagId
)
{
this
.
optionFlag
=
true
;
...
...
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