Commit 11b14ac5 by 王志慧

人群管理,设置标签

1 parent 8651272b
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</div> </div>
<img src="./assets/logo.png" alt="" srcset="" /> <img src="./assets/logo.png" alt="" srcset="" />
</div> --> </div> -->
<keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd,guestGroupDetail"> <keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd,guestGroupDetail,group">
<router-view></router-view> <router-view></router-view>
</keep-alive> </keep-alive>
</div> </div>
......
...@@ -6,10 +6,12 @@ ...@@ -6,10 +6,12 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http3 } from '@/main' import { http3 } from '@/main'
const url = 'http://192.168.3.193:8395/rop-scrm-entmicro/router'
//获取数据概览上方的数据 /rop-scrm-datahub //获取数据概览上方的数据 /rop-scrm-datahub
export function getDataOverview(params){ export function getDataOverview(params) {
params.method='entmicro.api.Customer.customer.view.data' params.method = 'entmicro.api.Customer.customer.view.data'
return http3({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
...@@ -17,18 +19,37 @@ ...@@ -17,18 +19,37 @@
data: params, data: params,
sign: true sign: true
}) })
} }
//获取数据概览下方柱状图的数据 //获取数据概览下方柱状图的数据
export function getDataOverviewBarMap(params){ export function getDataOverviewBarMap(params) {
params.method='entmicro.api.customer.view.chart' params.method = 'entmicro.api.customer.view.chart'
return http3({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
//客户分群列表接口
export function getCustomerList(params) {
params.method = 'entmicro.api.customer.cluster.page'
return http3({
url:'/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//客户分群列表导出
export function customerClusterListExport(params) {
params.method = 'entmicro.api.customer.customerClusterListExport'
return http3({
url:'/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http,http2,http3 } from '@/main' import { http, http3 } from '@/main'
// const url = 'http://192.168.3.181:9636/rop-scrm-datahub/router'
//const commonUrl='&format=json&appKey=48e5e13229b82c1b4e6e8c96151f0637&v=1.0.*×tamp=1654487354&source=sub-client-custom&sign=sdf9787dfs87987sf9879sdf87sdf' //const commonUrl='&format=json&appKey=48e5e13229b82c1b4e6e8c96151f0637&v=1.0.*×tamp=1654487354&source=sub-client-custom&sign=sdf9787dfs87987sf9879sdf87sdf'
//获取客户列表内容 //获取客户列表内容
// const GETCLIENTTABLELIST = params => { // const GETCLIENTTABLELIST = params => {
// return http({ // return http({
...@@ -23,44 +23,45 @@ ...@@ -23,44 +23,45 @@
// 获取客户详情单用户标签 // 获取客户详情单用户标签
// params.method='datahub.api.label.querylabeltree' // params.method='datahub.api.label.querylabeltree'
export function getSingleClientTag(params){ export function getSingleClientTag(params) {
params.method='scrm.api.datahub.user.getuserlabel' params.method = 'scrm.api.datahub.user.getuserlabel'
return http({ return http({
url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
export function getAllTagTree (params){ export function getAllTagTree(params) {
// params.method='scrm.api.datahub.label.querylabeltree' // params.method='scrm.api.datahub.label.querylabeltree'
params.method='scrm.api.datahub.labelgroup.queryLabelTree' params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
return http({ return http({
url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
// /router/datahub.api.user.addUserLabel/1.0.0 // /router/datahub.api.user.addUserLabel/1.0.0
// 用户添加标签 //编辑用户标签(包含标签新增列表和删除列表)
export function addSingleClientTag (params){
params.method='scrm.api.datahub.user.addUserLabel' export function addSingleClientTag(params) {
params.method = 'scrm.api.datahub.user.editUserLabel'
return http({ return http({
url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
export function getTableList (params){ export function getTableList(params) {
params.method='entmicro.api.customer.page' params.method = 'entmicro.api.customer.page'
// params.sessionId="mini-e72437ba-845e-4da3-9966-0b25684d6373-rop" // params.sessionId="mini-e72437ba-845e-4da3-9966-0b25684d6373-rop"
// params.timestamp=new Date().getTime() // params.timestamp=new Date().getTime()
// +'?method=org.ore.api.customer.page' // +'?method=org.ore.api.customer.page'
...@@ -70,9 +71,9 @@ ...@@ -70,9 +71,9 @@
data: params, data: params,
sign: true sign: true
}) })
} }
export function syncCustomer(params){ export function syncCustomer(params) {
params.method='entmicro.api.synchro.syncCustomer' params.method = 'entmicro.api.synchro.syncCustomer'
return http3({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
...@@ -80,8 +81,8 @@ ...@@ -80,8 +81,8 @@
sign: true sign: true
}) })
} }
export function getTableDetail(params){ export function getTableDetail(params) {
params.method='entmicro.api.customer.detail' params.method = 'entmicro.api.customer.detail'
// params.sessionId="mini-e72437ba-845e-4da3-9966-0b25684d6373-rop" // params.sessionId="mini-e72437ba-845e-4da3-9966-0b25684d6373-rop"
return http3({ return http3({
...@@ -90,24 +91,24 @@ ...@@ -90,24 +91,24 @@
data: params, data: params,
sign: true sign: true
}) })
} }
/*获取来源字典的 /*获取来源字典的
*/ */
export function getDictionaryFun(params){ export function getDictionaryFun(params) {
params.method='entmicro.api.common.dictdata.list' params.method = 'entmicro.api.common.dictdata.list'
return http3({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'GET', method: 'GET',
data: params, data: params,
sign: true sign: true
}) })
} }
// entmicro.api.customer.list.export // entmicro.api.customer.list.export
//客户信息管理导出 //客户信息管理导出
export function clientManageExportApi(params){ export function clientManageExportApi(params) {
params.method=`entmicro.api.customer.customerListExport` params.method = `entmicro.api.customer.customerListExport`
return http3({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'GET', method: 'GET',
......
...@@ -38,4 +38,42 @@ background: transparent !important; ...@@ -38,4 +38,42 @@ background: transparent !important;
color: $btnBlue; color: $btnBlue;
font-size: 16px; font-size: 16px;
} }
.white-hide{
box-sizing: border-box;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.color-6{
color:#666666;
}
.color-3{
color:#333333;
}
.color-71{
color: #717171;
}
.color-58{
color: #5850ff;
}
.flex-start{
align-items: flex-start;
display: flex;
}
.flex{
display:flex;
align-items: center;
flex-wrap: wrap;
}
.flex-between{
display:flex;
align-items: center;
justify-content: space-between;
}
.font-20{
font-size: 20px;
}
.font-14{
font-size: 14px;
}
\ No newline at end of file \ No newline at end of file
...@@ -18,6 +18,12 @@ const staticRoutes = Object.freeze([ ...@@ -18,6 +18,12 @@ const staticRoutes = Object.freeze([
meta: {} meta: {}
}, },
{ {
name: 'clientDataOverview',
path: "/clientDataOverview/group/:id",
component: resolve => require([`@/views/clientDataOverview/group.vue`], resolve),
meta: {}
},
{
name: 'clientManage', name: 'clientManage',
path: "/clientManage/index", path: "/clientManage/index",
component: resolve => require([`@/views/clientManage/index.vue`], resolve), component: resolve => require([`@/views/clientManage/index.vue`], resolve),
......
...@@ -14,7 +14,7 @@ let router = null ...@@ -14,7 +14,7 @@ let router = null
let instance = null let instance = null
// http:调的是新版标签的接口,http2:调的是客户相关接口;http3:企微授权那边的接口 目前导出接口都测试的:http3 // http:调的是新版标签的接口,http2:调的是客户相关接口;http3:企微授权那边的接口 目前导出接口都测试的:http3
export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) { export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) {
const { response, request,request2,request3, sign, secret, sign_common, request_common } = await fetchConfig(globalState.configSwitch)//globalState.configSwitch const { response, request,request2,request3, request4,sign, secret, sign_common, request_common } = await fetchConfig(globalState.configSwitch)//globalState.configSwitch
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
...@@ -22,6 +22,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt ...@@ -22,6 +22,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http3 = new common.Http({ response, request: request3, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http3 = new common.Http({ response, request: request3, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$http4 = new common.Http({ response, request: request4, sign, secret, alert: message.error, headers: { token: 'scrm-base-e2d4f962-4ca3-4044-83e7-01ba314d8e3d-rop' } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: "mini-14eda653-4284-4165-bb85-325bb82a516d-rop" } }) // Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: "mini-14eda653-4284-4165-bb85-325bb82a516d-rop" } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
......
<template>
<div class="scrm-sub-client-container">
<div class="head-container">
<div class="head-container-title color-3 font-20">人群名称</div>
<div class="head-container-content color-6 font-14">{{ describe }}</div>
<div class="reminder font-14 color-3">企业标签 | 自动更新</div>
<div class="back color-58 font-14" @click="goBack">返回人群管理</div>
</div>
<div class="main-container">
<div class="main-container-head flex-between">
<div class="main-container-head-title color-3 font-20">
全部客户
<span class="main-container-head-number font-14">{{ totalCount }}个</span>
</div>
<div class="export font-14 color-6" @click="handleExport()">导出</div>
</div>
<GLTable ref="groupRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="customerNickName" class="flex-center" slot-scope="scope">
<el-tooltip effect="dark" :content="scope.scope.customerNickName" placement="top">
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerNickName }}</span>
</el-tooltip>
<span :class="[scope.scope.type == 1 ? 'pure-blue-text' : '', scope.scope.type == 2 ? 'pure-yello-text' : '']">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span>
</span>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<GLButton type="text" @click="handleDetail(scope.scope)" fn="魔方导入结果">详情</GLButton>
</div>
</GLTable>
</div>
</div>
</template>
<script>
import { getCustomerList, customerClusterListExport } from '@/api/modules/clientDataOverview'
export default {
name: 'group',
data() {
return {
getListApi: getCustomerList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableSearchForm: {},
id: this.$route.params.id ? this.$route.params.id : '',
totalCount: 0,
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '客户姓名',
prop: 'customerName',
minWidth: 100
},
{
label: '昵称',
prop: 'customerNickName',
minWidth: 100,
addHtml: 'customerNickName'
},
{
label: '手机号',
prop: 'customerPhone',
minWidth: 110
},
{
label: '车牌号',
prop: 'carNumber',
width: 100
},
{
label: '车架号(后6位)',
prop: 'carVin',
// addHtml: 'standNo',
minWidth: 120
},
{
label: '车系',
prop: 'audi',
width: 160,
line: 2
},
{
label: '跟进员工',
prop: 'followStaff',
// addHtml: 'followStaff',
minWidth: 120
},
{
label: '是否加企微', //1. 加入,0.未加入
prop: 'isJoinName',
width: 100
},
{
label: '添加时间',
prop: 'addTime',
width: 98
}
]
},
describeData: ['潜在意向客户数', '潜在意向客户&已加企微客户数', '潜在意向客户&未加企微客户数', '基盘客户数', '基盘客户&已加企微客户数', '基盘客户&未加企微客户数', '新车客户数', '车险待续保客户数', '新车待首保客户数', '沉默客户数']
}
},
created() {
let { id } = this
this.init(id)
},
computed: {
describe() {
let id = this.id - 1
return this.describeData[id]
}
},
methods: {
init(id) {
this.tableSearchForm = {
crowdId: id
}
this.getTotalCount()
},
//获取全部客户数
getTotalCount() {
getCustomerList({
...this.tableSearchForm,
pageSize: 10,
pageNum: 1
}).then(res => {
console.log('res', res)
this.totalCount = res.count
})
},
//导出
handleExport() {
var params = {
tagLists: [{ groupId: `${this.id}` }],
pageSize: 10,
pageNum: 1
}
customerClusterListExport(params).then(res => {
this.$Utils.exportFn(res)
})
},
goBack() {
this.$router.replace({ path: '/clientDataOverview/index' })
}
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
.scrm-sub-client-container {
.head-container {
position: relative;
margin-bottom: 10px;
width: 100%;
height: 112px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
padding: 20px;
box-sizing: border-box;
&-title {
font-weight: 500;
line-height: 20px;
letter-spacing: 1px;
margin-bottom: 10px;
}
&-content {
font-weight: 400;
line-height: 20px;
width: calc(100% - 156px);
}
.reminder {
position: absolute;
font-weight: 400;
line-height: 20px;
right: 20px;
top: 20px;
}
.back {
font-weight: 400;
line-height: 22px;
padding: 5px 16px;
border-radius: 4px;
border: 1px solid $btnBlue;
position: absolute;
right: 20px;
bottom: 20px;
color: $btnBlue;
}
}
.main-container {
width: 100%;
height: 100%;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
padding: 20px;
box-sizing: border-box;
.main-container-head {
margin-bottom: 20px;
&-title {
font-weight: 500;
line-height: 20px;
letter-spacing: 1px;
}
&-number {
color: $btnBlue;
margin-left: 6px;
font-weight: 400;
line-height: 20px;
}
.export {
font-weight: 400;
padding: 6px 23px;
line-height: 20px;
background: #ffffff;
border-radius: 4px;
border: 1px solid rgba(105, 105, 105, 0.3);
}
}
}
.pure-blue-text {
color: #61cc43;
}
.pure-yello-text {
color: #fb8f28;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<div class="topmsg"> <div class="topmsg">
<div class="leftPieEcharts"> <div class="leftPieEcharts">
<span class="title">客户总数</span> <span class="title">客户总数</span>
<span class="subtitle" v-if="accountLevel==4">门店的所有客户数,包括企微客户,导入和外部系统接入客户,并根据手机号码识别同一客户后合并去重</span> <span class="subtitle" v-if="accountLevel == 4">门店的所有客户数,包括企微客户,导入和外部系统接入客户,并根据手机号码识别同一客户后合并去重</span>
<span class="subtitle" v-else>企业的所有客户数,包括企业客户和旗下所有门店客户,并根据手机号码识别同一客户后合并去重</span> <span class="subtitle" v-else>企业的所有客户数,包括企业客户和旗下所有门店客户,并根据手机号码识别同一客户后合并去重</span>
<span class="clientTotal"> <span class="clientTotal">
<!-- 可以动态跑数字 --> <!-- 可以动态跑数字 -->
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</div> </div>
<div class="itembox"> <div class="itembox">
<div class="no-buy"> <div class="no-buy">
<div class="no-buy-total item"> <GLButton class="no-buy-total item" @click="goto(1)" fn="人群客户列表" mode="div">
<span>潜在意向客户数</span> <span>潜在意向客户数</span>
<span>无购车且无其他交易行为的所有客户</span> <span>无购车且无其他交易行为的所有客户</span>
<span v-if="!isEmptyObj"> <span v-if="!isEmptyObj">
...@@ -63,10 +63,11 @@ ...@@ -63,10 +63,11 @@
<!-- <i class="vertical-line"></i> --> <!-- <i class="vertical-line"></i> -->
<no-data :type="'hasText'" v-if="isEmptyObj"></no-data> <no-data :type="'hasText'" v-if="isEmptyObj"></no-data>
</div> </GLButton>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<div class="rightWrap"> <div class="rightWrap">
<div class="inCompanyWechatNum item smallWrap"> <GLButton class="inCompanyWechatNum item smallWrap" @click="goto(2)" fn="人群客户列表" mode="div">
<span>已加企微客户数</span> <span>已加企微客户数</span>
<span> <span>
{{ (topDataObj.purposeCustomerAddCount || 0) | overThousandFilter }} {{ (topDataObj.purposeCustomerAddCount || 0) | overThousandFilter }}
...@@ -74,9 +75,9 @@ ...@@ -74,9 +75,9 @@
</span> </span>
<span>在潜在意向客户中,已加企微的客户</span> <span>在潜在意向客户中,已加企微的客户</span>
<!-- <i class="horizontal-line"></i> --> <!-- <i class="horizontal-line"></i> -->
</div> </GLButton>
<el-divider></el-divider> <el-divider></el-divider>
<div class="outCompanyWechatNum item smallWrap"> <GLButton class="outCompanyWechatNum item smallWrap" @click="goto(3)" fn="人群客户列表" mode="div">
<span>未加企微客户数</span> <span>未加企微客户数</span>
<span> <span>
{{ (topDataObj.purposeCustomerNAddCount || 0) | overThousandFilter }} {{ (topDataObj.purposeCustomerNAddCount || 0) | overThousandFilter }}
...@@ -84,12 +85,15 @@ ...@@ -84,12 +85,15 @@
</span> </span>
<span>在潜在意向客户中,未加企微的客户</span> <span>在潜在意向客户中,未加企微的客户</span>
<!-- &nbsp;&nbsp;&gt;&gt;--> <!-- &nbsp;&nbsp;&gt;&gt;-->
<button class="btn" @click="toGuideCompanyWechat" v-if="accountLevel==4">引流企微 <i class="el-icon-d-arrow-right"></i></button> <button class="btn" @click="toGuideCompanyWechat" v-if="accountLevel == 4">
</div> 引流企微
<i class="el-icon-d-arrow-right"></i>
</button>
</GLButton>
</div> </div>
</div> </div>
<div class="buy"> <div class="buy">
<div class="buy-total item"> <GLButton class="buy-total item" @click="goto(4)" fn="人群客户列表" mode="div">
<!-- <span>购买(存档)客户数</span> --> <!-- <span>购买(存档)客户数</span> -->
<span>基盘客户数</span> <span>基盘客户数</span>
<span>有购车或其他交易行为的所有客户</span> <span>有购车或其他交易行为的所有客户</span>
...@@ -106,10 +110,10 @@ ...@@ -106,10 +110,10 @@
<no-data :type="'hasText'" v-if="isEmptyObj"></no-data> <no-data :type="'hasText'" v-if="isEmptyObj"></no-data>
<!-- <i class="vertical-line"></i> --> <!-- <i class="vertical-line"></i> -->
</div> </GLButton>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<div class="rightWrap"> <div class="rightWrap">
<div class="inCompanyWechatNum item smallWrap"> <GLButton class="inCompanyWechatNum item smallWrap" @click="goto(5)" fn="人群客户列表" mode="div">
<span>已加企微客户数</span> <span>已加企微客户数</span>
<span> <span>
{{ (topDataObj.purchaseCustomerAddCount || 0) | overThousandFilter }} {{ (topDataObj.purchaseCustomerAddCount || 0) | overThousandFilter }}
...@@ -118,17 +122,20 @@ ...@@ -118,17 +122,20 @@
<span>在基盘客户中,已加企微的客户</span> <span>在基盘客户中,已加企微的客户</span>
<!-- <button class="btn">企微魔方&gt;&gt;</button> --> <!-- <button class="btn">企微魔方&gt;&gt;</button> -->
<!-- <i class="horizontal-line"></i> --> <!-- <i class="horizontal-line"></i> -->
</div> </GLButton>
<el-divider></el-divider> <el-divider></el-divider>
<div class="outCompanyWechatNum item smallWrap"> <GLButton class="outCompanyWechatNum item smallWrap" @click="goto(6)" fn="人群客户列表" mode="div">
<span>未加企微客户数</span> <span>未加企微客户数</span>
<span> <span>
{{ (topDataObj.purchaseCustomerNAddCount || 0) | overThousandFilter }} {{ (topDataObj.purchaseCustomerNAddCount || 0) | overThousandFilter }}
<span class="person-text">人</span> <span class="person-text">人</span>
</span> </span>
<span>在基盘客户中,未加企微的客户</span> <span>在基盘客户中,未加企微的客户</span>
<button class="btn" @click="toGuideCompanyWechat" v-if="accountLevel==4" >引流企微 <i class="el-icon-d-arrow-right"></i></button> <button class="btn" @click="toGuideCompanyWechat" v-if="accountLevel == 4">
</div> 引流企微
<i class="el-icon-d-arrow-right"></i>
</button>
</GLButton>
</div> </div>
</div> </div>
</div> </div>
...@@ -136,7 +143,8 @@ ...@@ -136,7 +143,8 @@
<div class="middlemsg"> <div class="middlemsg">
<h3 class="pageSubTitle">客户分群</h3> <h3 class="pageSubTitle">客户分群</h3>
<div class="itembox"> <div class="itembox">
<div class="item" v-for="(item, index) in titles" :key="index"> <template v-for="(item, index) in titles">
<GLButton class="item" @click="goto(item.id)" fn="人群客户列表" mode="div" :key="index">
<p>{{ item.name }}</p> <p>{{ item.name }}</p>
<p>{{ item.subName }}</p> <p>{{ item.subName }}</p>
<p> <p>
...@@ -144,7 +152,8 @@ ...@@ -144,7 +152,8 @@
<span class="person-text">人</span> <span class="person-text">人</span>
</p> </p>
<img :src="item.url" alt="" /> <img :src="item.url" alt="" />
</div> </GLButton>
</template>
</div> </div>
</div> </div>
<h3 class="pageSubTitle">客户增长趋势</h3> <h3 class="pageSubTitle">客户增长趋势</h3>
...@@ -211,8 +220,8 @@ export default { ...@@ -211,8 +220,8 @@ export default {
}, },
data() { data() {
return { return {
isCloseShowNumTag:false, isCloseShowNumTag: false,
isReload:true, isReload: true,
isShowModal: false, isShowModal: false,
isHasCustomerCountBanner: false, isHasCustomerCountBanner: false,
topDataObj: { topDataObj: {
...@@ -235,25 +244,29 @@ export default { ...@@ -235,25 +244,29 @@ export default {
name: '新车客户数', name: '新车客户数',
subName: '购车时间3个月的客户', subName: '购车时间3个月的客户',
num: 0, num: 0,
url: url1 url: url1,
id:7,
}, },
{ {
name: '车险待续保客户数', name: '车险待续保客户数',
subName: '近一个月内车险即将到期的客户', subName: '近一个月内车险即将到期的客户',
num: 0, num: 0,
url: url2 url: url2,
id:8,
}, },
{ {
name: '新车待首保客户数', name: '新车待首保客户数',
subName: '购车时间5~7个月内,且无保养记录的客户', subName: '购车时间5~7个月内,且无保养记录的客户',
num: 0, num: 0,
url: url3 url: url3,
id:9
}, },
{ {
name: '沉默客户数', name: '沉默客户数',
subName: '超过180天未到店的客户', subName: '超过180天未到店的客户',
num: 0, num: 0,
url: url4 url: url4,
id:10
} }
], ],
isNoBuyUp: 0, //默认环比为增 isNoBuyUp: 0, //默认环比为增
...@@ -267,18 +280,18 @@ export default { ...@@ -267,18 +280,18 @@ export default {
thirtyDayStorage: {}, thirtyDayStorage: {},
dialogVisible: false, dialogVisible: false,
//只有门店可以引流企微 //只有门店可以引流企微
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店 accountLevel: 0 //1,2,3,4工厂,省代,市代,门店
} }
}, },
mounted() { mounted() {
document.body.style.overflow = 'hidden' document.body.style.overflow = 'hidden'
var that =this; var that = this
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
that.isReload=false that.isReload = false
that.$nextTick(() => { that.$nextTick(() => {
that.isReload=true that.isReload = true
}); })
}) })
}, },
computed: { computed: {
...@@ -312,7 +325,6 @@ export default { ...@@ -312,7 +325,6 @@ export default {
//先看登录次数,首次进来为true,不管客户总数是否为0,都显示banner; //先看登录次数,首次进来为true,不管客户总数是否为0,都显示banner;
//不是首次进来,登录次数为2,客户总数大于0,不显示banner,小于0,继续显示banner; //不是首次进来,登录次数为2,客户总数大于0,不显示banner,小于0,继续显示banner;
this.getDataOverviewBarMapFun() this.getDataOverviewBarMapFun()
}, },
methods: { methods: {
...@@ -427,11 +439,11 @@ export default { ...@@ -427,11 +439,11 @@ export default {
this.isBuyUp = res.purchaseUp this.isBuyUp = res.purchaseUp
//先看登录次数,首次进来为true,不管客户总数是否为0,都显示banner; //先看登录次数,首次进来为true,不管客户总数是否为0,都显示banner;
//不是首次进来,登录次数为2,客户总数大于0,不显示banner,小于等于0,继续显示banner; //不是首次进来,登录次数为2,客户总数大于0,不显示banner,小于等于0,继续显示banner;
console.log(this.accountLevel,this.isShowModal,this.topDataObj.customerCount,'myData') console.log(this.accountLevel, this.isShowModal, this.topDataObj.customerCount, 'myData')
if(this.isShowModal && this.accountLevel!==4){ if (this.isShowModal && this.accountLevel !== 4) {
this.isShowModal=false; //关掉引导层 this.isShowModal = false //关掉引导层
} }
if (this.isShowModal && this.accountLevel==4) { if (this.isShowModal && this.accountLevel == 4) {
this.isHasCustomerCountBanner = true this.isHasCustomerCountBanner = true
this.$nextTick(() => { this.$nextTick(() => {
$('img[usemap]').rwdImageMaps() $('img[usemap]').rwdImageMaps()
...@@ -442,7 +454,7 @@ export default { ...@@ -442,7 +454,7 @@ export default {
}, 1000) }, 1000)
} else if (!this.isShowModal && this.topDataObj.customerCount > 0) { } else if (!this.isShowModal && this.topDataObj.customerCount > 0) {
this.isHasCustomerCountBanner = false this.isHasCustomerCountBanner = false
} else if (!this.isShowModal && this.topDataObj.customerCount <= 0 && this.accountLevel==4) { } else if (!this.isShowModal && this.topDataObj.customerCount <= 0 && this.accountLevel == 4) {
this.isHasCustomerCountBanner = true this.isHasCustomerCountBanner = true
this.$nextTick(() => { this.$nextTick(() => {
$('img[usemap]').rwdImageMaps() $('img[usemap]').rwdImageMaps()
...@@ -486,7 +498,7 @@ export default { ...@@ -486,7 +498,7 @@ export default {
}, },
clickThirty() { clickThirty() {
this.timeGap = 30 this.timeGap = 30
this.isCloseShowNumTag=true this.isCloseShowNumTag = true
if (Object.keys(this.thirtyDayStorage).length == 0) { if (Object.keys(this.thirtyDayStorage).length == 0) {
this.getDataOverviewBarMapFun(30) //第一次点击30天,获取数据 this.getDataOverviewBarMapFun(30) //第一次点击30天,获取数据
} else { } else {
...@@ -496,7 +508,7 @@ export default { ...@@ -496,7 +508,7 @@ export default {
}, },
clickSeven() { clickSeven() {
this.timeGap = 7 this.timeGap = 7
this.isCloseShowNumTag=false this.isCloseShowNumTag = false
if (Object.keys(this.sevenDayStorage).length == 0) { if (Object.keys(this.sevenDayStorage).length == 0) {
this.getDataOverviewBarMapFun() //重新掉一遍接口 this.getDataOverviewBarMapFun() //重新掉一遍接口
} else { } else {
...@@ -508,6 +520,10 @@ export default { ...@@ -508,6 +520,10 @@ export default {
this.isShowModal = false this.isShowModal = false
// 允许页面滚动: // 允许页面滚动:
document.body.style.overflow = 'visible' document.body.style.overflow = 'visible'
},
//跳转到人群客户列表
goto(id) {
this.$router.push('/clientDataOverview/group/'+id)
} }
} }
} }
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<span>类型</span> <span>类型</span>
<span class="ellipsis-1">{{ leftPanelInfo.type == 1 ? '微信用户' : leftPanelInfo.type == 2 ? '企微用户' : '' }}</span> <span class="ellipsis-1">{{ leftPanelInfo.type == 1 ? '微信用户' : leftPanelInfo.type == 2 ? '企微用户' : '' }}</span>
</p> </p>
<p v-if="leftPanelInfo.isJoin == 1"> <p>
<span>是否加企微</span> <span>是否加企微</span>
<!-- 1-是,2-否 --> <!-- 1-是,2-否 -->
<span>{{ leftPanelInfo.isJoin == 1 ? '是' : leftPanelInfo.isJoin == 0 ? '否' : '' }}</span> <span>{{ leftPanelInfo.isJoin == 1 ? '是' : leftPanelInfo.isJoin == 0 ? '否' : '' }}</span>
...@@ -160,7 +160,32 @@ ...@@ -160,7 +160,32 @@
</div> </div>
<basic-dialog class="tags" :title="tagsDialogTitle" :width="'712px'" :btnLoading="sloading" :isShowThirdBtn="true" @btnEvent="goNewTag" :isVisible="tagsVisible" @confirmDialog="handleConfirm" @closeDialog="handleClose"> <basic-dialog class="tags" :title="tagsDialogTitle" :width="'712px'" :btnLoading="sloading" :isShowThirdBtn="true" @btnEvent="goNewTag" :isVisible="tagsVisible" @confirmDialog="handleConfirm" @closeDialog="handleClose">
<slot> <slot>
<p class="dialogSubTitle">企业标签</p> <p class="hint-text">
<span class="color-6">说明:</span>
仅支持企业标签<span v-if="merchantModel==1">和自店标签</span>进行人工维护和设置
</p>
<p class="hint-text mg10">系统标签通过大数据算法进行自动更新,不支持人工维护和编辑</p>
<div class="labels-wrap" v-for="(group, index) in allTagsList" :key="index">
<template v-if="(merchantModel == 2 && group.labelType != '自店标签')||merchantModel == 1">
<div class="label-wrap">
<div class="label-group-name color-3">{{ group.labelType }}</div>
<div class="labels" v-for="(labels, ids) in group.children" :key="ids">
<div class="label-name white-hide color-71">{{ labels.labelGroup.name }}</div>
<div class="label-value flex">
<template v-for="(label, i) in labels.labelList">
<div :class="['label', 'color-6', 'white-hide', label.checked ? 'isChecked' : '']" :style="{ width: label.name.length > 10 ? '145px' : auto }" :key="label.id" @click="choose(index, ids, i)">
{{ label.name }}
<template v-if="label.checked">
<img src="@/assets/clientDetail/select-icon.png" class="select-icon" alt />
</template>
</div>
</template>
</div>
</div>
</div>
</template>
</div>
<!-- <p class="dialogSubTitle">企业标签</p>
<div class="companyRowData" v-for="(item, index) in companyTagsList" :key="index"> <div class="companyRowData" v-for="(item, index) in companyTagsList" :key="index">
<span :title="item.labelGroup.name">{{ item.labelGroup.name }}</span> <span :title="item.labelGroup.name">{{ item.labelGroup.name }}</span>
<div class="tagsBox"> <div class="tagsBox">
...@@ -176,7 +201,7 @@ ...@@ -176,7 +201,7 @@
<span v-for="(m, n) in xItem.labelList" :key="n" class="ellipsis-1" :class="{ activeTag: m.checked }" :title="m.name" @click="checkNewTag(m.checked, n, xItem.labelList, m.original)">{{ m.name }}</span> <span v-for="(m, n) in xItem.labelList" :key="n" class="ellipsis-1" :class="{ activeTag: m.checked }" :title="m.name" @click="checkNewTag(m.checked, n, xItem.labelList, m.original)">{{ m.name }}</span>
</div> </div>
</div> </div>
</template> </template> -->
<!-- 这里btn-behind插槽莫名失效了,原因:??? --> <!-- 这里btn-behind插槽莫名失效了,原因:??? -->
<!-- <el-button slot="behind" @click="goNewTag">没找到需要的标签,创建新标签</el-button> --> <!-- <el-button slot="behind" @click="goNewTag">没找到需要的标签,创建新标签</el-button> -->
...@@ -411,6 +436,7 @@ export default { ...@@ -411,6 +436,7 @@ export default {
this.accountLevel = this.$globalState.session.accountLevel this.accountLevel = this.$globalState.session.accountLevel
this.userType = this.$globalState.session.userType this.userType = this.$globalState.session.userType
} }
this.id = this.$route.query.id ? this.$route.query.id : ''
this.getPageDetail() this.getPageDetail()
//舍弃调用小龙的获取单用户标签的接口 //舍弃调用小龙的获取单用户标签的接口
// this.getSingleClientTag(this.$route.query.id, this.merchantId) // this.getSingleClientTag(this.$route.query.id, this.merchantId)
...@@ -470,7 +496,7 @@ export default { ...@@ -470,7 +496,7 @@ export default {
getSingleClientTag(oneId = 14120314541863, merchantId = 10001001) { getSingleClientTag(oneId = 14120314541863, merchantId = 10001001) {
let param = { let param = {
'req.oneId': oneId, 'req.oneId': oneId,
'req.merchantId': merchantId, 'req.merchantIdsStr': merchantId,
'req.edition': this.merchantModel 'req.edition': this.merchantModel
} }
getSingleClientTag(param) getSingleClientTag(param)
...@@ -524,7 +550,7 @@ export default { ...@@ -524,7 +550,7 @@ export default {
console.log(pType, scope) console.log(pType, scope)
switch (pType) { switch (pType) {
case 'create': case 'create':
this.tagsDialogTitle = '添加标签' this.tagsDialogTitle = '设置标签'
this.getAllTags() this.getAllTags()
// this.handleClose(); // this.handleClose();
break break
...@@ -537,37 +563,38 @@ export default { ...@@ -537,37 +563,38 @@ export default {
getAllTagTree({ 'labelTreeReq.shopId': this.merchantId, 'labelTreeReq.edition': this.merchantModel, 'labelTreeReq.pageNum': 1, 'labelTreeReq.pageSize': 3000 }) getAllTagTree({ 'labelTreeReq.shopId': this.merchantId, 'labelTreeReq.edition': this.merchantModel, 'labelTreeReq.pageNum': 1, 'labelTreeReq.pageSize': 3000 })
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
console.log(res.data.labelTreeRets, '标签树') let allTagsList = [
let companyArr = res.data.labelTreeRets.filter(item => item.labelType == '企业标签') {
companyArr.forEach(item => labelType: '',
item.labelList.forEach(ele => { children: []
ele.checked = false },
ele.original = false {
}) labelType: '',
) children: []
}
let ownShopArr = res.data.labelTreeRets.filter(ele => ele.labelType == '自店标签') ]
ownShopArr.forEach(item => res.data.labelTreeRets.forEach(labels => {
item.labelList.forEach(ele => { labels.labelList.forEach(ele => {
ele.checked = false ele.checked = false
ele.original = false ele.original = false
}) this.labelIdList.forEach(id => {
) if (id == ele.id) {
console.log(companyArr, ownShopArr, '企业标签自店标签')
this.companyTagsList = companyArr
this.ownShopTagsList = ownShopArr
this.allTagsList = [...this.companyTagsList, ...this.ownShopTagsList]
this.allTagsList.forEach(item =>
item.labelList.forEach(ele => {
for (let i = 0; i < this.labelIdList.length; i++) {
if (ele.id == this.labelIdList[i]) {
ele.checked = true ele.checked = true
ele.original = true ele.old = 1
} }
})
})
if (labels.labelType == '企业标签') {
allTagsList[0].labelType = '企业标签'
allTagsList[0].children.push(labels)
} else {
allTagsList[1].labelType = '自店标签'
allTagsList[1].children.push(labels)
} }
}) })
)
this.allTagsList = allTagsList
// console.log(this.allTagsList, ' this.allTagsList')
} else { } else {
this.$message.error(res.message) this.$message.error(res.message)
} }
...@@ -578,33 +605,39 @@ export default { ...@@ -578,33 +605,39 @@ export default {
this.handleClose() this.handleClose()
}, },
handleConfirm() { handleConfirm() {
//后台要求循环掉接口
//满足条件进行提交
this.sloading = true this.sloading = true
this.submitTagsList.forEach((item, index) => { let labelIdAddList = [] // 新增的标签
let labelIdDelList = [] //取消的标签
this.allTagsList.forEach(labels => {
labels.children.forEach(ele => {
ele.labelList.forEach(tag => {
if (tag.old == '1' && !tag.checked) {
labelIdDelList.push(tag.id)
}
if (!tag.old && tag.checked) {
labelIdAddList.push(tag.id)
}
})
})
})
let param = { let param = {
'req.OneId': this.$route.query.id, 'req.OneId': this.id,
'req.labelGroupId': item.labelGroup.id,
'req.edition': this.merchantModel,
'req.merchantId': this.merchantId, 'req.merchantId': this.merchantId,
'req.uuId': this.userid, 'req.uuId': this.userid,
'req.staffId': this.staffId 'req.staffId': this.staffId,
'req.labelIdAddList': labelIdAddList,
// 'req.labelIdList': item.labelList.map(ele => ele.id) 'req.labelIdDelList': labelIdDelList
} }
var ids = item.labelList.map(ele => ele.id)
param['req.labelIdList'] = ids
console.log(param, '参数')
addSingleClientTag(param) addSingleClientTag(param)
.then(res => { .then(res => {
console.log(param)
if (res.data.code == 0) { if (res.data.code == 0) {
if (index == this.submitTagsList.length - 1) {
this.sloading = false this.sloading = false
this.$message.success('添加成功') this.$message.success('添加成功')
this.handleClose() this.handleClose()
// this.getSingleClientTag(this.$route.query.id, this.merchantId) // this.getSingleClientTag(this.id, this.merchantId)
this.getPageDetail() //刷新当前页面 this.getPageDetail() //刷新当前页面
}
} else { } else {
this.sloading = false this.sloading = false
this.$message.error(res.data.message) this.$message.error(res.data.message)
...@@ -617,15 +650,13 @@ export default { ...@@ -617,15 +650,13 @@ export default {
.finally(() => { .finally(() => {
this.sloading = false this.sloading = false
}) })
})
}, },
handleClose() { handleClose() {
if (this.tagsVisible) { // if (this.tagsVisible) {
this.companyTagsList = [] // this.companyTagsList = []
this.ownShopTagsList = [] // this.ownShopTagsList = []
} // }
console.log('进来') // console.log('进来')
// this.roleForm.tagsList = [] //取消时清空新增标签
this.tagsVisible = !this.tagsVisible this.tagsVisible = !this.tagsVisible
}, },
checkNewTag(checked, j, arr, original = false) { checkNewTag(checked, j, arr, original = false) {
...@@ -659,6 +690,9 @@ export default { ...@@ -659,6 +690,9 @@ export default {
console.log('选中', _arr) console.log('选中', _arr)
this.submitTagsList = _arr this.submitTagsList = _arr
},
choose(index1, index2, index3) {
this.allTagsList[index1].children[index2].labelList[index3].checked = !this.allTagsList[index1].children[index2].labelList[index3].checked
} }
} }
} }
...@@ -894,66 +928,120 @@ export default { ...@@ -894,66 +928,120 @@ export default {
/deep/.app-dialog { /deep/.app-dialog {
.el-dialog__body { .el-dialog__body {
.container { .container {
padding: 20px 72px 20px 68px; padding: 32px 74px;
} }
} }
} }
.dialogSubTitle { // .dialogSubTitle {
margin-bottom: 10px; // margin-bottom: 10px;
height: 20px; // height: 20px;
// font-size: 14px;
// font-weight: 500;
// color: #717171;
// line-height: 20px;
// &:not(:first-child) {
// margin-top: 20px;
// }
// }
// .companyRowData,
// .ownShopRowData {
// display: flex;
// // margin-top: 10px;
// > span {
// margin-right: 10px;
// min-width: 82px;
// height: 20px;
// font-size: 14px;
// font-weight: 400;
// color: #717171;
// line-height: 20px;
// text-align: right;
// max-width: 82px;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
// word-break: break-all;
// }
// .tagsBox {
// display: flex;
// flex-wrap: wrap;
// justify-content: flex-start;
// > span {
// display: inline-block;
// margin-right: 10px;
// margin-bottom: 10px;
// padding: 0 10px;
// box-sizing: border-box;
// min-width: 82px;
// height: 26px;
// line-height: 26px;
// border-radius: 4px;
// border: 1px solid #e8e8ea;
// text-align: center;
// font-size: 14px;
// font-weight: 400;
// color: #666666;
// max-width: 245px;
// cursor: pointer;
// background: #fafbfe;
// }
// .activeTag {
// border: 1px solid $btnBlue;
// color: $btnBlue;
// }
// }
// }
.hint-text {
font-size: 12px;
font-weight: 400;
color: #333333;
line-height: 18px;
}
.mg10 {
margin-left: 38px;
}
.labels-wrap {
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
color: #717171; color: #333333;
line-height: 20px; line-height: 20px;
&:not(:first-child) { .label-group-name {
margin-bottom: 15px;
margin-top: 20px; margin-top: 20px;
font-weight: 500;
} }
} .labels {
.companyRowData, margin-bottom: 10px;
.ownShopRowData { .label-name {
display: flex; box-sizing: border-box;
// margin-top: 10px;
> span {
margin-right: 10px;
min-width: 82px;
height: 20px;
font-size: 14px;
font-weight: 400;
color: #717171;
line-height: 20px;
text-align: right;
max-width: 82px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
word-break: break-all; text-overflow: ellipsis;
}
.tagsBox {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
> span {
display: inline-block;
margin-right: 10px; margin-right: 10px;
margin-bottom: 10px; margin-bottom: 10px;
padding: 0 10px; }
box-sizing: border-box; .label {
min-width: 82px;
height: 26px; height: 26px;
line-height: 26px; background: #fafbfe;
border-radius: 4px; border-radius: 4px;
border: 1px solid #e8e8ea; border: 1px solid #e8e8ea;
line-height: 26px;
text-align: center; text-align: center;
font-size: 14px; margin-right: 10px;
font-weight: 400; margin-bottom: 10px;
color: #666666; position: relative;
max-width: 245px; padding: 0 16px;
cursor: pointer; box-sizing: border-box;
background: #fafbfe; }
.isChecked {
border: 1px solid #5850ff !important;
.select-icon {
width: 16px;
height: 16px;
position: absolute;
top: 0;
right: 0;
} }
.activeTag {
border: 1px solid $btnBlue;
color: $btnBlue;
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!