Commit 0609623f by liuchenxi

update: 会员分组导出

parent 07353533
......@@ -5,7 +5,8 @@
<link rel="shortcut icon" href="./static/img/favicon.ico"/>
<title>GIC-会员标签</title>
<link rel="stylesheet" href="//at.alicdn.com/t/font_688955_99jmfacmlpp.css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_3276801_vxllf19dief.css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_3276801_w3vkjjmzzz.css">
<script src="//at.alicdn.com/t/font_3276801_w3vkjjmzzz.js"></script>
</head>
<body style="background-color: #f0f2f5;min-width: 1400px;">
......
......@@ -375,3 +375,4 @@ export const changeTagSort = (params = {}) =>
}
})
......@@ -10,9 +10,9 @@
</span>
<template v-if="$getButtonLimit($buttonCode.memberTagExportPeople)">
<el-button type="primary" class="down-member-list__btn m-l-8" @click="downMemberListPop.show = true" v-if="total < 1000000" :limit-code='$buttonCode.memberTagExportPeople'>人群导出</el-button>
<el-button type="primary" class="down-member-list__btn m-l-8" @click="tableFiledVisible = true" v-if="total < 1000000" :limit-code='$buttonCode.memberTagExportPeople'>人群导出</el-button>
<el-tooltip v-else class="item" effect="dark" content="每张报表导出人数限制为100万,大于100万的人群会自动拆分为多张报表进行导出" placement="top">
<el-button type="primary" class="down-member-list__btn m-l-8" @click="downMemberListPop.show = true" :limit-code='$buttonCode.memberTagExportPeople'>人群导出</el-button>
<el-button type="primary" class="down-member-list__btn m-l-8" @click="tableFiledVisible = true" :limit-code='$buttonCode.memberTagExportPeople'>人群导出</el-button>
</el-tooltip>
</template>
<el-button type="primary" class="down-member-list__btn" @click="$router.push(`/memberGroupLog?groupName=${groupName}`)" :limit-code='$buttonCode.memberTagOperateLog' v-if='$getButtonLimit($buttonCode.memberTagOperateLog)'>操作日志</el-button>
......@@ -309,6 +309,8 @@
type="2"
projectName="member-tag"
></vue-gic-export-excel>
<!--表格字段-->
<dm-table-filed :visible.sync="tableFiledVisible" projectName="member-tag" pageName="memberTag" :max="20" :defaultDisabled="['memberName']" :checkedFields="checkFields" @submit="onSubmiTableFiled" />
</div>
</template>
<script>
......@@ -334,7 +336,8 @@ export default {
excelUrl: '/gic-member-tag-web/member-tag-member/memberExportExcel',
params: {
memberTagGroupId: '',
requestProject: 'member-tag'
requestProject: 'member-tag',
exportFields: ''
}
},
......@@ -371,7 +374,9 @@ export default {
baseUrl: '',
sortFiled: '',
order: '',
tagSearch: ''
tagSearch: '',
tableFiledVisible: false,
checkFields: ['cardNo','gradeName','crateCardDateStringFormat','lastCostTimeFormat','costTimes','avgCost','birthdayMDFormat','pointsCurrent','costAll','mainStoreName','openStoreName']
};
},
computed: {
......@@ -672,7 +677,12 @@ export default {
message: error.message
});
});
}
},
onSubmiTableFiled(data) {
const { downMemberListPop: { params: exportParams } } = this;
this.downMemberListPop.show = true;
exportParams.exportFields = data.toString();
},
},
beforeMount() {
var that = this;
......
......@@ -11,9 +11,9 @@
</span>
<template v-if="$getButtonLimit($buttonCode.memberTagExportPeople)">
<el-button type="primary" class="down-member-list__btn" @click="downMemberListPop.show = true" v-if="total < 1000000" :limit-code='$buttonCode.memberTagExportPeople'>人群导出</el-button>
<el-button type="primary" class="down-member-list__btn" @click="tableFiledVisible = true" v-if="total < 1000000" :limit-code='$buttonCode.memberTagExportPeople'>人群导出</el-button>
<el-tooltip v-else class="item" effect="dark" content="每张报表导出人数限制为100万,大于100万的人群会自动拆分为多张报表进行导出" placement="top">
<el-button type="primary" class="down-member-list__btn" @click="downMemberListPop.show = true" :limit-code='$buttonCode.memberTagExportPeople'>人群导出</el-button>
<el-button type="primary" class="down-member-list__btn" @click="tableFiledVisible = true" :limit-code='$buttonCode.memberTagExportPeople'>人群导出</el-button>
</el-tooltip>
</template>
</div>
......@@ -300,6 +300,8 @@
type="2"
projectName="member-tag"
></vue-gic-export-excel>
<!--表格字段-->
<dm-table-filed :visible.sync="tableFiledVisible" projectName="member-tag" pageName="memberTag" :max="20" :defaultDisabled="['memberName']" :checkedFields="checkFields" @submit="onSubmiTableFiled" />
</div>
</template>
<script>
......@@ -329,7 +331,8 @@ export default {
excelUrl: '/gic-member-tag-web/member-tag-member/memberExportExcel',
params: {
memberTagGroupId: '',
requestProject: 'member-tag'
requestProject: 'member-tag',
exportFields: ''
}
},
......@@ -366,7 +369,9 @@ export default {
baseUrl: '',
sortFiled: '',
order: '',
tagSearch: ''
tagSearch: '',
tableFiledVisible: false,
checkFields: ['cardNo','gradeName','crateCardDateStringFormat','lastCostTimeFormat','costTimes','avgCost','birthdayMDFormat','pointsCurrent','costAll','mainStoreName','openStoreName']
};
},
computed: {
......@@ -651,14 +656,18 @@ export default {
getTagLists({ requestProject: 'gic-member-tag-web' }).then(res => {
if (res.errorCode === 1) {
const ret = res.result;
console.log(ret);
let memberTagGroupId = this.$route.query.memberTagGroupId;
let target = ret.find(el => el.memberTagGroupId === memberTagGroupId);
// this.aliasName = target.aliasName;
this.memberCount = target.memberCount;
}
});
}
},
onSubmiTableFiled(data) {
const { downMemberListPop: { params: exportParams } } = this;
this.downMemberListPop.show = true;
exportParams.exportFields = data.toString();
},
},
beforeMount() {
var that = this;
......@@ -678,6 +687,7 @@ export default {
}
this.downMemberListPop.params.gradeId = memberTagGroupId;
this.downMemberListPop.params.memberTagGroupId = memberTagGroupId;
this.downMemberListPop.excelUrl = local + this.downMemberListPop.excelUrl;
// this.canDownMemberList();
this.getTagValueDtoList();
......
......@@ -363,7 +363,7 @@ export default {
weimId: ['3d11ac15963b4c0790762e6147ea9315', '5bdac971673b4f40a9af981e3c9215bf'],
isSync: false, // 是否开启自动同步开关
activeTag: 'system',
manualOrderBy: 0
manualOrderBy: 1
};
},
computed: {
......@@ -603,7 +603,7 @@ export default {
showMemberCount: 1, // 覆盖人数
pageNum: opt.pageNum || 1,
pageSize: opt.pageSize || 20,
orderType: this.activeTag == 'manual' ? this.manualOrderBy : 0
orderType: this.activeTag == 'manual' ? this.manualOrderBy : 1
};
const Data = await getMemberTagList(params);
this.showSearchResult = !!opt.showSearchResult;
......
......@@ -2,7 +2,10 @@
<div class="second" :class="[isOtherTag && 'manual']">
<span class="name" :class="{ 'manual-name': isOtherTag, 'light-active': tagList.name === tagRealName }" @click="handleSecondtag(tagList)">
<span v-if="isOtherTag">
<i :class="[tagList.icon, { 'icon-tag-light': tagList.name === tagRealName }]" class="iconfont menu-icon"></i>
<!-- tagList.icon -->
<svg class="menu-icon" :class="[ { 'icon-tag-light': tagList.name === tagRealName }]" aria-hidden="true">
<use :xlink:href="`#${tagList.icon}`"></use>
</svg>
<span class="tag-name" :class="{ 'icon-tag-light': tagList.name === tagRealName }">{{ tagList.name }}</span>
</span>
<span class="second-title" v-else>{{ tagList.name }}</span>
......@@ -446,4 +449,10 @@ export default {
.btn-group {
font-size: 0;
}
.menu-icon {
width: 16px; height: 16px;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
</style>
......@@ -2,8 +2,10 @@
<div class="list">
<div class="first-tag">
<div v-if="isOtherTag" class="mb16">
<i :class="[list.icon, { 'icon-tag-light': list.name === tagRealName }]" class="iconfont menu-icon"></i>
<span class="tag-name" :class="{ 'icon-tag-light': list.name === tagRealName }" @click="handleFirstTag">{{ list.name }}</span>
<svg class="menu-icon" :class="[ { 'icon-tag-light': list.name === tagRealName }]" aria-hidden="true">
<use :xlink:href="`#${list.icon}`"></use>
</svg>
<span class="tag-name" :class="{ 'icon-tag-light': list.name === tagRealName }" @click="handleFirstTag">{{ list.name }}</span>
</div>
<el-collapseTransition>
<div class="second-tag">
......@@ -121,4 +123,10 @@ export default {
.mb16 {
margin-bottom: 16px;
}
.menu-icon {
width: 16px; height: 16px;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
</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