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
2b676e87
Commit
2b676e87
authored
Apr 13, 2019
by
member
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接添加标签组件
parent
d4950bd1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
16 deletions
+55
-16
index.js
src/components/tagDetail/mixin/index.js
+5
-8
member-tag.vue
src/view/platformTag/member-tag.vue
+48
-5
tag-container.vue
src/view/platformTag/tag-container.vue
+1
-1
index.less
static/css/index.less
+1
-2
No files found.
src/components/tagDetail/mixin/index.js
View file @
2b676e87
...
...
@@ -621,7 +621,6 @@ export default {
.
then
(
res
=>
{
let
resData
=
res
.
data
;
if
(
resData
.
errorCode
==
1
)
{
debugger
;
this
.
successAdd
=
true
;
if
(
that
.
tabActive
!=
'second'
)
{
// 如果是在暂存架修改标签值
...
...
@@ -629,7 +628,7 @@ export default {
}
that
.
closeTagShortDialog
();
// 如果来源是 会员标签编辑的时候
if
(
that
.
fromFlag
==
'memberGroup'
)
{
//
if (that.fromFlag == 'memberGroup') {
let
sendObj
=
{
tagId
:
that
.
tagShortId
||
this
.
tagId
,
tagValue
:
JSON
.
stringify
(
tagValue
),
...
...
@@ -637,13 +636,11 @@ export default {
tagName
:
that
.
tagData
.
tagName
,
isActive
:
that
.
tagData
.
isActive
};
// that.closeTagShortDialog()
that
.
$emit
(
'returnTagData'
,
sendObj
);
return
false
;
}
this
.
$emit
(
'returnTagData'
,
sendObj
);
// return false;
// }
// 更新暂存架
that
.
$emit
(
'updateTemp'
);
return
;
// that.$emit('updateTemp');
}
})
.
catch
(
function
(
error
)
{
...
...
src/view/platformTag/member-tag.vue
View file @
2b676e87
...
...
@@ -21,7 +21,7 @@
{{
tagName
}}
<el-button
type=
"primary"
class=
"add-newtag"
@
click=
"addNewTag"
v-show=
"handTag == 1"
>
新增标签
</el-button>
</p>
<tag-container
:data=
"memberTagList"
:handTag=
"handTag"
:groupId=
"groupId"
@
deleteHandTag=
"deleteHandTag"
>
</tag-container>
<tag-container
:data=
"memberTagList"
:handTag=
"handTag"
:groupId=
"groupId"
@
deleteHandTag=
"deleteHandTag"
@
returnTagData=
"returnTagData"
>
</tag-container>
<div
class=
"page-box"
v-if=
"total > 0"
>
<el-pagination
...
...
@@ -37,9 +37,9 @@
</div>
<!-- 我的标签 -->
<div
class=
"my-pop-tagbox"
v-if=
"
chooseTagList.length > 0
"
>
<div
class=
"my-pop-tagbox"
v-if=
"
selectedTags.length > 0"
@
click=
"expendsGroupList
"
>
<p
class=
"txt"
>
已选标签
</p>
<p
class=
"number-txt"
>
{{
chooseTagList
.
length
}}
</p>
<p
class=
"number-txt"
>
{{
selectedTags
.
length
}}
</p>
</div>
</div>
</div>
...
...
@@ -49,15 +49,26 @@
<div
class=
"foot-box"
>
<vue-gic-footer></vue-gic-footer>
</div>
<div
class=
"grouo-right-list"
v-show=
"groupShow && selectedTags.length"
>
<el-collapseTransition>
<tags-group-list
:selectedTagsData=
"selectedTags"
:tagsGroupRelation=
"tagsGroupRelation"
@
addTags=
"addTags"
@
editTags=
"editTags"
/>
</el-collapseTransition>
</div>
</div>
</
template
>
<
script
>
import
Vue
from
'vue'
;
import
{
CollapseTransition
}
from
'element-ui'
;
import
navCrumb
from
'@/components/nav/nav.vue'
;
import
TagsGroupList
from
'../memberGroup/tags-group-list'
;
import
TagType
from
'./tag-type'
;
import
TagContainer
from
'./tag-container'
;
import
{
getMemberTag
,
getMemberTagList
}
from
'@/request/api'
;
Vue
.
component
(
CollapseTransition
.
name
,
CollapseTransition
);
export
default
{
name
:
'member-tag'
,
...
...
@@ -66,12 +77,15 @@ export default {
components
:
{
navCrumb
,
TagType
,
TagContainer
TagContainer
,
TagsGroupList
},
data
()
{
return
{
chooseTagList
:
[{}],
groupShow
:
false
,
selectedTags
:
[],
tagsGroupRelation
:
[[]],
// 面包屑参数
navpath
:
[
{
...
...
@@ -101,6 +115,25 @@ export default {
},
methods
:
{
expendsGroupList
()
{
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
);
if
(
index
<
0
)
{
this
.
selectedTags
.
push
(
list
);
}
},
editTags
()
{
//
},
addTags
()
{
//
},
async
getTagList
()
{
const
Data
=
await
getMemberTag
();
if
(
Data
.
result
&&
Data
.
result
.
length
)
{
...
...
@@ -284,6 +317,7 @@ export default {
<
style
lang=
"scss"
scoped
>
.member-tag
{
position
:
relative
;
width
:
100%
;
overflow-y
:
auto
;
.tag-container
{
...
...
@@ -364,5 +398,14 @@ export default {
transform
:
scale
(
1.2
);
}
}
.grouo-right-list
{
position
:
absolute
;
top
:
0px
;
right
:
0px
;
bottom
:
0px
;
padding
:
10px
;
box-shadow
:
0
0
5px
#bbb
;
background-color
:
#fff
;
}
}
</
style
>
src/view/platformTag/tag-container.vue
View file @
2b676e87
...
...
@@ -180,10 +180,10 @@ export default {
setTimeout
(
_
=>
{
// 如果成功就修改
if
(
this
.
successAdd
)
{
console
.
log
(
1
);
this
.
dialogVisible
=
false
;
let
index
=
this
.
tableData
.
findIndex
(
el
=>
el
.
tagId
===
this
.
middleList
.
tagId
);
this
.
tableData
[
index
].
refersh
=
true
;
// 传出数据到tags-group-list
}
},
200
);
}
...
...
static/css/index.less
View file @
2b676e87
...
...
@@ -40,4 +40,4 @@
transition: transform .3s;
transform: rotate(-90deg);
color: #c0c4cc;
}
\ No newline at end of file
}
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