Commit 5a6374c8 by xuyl

更新客户数据概览展开收起以及营销人群导出

1 parent 903c620d
......@@ -225,16 +225,25 @@
</div>
<div class="middlemsg">
<div class="settiongBox">
<span class="normalTitle">客户分群</span>
<span class="normalTitle">
客户分群
<span class="setting" @click="goToGrouping()">设置</span>
</span>
<div class="set">
<span @click="goToGrouping()">设置</span>
<i class="el-icon-arrow-right color-58"></i>
<span v-if="customerSegmentation && customerSegmentation.length > 4 && !closeFlag" @click="expandClick('expand')">
展开
<i class="el-icon-arrow-down color-58"></i>
</span>
<span v-if="closeFlag" @click="expandClick('close')">
收起
<i class="el-icon-arrow-up color-58"></i>
</span>
</div>
</div>
<div class="itembox">
<template v-for="(item, index) in customerSegmentation">
<!-- fn="人群客户列表" mode="div" -->
<div class="item" @click="goToGroupOperating(item.crowdGroupId)" :key="index">
<div class="item" @click="goToGroupOperating(item.crowdGroupId)" :key="index" v-if="index < displayNum">
<div class="itemTitle">
<span class="itemName">{{ item.crowdGroupName }}</span>
<el-popover placement="top" trigger="hover" :content="item.crowdGroupDesc">
......@@ -330,6 +339,8 @@ export default {
},
data() {
return {
displayNum: 4, //展示的数目
closeFlag: false, //展开收起
crowdType: 3,
isCloseShowNumTag: false,
isReload: true,
......@@ -469,6 +480,15 @@ export default {
this.customerListShow()
},
methods: {
expandClick(val) {
if (val == 'expand') {
this.closeFlag = true
this.displayNum = this.customerSegmentation.length || ''
} else {
this.closeFlag = false
this.displayNum = 4
}
},
goToGrouping() {
this.$router.push('/clientDataOverview/grouping')
},
......@@ -1115,6 +1135,12 @@ export default {
border-bottom: 1px solid #e5e5e5;
.normalTitle {
border-bottom: none;
.setting {
font-size: 16px;
color: #5850ff;
margin-right: 20px;
font-weight: 500;
}
}
.set {
font-size: 16px;
......
......@@ -105,7 +105,7 @@
</template>
<script>
import { marketingPeopleListShow, getcrowdManageList } from '@/api/modules/clientDataOverview'
import { marketingPeopleListShow, getcrowdManageList, customerClusterListExport } from '@/api/modules/clientDataOverview'
import { getStaffList } from '@/api/modules/clientManage'
import marketingPlan from './components/marketingPlan.vue'
import Swiper from 'swiper'
......@@ -122,6 +122,7 @@ export default {
searchForm: {
crowdId: ''
},
backupCrowdId: '',
isActive: 0,
displayNum: 4, //展示的数目
closeFlag: false, //展开收起
......@@ -298,7 +299,6 @@ export default {
if (this.queryTab) {
this.activeName = this.queryTab == 'first' ? 'first' : 'second'
}
// this.getMarketingPeople()
this.getStaffList()
},
mounted() {
......@@ -316,6 +316,18 @@ export default {
})
},
methods: {
// 导出
handleExport() {
var params = {
customCrowd: true,
crowdId: this.backupCrowdId,
pageSize: 10,
pageNum: 1
}
customerClusterListExport(params).then(res => {
this.$Utils.exportFn(res)
})
},
marketSOP() {
let params = this.itemArr[this.isActive]
this.createMarketSOP(params)
......@@ -349,7 +361,7 @@ export default {
await marketingPeopleListShow(params).then(res => {
this.itemArr = res.crowdUnitList
this.showTitle = this.itemArr[0].crowdName
this.searchForm.crowdId = 53
this.searchForm.crowdId = this.itemArr[0].crowdId
})
}
......@@ -432,14 +444,16 @@ export default {
}
},
// 选择的人群
choickItem(idx, title, id) {
choickItem(idx, title, Cid) {
console.log(Cid)
this.isActive = idx
this.showTitle = title
console.log(id)
this.backupCrowdId = Cid
// 发送请求查询列表
this.searchForm = {
crowdId: 58
crowdId: Cid
}
console.log(this.searchForm)
this.searchTable()
},
setTableFinishFun() {
......
......@@ -118,7 +118,7 @@ export default {
createMarketSOP(crowd) {
var params = {
addOrEdit: 'add',
fromPage: '/custom/crowdManage/index',
fromPage: `/custom/crowdManage/index?selectTab=${this.activeName}`,
$title: encodeURI('新建SOP'),
info: {
// 人群
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!