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
8e8500d3
Commit
8e8500d3
authored
Apr 15, 2019
by
caoyanzhi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://115.159.76.241/memberTag/memberTag-web
into dev-dingdang
parents
1b10ae76
0eeec886
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
130 additions
and
21 deletions
+130
-21
tag-config-options.vue
src/components/tag/tag-config-options.vue
+3
-0
index.js
src/components/tagDetail/mixin/index.js
+6
-8
member-tag.vue
src/view/platformTag/member-tag.vue
+114
-5
platformTagDetail.vue
src/view/platformTag/platformTagDetail.vue
+3
-4
tag-container.vue
src/view/platformTag/tag-container.vue
+3
-2
index.less
static/css/index.less
+1
-2
No files found.
src/components/tag/tag-config-options.vue
View file @
8e8500d3
...
...
@@ -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 @
8e8500d3
...
...
@@ -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,8 @@ export default {
}
that
.
closeTagShortDialog
();
// 如果来源是 会员标签编辑的时候
if
(
that
.
fromFlag
==
'memberGroup'
)
{
// if (that.fromFlag == 'memberGroup') {
console
.
log
(
this
.
tagData
);
let
sendObj
=
{
tagId
:
that
.
tagShortId
||
this
.
tagId
,
tagValue
:
JSON
.
stringify
(
tagValue
),
...
...
@@ -637,13 +637,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 @
8e8500d3
...
...
@@ -21,7 +21,8 @@
{{
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"
ref=
"tagContainer"
>
</tag-container>
<div
class=
"page-box"
v-if=
"total > 0"
>
<el-pagination
...
...
@@ -37,9 +38,9 @@
</div>
<!-- 我的标签 -->
<div
class=
"my-pop-tagbox"
v-if=
"
chooseTagList.length > 0
"
>
<div
class=
"my-pop-tagbox"
v-if=
"
groupListNumber > 0"
@
click=
"expendsGroupList
"
>
<p
class=
"txt"
>
已选标签
</p>
<p
class=
"number-txt"
>
{{
chooseTagList
.
length
}}
</p>
<p
class=
"number-txt"
>
{{
groupListNumber
}}
</p>
</div>
</div>
</div>
...
...
@@ -49,15 +50,46 @@
<div
class=
"foot-box"
>
<vue-gic-footer></vue-gic-footer>
</div>
<div
class=
"group-right-list"
v-show=
"groupShow && groupListNumber"
>
<el-collapseTransition>
<div
class=
"wapper"
>
<div
class=
"inner"
>
<tags-group-list
:selectedTagsData=
"selectedTags"
:tagsGroupRelation=
"tagsGroupRelation"
@
addTags=
"addTags"
@
editTags=
"editTags"
:activeTagsGroupIndex
.
sync=
"activeTagsGroupIndex"
/>
<div
class=
"form-item"
>
<label
for=
""
>
分组名称
</label>
<el-input
v-model=
"tagConfig.groupName"
:maxlength=
"10"
></el-input>
</div>
<div
class=
"form-item"
>
<label
for=
""
>
分组有效期
</label>
<el-date-picker
v-model=
"tagConfig.date"
type=
"date"
placeholder=
"选择日期"
>
</el-date-picker>
</div>
<div
class=
"form-item"
>
<label
for=
""
>
分组描述
</label>
<el-input
type=
"textarea"
v-model=
"tagConfig.textarea"
:maxlength=
"10"
></el-input>
</div>
<p>
更新频率(更新时间预计选择日期的凌晨0点至6点)
</p>
</div>
<div
class=
"fixed-btn"
>
<el-button
type=
"primary"
@
click=
"createNewGroup"
>
创建会员分组
</el-button>
</div>
</div>
</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 +98,21 @@ export default {
components
:
{
navCrumb
,
TagType
,
TagContainer
TagContainer
,
TagsGroupList
},
data
()
{
return
{
chooseTagList
:
[{}],
tagConfig
:
{
groupName
:
''
,
textarea
:
''
,
date
:
''
},
activeTagsGroupIndex
:
0
,
groupShow
:
false
,
selectedTags
:
[[]],
tagsGroupRelation
:
[],
// 面包屑参数
navpath
:
[
{
...
...
@@ -100,7 +141,45 @@ export default {
};
},
computed
:
{
groupListNumber
()
{
return
this
.
selectedTags
.
reduce
((
curr
,
el
)
=>
{
return
curr
+
el
.
length
;
},
0
);
}
},
methods
:
{
createNewGroup
()
{
//
},
expendsGroupList
()
{
// if (this.selectedTags && this.selectedTags.length) {
this
.
groupShow
=
true
;
// }
},
returnTagData
(
list
)
{
// 把添加的标签数据加到显示组件中 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
[
this
.
activeTagsGroupIndex
].
push
(
list
);
}
else
{
// 否则就是修改
}
},
editTags
()
{
//
this
.
$refs
.
tagContainer
.
dialogVisible
=
true
;
},
addTags
()
{
//
},
async
getTagList
()
{
const
Data
=
await
getMemberTag
();
if
(
Data
.
result
&&
Data
.
result
.
length
)
{
...
...
@@ -284,6 +363,7 @@ export default {
<
style
lang=
"scss"
scoped
>
.member-tag
{
position
:
relative
;
width
:
100%
;
overflow-y
:
auto
;
.tag-container
{
...
...
@@ -364,5 +444,34 @@ export default {
transform
:
scale
(
1.2
);
}
}
.group-right-list
{
position
:
absolute
;
top
:
0px
;
right
:
0px
;
bottom
:
0px
;
padding
:
10px
;
box-shadow
:
0
0
5px
#bbb
;
background-color
:
#fff
;
z-index
:
10
;
.form-item
{
margin-top
:
20px
;
margin-bottom
:
20px
;
color
:
#606266
;
label
{
display
:
block
;
margin-bottom
:
10px
;
}
}
.wapper
{
height
:
700px
;
overflow-y
:
auto
;
}
.fixed-btn
{
position
:
absolute
;
bottom
:
20px
;
width
:
100%
;
text-align
:
center
;
}
}
}
</
style
>
src/view/platformTag/platformTagDetail.vue
View file @
8e8500d3
...
...
@@ -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 @
8e8500d3
...
...
@@ -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
;
...
...
@@ -180,10 +181,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 @
8e8500d3
...
...
@@ -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