Commit a82b18b3 by chenyu

Merge branch 'feature/10月迭代' of http://git.gicdev.com/memberTag/memberTag-web

parents 3319d4c3 100f82c6
......@@ -55,8 +55,7 @@ const devWebpackConfig = merge(baseWebpackConfig, {
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true,
favicon: './favicon.ico'
inject: true
}),
// copy custom static assets
new CopyWebpackPlugin([
......
......@@ -63,6 +63,7 @@ const webpackConfig = merge(baseWebpackConfig, {
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
favicon: './favicon.ico',
inject: true,
minify: {
removeComments: true,
......
......@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="./favicon.ico"/>
<link rel="shortcut icon" href="./static/img/favicon.ico"/>
<title>GIC-会员标签</title>
<!-- <script type='text/javascript'>
!function(e,t,n,g,i){e[i]=e[i]||function(){(e[i].q=e[i].q||[]).push(arguments)},n=t.createElement("script"),tag=t.getElementsByTagName("script")[0],n.async=1,n.src=('https:'==document.location.protocol?'https://':'http://')+g,tag.parentNode.insertBefore(n,tag)}(window,document,"script","assets.giocdn.com/2.1/gio.js","gio");
......
......@@ -143,6 +143,7 @@
<div class="m-b-20" :key="'tag6' + pindex">
<el-radio v-model="parent.computeRadio" label="in">属于</el-radio>
<el-radio v-model="parent.computeRadio" label="notIn">不属于</el-radio>
<el-radio v-model="parent.computeRadio" label="isEmpty" v-if="['mainClerkId','clerkId','openClerkId'].includes(currentKey)">无归属</el-radio>
</div>
</template>
<!-- 7.固定时段/最近 -->
......@@ -187,7 +188,7 @@
</div>
</template>
<!-- 9.输入搜索下拉多选 添加值 -->
<template v-if="parent.templateCode == 'tag008'">
<template v-if="parent.templateCode == 'tag008'?(['mainClerkId','clerkId','openClerkId'].includes(currentKey)?(templateData[0].computeRadio!='isEmpty'?true:false):true):false">
<div class="m-b-20" :key="'tag9' + pindex">
<div class="add-search-select">
<el-select
......
......@@ -553,14 +553,12 @@ export default {
.replace(/\s+/g, '');
}
that.postTemplateData.selectedVal.push(that.templateData[0].dateRangeValue[0].split(' ')[0] + '至' + that.templateData[0].dateRangeValue[1].split(' ')[0]);
console.log(that.postTemplateData.selectedVal);
}
if ((code === 'tag014' || code === 'tag017' || code === 'tag019' || code === 'tag020' || code === 'tag015') && that.templateData.length === 1 && that.templateData[0].radio == 2) {
// 天
// timeAfterChecked 最近/之后
// timeChecked 当天/年/月
console.log(that.templateData[0].timeRadio );
if (that.templateData[0].timeRadio == 1) {
/** 同时选择
* lastdayHasToday 最近几天包含今天
......@@ -825,7 +823,6 @@ export default {
this.$message.warning('商品选择器未选择条件!')
return false;
}
console.log(this.com022.conditionsList);
tagValue.val.push({
type: 'data', //类型
data: {
......@@ -858,11 +855,14 @@ export default {
}
// 属于/不属于
if (ele.templateCode === 'tag002') {
tagValue.val[0].data.compute = ele.computeRadio;
tagValue.val[0].data.compute = ele.computeRadio=='-1'?'=':ele.computeRadio;
tagValue.val[0].data.value = ele.computeRadio=='-1'?'-1':tagValue.val[0].data.value;
if (ele.computeRadio == 'in') {
that.postTemplateData.selectedVal.unshift('属于');
} else {
} else if (ele.computeRadio == 'notIn'){
that.postTemplateData.selectedVal.unshift('不属于');
}else {
that.postTemplateData.selectedVal=['无归属'];
}
}
// 数字区间
......@@ -925,10 +925,14 @@ export default {
// 下拉搜索添加值
if (ele.templateCode === 'tag008') {
if (!ele.addSelectTags.length) {
returnFlag = false;
returnFlag = ['mainClerkId','clerkId','openClerkId'].includes(this.currentKey)&&tagValue.val[0].data.compute==='isEmpty'?true:false;
}
if (['mainClerkId','clerkId','openClerkId'].includes(this.currentKey)&&tagValue.val[0].data.compute==='isEmpty') {
tagValue.val[0].data.value = '';
}else{
tagValue.val[0].data.value = ele.addSelectTags.map(item => item.key).join(' ');
that.postTemplateData.selectedVal.push(ele.addSelectTags.map(item => item.value).join(','));
}
tagValue.val[0].data.value = ele.addSelectTags.map(item => item.key).join(' ');
that.postTemplateData.selectedVal.push(ele.addSelectTags.map(item => item.value).join(','));
}
// 多选项(城市选择) ( 全部选项/已选选项 )
if (ele.templateCode === 'tag010') {
......@@ -1145,7 +1149,6 @@ export default {
tagValue: JSON.stringify(tagValue), // 标签选择保存值
tagParams: JSON.stringify(tagParams) // 标签前端选择
};
console.log(2222, para);
postRequest('/member-tag-value/add.json', para)
.then(res => {
let resData = res.data;
......@@ -1168,7 +1171,6 @@ export default {
isActive: that.tagData.isActive,
templateCode: this.templateCode
};
console.log(sendObj);
this.$emit('returnTagData', sendObj);
}
})
......@@ -1837,7 +1839,6 @@ export default {
let selectVal = null;
let checkedCount = null;
console.log(this.templateDataList, 'asdsd');
// compute 是计算属性的区间值 value是选中的值
for(let i = 0; i < this.templateDataList.templateCode.length; i++) {
......@@ -1886,7 +1887,6 @@ export default {
break;
case 'tag013':
console.log(this.templateData, 'asdsad')
value = tagValue.val[0].data.value.split(' ');
for (let i = 0; i < this.templateData.length; i++) {
if (this.templateData[i].templateCode === 'tag013') {
......
......@@ -7,7 +7,7 @@
<el-checkbox-group v-model="checkedFields" :min="0" :max="8">
<div class="checkwrap flex flex-wrap">
<div class="checkwrap-item line-30" v-for="(item, index) in memberFields" :key="index">
<el-checkbox :label="item.code" :key="item.code">{{ item.name }}</el-checkbox>
<el-checkbox :label="item.code" :key="item.code" :disabled="item.disabled||false">{{ item.name }}</el-checkbox>
</div>
</div>
</el-checkbox-group>
......@@ -41,6 +41,7 @@ export default {
* 关闭
*/
handleClose(done) {
this.checkedFields=[].concat(this.selectedData)
this.$emit('hideUserDefined', false);
},
......
......@@ -65,6 +65,14 @@ export const constantRouterMap = [
}
},
{
path: '/manualTagValueEditInfo',
component: _import('manualTag', 'manual-tag-value-edit-info'),
name: '标签值设置',
meta: {
title: '会员标签-会员标签详情'
}
},
{
path: '/syncTagHistory',
component: _import('manualTag', 'syncTagHistory'),
name: '同步标签',
......
......@@ -4,12 +4,12 @@
<div class="right-content">
<div class="right-box">
<div class="manualTagEdit-wrap__title">{{ tagInfo.tagName }}</div>
<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="操作" min-width="100" class-name="tag-cell" label-class-name="tag-head">
<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="220" class-name="tag-cell" label-class-name="tag-head">
<template slot-scope="scope">
<!-- 正在上传中 -->
<div v-if="scope.row.status === 4 || scope.row.status === 6" class="uploading">
......@@ -22,6 +22,9 @@
</div>
<!-- 初始状态和导入完成状态 -->
<template v-else>
<el-button type="text" size="small" class="m-r-20" @click="toTagDetail(scope.row)">
查看
</el-button>
<el-button type="text" size="small" class="m-r-20" :disabled="scope.row.status === 5" @click="showImportPop(scope.$index, scope.row)">
导入会员
</el-button>
......@@ -230,11 +233,6 @@ export default {
methods: {
// 返回手工标签列表
back() {
const levelGroupInfo = {
id: this.tagInfo.tagLevelGroupId,
name: this.tagInfo.tagLevelGroupName
};
localStorage.setItem('groupId', JSON.stringify(levelGroupInfo));
this.$router.push('/member-tag');
},
......@@ -364,7 +362,10 @@ export default {
});
});
},
// 跳转会员标签人数详情页面
toTagDetail(row){
this.$router.push(`/manualTagValueEditInfo?tagId=${row.tagId}&tagItemId=${row.tagItemId}`)
},
// 显示导入会员的弹窗
showImportPop(index, row) {
// 状态为删除中,不可以导入会员
......@@ -704,7 +705,6 @@ export default {
},
mounted() {
const tagId = this.$route.query.tagId;
localStorage.removeItem('groupId');
if (tagId) {
this.tagId = tagId;
this.getValueData();
......
.table-header__handle {
&.cell {
position: absolute !important;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
padding-right: 0;
display: flex !important;
align-items: center;
justify-content: space-between;
.el-icon-setting {
display: flex;
justify-content: center;
align-items: center;
width: 60px;
height: 100%;
font-size: 20px;
color: #666;
cursor: pointer;
background: #eaeaea;
&:hover {
color: #000;
}
}
}
}
......@@ -559,10 +559,14 @@ export default {
.then(res => {
that.total = res.data.result.page.totalCount;
that.memberGroupDetailData = res.data.result.page.result;
let defaultFieldsArr = res.data.result.fieldsStr.split(',');
if (list) {
list.forEach(function(ele, index) {
if (!!ele.check || defaultFieldsArr.indexOf(ele.code) > -1) {
if (ele.code==='name') {
ele.check = true;
ele.disabled=true;
that.selectedUserDefined.push(ele.code);
that.selectedFields.push(ele);
}else if (!!ele.check) {
that.selectedUserDefined.push(ele.code);
that.selectedFields.push(ele);
}
......
......@@ -231,7 +231,6 @@ export default {
name: 'memberGroupEdit',
data() {
const rateOneValid = (rule, value, callback) => {
console.log(value);
if (this.ruleForm.isActive == 0 && value == '') {
callback(new Error('请选择更新频率'));
} else {
......@@ -239,9 +238,7 @@ export default {
}
};
const rateValid = (rule, value, callback) => {
console.log(value, this.ruleForm);
if (this.ruleForm.isActive == 0 && (this.ruleForm.updateType != '1' || this.ruleForm.updateType == '') && value == '') {
console.log(value, this.ruleForm);
callback(new Error('请选择更新频率'));
} else {
callback();
......@@ -618,7 +615,6 @@ export default {
this.tagsGroupList = [];
this.total = 0;
}
console.log('tagsGroupList', this.tagsGroupList);
});
},
// 搜索标签
......@@ -660,7 +656,6 @@ export default {
const resData = res.data;
if (resData.errorCode == 1) {
let tagGroupDto = resData.result.tagGroupDto;
console.log('tagGroupDto', tagGroupDto);
this.creatorId = tagGroupDto.createUser || '';
if (!!tagGroupDto) {
this.ruleForm.memberTagGroupClassifyId = tagGroupDto.memberTagGroupClassifyId || '0';
......@@ -713,11 +708,10 @@ export default {
result = result || [];
result.forEach(item => {
if (item.memberTagGroupClassifyId === 'b3a45c4711134c939b5f8ee31a10f646') {
console.log(item);
// console.log(item);
}
});
this.memberGroupList = result.slice(0);
console.log('memberTagGroupClassifyId', this.ruleForm.memberTagGroupClassifyId);
this.ruleForm.memberTagGroupClassifyId = this.ruleForm.memberTagGroupClassifyId || '0';
})
.catch(err => {
......
......@@ -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>
......
......@@ -563,10 +563,14 @@ export default {
.then(res => {
that.total = res.data.result.page.totalCount;
that.memberGroupDetailData = res.data.result.page.result;
let defaultFieldsArr = res.data.result.fieldsStr.split(',');
if (list) {
list.forEach(function(ele, index) {
if (!!ele.check || defaultFieldsArr.indexOf(ele.code) > -1) {
if (ele.code==='name') {
ele.check = true;
ele.disabled=true;
that.selectedUserDefined.push(ele.code);
that.selectedFields.push(ele);
}else if (!!ele.check) {
that.selectedUserDefined.push(ele.code);
that.selectedFields.push(ele);
}
......
......@@ -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 @setGroupId="setGroupId" @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
......@@ -181,6 +181,7 @@ export default {
data() {
return {
handTag: null,
realCount: Object.create(null),
margin60: false,
refershList: {},
......@@ -362,7 +363,7 @@ export default {
this.params.type = -1;
this.loadMemberTagList(this.params);
this.tagName = '全部标签';
this.handTag = false;
this.handTag = null;
this.$store.commit('modiftTagName', '我的用户');
},
checkRealTime() {
......@@ -508,8 +509,9 @@ export default {
search: opt.searchName || null, // 标签名
tagLevelGroupId: opt.id || '', // 标签层级
tagType: opt.type || null, // 标签类型
showMemberCount: 1, // 覆盖人数
pageNum: opt.pageNum || 1,
pageSize: opt.pageSize || 20
pageSize: opt.pageSize || 20,
};
const Data = await getMemberTagList(params);
this.showSearchResult = !!opt.showSearchResult;
......@@ -519,6 +521,7 @@ export default {
refersh: false
}));
this.total = Data.result.totalCount;
localStorage.setItem('groupId', '');
} else {
this.memberTagList = [];
this.total = 0;
......@@ -564,14 +567,13 @@ export default {
} else {
this.tagName = '全部标签';
}
this.handTag = false;
this.handTag = null;
this.loadMemberTagList({
searchName: this.memberTag,
showSearchResult: true
});
// this.tagName = '全部标签';
// this.handTag = null;
this.handTag = null;
},
// 一级标签
handleFristTag(list) {
......@@ -579,12 +581,11 @@ export default {
this.pageSize = 20;
this.params.pageNum = 1;
this.params.pageSize = 20;
localStorage.setItem('groupId', '');
this.saveHandTagData(list);
this.saveTagLevelGroupId(list);
this.loadMemberTagList(this.params);
this.groupId = list.id;
this.handTag = list.handTag;
this.groupId = list.id;
this.loadMemberTagList(this.params);
this.manualTagPop.tagTwoLevelGroupId = '';
this.manualTagPop.tagLevelGroupId = '';
this.changeTagTitle(list.name);
......@@ -649,9 +650,13 @@ export default {
}
})
},
// onLoadV() {
// localStorage.setItem('jumpThirdTag', '');
// }
setGroupId(){
const levelGroupInfo = {
id: this.groupId,
name: this.tagName
};
localStorage.setItem('groupId', JSON.stringify(levelGroupInfo));
}
},
beforeMount() {
......@@ -692,10 +697,10 @@ export default {
this.params.type = 1;
this.params.id = hangObj.id;
this.loadMemberTagList(this.params);
this.tagName = hangObj.name;
this.$store.commit('modiftTagName', this.tagName);
this.handTag = true;
this.handTag = 1;
this.loadMemberTagList(this.params);
} else {
this.loadMemberTagList(this.params);
this.$store.commit('modiftTagName', '我的用户');
......@@ -717,12 +722,11 @@ export default {
};
this.pageNum = 1;
this.pageSize = 20;
localStorage.setItem('groupId', '');
this.saveHandTagData(list);
this.handTag = list.handTag;
this.groupId = list.id;
this.saveTagLevelGroupId(list);
this.loadMemberTagList(this.params);
this.groupId = list.id;
this.handTag = list.handTag;
this.manualTagPop.tagTwoLevelGroupId = list.tagLevelGroupId;
this.manualTagPop.tagLevelGroupId = '';
this.changeTagTitle(list.name);
......@@ -743,12 +747,11 @@ export default {
this.pageSize = 20;
this.params.pageNum = 1;
this.params.pageSize = 20;
localStorage.setItem('groupId', '');
this.saveHandTagData(list);
this.saveTagLevelGroupId(list);
this.loadMemberTagList(this.params);
this.groupId = list.id;
this.handTag = list.handTag;
this.loadMemberTagList(this.params);
this.manualTagPop.tagTwoLevelGroupId = list.parentLevelGroupId;
this.manualTagPop.tagLevelGroupId = list.tagLevelGroupId;
this.changeTagTitle(list.name);
......@@ -757,14 +760,6 @@ export default {
this.getMemberGroupList();
this.getMemberTagGradeEnsure();
this.getSyncFlag();
// if (localStorage.getItem('jumpThirdTag')) {
// console.log(1);
// let tagList = JSON.parse(localStorage.getItem('jumpThirdTag'));
// this.params.id = tagList.id;
// this.params.type = 1;
// this.tagName = tagList.name;
// this.loadMemberTagList(this.params);
// }
}
};
</script>
......
......@@ -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="150">
<template slot-scope="scope">
<div>{{ scope.row.tagDescribe ? scope.row.tagDescribe : '--' }}</div>
</template>
</el-table-column>
<el-table-column prop="memberCount" label="覆盖人数" min-width="200" 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-tishi refresh"></i>
</el-popover>
</template>
<template slot-scope="scope">
{{ scope.row.memberCount?(scope.row.memberCount | formatNum) +'人': '--'}}
</template>
</el-table-column>
<el-table-column label="是否实时" prop="isActive" min-width="150">
<template slot-scope="scope">
<span> {{ scope.row.isActive == 1 ? '实时' : '非实时' }} </span>
......@@ -54,8 +69,8 @@ export default {
}
},
handTag: {
type: Boolean,
default: false
type: Number,
default: null
},
groupId: String,
refersh: Object,
......@@ -78,9 +93,9 @@ export default {
this.$emit('editHandTag', list);
},
editHandTagValue(list) {
this.$emit('setGroupId')
localStorage.setItem('jumpTag', '');
localStorage.setItem('jumpThirdTag', '');
// this.dispatch('member-tag', 'edit-third-tag');
this.$router.push({
path: '/manualTagValueEdit',
query: { tagId: list.tagId }
......@@ -161,7 +176,6 @@ export default {
return { fn: () => {}, data: fn ? fn() : {} }
},
},
watch: {
data: {
immediate: true,
......@@ -179,7 +193,7 @@ export default {
}
}
}
}
},
};
</script>
......@@ -197,4 +211,10 @@ export default {
color: #303133;
}
}
.refresh {
color: #909399;
&:hover {
color: #1890ff;
}
}
</style>
No preview for this file type
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