Commit 958af1c0 by chenyu

update: 手工标签和标签值设置显示覆盖人数

parent 1ef1d02a
......@@ -8,7 +8,8 @@
<div class="tag-value-wrapper">
<el-table :data="tagValTableData">
<el-table-column width="50" class-name="tag-cell" label-class-name="tag-head"><!-- 占位用 --></el-table-column>
<el-table-column label="标签值" prop="tagItemName" min-width="200" class-name="tag-cell" label-class-name="tag-head"></el-table-column>
<el-table-column label="标签值" prop="tagItemName" min-width="100" class-name="tag-cell" label-class-name="tag-head"></el-table-column>
<el-table-column label="覆盖人数" prop="memberCount" min-width="200" class-name="tag-cell" label-class-name="tag-head"></el-table-column>
<el-table-column label="操作" min-width="100" class-name="tag-cell" label-class-name="tag-head">
<template slot-scope="scope">
<!-- 正在上传中 -->
......
......@@ -253,7 +253,7 @@
<template slot="header">
覆盖人数
<el-popover width="260" trigger="hover">
<div style="color: #909399;">
<div style="color: #303133;">
默认显示上次页面缓存人数,可点击刷新按钮查看当页分组最新人数。
</div>
<i slot="reference" class="iconfont icon-zhongzhi refresh" @click="refershMember('')"></i>
......@@ -378,7 +378,7 @@
<template slot="header">
覆盖人数
<el-popover width="260" trigger="hover">
<div style="color: #909399;">
<div style="color: #303133;">
默认显示上次页面缓存人数,可点击刷新按钮查看当页分组最新人数。
</div>
<i slot="reference" class="iconfont icon-zhongzhi refresh" @click="refershMember('tag')"></i>
......
......@@ -28,7 +28,7 @@
</p>
<p class="tips" v-if="tagName == '金字塔会员分层' && !memberTagGradeEnsure">暂未开通金字塔分层功能,无法使用该标签,可以联系达摩项目经理进行开通!</p>
<tag-container @deleteHandTag="deleteHandTag" :data="memberTagList" :handTag="handTag" :groupId="groupId" :refersh="refershList" @addTag="selectedTag" @editHandTag="editHandTag" ref="tagContainer" :isWeim="weimId.includes(groupId || params.id)" />
<tag-container @peopleHandTag="peopleHandTag" @deleteHandTag="deleteHandTag" :data="memberTagList" :handTag="handTag" :groupId="groupId" :refersh="refershList" @addTag="selectedTag" @editHandTag="editHandTag" ref="tagContainer" :isWeim="weimId.includes(groupId || params.id)" />
<div class="page-box" v-if="total > 0">
<dm-pagination
......@@ -507,8 +507,9 @@ export default {
search: opt.searchName || null, // 标签名
tagLevelGroupId: opt.id || '', // 标签层级
tagType: opt.type || null, // 标签类型
showMemberCount: opt.showMemberCount || null, // 手工标签显示覆盖人数
pageNum: opt.pageNum || 1,
pageSize: opt.pageSize || 20
pageSize: opt.pageSize || 20,
};
const Data = await getMemberTagList(params);
this.showSearchResult = !!opt.showSearchResult;
......@@ -608,6 +609,16 @@ export default {
localStorage.setItem('groupId', '');
}
},
// 查询覆盖人数
peopleHandTag(id) {
this.loadMemberTagList({
id: id,
type: -1, //所有ALL(-1) 平台PLATFORM(0) 手工HAND(1)
showMemberCount: 1, // 显示覆盖人数 1显示 0不显示
pageNum: this.pageNum,
pageSize: this.pageSize
});
},
// 添加手工标签后刷新标签列表
addNewTag() {
this.loadMemberTagList(this.params);
......
......@@ -2,7 +2,7 @@
<!-- 具体标签 -->
<div class="tag-some-list">
<el-table :data="tableData" style="width: 100%">
<el-table-column label="标签名称" prop="tagName" min-width="150">
<el-table-column label="标签名称" prop="tagName" min-width="250">
<template slot-scope="scope">
<span class="tag-name">{{ scope.row.tagName }}</span>
<!-- <el-tooltip class="item" effect="dark" :content="scope.row.refersh ? '更新标签' : '添加标签'" placement="bottom">-->
......@@ -12,11 +12,26 @@
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="标签描述" prop="tagDescribe" min-width="400">
<el-table-column label="标签描述" prop="tagDescribe" min-width="300">
<template slot-scope="scope">
<div>{{ scope.row.tagDescribe ? scope.row.tagDescribe : '--' }}</div>
</template>
</el-table-column>
<el-table-column prop="memberCount" label="覆盖人数" min-width="400" show-overflow-tooltip v-if="handTag">
<template slot="header">
覆盖人数
<el-popover width="260" trigger="hover">
<div style="color: #303133;">
标签下不同标签值可能覆盖相同的会员,因此此处“标签”覆盖人数去重显示(如“喜欢的颜色-白、红、黑、蓝”,某会员身上可能同时具备“白、黑”二种标签值)
</div>
<i slot="reference" class="iconfont icon-zhongzhi refresh" @click="peopleHandTag"></i>
</el-popover>
</template>
<template slot-scope="scope">
{{ (scope.row.memberCount || 0) | formatNum }}
</template>
</el-table-column>
<el-table-column label="是否实时" prop="isActive" min-width="150">
<template slot-scope="scope">
<span> {{ scope.row.isActive == 1 ? '实时' : '非实时' }} </span>
......@@ -86,6 +101,9 @@ export default {
query: { tagId: list.tagId }
});
},
peopleHandTag(){
this.$emit('peopleHandTag', this.groupId);
},
deleteHandTag(list) {
this.$confirm('删除标签后,符合该标签值的会员对应标签值将同步删除。一旦删除将无法恢复,确认要删除吗?', '提示', {
confirmButtonText: '确定',
......@@ -197,4 +215,11 @@ export default {
color: #303133;
}
}
.refresh {
color: #909399;
cursor: pointer;
&:hover {
color: #1890ff;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment