Commit 5a6374c8 by xuyl

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

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