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,29 +6,50 @@ ...@@ -6,29 +6,50 @@
* @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',
method: 'POST', method: 'POST',
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,66 +23,67 @@ ...@@ -23,66 +23,67 @@
// 获取客户详情单用户标签 // 获取客户详情单用户标签
// 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) {
return http({ params.method = 'scrm.api.datahub.user.editUserLabel'
url: '/rop-scrm-datahub/router', return http({
method: 'POST', url: '/rop-scrm-datahub/router',
data: params, method: 'POST',
sign: true, data: params,
returnAll:true sign: 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'
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 syncCustomer(params){
params.method='entmicro.api.synchro.syncCustomer'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
} }
export function getTableDetail(params){ export function syncCustomer(params) {
params.method='entmicro.api.customer.detail' params.method = 'entmicro.api.synchro.syncCustomer'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export function getTableDetail(params) {
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({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
...@@ -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
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!