Commit 3377329c by 前端

Merge branch 'test1' into 'master'

合并

See merge request !12
2 parents 0f0f3470 a3cbb6f1
...@@ -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,group,viewCustomers"> <keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd,guestGroupDetail,group,viewCustomers,crowdDetail,crowdAdd,crowdManage">
<router-view></router-view> <router-view></router-view>
</keep-alive> </keep-alive>
</div> </div>
......
...@@ -32,11 +32,12 @@ export function getDataOverviewBarMap(params) { ...@@ -32,11 +32,12 @@ export function getDataOverviewBarMap(params) {
}) })
} }
//客户分群列表接口 // 获取自定义分群客户列表数据接口
export function getCustomerList(params) { export function getCustomerList(params) {
params.method = 'entmicro.api.customer.cluster.page' params.method = 'entmicro.api.customer.crowd.page'
return http3({ return http3({
url:'/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
// url:'http://192.168.3.193:8395/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
...@@ -46,10 +47,9 @@ export function getCustomerList(params) { ...@@ -46,10 +47,9 @@ export function getCustomerList(params) {
export function customerClusterListExport(params) { export function customerClusterListExport(params) {
params.method = 'entmicro.api.customer.customerClusterListExport' params.method = 'entmicro.api.customer.customerClusterListExport'
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
}) })
} }
...@@ -6,56 +6,56 @@ ...@@ -6,56 +6,56 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http2,http3 } from '@/main' import { http2, http3 } from '@/main'
export function getTableList(params) {
params.method = 'entmicro.api.customer.base.page'
export function getTableList (params){
params.method='entmicro.api.customer.base.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 syncCustomerBase(params){
params.method='entmicro.api.synchro.syncCustomerBase'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
} }
export function getTableDetail(params){ export function syncCustomerBase(params) {
params.method='entmicro.api.customer.base.detail' params.method = 'entmicro.api.synchro.syncCustomerBase'
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 getClientTableDetail(params){ export function getTableDetail(params) {
params.method='entmicro.api.customer.detail' params.method = 'entmicro.api.customer.base.detail'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export function getClientTableDetail(params) {
params.method = 'entmicro.api.customer.detail'
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,
returnAll:true returnAll: true
}) })
} }
// 客户群的客户列表获取分页数据接口 // 客户群的客户列表获取分页数据接口
export function getDetailTableList(params){ export function getDetailTableList(params) {
params.method='entmicro.api.customer.base.cust.page' params.method = 'entmicro.api.customer.base.cust.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
}) })
} }
/* /*
未授权时,打开进入页面即弹出提示。 触发条件:跟企业微信相关且该账户暂未绑定企业微信时提示 未授权时,打开进入页面即弹出提示。 触发条件:跟企业微信相关且该账户暂未绑定企业微信时提示
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
export function getStatus(params) { export function getStatus(params) {
params.method = 'scrm.api.work.wechat.access.status' params.method = 'scrm.api.work.wechat.access.status'
return http3({ return http3({
url: '/rop-scrm-wechat/router', url: '/rop-scrm-wechat/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
...@@ -74,43 +74,43 @@ export function getStatus(params) { ...@@ -74,43 +74,43 @@ export function getStatus(params) {
跟进员工 跟进员工
*/ */
// POST /router/entmicro.api.customer.base.staff.page/1.0.0 // POST /router/entmicro.api.customer.base.staff.page/1.0.0
export function getDetailStaffTableList(params){ export function getDetailStaffTableList(params) {
params.method='entmicro.api.customer.base.staff.page' params.method = 'entmicro.api.customer.base.staff.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 getDetailQuitTableList(params){ export function getDetailQuitTableList(params) {
params.method='entmicro.api.customer.base.quit.cust.page' params.method = 'entmicro.api.customer.base.quit.cust.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 getDetailPotentialTableList(params){ export function getDetailPotentialTableList(params) {
params.method='entmicro.api.customer.base.potential.cust.page' params.method = 'entmicro.api.customer.base.potential.cust.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 clientGroupExportApi(params){ export function clientGroupExportApi(params) {
params.method=`entmicro.api.customer.base.list.export` params.method = `entmicro.api.customer.base.list.export`
return http3({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'GET', method: 'GET',
...@@ -119,8 +119,8 @@ export function clientGroupExportApi(params){ ...@@ -119,8 +119,8 @@ export function clientGroupExportApi(params){
}) })
} }
// 全部客户导出 // 全部客户导出
export function clientExportApi(params){ export function clientExportApi(params) {
params.method=`entmicro.api.customer.base.cust.export` params.method = `entmicro.api.customer.base.cust.export`
return http3({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'GET', method: 'GET',
...@@ -130,8 +130,8 @@ export function clientExportApi(params){ ...@@ -130,8 +130,8 @@ export function clientExportApi(params){
} }
//跟进员工导出 //跟进员工导出
export function followEmployeeExportApi(params){ export function followEmployeeExportApi(params) {
params.method=`entmicro.api.customer.base.staff.export` params.method = `entmicro.api.customer.base.staff.export`
return http3({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'GET', method: 'GET',
...@@ -140,8 +140,8 @@ export function followEmployeeExportApi(params){ ...@@ -140,8 +140,8 @@ export function followEmployeeExportApi(params){
}) })
} }
//退群客户导出 //退群客户导出
export function leaveGroupExportApi(params){ export function leaveGroupExportApi(params) {
params.method=`entmicro.api.customer.base.quit.export` params.method = `entmicro.api.customer.base.quit.export`
return http3({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'GET', method: 'GET',
...@@ -151,12 +151,12 @@ export function leaveGroupExportApi(params){ ...@@ -151,12 +151,12 @@ export function leaveGroupExportApi(params){
} }
//潜在客户导出 //潜在客户导出
export function potentialClientExportApi(params){ export function potentialClientExportApi(params) {
params.method=`entmicro.api.customer.base.potential.export` params.method = `entmicro.api.customer.base.potential.export`
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
}) })
}
\ No newline at end of file \ No newline at end of file
}
...@@ -33,7 +33,6 @@ export function getSingleClientTag(params) { ...@@ -33,7 +33,6 @@ export function getSingleClientTag(params) {
}) })
} }
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'
...@@ -43,7 +42,6 @@ export function getAllTagTree(params) { ...@@ -43,7 +42,6 @@ export function getAllTagTree(params) {
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
...@@ -57,12 +55,11 @@ export function addSingleClientTag(params) { ...@@ -57,12 +55,11 @@ export function addSingleClientTag(params) {
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'
return http3({ return http3({
...@@ -93,8 +90,8 @@ export function getTableDetail(params) { ...@@ -93,8 +90,8 @@ export function getTableDetail(params) {
}) })
} }
/*获取来源字典的 /*获取来源字典的
*/ */
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({
...@@ -104,7 +101,15 @@ export function getDictionaryFun(params) { ...@@ -104,7 +101,15 @@ export function getDictionaryFun(params) {
sign: true sign: true
}) })
} }
export function getStaffList(params) {
params.method = 'entmicro.api.staff.findStaffByMerchantId'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// entmicro.api.customer.list.export // entmicro.api.customer.list.export
//客户信息管理导出 //客户信息管理导出
export function clientManageExportApi(params) { export function clientManageExportApi(params) {
...@@ -115,4 +120,4 @@ export function clientManageExportApi(params) { ...@@ -115,4 +120,4 @@ export function clientManageExportApi(params) {
data: params, data: params,
sign: true sign: true
}) })
}
\ No newline at end of file \ No newline at end of file
}
/**
* 新增参数sign 判断接口是否需要sign签名(默认有,不必写)
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http, http3 } from '@/main'
// http 对应的域名http://ismv.branch.glsx.com.cn
// 查询推荐人群和自定义人群列表
const getCrowdList = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http({
url: '/rop-scrm-datahub/router',
// url:'http://192.168.3.181:9636/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//通过人群Id查询人群详情
const getCrowdDetails = params => {
params.method = 'scrm.api.datahub.user.queryCrowdDetailsById'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//创建人群
const addCrowd = params => {
params.method = 'scrm.api.datahub.user.addCrowd'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//根据标签组合查询人群客户数
const getCrowdCount = params => {
params.method = 'scrm.api.datahub.user.queryCrowdCountByTagCombine'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//搜索框查询
const getSearchBox = params => {
params.method = 'scrm.api.datahub.labelgroup.querySearchBox'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//标签组树查询
const getLabelTreeList = params => {
params.method = 'scrm.api.datahub.labelgroup.queryLabelGroupTree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default {
getCrowdList,
getCrowdDetails,
addCrowd,
getCrowdCount,
getSearchBox,
getLabelTreeList
}
...@@ -56,6 +56,9 @@ background: transparent !important; ...@@ -56,6 +56,9 @@ background: transparent !important;
.color-58{ .color-58{
color: #5850ff; color: #5850ff;
} }
.color-9{
color: #999999;
}
.flex-start{ .flex-start{
align-items: flex-start; align-items: flex-start;
display: flex; display: flex;
...@@ -76,4 +79,9 @@ background: transparent !important; ...@@ -76,4 +79,9 @@ background: transparent !important;
.font-14{ .font-14{
font-size: 14px; font-size: 14px;
} }
\ No newline at end of file \ No newline at end of file
.font-16{
font-size: 16px;
}
.hand{
cursor: pointer;
}
\ No newline at end of file \ No newline at end of file
...@@ -13,4 +13,5 @@ import _button from '@/components/glsx-button/index' ...@@ -13,4 +13,5 @@ import _button from '@/components/glsx-button/index'
Vue.component('glsx-button', _button) Vue.component('glsx-button', _button)
Vue.component('search-form', () => import('./search-form/index.vue')) Vue.component('search-form', () => import('./search-form/index.vue'))
Vue.component('basic-dialog', () => import('./basic-dialog/index.vue')) Vue.component('basic-dialog', () => import('./basic-dialog/index.vue'))
Vue.component('rule-form', () => import('./rule-form/index.vue'))
\ No newline at end of file \ No newline at end of file
Vue.component('rule-form', () => import('./rule-form/index.vue'))
Vue.component('layout-row', () => import('./layout-row/index.vue'))
\ No newline at end of file \ No newline at end of file
<template>
<div>
<template v-for="(list, id) in tableData">
<div class="layout-wrap" :key="id">
<el-row :gutter="30">
<template v-for="(params, index) in layoutParams">
<el-col :span="12" :key="index">
<div class="label-wrap">
<label>{{ params.label }}</label>
<span>{{ list[params.prop]? list[params.prop]: '--'}}</span>
</div>
</el-col>
</template>
</el-row>
</div>
</template>
</div>
</template>
<script>
export default {
name: 'layout-row',
props: {
//获取的数据
layoutData: {
type: Array,
default: () => []
},
layoutParams: {
type: Array,
default: () => []
},
isHidden: {
type: Boolean,
default: false
}
},
computed: {
tableData() {
return this.isHidden ? this.layoutData : this.layoutData.slice(0, 1)
}
},
created() {}
}
</script>
<style scoped lang="scss">
.layout-wrap {
padding: 20px 0;
box-sizing: border-box;
background: #f5f5f5;
margin-bottom:10px;
.el-row {
&:last-child {
margin-bottom: -20px;
}
.el-col {
margin-bottom: 16px;
}
.label-wrap {
display: flex;
align-items: center;
margin: 0 10%;
min-width: 80%;
label {
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
text-align: right;
min-width: 30%;
display: inline-block;
}
span {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
text-align: left;
max-width: 228px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<el-input v-model="formModel[item.prop]" :type="item.inputType || 'text'" :placeholder="item.placeholder || '请输入'" :clearable="item.clearable || false" :readonly="item.readonly || false" @keyup.enter.native="onInput" ></el-input> <el-input v-model="formModel[item.prop]" :type="item.inputType || 'text'" :placeholder="item.placeholder || '请输入'" :clearable="item.clearable || false" :readonly="item.readonly || false" @keyup.enter.native="onInput" ></el-input>
</template> </template>
<template v-else-if="item.type === 'select'"> <template v-else-if="item.type === 'select'">
<el-select size="small" v-model="formModel[item.prop]" :placeholder="item.placeholder || '请选择'"> <el-select size="small" v-model="formModel[item.prop]" :placeholder="item.placeholder || '请选择'" :filterable="!item.noFilter">
<el-option v-for="i in item.options" :key="i[item.value] || i.value" :label="i[item.key] || i.label" :value="i[item.value] || i.value" :disabled="i.disabled"></el-option> <el-option v-for="i in item.options" :key="i[item.value] || i.value" :label="i[item.key] || i.label" :value="i[item.value] || i.value" :disabled="i.disabled"></el-option>
</el-select> </el-select>
</template> </template>
......
...@@ -11,18 +11,19 @@ ...@@ -11,18 +11,19 @@
let cfg = require('./conf.js') let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function (isEnv = true) { export const fetchConfig = function(isEnv = true) {
if (isEnv) { if (isEnv) {
let { request } = cfg let { request } = cfg
Object.assign(request, { timeout }) Object.assign(request, { timeout })
return Promise.resolve(cfg) return Promise.resolve(cfg)
} }
// https://oss-config.test.glsx.com.cn/mock/6136bea6ceeb5a5c2bec6950/base
// https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config return new Http({ request: { timeout: 3000 } }).get('https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config2')
return new Http({request:{timeout:3000}}).get('https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config2') //开发环境mock
// return new Http({ request: { timeout: 3000 } }).get('http://192.168.3.171:7300/mock/616d3b131072f92988f05a01/custom/config2')
} }
export const config = { export const config = {
install(vue, cfg) {
vue.prototype.$config = cfg
}
}
\ No newline at end of file \ No newline at end of file
install(vue, cfg) {
vue.prototype.$config = cfg
}
}
...@@ -13,26 +13,25 @@ const staticRoutes = Object.freeze([ ...@@ -13,26 +13,25 @@ const staticRoutes = Object.freeze([
}, },
{ {
name: 'clientDataOverview', name: 'clientDataOverview',
path: "/clientDataOverview/index", path: '/clientDataOverview/index',
component: resolve => require([`@/views/clientDataOverview/index.vue`], resolve), component: resolve => require([`@/views/clientDataOverview/index.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'clientDataOverview', name: 'clientDataOverview',
path: "/clientDataOverview/group/:id", path: '/clientDataOverview/group/:id',
component: resolve => require([`@/views/clientDataOverview/group.vue`], resolve), component: resolve => require([`@/views/clientDataOverview/group.vue`], resolve),
meta: {} 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),
meta: {} meta: {}
}, },
{ {
name: 'clientDetail', name: 'clientDetail',
path: "/clientManage/clientDetail", path: '/clientManage/clientDetail',
component: resolve => require([`@/views/clientManage/clientDetail.vue`], resolve), component: resolve => require([`@/views/clientManage/clientDetail.vue`], resolve),
meta: {} meta: {}
}, },
...@@ -40,73 +39,91 @@ const staticRoutes = Object.freeze([ ...@@ -40,73 +39,91 @@ const staticRoutes = Object.freeze([
// name: 'clientDemo', // name: 'clientDemo',
// path: "/clientManage/clientDemo", // path: "/clientManage/clientDemo",
// component: resolve => require([`@/views/clientManage/demo.vue`], resolve), // component: resolve => require([`@/views/clientManage/demo.vue`], resolve),
// meta: {} // meta: {}
// }, // },
{ {
name: 'clientGroupManage', name: 'clientGroupManage',
path: "/clientGroupManage/index", path: '/clientGroupManage/index',
component: resolve => require([`@/views/clientGroupManage/index.vue`], resolve), component: resolve => require([`@/views/clientGroupManage/index.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'clientGroupDetail', name: 'clientGroupDetail',
path: "/clientGroupManage/clientGroupDetail", path: '/clientGroupManage/clientGroupDetail',
component: resolve => require([`@/views/clientGroupManage/clientGroupDetail.vue`], resolve), component: resolve => require([`@/views/clientGroupManage/clientGroupDetail.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'tagsManage', name: 'tagsManage',
path: "/tagsManage/index", path: '/tagsManage/index',
component: resolve => require([`@/views/tagsManage/index.vue`], resolve), component: resolve => require([`@/views/tagsManage/index.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'viewCustomers', name: 'viewCustomers',
path: "/tagsManage/viewCustomers/:info/:type", path: '/tagsManage/viewCustomers/:info/:type',
component: resolve => require([`@/views/tagsManage/viewCustomers.vue`], resolve), component: resolve => require([`@/views/tagsManage/viewCustomers.vue`], resolve),
meta: {}, meta: {}
}, },
{ {
name: 'expand', name: 'expand',
path: "/expand/index", path: '/expand/index',
component: resolve => require([`@/views/expand/index.vue`], resolve), component: resolve => require([`@/views/expand/index.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'employee', name: 'employee',
path: "/employee/index", path: '/employee/index',
component: resolve => require([`@/views/employee/index.vue`], resolve), component: resolve => require([`@/views/employee/index.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'employee', name: 'employee',
path: "/employee/detail", path: '/employee/detail',
component: resolve => require([`@/views/employee/detail.vue`], resolve), component: resolve => require([`@/views/employee/detail.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'employee', name: 'employee',
path: "/employee/add", path: '/employee/add',
component: resolve => require([`@/views/employee/add.vue`], resolve), component: resolve => require([`@/views/employee/add.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'guestGuest', name: 'guestGuest',
path: "/guestGroup/index", path: '/guestGroup/index',
component: resolve => require([`@/views/guestGroup/index.vue`], resolve), component: resolve => require([`@/views/guestGroup/index.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'guestAdd', name: 'guestAdd',
path: "/guestGroup/add/:id", path: '/guestGroup/add/:id',
component: resolve => require([`@/views/guestGroup/add.vue`], resolve), component: resolve => require([`@/views/guestGroup/add.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'guestDetail', name: 'guestDetail',
path: "/guestGroup/detail/:id", path: '/guestGroup/detail/:id',
component: resolve => require([`@/views/guestGroup/detail.vue`], resolve), component: resolve => require([`@/views/guestGroup/detail.vue`], resolve),
meta: {} meta: {}
},
{
name: 'crowdManage',
path: '/crowdManage/index',
component: resolve => require([`@/views/crowdManage/index.vue`], resolve),
meta: {}
},
{
name: 'crowdAdd',
path: '/crowdManage/crowdAdd',
component: resolve => require([`@/views/crowdManage/crowdAdd.vue`], resolve),
meta: {}
},
{
name: 'crowdDetail',
path: '/crowdManage/crowdDetail:id',
component: resolve => require([`@/views/crowdManage/crowdDetail.vue`], resolve),
meta: {}
} }
]) ])
export default staticRoutes export default staticRoutes
...@@ -134,7 +151,6 @@ export default staticRoutes ...@@ -134,7 +151,6 @@ export default staticRoutes
// keepAlive: false, // keepAlive: false,
// component: () => import("../views/clientMassTexting/detailMassTexting.vue"), // component: () => import("../views/clientMassTexting/detailMassTexting.vue"),
// }, // },
// { // {
// path: "/clientPartGroup", // path: "/clientPartGroup",
// name: "clientPartGroup", // name: "clientPartGroup",
...@@ -150,4 +166,4 @@ export default staticRoutes ...@@ -150,4 +166,4 @@ export default staticRoutes
// hidden: true, // hidden: true,
// keepAlive: false, // keepAlive: false,
// component: () => import("../views/clientPartGroup/crowdCircleImage.vue"), // component: () => import("../views/clientPartGroup/crowdCircleImage.vue"),
// },
\ No newline at end of file \ No newline at end of file
// },
...@@ -34,7 +34,8 @@ button { ...@@ -34,7 +34,8 @@ button {
// 子系统不设外边距 // 子系统不设外边距
.scrm-sub-client-container { .scrm-sub-client-container {
padding: 0 20px 20px 40px; padding: 0 20px 20px 20px;
box-sizing: border-box;
} }
.el-table .cell { .el-table .cell {
......
...@@ -26,3 +26,43 @@ ...@@ -26,3 +26,43 @@
.el-range-editor.is-active:hover { .el-range-editor.is-active:hover {
border-color: $btnBlue; border-color: $btnBlue;
} }
.el-message-box {
width: 547px;
height:310px;
box-sizing: border-box;
padding-bottom: 10px;
}
.el-message-box__title {
padding-left: 0;
margin-bottom: 0;
font-size: 20px;
line-height: 1;
color: #333;
}
.el-message-box__title {
display: block!important;
}
.el-message-box__headerbtn {
display: block!important;
color:#666666;
}
.el-message-box__header {
position: relative;
padding: 15px 20px ;
border-bottom:1px solid #E6E6E6;
}
.el-message-box__content {
text-align: center;
padding: 60px 0;
}
.el-icon-warning {
display: block!important;
font-size:33px!important;
color: #5850FF!important;
position:relative;
left:50%;
transform: translateX(-50%);
margin-bottom:12px;
}
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<div class="head-container"> <div class="head-container">
<div class="head-container-title color-3 font-20"> {{describeData[id-1].name}}</div> <div class="head-container-title color-3 font-20">{{ crowdForm.crowdName }}</div>
<div class="head-container-content color-6 font-14">{{ describeData[id-1].info }}</div> <div class="head-container-content color-6 font-14">{{ crowdForm.crowdDesc }}</div>
<!-- <div class="reminder font-14 color-3">企业标签 | 自动更新</div> --> <!-- <div class="reminder font-14 color-3">企业标签 | 自动更新</div> -->
<div class="back color-58 font-14" @click="goBack">返回人群管理</div> <div class="back color-58 font-14" @click="goBack">返回人群管理</div>
</div> </div>
...@@ -29,15 +29,15 @@ ...@@ -29,15 +29,15 @@
<span>{{ list.nickName }}</span> <span>{{ list.nickName }}</span>
<span class="smallFontSize" :class="[list.type == 1 ? 'pure-green-text' : '', list.type == 2 ? 'pure-yello-text' : '']">@{{ list.corpName }}</span> <span class="smallFontSize" :class="[list.type == 1 ? 'pure-green-text' : '', list.type == 2 ? 'pure-yello-text' : '']">@{{ list.corpName }}</span>
</div> </div>
<span v-if="idx == 1"> <span v-if="idx == 1">
<el-popover placement="right-start" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"> <el-popover placement="right-start" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<div style="padding-bottom:3px !important" v-for="(i, index) in scope.scope.nickNameList" :key="index"> <div style="padding-bottom: 3px !important" v-for="(i, index) in scope.scope.nickNameList" :key="index">
<span>{{ i.nickName }}</span> <span>{{ i.nickName }}</span>
<span style="height: 20px;font-size: 12px; letter-spacing: 0; line-height: 20px; font-weight: 400;margin-left:2px" :class="[i.type == 1 ? 'pure-green-text' : '', i.type == 2 ? 'pure-yello-text' : '']">@{{ i.corpName }}</span> <span style="height: 20px; font-size: 12px; letter-spacing: 0; line-height: 20px; font-weight: 400; margin-left: 2px" :class="[i.type == 1 ? 'pure-green-text' : '', i.type == 2 ? 'pure-yello-text' : '']">@{{ i.corpName }}</span>
</div> </div>
<img class="imgEll" src="@/assets/tagsManage/ellipsis.png" alt="" slot="reference" /> <img class="imgEll" src="@/assets/tagsManage/ellipsis.png" alt="" slot="reference" />
</el-popover> </el-popover>
</span> </span>
</div> </div>
</div> </div>
</GLTable> </GLTable>
...@@ -55,6 +55,7 @@ export default { ...@@ -55,6 +55,7 @@ export default {
getListApi: getCustomerList, getListApi: getCustomerList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableSearchForm: {}, tableSearchForm: {},
crowdForm: {},
id: this.$route.params.id ? this.$route.params.id : '', id: this.$route.params.id ? this.$route.params.id : '',
totalCount: '', totalCount: '',
tableParams: { tableParams: {
...@@ -110,50 +111,7 @@ export default { ...@@ -110,50 +111,7 @@ export default {
} }
] ]
}, },
describeData: [ url: url
{
name: '潜在意向客户',
info: '无购车且无其他交易行为的所有客户'
},
{
name: '潜在意向客户(已加企微客户)',
info: '在潜在意向客户中,已加企微的客户'
},
{
name: '潜在意向客户(未加企微客户)',
info: '在潜在意向客户中,未加企微的客户'
},
{
name: '基盘客户',
info: '有购车或其他交易行为的所有客户'
},
{
name: '基盘客户(已加企微客户)',
info: '在基盘客户中,已加企微的客户'
},
{
name: '基盘客户(未加企微客户)',
info: '在基盘客户中,未加企微的客户'
},
{
name: '新车客户',
info: '购车时间3个月的客户'
},
{
name: '车险待续保客户',
info: '近一个月内车险即将到期的客户'
},
{
name: '新车待首保客户',
info: '购车时间5~7个月内,且无保养记录的客户'
},
{
name: '沉默客户',
info: '超过180天未到店的客户'
}
],
url: url,
//describeData: ['无购车且无其他交易行为的所有客户', '在潜在意向客户中,已加企微的客户', '在潜在意向客户中,未加企微的客户', '有购车或其他交易行为的所有客户', '在基盘客户中,已加企微的客户', '在基盘客户中,未加企微的客户', '购车时间3个月的客户', '近一个月内车险即将到期的客户', '购车时间5~7个月内,且无保养记录的客户', '超过180天未到店的客户']
} }
}, },
created() { created() {
...@@ -171,8 +129,21 @@ export default { ...@@ -171,8 +129,21 @@ export default {
this.tableSearchForm = { this.tableSearchForm = {
crowdId: id crowdId: id
} }
// 通过人群Id查询人群详情
this.getCrowdDetails()
// this.getTotalCount() // this.getTotalCount()
}, },
getCrowdDetails() {
let params = {
'req.crowdId': this.id
}
this.$apis.crowdManage.getCrowdDetails(params).then(res => {
if (res.code == 0) {
this.crowdForm.crowdName = res.data.crowdName
this.crowdForm.crowdDesc = res.data.crowdDesc
}
})
},
//导出 //导出
handleExport() { handleExport() {
var params = { var params = {
...@@ -189,11 +160,11 @@ export default { ...@@ -189,11 +160,11 @@ export default {
this.$refs.groupRef.data.length ? (this.$refs.groupRef.tableHeightValues = '') : this.$refs.groupRef.setTableHeightFun() this.$refs.groupRef.data.length ? (this.$refs.groupRef.tableHeightValues = '') : this.$refs.groupRef.setTableHeightFun()
}, },
goBack() { goBack() {
this.$router.replace({ path: '/clientDataOverview/index' }) this.$router.go(-1)
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/styles/variables.scss'; @import '@/styles/variables.scss';
...@@ -293,4 +264,4 @@ export default { ...@@ -293,4 +264,4 @@ export default {
color: #fb8f28; color: #fb8f28;
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</div> </div>
<div class="itembox"> <div class="itembox">
<div class="no-buy"> <div class="no-buy">
<GLButton class="no-buy-total item" @click="goto(1)" fn="人群客户列表" mode="div"> <div class="no-buy-total item" @click="goto(1)">
<span>潜在意向客户数</span> <span>潜在意向客户数</span>
<span>无购车且无其他交易行为的所有客户</span> <span>无购车且无其他交易行为的所有客户</span>
<span v-if="!isEmptyObj"> <span v-if="!isEmptyObj">
...@@ -63,11 +63,11 @@ ...@@ -63,11 +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>
</GLButton> </div>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<div class="rightWrap"> <div class="rightWrap">
<GLButton class="inCompanyWechatNum item smallWrap" @click="goto(2)" fn="人群客户列表" mode="div"> <div class="inCompanyWechatNum item smallWrap" @click="goto(2)">
<span>已加企微客户数</span> <span>已加企微客户数</span>
<span> <span>
{{ (topDataObj.purposeCustomerAddCount || 0) | overThousandFilter }} {{ (topDataObj.purposeCustomerAddCount || 0) | overThousandFilter }}
...@@ -75,9 +75,9 @@ ...@@ -75,9 +75,9 @@
</span> </span>
<span>在潜在意向客户中,已加企微的客户</span> <span>在潜在意向客户中,已加企微的客户</span>
<!-- <i class="horizontal-line"></i> --> <!-- <i class="horizontal-line"></i> -->
</GLButton> </div>
<el-divider></el-divider> <el-divider></el-divider>
<GLButton class="outCompanyWechatNum item smallWrap" @click="goto(3)" fn="人群客户列表" mode="div"> <div class="outCompanyWechatNum item smallWrap" @click="goto(3)">
<span>未加企微客户数</span> <span>未加企微客户数</span>
<span> <span>
{{ (topDataObj.purposeCustomerNAddCount || 0) | overThousandFilter }} {{ (topDataObj.purposeCustomerNAddCount || 0) | overThousandFilter }}
...@@ -89,11 +89,11 @@ ...@@ -89,11 +89,11 @@
引流企微 引流企微
<i class="el-icon-d-arrow-right"></i> <i class="el-icon-d-arrow-right"></i>
</button> </button>
</GLButton> </div>
</div> </div>
</div> </div>
<div class="buy"> <div class="buy">
<GLButton class="buy-total item" @click="goto(4)" fn="人群客户列表" mode="div"> <div class="buy-total item" @click="goto(4)">
<!-- <span>购买(存档)客户数</span> --> <!-- <span>购买(存档)客户数</span> -->
<span>基盘客户数</span> <span>基盘客户数</span>
<span>有购车或其他交易行为的所有客户</span> <span>有购车或其他交易行为的所有客户</span>
...@@ -110,10 +110,10 @@ ...@@ -110,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> -->
</GLButton> </div>
<el-divider direction="vertical"></el-divider> <el-divider direction="vertical"></el-divider>
<div class="rightWrap"> <div class="rightWrap">
<GLButton class="inCompanyWechatNum item smallWrap" @click="goto(5)" fn="人群客户列表" mode="div"> <div class="inCompanyWechatNum item smallWrap" @click="goto(5)">
<span>已加企微客户数</span> <span>已加企微客户数</span>
<span> <span>
{{ (topDataObj.purchaseCustomerAddCount || 0) | overThousandFilter }} {{ (topDataObj.purchaseCustomerAddCount || 0) | overThousandFilter }}
...@@ -122,9 +122,9 @@ ...@@ -122,9 +122,9 @@
<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> -->
</GLButton> </div>
<el-divider></el-divider> <el-divider></el-divider>
<GLButton class="outCompanyWechatNum item smallWrap" @click="goto(6)" fn="人群客户列表" mode="div"> <div class="outCompanyWechatNum item smallWrap" @click="goto(6)">
<span>未加企微客户数</span> <span>未加企微客户数</span>
<span> <span>
{{ (topDataObj.purchaseCustomerNAddCount || 0) | overThousandFilter }} {{ (topDataObj.purchaseCustomerNAddCount || 0) | overThousandFilter }}
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
引流企微 引流企微
<i class="el-icon-d-arrow-right"></i> <i class="el-icon-d-arrow-right"></i>
</button> </button>
</GLButton> </div>
</div> </div>
</div> </div>
</div> </div>
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
<h3 class="pageSubTitle">客户分群</h3> <h3 class="pageSubTitle">客户分群</h3>
<div class="itembox"> <div class="itembox">
<template v-for="(item, index) in titles"> <template v-for="(item, index) in titles">
<GLButton class="item" @click="goto(item.id)" fn="人群客户列表" mode="div" :key="index"> <div class="item" @click="goto(item.id)" :key="index">
<p>{{ item.name }}</p> <p>{{ item.name }}</p>
<p>{{ item.subName }}</p> <p>{{ item.subName }}</p>
<p> <p>
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
<span class="person-text">人</span> <span class="person-text">人</span>
</p> </p>
<img :src="item.url" alt="" /> <img :src="item.url" alt="" />
</GLButton> </div>
</template> </template>
</div> </div>
</div> </div>
...@@ -852,7 +852,7 @@ export default { ...@@ -852,7 +852,7 @@ export default {
.rightWrap { .rightWrap {
width: 48%; width: 48%;
margin-left: 20px; margin-left: 20px;
cursor: pointer; cursor: pointer;
position: relative; position: relative;
.smallWrap { .smallWrap {
......
<template> <template>
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<div class="header"> <!-- <div class="header">
<div class="userId"> <div class="userId">
<span>客户ID:{{ leftPanelInfo.oneId }}</span> <span>客户ID:{{ leftPanelInfo.oneId }}</span>
</div> </div>
<button class="backBtn" @click="goBack">返回客户信息管理</button> <button class="backBtn" @click="goBack">返回客户信息管理</button>
</div> </div> -->
<div class="content"> <div class="content">
<div class="leftWrap"> <div class="leftWrap">
<div class="avator"> <div class="avatorStyle">
<img :src="leftPanelInfo.avatar" alt="" v-if="leftPanelInfo.avatar" /> <div class="avator">
<img src="@/assets/clientDetail/defaultAvator.png" alt="" v-else /> <img :src="leftPanelInfo.avatar" alt="" v-if="leftPanelInfo.avatar" />
<img src="@/assets/clientDetail/defaultAvator.png" alt="" v-else />
</div>
<span class="customerID">客户ID:{{ leftPanelInfo.oneId }}</span>
</div> </div>
<p> <hr />
<span>客户名称</span> <div class="leftWrapTop">
<el-tooltip effect="dark" :content="leftPanelInfo.customerName" placement="top"> <div class="baseInfo">
<span class="ellipsis-1"> <span>基本信息</span>
<span> <i class="el-icon-arrow-down iconStyle" @click="switchBaseInfo()" v-if="isShowBaseInfo"></i>
<!-- {{ leftPanelInfo.customerName }} --> <i class="el-icon-arrow-up iconStyle" @click="switchBaseInfo()" v-else></i>
{{ beautySub(leftPanelInfo.customerName) }} </div>
<span class="pure-blue-text">{{ leftPanelInfo.type == 1 ? '@微信' : leftPanelInfo.type == 2 ? '@企微' : '' }}</span> <div class="leftWrapBottom" v-if="isShowBaseInfo">
</span> <p>
</span> <span>客户姓名:</span>
</el-tooltip> <el-tooltip effect="dark" :content="leftPanelInfo.customerName" placement="top">
</p> <span class="ellipsis-1">
<div class="newStyle"> <!-- {{ leftPanelInfo.customerName }} -->
<span class="WechatName">企微名称</span> {{ beautySub(leftPanelInfo.customerName) }}
<label class="pure-blue-text">{{ leftPanelInfo.type == 1 ? '@微信' : leftPanelInfo.type == 2 ? '@企微' : '' }}</label>
<div class="nameListItem"> </span>
<div v-for="(item, index) in nickNameList" :key="index" style="margin-bottom:5px">
<el-tooltip effect="dark" placement="top">
<div class="qiweiItem" slot="content">
<span class="qiweiItemNick">{{ item.nickName }}</span>
<span class="qiweiItemCrop" :class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']">@{{ item.corpName }}</span>
</div>
<div class="qiweiItem" :class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']">
<span class="qiweiItemNick">{{ item.nickName }}</span>
<span class="qiweiItemCrop" :class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']">@{{ item.corpName }}</span>
</div>
</el-tooltip> </el-tooltip>
</p>
<div class="newStyle">
<span class="WechatName">企微名称:</span>
<div class="nameListItem">
<div v-for="(item, index) in nickNameList" :key="index" style="margin-bottom: 5px">
<el-tooltip effect="dark" placement="top">
<div class="qiweiItem" slot="content">
<span class="qiweiItemNick">{{ item.nickName }}</span>
<span class="qiweiItemCrop" :class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']">@{{ item.corpName }}</span>
</div>
<div class="qiweiItem" :class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']">
<span class="qiweiItemNick">{{ item.nickName }}</span>
<span class="qiweiItemCrop" :class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']">@{{ item.corpName }}</span>
</div>
</el-tooltip>
</div>
</div>
</div> </div>
</div> <p>
</div> <span>联系电话:</span>
<p style="margin-top:15px"> <span class="ellipsis-1">{{ leftPanelInfo.customerPhone }}</span>
<span>联系电话</span> </p>
<span class="ellipsis-1">{{ leftPanelInfo.customerPhone }}</span> <p>
</p> <span>证件号码:</span>
<!-- <p> <span>{{ leftPanelInfo.idCard }}</span>
<span>微信号</span> </p>
<span class="ellipsis-1">{{ leftPanelInfo.weChatId || '待完善' }}</span> <p>
</p> --> <span>性别:</span>
<p> <span class="ellipsis-1">{{ leftPanelInfo.customerSex == 0 ? '未知' : leftPanelInfo.customerSex == 1 ? '男' : leftPanelInfo.customerSex == 2 ? '女' : '' }}</span>
<span>性别</span> </p>
<span class="ellipsis-1">{{ leftPanelInfo.customerSex == 0 ? '未知' : leftPanelInfo.customerSex == 1 ? '男' : leftPanelInfo.customerSex == 2 ? '女' : '' }}</span> <p>
</p> <span>企业简称:</span>
<p> <span class="ellipsis-1">{{ leftPanelInfo.corpName || '待完善' }}</span>
<span>企业简称</span> </p>
<span class="ellipsis-1">{{ leftPanelInfo.corpName || '待完善' }}</span> <p>
</p> <span>职务:</span>
<p> <span class="ellipsis-1">{{ leftPanelInfo.position || '待完善' }}</span>
<span>职务</span> </p>
<span class="ellipsis-1">{{ leftPanelInfo.position || '待完善' }}</span> <p v-if="leftPanelInfo.type == 2">
</p> <span>类型:</span>
<p v-if="leftPanelInfo.type == 2"> <span class="ellipsis-1">{{ leftPanelInfo.type == 1 ? '微信用户' : leftPanelInfo.type == 2 ? '企微用户' : '' }}</span>
<span>类型</span> </p>
<span class="ellipsis-1">{{ leftPanelInfo.type == 1 ? '微信用户' : leftPanelInfo.type == 2 ? '企微用户' : '' }}</span> <p>
</p> <span>是否加入企微:</span>
<p> <!-- 1-是,2-否 -->
<span>是否加企微</span> <span>{{ leftPanelInfo.isJoin == 1 ? '是' : leftPanelInfo.isJoin == 0 ? '否' : '' }}</span>
<!-- 1-是,2-否 --> </p>
<span>{{ leftPanelInfo.isJoin == 1 ? '是' : leftPanelInfo.isJoin == 0 ? '否' : '' }}</span>
</p>
<p> <p>
<span>当前状态</span> <span>当前状态:</span>
<span>{{ leftPanelInfo.status == -1 ? '删除好友' : leftPanelInfo.status == 0 ? '正常' : '' }}</span> <span>{{ leftPanelInfo.status == -1 ? '删除好友' : leftPanelInfo.status == 0 ? '正常' : '' }}</span>
</p> </p>
<p> <p>
<span>所属渠道</span> <span>来源渠道:</span>
<el-tooltip effect="dark" :content="leftPanelInfo.sourceChannel" placement="top"> <el-tooltip effect="dark" :content="leftPanelInfo.sourceChannel" placement="top">
<span class="ellipsis-1">{{ leftPanelInfo.sourceChannel }}</span> <span class="ellipsis-1">{{ leftPanelInfo.sourceChannel }}</span>
</el-tooltip> </el-tooltip>
</p> </p>
<p> <p>
<span>添加来源</span> <span>添加来源:</span>
<el-tooltip effect="dark" :content="leftPanelInfo.addWay | toLabel" placement="top"> <el-tooltip effect="dark" :content="leftPanelInfo.addWay | toLabel" placement="top">
<span class="ellipsis-1">{{ leftPanelInfo.addWay | toLabel }}</span> <span class="ellipsis-1">{{ leftPanelInfo.addWay | toLabel }}</span>
</el-tooltip> </el-tooltip>
</p> </p>
<p> <p>
<span>添加时间</span> <span>添加时间:</span>
<span>{{ leftPanelInfo.addTime }}</span> <span>{{ leftPanelInfo.addTime }}</span>
</p> </p>
</div>
</div>
</div> </div>
<div class="rightWrap"> <div class="rightWrap">
<div class="choseRow"> <div class="choseRow">
<span class="tabItemText" :class="{ activeItemText: currentIndex == 1 }" @click="tabClick(1)">概况</span> <span class="tabItemText" :class="{ activeItemText: currentIndex == 1 }" @click="tabClick(1)">概况</span>
<span class="tabItemText" :class="{ activeItemText: currentIndex == 2 }" @click="tabClick(2)">标签信息</span> <span class="tabItemText" :class="{ activeItemText: currentIndex == 2 }" @click="tabClick(2)">标签信息</span>
</div> </div>
<template v-if="currentIndex == 1"> <template v-if="currentIndex === 1">
<!-- <p><span>标签信息</span></p> <div class="general-wrap">
<div class="tagsWrap"> <div class="public-text">
<span class="tag ellipsis-1" v-for="item in tagsList" :key="item.labelId" :title="item.labelValue">{{ item.labelValue }}</span> <div class="public-text-info font-16 flex">
添加标签 仅对该客户的跟进员工可见(要有登录信息)1--商户 2--员工 车辆信息
<span class="tag addTag" @click="btnClick('create')" v-if="userType == 2">添加</span> <span class="font-14 color-58">{{ vehicleTableData | filterCar }}辆</span>
</div> --> </div>
<p> <div class="expande-button" v-if="expande" @click="expandeClick(false, 'expande')">
<span>车辆信息</span> <span class="font-14 color-58">收起</span>
<span>{{ vehicleTableData.length || 0 }}辆</span> <i class="el-icon-arrow-down color-58"></i>
</p> </div>
<!--1. 车辆信息表 --> <div class="expande-button" @click="expandeClick(true, 'expande')" v-if="vehicleTableData.length > 1 && !expande">
<!-- :row-style="{ height: 88 + 'px' }" --> <span class="font-14 color-58">更多车辆</span>
<GLTable :hasNum="false" :tableData="vehicleTableData" :hasPage="false" :tableParams="vehicleTableParams" :headerStyle="{ height: '54px' }"> <i class="el-icon-arrow-up color-58"></i>
<span slot="standNo" slot-scope="scope"> </div>
<span>{{ myStandNo(scope.scope.standNo) }}</span>
</span>
</GLTable>
<p>
<span>跟进员工</span>
<span>{{ employTableList.length || 0 }}人</span>
</p>
<!--2. 员工跟进表 -->
<GLTable :hasNum="false" :tableData="employTableList" :hasPage="false" :tableParams="employTableParams" :headerStyle="{ height: '54px' }">
<span slot="addWay" slot-scope="scope">
<span>{{ scope.scope.addWay | toLabel }}</span>
</span>
<span slot="addType" slot-scope="scope">
<span>{{ addTypeToLable(scope.scope.addType) }}</span>
</span>
</GLTable>
<p>
<span>所属群聊</span>
<span>{{ clientGroupTableList.length || 0 }}个</span>
</p>
<GLTable :hasNum="false" :tableData="clientGroupTableList" :hasPage="false" :tableParams="clientGroupTableParams" :headerStyle="{ height: '54px' }">
<span slot="groupName" slot-scope="scope">
<span>{{ scope.scope.groupName || '群聊(默认)' }}</span>
</span>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="goDetail(scope.scope.id, scope.scope.groupName)">详情</el-button>
</div> </div>
</GLTable> <layout-row class="layout-detail" :layoutData="vehicleTableData" :layoutParams="vehicleTableParams" :isHidden="expande"></layout-row>
<template v-if="deviceTableData.length > 0">
<div class="public-text">
<div class="public-text-info font-16 flex">
设备信息
<span class="font-14 color-58">{{ deviceTableData.length || 0 }}个</span>
</div>
<div class="expande-button" v-if="deviceExpande" @click="expandeClick(false, 'deviceExpande')">
<span class="font-14 color-58">收起</span>
<i class="el-icon-arrow-down color-58"></i>
</div>
<div class="expande-button" @click="expandeClick(true, 'deviceExpande')" v-if="deviceTableData.length > 1 && !deviceExpande">
<span class="font-14 color-58">更多设备</span>
<i class="el-icon-arrow-up color-58"></i>
</div>
</div>
<layout-row class="layout-detail" :layoutData="deviceTableData" :layoutParams="deviceTableParams" :isHidden="deviceExpande"></layout-row>
</template>
<template v-if="guaranteeTableData.length > 0">
<div class="public-text">
<div class="public-text-info font-16 flex">
保单信息
<span class="font-14 color-58">{{ guaranteeTableData.length || 0 }}个</span>
</div>
<div class="expande-button" v-if="guaranteeExpande" @click="expandeClick(false, 'guaranteeExpande')">
<span class="font-14 color-58">收起</span>
<i class="el-icon-arrow-down color-58"></i>
</div>
<div class="expande-button" @click="expandeClick(true, 'guaranteeExpande')" v-if="guaranteeTableData.length > 1 && !guaranteeExpande">
<span class="font-14 color-58">更多保单</span>
<i class="el-icon-arrow-up color-58"></i>
</div>
</div>
<layout-row class="layout-detail" :layoutData="guaranteeTableData" :layoutParams="guaranteeTableParams" :isHidden="guaranteeExpande"></layout-row>
</template>
<div class="public-text">
<div class="public-text-info font-16 flex">
员工跟进
<span class="font-14 color-58">{{ employTableList.length || 0 }}人</span>
</div>
</div>
<!--2. 员工跟进表 -->
<GLTable :hasNum="false" class="table" :tableData="employTableList" :hasPage="false" :tableParams="employTableParams" :headerStyle="{ height: '54px' }">
<span slot="addWay" slot-scope="scope">
<span>{{ scope.scope.addWay | toLabel }}</span>
</span>
<span slot="addType" slot-scope="scope">
<span>{{ addTypeToLable(scope.scope.addType) }}</span>
</span>
</GLTable>
<div class="public-text">
<div class="public-text-info font-16 flex">
所属群聊
<span class="font-14 color-58">{{ clientGroupTableList.length || 0 }}个</span>
</div>
</div>
<GLTable class="table" :hasNum="false" :tableData="clientGroupTableList" :hasPage="false" :tableParams="clientGroupTableParams" :headerStyle="{ height: '54px' }">
<span slot="groupName" slot-scope="scope">
<span>{{ scope.scope.groupName || '群聊(默认)' }}</span>
</span>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="goDetail(scope.scope.id, scope.scope.groupName)">详情</el-button>
</div>
</GLTable>
</div>
</template> </template>
<div v-show="currentIndex == 2" class="clientTagsWrap"> <div v-show="currentIndex == 2" class="clientTagsWrap">
<div style="height: 40px"></div> <div style="height: 20px"></div>
<!-- //提示面板组件 --> <!-- //提示面板组件 -->
<tip-panel panelWidth="666px" panelMinHeight="45px" :panelContent="panelContent"></tip-panel> <tip-panel panelWidth="666px" panelMinHeight="45px" :panelContent="panelContent"></tip-panel>
<!-- v-if="userType == 2" --> <!-- v-if="userType == 2" -->
...@@ -224,85 +273,142 @@ export default { ...@@ -224,85 +273,142 @@ export default {
}, },
data() { data() {
return { return {
isShowTooltip: false, isShowBaseInfo: true,
remark: '' , isShowTooltip: false,
remark: '',
sloading: false, sloading: false,
expande: false, //车辆
deviceExpande: false, //设备
guaranteeExpande: false, //保单
panelContent: '说明:标签信息包含跟进员工标记的企业标签和自店标签,以及通过大数据算法生成的系统标签', panelContent: '说明:标签信息包含跟进员工标记的企业标签和自店标签,以及通过大数据算法生成的系统标签',
url: url, url: url,
leftPanelInfo: {}, leftPanelInfo: {},
labelIdList: [], //存放用户被标记标签的id labelIdList: [], //存放用户被标记标签的id
tagsList: [ tagsList: [],
// { labelName: '一般', labelId: 1 },
// { name: '初次沟通', id: 2 }
],
vehicleTableData: [], vehicleTableData: [],
vehicleTableParams: { vehicleTableParams: [
listName: 'vehicleInfoList', {
tableOption: false, label: '车架号:',
tableColumns: [ prop: 'standNo',
{ addHtml: 'standNo'
label: '车架号(后6位)', },
prop: 'standNo', {
addHtml: 'standNo', label: '车牌号:',
minWidth: '120' prop: 'vehicleNo'
}, },
{ {
label: '车牌号', label: '发动机号:',
prop: 'vehicleNo', prop: 'engineNumber'
minWidth: '100' },
}, {
{ label: '车辆品牌:',
label: '车辆品牌', prop: 'vehicleBrand'
prop: 'vehicleBrand', },
minWidth: '100' {
}, label: '车系:',
{ prop: 'vehicleTrain'
label: '车系', },
prop: 'vehicleTrain', {
width: 160, label: '车型:',
line: 2 prop: 'vehicleType'
}, },
{ {
label: '车型', label: '车身颜色:',
prop: 'vehicleType', prop: 'vehicleColor'
width: 160, },
line: 2 {
}, label: '购车价格:',
{ prop: 'vehiclePrice'
label: '年款', },
prop: 'vehicleModelYear', {
minWidth: '100' label: '购车时间:',
}, prop: 'buyTime'
{ },
label: '购车价格', {
prop: 'vehiclePrice', label: '最近保养时间:',
minWidth: '100', prop: 'maintRecTime'
formatter: cellValue => { },
return cellValue.vehiclePrice || '' {
} label: '保险开始时间:',
}, prop: 'insBgnTime'
{ },
label: '购车时间', {
prop: 'buyTime', label: '保险到期时间:',
minWidth: '120' prop: 'insEndTime'
}, }
{ ],
label: '保险开始时间', deviceTableData: [],
prop: 'insBgnTime', deviceTableParams: [
minWidth: '120' {
}, label: '设备号(SN/IMEI):',
{ prop: 'sn',
label: '保险到期时间', addHtml: 'standNo'
prop: 'insEndTime', },
minWidth: '120' {
}, label: '设备流量卡(ICCID):',
{ prop: 'iccId'
label: '最近保养时间', },
prop: 'maintRecTime', {
minWidth: '120' label: '设备类型:',
} prop: 'deviceType'
] },
}, {
label: '设备型号:',
prop: 'deviceModel'
},
{
label: '验证码:',
prop: 'verificationCode'
},
{
label: '批次号:',
prop: 'batchNo'
},
{
label: '绑定车辆(车架号):',
prop: 'standNo'
},
{
label: '设备激活时间:',
prop: 'deviceActiveTime'
}
],
guaranteeTableData: [], //保单
guaranteeTableParams: [
{
label: '保单号:',
prop: 'attInsureOrder',
addHtml: 'standNo'
},
{
label: '产品名称:',
prop: 'attProductName'
},
{
label: '服务期限:',
prop: 'attServicePeriod'
},
{
label: '服务公司:',
prop: 'attServiceCompany'
},
{
label: '保险生效时间:',
prop: 'attInsureStartTime'
},
{
label: '保险到期时间:',
prop: 'attInsureEndTime'
},
{
label: '保险提单时间:',
prop: 'attInsureSubmitTime'
},
{
label: '绑定车辆:',
prop: 'standNo'
}
],
//员工跟进 //员工跟进
employTableParams: { employTableParams: {
listName: 'staffFollows', listName: 'staffFollows',
...@@ -310,39 +416,49 @@ export default { ...@@ -310,39 +416,49 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '跟进员工', label: '跟进员工',
prop: 'staffName' prop: 'staffName',
align: 'left'
}, },
{ {
label: '所属部门', label: '所属部门',
prop: 'departmentName' prop: 'departmentName',
align: 'left'
}, },
{ {
label: '添加时间', label: '添加时间',
prop: 'addTime', prop: 'addTime',
width: 100 minWidth: 160,
align: 'left'
}, },
{ {
label: '来源', label: '来源',
prop: 'addWay', prop: 'addWay',
addHtml: 'addWay' addHtml: 'addWay',
align: 'left',
minWidth: 120
}, },
{ {
label: '添加类型', label: '添加类型',
prop: 'addType', prop: 'addType',
addHtml: 'addType', addHtml: 'addType',
width: 170 width: 170,
align: 'left'
}, },
{ {
label: '备注手机号', label: '备注手机号',
prop: 'remarkMobiles' prop: 'remarkMobiles',
minWidth: 120,
align: 'left'
}, },
{ {
label: '备注', label: '备注',
prop: 'remark' prop: 'remark',
align: 'left'
}, },
{ {
label: '描述', label: '描述',
prop: 'description' prop: 'description',
align: 'left'
} }
] ]
}, },
...@@ -354,23 +470,28 @@ export default { ...@@ -354,23 +470,28 @@ export default {
{ {
label: '群聊名称', label: '群聊名称',
prop: 'groupName', prop: 'groupName',
addHtml: 'groupName' addHtml: 'groupName',
align: 'left'
}, },
{ {
label: '群主', label: '群主',
prop: 'groupHostName' prop: 'groupHostName',
align: 'left'
}, },
{ {
label: '客户数', label: '客户数',
prop: 'membersNumber' prop: 'membersNumber',
align: 'left'
}, },
{ {
label: '本群昵称', label: '本群昵称',
prop: 'groupNickName' prop: 'groupNickName',
align: 'left'
}, },
{ {
label: '入群时间', label: '入群时间',
prop: 'joinTime' prop: 'joinTime',
align: 'left'
}, },
{ {
label: '操作', label: '操作',
...@@ -396,7 +517,7 @@ export default { ...@@ -396,7 +517,7 @@ export default {
label: '标签组', label: '标签组',
prop: 'labelGroupInfo', prop: 'labelGroupInfo',
addHtml: 'labelGroupInfo', addHtml: 'labelGroupInfo',
width: '160' width: '230'
}, },
{ {
label: '标签组类型', label: '标签组类型',
...@@ -448,14 +569,27 @@ export default { ...@@ -448,14 +569,27 @@ export default {
// this.getSingleClientTag(this.$route.query.id, this.merchantId) // this.getSingleClientTag(this.$route.query.id, this.merchantId)
console.log(this.tagsParams, 'kkkk') console.log(this.tagsParams, 'kkkk')
}, },
filters: {
filterCar(val) {
// if (val && Object.keys(val[0])) {
// return 0
// } else {
// return val.length
// }
if (val && JSON.stringify(val[0]) === '{}') {
return 0
} else {
return val.length
}
}
},
methods: { methods: {
onMouseEnter (str) { // 切换基本信息的显示
// const tag = this.$refs[str] switchBaseInfo() {
// const parentWidth = tag.parentNode.offsetWidth // 获取元素父级可视宽度 this.isShowBaseInfo = !this.isShowBaseInfo
// const contentWidth = tag.offsetWidth // 获取元素可视宽度 },
// this.isShowTooltip = contentWidth <= parentWidth expandeClick(value, data) {
console.log(111) this[data] = value
}, },
closePanel() { closePanel() {
this.isFirstShow = false this.isFirstShow = false
...@@ -545,7 +679,9 @@ export default { ...@@ -545,7 +679,9 @@ export default {
this.userid = res.userid this.userid = res.userid
this.staffId = res.staffId this.staffId = res.staffId
this.leftPanelInfo = res.info this.leftPanelInfo = res.info
this.vehicleTableData = res.vehicleInfoList || [] this.vehicleTableData = res.vehicleInfoList || [{}]
this.deviceTableData = res.deviceInfoList || []
this.guaranteeTableData = res.insureInfoList || [] //保单
this.employTableList = res.staffFollows || [] this.employTableList = res.staffFollows || []
this.clientGroupTableList = res.customerBases || [] this.clientGroupTableList = res.customerBases || []
this.tagsList = res.labels || [] this.tagsList = res.labels || []
...@@ -729,16 +865,15 @@ export default { ...@@ -729,16 +865,15 @@ export default {
.nameListItem { .nameListItem {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-left: 22px;
.qiweiItem { .qiweiItem {
max-width: 132px; max-width: 140px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
.qiweiItemNick { .qiweiItemNick {
height: 20px; height: 20px;
font-size: 14px; font-size: 14px;
color: #666666; color: #333333;
letter-spacing: 0; letter-spacing: 0;
line-height: 20px; line-height: 20px;
font-weight: 400; font-weight: 400;
...@@ -755,8 +890,8 @@ export default { ...@@ -755,8 +890,8 @@ export default {
} }
.WechatName { .WechatName {
font-weight: 600; font-weight: 500;
color: #333333; color: #666666;
line-height: 20px; line-height: 20px;
margin-left: 20px; margin-left: 20px;
height: 20px; height: 20px;
...@@ -804,17 +939,45 @@ export default { ...@@ -804,17 +939,45 @@ export default {
width: 100%; width: 100%;
margin-top: 20px; margin-top: 20px;
.leftWrap { .leftWrap {
width: 240px; width: 275px;
min-height: calc(100vh - 92px); min-height: calc(100vh - 92px);
background-color: #fff; background-color: #fff;
box-sizing: border-box; box-sizing: border-box;
// padding: 0 20px;
box-sizing: border-box;
text-align: center;
.customerID {
font-size: 14px;
}
.leftWrapTop {
padding: 0 20px;
.baseInfo {
padding-top: 5px;
display: flex;
justify-content: space-between;
span {
font-size: 16px;
font-weight: 600;
}
.iconStyle {
width: 16px;
height: 16px;
color: #666666;
}
}
}
.avatorStyle {
padding-bottom: 5px;
}
.avator { .avator {
margin: 0 auto; margin: 0 auto;
margin-top: 40px; margin-top: 40px;
margin-bottom: 12px;
width: 60px; width: 60px;
height: 60px; height: 60px;
text-align: center; text-align: center;
line-height: 60px; line-height: 60px;
img { img {
border-radius: 50%; border-radius: 50%;
width: 100%; width: 100%;
...@@ -822,39 +985,40 @@ export default { ...@@ -822,39 +985,40 @@ export default {
} }
} }
p { p {
padding-left: 20px;
position: relative; position: relative;
margin-top: 20px; margin-top: 20px;
display: flex;
span:first-child { span:first-child {
display: inline-block; display: inline-block;
// height: 20px; // height: 20px;
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 500;
color: #333333; color: #666666;
line-height: 20px; line-height: 20px;
min-width: 90px;
text-align: right;
} }
span:nth-child(2) { span:nth-child(2) {
position: absolute;
left: 100px;
display: inline-block; display: inline-block;
height: 20px; height: 20px;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #666666; color: #333333;
line-height: 20px; line-height: 20px;
max-width: 140px; max-width: 146px;
} }
} }
} }
.rightWrap { .rightWrap {
margin-left: 20px; margin-left: 12px;
width: calc(100% - 260px); width: calc(100% - 287px);
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #fff;
padding: 20px; // padding: 20px;
position: relative; // position: relative;
.choseRow { .choseRow {
position: absolute; // position: absolute;
width: 100%; width: 100%;
left: 0; left: 0;
top: 0; top: 0;
...@@ -1050,5 +1214,49 @@ export default { ...@@ -1050,5 +1214,49 @@ export default {
} }
} }
} }
.general-wrap {
margin: 0 0 20px 0;
.public-text {
width: 100%;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #d8d8d8;
padding: 0 20px;
box-sizing: border-box;
position: relative;
margin-bottom: 20px;
&-info {
font-size: 16px;
font-weight: 500;
color: #333333;
span {
margin-left: 8px;
}
}
.expande-button {
position: absolute;
right: 20px;
top: 0;
.el-icon-arrow-down {
font-size: 10px;
margin-left: 7px;
}
.el-icon-arrow-up {
font-size: 10px;
margin-left: 7px;
}
}
}
.layout-detail {
margin: 0 20px;
}
.table {
margin-bottom: 10px;
}
}
.table /deep/ .line-ellipsis {
white-space: nowrap;
overflow: visible;
}
} }
</style> </style>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<!-- <span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span> --> <!-- <span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span> -->
<span class="pure-blue-text" style="font-size:12px">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : scope.scope.type == null ? '' : '' }}</span> <span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : scope.scope.type == null ? '' : '' }}</span>
</span> </span>
<span slot="customerSex" slot-scope="scope"> <span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : scope.scope.customerSex == 2 ? '女' : '' }}</span> <span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : scope.scope.customerSex == 2 ? '女' : '' }}</span>
...@@ -57,10 +57,10 @@ ...@@ -57,10 +57,10 @@
<span class="smallFontSize" :class="[list.type == 1 ? 'pure-green-text' : '', list.type == 2 ? 'pure-yello-text' : '']">@{{ list.corpName }}</span> <span class="smallFontSize" :class="[list.type == 1 ? 'pure-green-text' : '', list.type == 2 ? 'pure-yello-text' : '']">@{{ list.corpName }}</span>
</div> </div>
<span v-if="idx == 1"> <span v-if="idx == 1">
<el-popover placement="right-start" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"> <el-popover placement="right-start" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<div v-for="(i, index) in scope.scope.nickNameList" :key="index" style="padding-bottom:3px !important"> <div v-for="(i, index) in scope.scope.nickNameList" :key="index" style="padding-bottom: 3px !important">
<span>{{ i.nickName }}</span> <span>{{ i.nickName }}</span>
<span style="height: 20px; font-size: 12px; letter-spacing: 0; line-height: 20px; font-weight: 400;margin-left:2px" :class="[i.type == 1 ? 'pure-green-text' : '', i.type == 2 ? 'pure-yello-text' : '']">@{{ i.corpName }}</span> <span style="height: 20px; font-size: 12px; letter-spacing: 0; line-height: 20px; font-weight: 400; margin-left: 2px" :class="[i.type == 1 ? 'pure-green-text' : '', i.type == 2 ? 'pure-yello-text' : '']">@{{ i.corpName }}</span>
</div> </div>
<img class="imgEll" src="@/assets/tagsManage/ellipsis.png" alt="" slot="reference" /> <img class="imgEll" src="@/assets/tagsManage/ellipsis.png" alt="" slot="reference" />
</el-popover> </el-popover>
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
</template> </template>
<script> <script>
import { getTableList, getDictionaryFun, syncCustomer, clientManageExportApi } from '@/api/modules/clientManage' import { getTableList, getDictionaryFun, getStaffList, syncCustomer, clientManageExportApi } from '@/api/modules/clientManage'
import url from '@/assets/clientDataOverview/nodata.png' import url from '@/assets/clientDataOverview/nodata.png'
export default { export default {
name: 'clientManage', name: 'clientManage',
...@@ -113,58 +113,90 @@ export default { ...@@ -113,58 +113,90 @@ export default {
searchFormTable: {}, searchFormTable: {},
clientManageFormList: [ clientManageFormList: [
{ {
type: 'daterange', type: 'input',
prop: 'daterange', inputType: 'text',
label: '添加时间', prop: 'customerPhone',
pickerOptions: { label: '联系电话',
disabledDate(time) { placeholder: '联系电话'
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
}, },
{ {
type: 'select', type: 'select',
prop: 'status', name: 'followStaffList',
label: '当前状态', prop: 'followStaff',
placeholder: '请选择当前状态', noFilter: false,
label: '跟进员工',
placeholder: '请输入跟进员工',
options: []
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
},
{
type: 'input',
inputType: 'text',
prop: 'nickName',
label: '企微名称',
placeholder: '请输入企微名称'
},
{
type: 'select',
prop: 'isJoin',
label: '是否已加企微',
placeholder: '请选择',
options: [ options: [
{ {
label: '全部', label: '全部',
value: null value: null
}, },
{ {
label: '正常', label: '是',
value: 0 value: 1
}, },
{ {
label: '删除好友', label: '否',
value: -1 value: 0
} }
] ]
}, },
{ {
type: 'select', type: 'select',
prop: 'isJoin', prop: 'status',
label: '是否已加企微', label: '当前状态',
placeholder: '请选择', placeholder: '请选择当前状态',
options: [ options: [
{ {
label: '全部', label: '全部',
value: null value: null
}, },
{ {
label: '是', label: '正常',
value: 1 value: 0
}, },
{ {
label: '否', label: '删除好友',
value: 0 value: -1
} }
] ]
}, },
{ {
type: 'daterange',
prop: 'daterange',
label: '添加时间',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
},
{
type: 'select', type: 'select',
prop: 'addWay', prop: 'addWay',
name: 'addWaySource',
label: '添加来源', label: '添加来源',
placeholder: '请选择当前来源', placeholder: '请选择当前来源',
options: [] //this.$Constants.SOURCE_OPTION options: [] //this.$Constants.SOURCE_OPTION
...@@ -175,34 +207,6 @@ export default { ...@@ -175,34 +207,6 @@ export default {
label: '性别', label: '性别',
placeholder: '请选择性别', placeholder: '请选择性别',
options: this.$Constants.GENDER_OPTION options: this.$Constants.GENDER_OPTION
},
{
type: 'input',
inputType: 'text',
prop: 'customerPhone',
label: '联系电话',
placeholder: '联系电话'
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
},
{
type: 'input',
inputType: 'text',
prop: 'followStaff',
label: '跟进员工',
placeholder: '请输入跟进员工'
},
{
type: 'input',
inputType: 'text',
prop: 'nickName',
label: '企微名称',
placeholder: '请输入企微名称'
} }
], ],
...@@ -215,65 +219,76 @@ export default { ...@@ -215,65 +219,76 @@ export default {
{ {
label: '客户ID', label: '客户ID',
prop: 'oneId', prop: 'oneId',
minWidth: 160 minWidth: 150,
//align: 'left'
}, },
{ {
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
addHtml: 'customerName', addHtml: 'customerName',
minWidth: 150 minWidth: 130,
//align: 'left'
}, },
{ {
label: '企微名称', label: '企微名称',
prop: 'nickNameList', prop: 'nickNameList',
addHtml: 'nickNameList', addHtml: 'nickNameList',
minWidth: 200 minWidth: 170,
//align: 'left'
}, },
{ {
label: '联系电话', label: '联系电话',
prop: 'customerPhone', prop: 'customerPhone',
addHtml: 'customerPhone', addHtml: 'customerPhone',
minWidth: 110 minWidth: 110,
//align: 'left'
}, },
{ {
label: '性别', label: '性别',
prop: 'customerSex', prop: 'customerSex',
addHtml: 'customerSex', addHtml: 'customerSex',
minWidth: 80 minWidth: 80,
//align: 'left'
}, },
{ {
label: '跟进员工', label: '跟进员工',
prop: 'followStaff', prop: 'followStaff',
addHtml: 'followStaff', addHtml: 'followStaff',
minWidth: 120 minWidth: 120,
//align: 'left'
}, },
{ {
label: '是否加企微', //1. 加入,0.未加入 label: '是否加企微', //1. 加入,0.未加入
prop: 'isJoin', prop: 'isJoin',
addHtml: 'isJoin', addHtml: 'isJoin',
width: 100 width: 100,
//align: 'left'
}, },
{ {
label: '当前状态', label: '当前状态',
prop: 'status', prop: 'status',
addHtml: 'status', addHtml: 'status',
minWidth: 100 minWidth: 100,
//align: 'left'
}, },
{ {
label: '所属渠道', label: '所属渠道',
prop: 'sourceChannel', prop: 'sourceChannel',
width: 120 width: 150,
//align: 'left'
}, },
{ {
label: '添加来源', label: '添加来源',
prop: 'addWay', prop: 'addWay',
addHtml: 'addWay', addHtml: 'addWay',
minWidth: 100 minWidth: 100,
//align: 'left'
}, },
{ {
label: '添加时间', label: '添加时间',
prop: 'addTime', prop: 'addTime',
width: 150 width: 150,
//align: 'left'
}, },
{ {
label: '操作', label: '操作',
...@@ -287,6 +302,7 @@ export default { ...@@ -287,6 +302,7 @@ export default {
// width: 80 // width: 80
// } // }
}, },
followList2: [],
getListApi: getTableList, getListApi: getTableList,
sourceList: [], sourceList: [],
merchantModel: 1, merchantModel: 1,
...@@ -304,6 +320,7 @@ export default { ...@@ -304,6 +320,7 @@ export default {
this.accountLevel = this.$globalState.session.accountLevel this.accountLevel = this.$globalState.session.accountLevel
} }
this.getDictionaryFun() this.getDictionaryFun()
this.getStaffList()
}, },
// filters:{ // filters:{
// // 截取@后面的文字 // // 截取@后面的文字
...@@ -373,6 +390,10 @@ export default { ...@@ -373,6 +390,10 @@ export default {
if (!res) { if (!res) {
return return
} }
// addWaySource
const id = this.clientManageFormList.findIndex(item => {
return item.name == 'addWaySource'
})
let data = res.map(item => { let data = res.map(item => {
return { return {
...item, ...item,
...@@ -381,12 +402,35 @@ export default { ...@@ -381,12 +402,35 @@ export default {
} }
}) })
data.unshift({ label: '全部', value: '' }) data.unshift({ label: '全部', value: '' })
this.sourceList = data || [] this.sourceList = data || []
if (data && data.length > 0) { if (data && data.length > 0) {
window.localStorage.setItem('sourceList', JSON.stringify(data)) window.localStorage.setItem('sourceList', JSON.stringify(data))
} }
this.$set(this.clientManageFormList[3], 'options', data) this.$set(this.clientManageFormList[id], 'options', data)
})
},
getStaffList(val) {
const params = {
staffName: val ? val.trim() : ''
}
getStaffList(params).then(res => {
if (res.length == 0) {
return ''
}
const id = this.clientManageFormList.findIndex(item => {
return item.name == 'followStaffList'
})
const staff = res.map(item => {
return {
label: item.staffName,
value: item.staffName
}
})
staff.unshift({ label: '全部', value: '' })
this.$nextTick(() => {
this.clientManageFormList[id].options = staff
})
}) })
}, },
//来源 value值转为对应label //来源 value值转为对应label
...@@ -461,7 +505,7 @@ export default { ...@@ -461,7 +505,7 @@ export default {
justify-content: center; justify-content: center;
.smallFontSize { .smallFontSize {
margin-left: 2px; margin-left: 2px;
height: 20px; height: 20px;
font-size: 12px; font-size: 12px;
letter-spacing: 0; letter-spacing: 0;
line-height: 20px; line-height: 20px;
......
<template>
<div class="scrm-sub-client-container">
<div class="container" id="container">
<div>
<div class="title">创建人群</div>
<div class="info-box">
<el-form class="create-form" :model="crowdForm" :rules="crowdRules" ref="crowdForm" label-width="118px">
<div class="el-form-line">
<el-form-item label="人群名称:" prop="crowdName">
<el-input v-model.trim="crowdForm.crowdName" size="small" placeholder="请输入人群名称" maxlength="60"></el-input>
</el-form-item>
<span class="limited">最多30个字符</span>
</div>
<div class="el-form-line">
<el-form-item label="人群描述:">
<el-input v-model.trim="crowdForm.crowdDesc" size="small" placeholder="请输入人群描述" maxlength="200"></el-input>
</el-form-item>
<span class="limited">最多100个字符</span>
</div>
<div class="el-form-line">
<el-form-item label="标签筛选:" class="label-word">
<div class="flex">
<div class="font-14 color-58 mr2 hand" @click="open('dialogRuleVisible')">人群规则说明</div>
<div class="font-14 color-58 hand" @click="open('dialogLogicVisible')">人群规则逻辑</div>
</div>
</el-form-item>
</div>
</el-form>
<div class="label-wrap">
<div :class="{ 'fixed-box': true, is_fixed: isFixed, is_pb: isDom }" id="boxFixed">
<template v-if="this.selectedArray.length > 0">
<div :class="['select-label-wrap', 'font-14', 'flex-start', !isFixed ? 'is_auto' : '']" id="tagBox">
<div class="select-label color-3">已选标签:</div>
<div class="flex" id="selectTagBox">
<div class="selects" v-for="(selectTag, index) in selectedArray" :key="index" @click="labelFilter(selectTag)">
<template v-if="selectTag.groupName.length + selectTag.combination.length <= 20">
<div class="label-group-name color-3 hand">
<span class="color-9">{{ selectTag.groupName }}:</span>
{{ selectTag.combinationtext }}
<i class="el-icon-close" @click.stop="closeTag(selectTag, index)"></i>
</div>
</template>
<template v-else>
<el-tooltip placement="top">
<div slot="content" class="tooltip-text">{{ selectTag.groupName }}:{{ selectTag.combination }}</div>
<div class="label-group-name color-3 hand" style="padding-right: 60px">
<span class="color-9">{{ selectTag.groupName }}:</span>
{{ selectTag.combinationtext }}
<div class="select-num">+{{ selectTag.labelUnitList.length }}</div>
<i class="el-icon-close" @click.stop="closeTag(selectTag, index)"></i>
</div>
</el-tooltip>
</template>
</div>
</div>
</div>
</template>
<el-form class="search-tag-form" :model="searchForm" size="small" filterable :inline="true" @submit.native.prevent label-position="right" label-width="auto">
<el-form-item label="标签组名称">
<el-select v-model="searchForm.groupName" clearable filterable placeholder="请选择" @change="getLabelList" @clear="getLabelList">
<el-option v-for="item in groupArray" :key="item" :label="item" :value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="标签名称">
<el-select v-model="searchForm.labelName" clearable filterable placeholder="请选择">
<el-option v-for="item in labelArray" :key="item" :label="item" :value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="resetTable" plain>重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button>
</el-form-item>
<div class="color-3 font-14 forecast">
查看预估人数
<template v-if="crowdCount === ''">
<span class="color-58" @click="getCrowdCount">查看</span>
</template>
<template v-else>
<span class="color-58">{{ crowdCount }}</span>
</template>
</div>
</el-form>
<div class="expande-button-wrap" v-if="isFixed">
<div class="expande-button" @click="expandeClick" v-if="!expande && isDom">
<i class="el-icon-arrow-down"></i>
<span>展开</span>
</div>
<div class="expande-button" @click="expandeClick" v-if="expande && isDom">
<i class="el-icon-arrow-up"></i>
<span>收起</span>
</div>
</div>
</div>
<div v-show="isFixed" style="width: 100%" id="placeholder"></div>
<div class="pageContent">
<GLTable ref="crowdManage" :hasNum="false" :tableTotal="tableTotal" :tableData="tableData" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" @refreshTable="refreshTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="labelUnitList" slot-scope="scope">
<div class="allTagsWrap flex">
<template v-for="(item, index) in scope.scope.labelUnitList">
<span :class="['label', 'color-3', 'white-hide', 'mt10', item.checked ? 'isChecked' : '']" :key="index" @click="selectTag(item, index)">
{{ item.labelName }}
<template v-if="item.checked">
<img src="@/assets/clientDetail/select-icon.png" class="select-icon" alt />
</template>
</span>
</template>
</div>
</span>
</GLTable>
</div>
</div>
</div>
</div>
</div>
<div class="footer-panel">
<div>
<el-button type="primary" @click="handleSubmit">确定</el-button>
<el-button class="cancel-button" @click="handleCancel">取消</el-button>
</div>
</div>
<el-dialog title="人群规则说明" class="crowd-dialog" width="720px" :before-close="handleClose" :visible.sync="dialogRuleVisible" :show-close="isShowCloseBtn">
<div class="crowd-dialog-wrap color-3">
<div class="condition font-14">
<b>说明:</b>
<br />
<span>
标签组内已选标签取
<b>并集(或)</b>
,即满足一个条件即可、标签组之间取
<b>交集(且)</b>
,即同时满足标签组条件。
</span>
</div>
<div class="flex-between">
<div class="static-image">
<img src="@/assets/crowdManage/sum.png" alt="" />
</div>
<div class="static-image">
<img src="@/assets/crowdManage/intersection.png" alt="" />
</div>
</div>
</div>
</el-dialog>
<el-dialog title="人群规则逻辑" class="crowd-logic-dialog" width="720px" :before-close="handleClose" :visible.sync="dialogLogicVisible" :show-close="isShowCloseBtn">
<div class="crowd-logic-dialog-wrap">
<div :class="{ 'crowd-flex': true }" v-if="this.selectedArray.length > 1">
<div class="crowd-line" id="lineHeight"></div>
<div class="moreover">且</div>
<div class="crowd-line" id="lineHeight2"></div>
</div>
<div class="crowd-logic-wrap" id="crowd-logic-wrap" :style="{ 'margin-left': this.selectedArray.length > 1 ? '20px' : '55px' }">
<div class="crowd-logic-labels" v-for="(logicTag, index) in this.selectedArray" :key="index">
<div class="crowd-logic-label-group-name font-14 color-3">{{ logicTag.groupName }}:</div>
<div class="flex">
<template v-for="(tag, id) in logicTag.labelUnitList">
<div class="crowd-logic-tag color-6 font-14" :key="id">{{ tag.labelName }}</div>
<template v-if="id < logicTag.labelUnitList.length - 1">
<div class="color-3 perhaps" :key="id">或</div>
</template>
</template>
</div>
</div>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'crowdAdd',
data() {
return {
isFixed: false,
offsetTop: 0,
expande: false,
isClick: false,
addClick: false,
isDom: false,
isShowCloseBtn: true,
tableData: [],
isReload: true,
dialogRuleVisible: false,
dialogLogicVisible: false,
crowdForm: {
crowdName: '',
crowdDesc: ''
},
crowdRules: {
crowdName: [
{ required: true, message: '请输入人群名称', trigger: 'blur' },
{ max: 60, message: '最多支持60个汉字', trigger: 'blur' }
]
},
searchForm: {
groupName: '',
labelName: ''
},
groupArray: [], //标签组列表
labelArray: [], //标签列表
crowdCount: '', //预估人数
page: {
'req.pageSize': 10,
'req.pageNum': 1
},
tableTotal: '',
pageConf: { pageSize: 'req.pageSize', pageNum: 'req.pageNum' },
tableParams: {
tableColumns: [
{
label: '标签组',
prop: 'groupName',
width: 230,
align: 'left'
},
{
label: '标签组类型',
prop: 'groupType',
width: 180,
align: 'left'
},
{
label: '标签',
prop: 'labelUnitList',
addHtml: 'labelUnitList',
align: 'left'
}
]
},
selectedArray: []
}
},
created() {
if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId
}
//获取标签组列表
this.getGroupList()
//获取标签列表
this.getLabelList()
//获取标签数据
this.getLabelData()
},
watch: {
selectedArray: function () {
this.crowdCount = '' //初始化查看预估人数
if (this.selectedArray.length > 0) {
this.$nextTick(() => {
//条件重置
document.getElementById('placeholder').style.height = document.getElementById('boxFixed').offsetHeight + 'px'
document.getElementById('tagBox').style.height = 'auto'
let height = document.getElementById('selectTagBox').offsetHeight
console.log(height, '数据监听')
if (!this.isFixed || this.addClick) {
//判断是否可以触发
this.isClick = false
this.expande = false
}
console.log(this.isClick)
if (!this.isClick || this.addClick || !this.isFixed) {
//获取当前元素的高
if (height > 96) {
document.getElementById('tagBox').style.height = 96 + 'px'
this.isDom = true
} else {
document.getElementById('tagBox').style.height = 'auto'
this.isDom = false
}
}
})
}
}
},
mounted() {
window.addEventListener('scroll', this.initHeight, true)
this.$nextTick(() => {
this.offsetTop = document.querySelector('#boxFixed').offsetTop
})
},
methods: {
getGroupList() {
let params = {
'req.merchantId': this.merchantId,
'req.searchBoxType': 1 //搜索框类型 1-标签组搜索框 2-标签搜索框
}
this.$apis.crowdManage.getSearchBox(params).then(res => {
if (res.code == 0) {
this.groupArray = res.data.resultList
}
})
},
getLabelList() {
let params = {
'req.merchantId': this.merchantId,
'req.searchBoxType': 2, //搜索框类型 1-标签组搜索框 2-标签搜索框
'req.groupName': this.searchForm.groupName
}
this.$apis.crowdManage.getSearchBox(params).then(res => {
if (res.code == 0) {
this.labelArray = res.data.resultList
this.searchForm.labelName = ''
}
})
},
handleParameters() {
let tagCombine = []
this.selectedArray.forEach(label => {
tagCombine.push({
groupId: label.groupId,
labelIdList: label.labelIdList
})
})
return tagCombine
},
//创建人群
handleSubmit() {
this.$refs.crowdForm.validate(valid => {
if (valid) {
let tagCombine = this.handleParameters()
if (tagCombine.length == 0) {
this.$message.error('必须选择一个标签')
return
}
const params = {
'req.merchantId': this.merchantId,
'req.crowdType': 2, //类型 1-推荐 2-自定义
'req.crowdName': this.crowdForm.crowdName,
'req.crowdDesc': this.crowdForm.crowdDesc,
'req.tagCombine': JSON.stringify(tagCombine)
}
this.$apis.crowdManage
.addCrowd(params)
.then(res => {
if (res) {
this.$message({
type: 'success',
message: '操作成功!'
})
this.$router.push('/crowdManage/index')
} else {
this.$message({
type: 'error',
message: '操作失败'
})
}
})
.catch(err => {
this.$message({
type: 'error',
message: err.message
})
})
}
})
},
//根据标签组合查询人群客户数
getCrowdCount() {
if (this.selectedArray.length > 0) {
let params = {
'req.merchantId': this.merchantId,
'req.tagCombine': JSON.stringify(this.handleParameters())
}
this.$apis.crowdManage.getCrowdCount(params).then(res => {
if (res.code == 0) {
this.crowdCount = res.data.total
}
})
}
},
delayScrollFunc(fn, delay) {
const now = new Date().getTime()
if (now - this.lastScrollCall < delay) return
this.lastScrollCall = now
setTimeout(() => {
fn()
}, 60) // 在实际项目中,我发现这里再延迟一点时间执行效果更好(针对监听scroll)
},
open(value) {
if (value == 'dialogLogicVisible' && this.selectedArray.length == 0) {
this.$confirm('暂未选中标签,无法生成人群规则逻辑,快去选标签吧?', '提示', {
confirmButtonText: '我知道了',
cancelButtonText: '取消',
showCancelButton: false,
type: 'warning'
})
.then(() => {
this[value] = false
})
.catch(() => {})
return
}
this[value] = true
if (this.dialogLogicVisible == true && this.selectedArray.length > 1) {
this.$nextTick(() => {
let height = document.getElementById('crowd-logic-wrap').offsetHeight
if (height >= 650) {
document.getElementById('lineHeight').style.height = 308 + 'px'
document.getElementById('lineHeight2').style.height = 308 + 'px'
this.logicFix = true
} else {
let lineHeight = (height - 35) / 2
document.getElementById('lineHeight').style.height = lineHeight + 'px'
document.getElementById('lineHeight2').style.height = lineHeight + 'px'
}
})
}
},
handleClose() {
this.dialogRuleVisible = false
this.dialogLogicVisible = false
},
refreshTable(page) {
this.page = page
this.getLabelData()
},
expandeClick() {
this.expande = !this.expande
this.isClick = this.expande
this.addClick = false
if (this.expande) {
document.getElementById('tagBox').style.height = 'auto'
} else {
document.getElementById('tagBox').style.height = 96 + 'px'
}
document.getElementById('placeholder').style.height = document.getElementById('boxFixed').offsetHeight + 'px'
},
initHeight() {
var timeOut = null
if (timeOut) {
clearTimeout(timeOut)
}
timeOut = setTimeout(() => {
var scrollTop = document.querySelector('#container').scrollTop
this.isFixed = scrollTop > this.offsetTop ? true : false
if (!this.isFixed) {
document.getElementById('placeholder').style.height = document.getElementById('boxFixed').offsetHeight + 'px'
}
}, 200)
},
//获取标签数据
getLabelData() {
let params = {
'req.merchantId': this.merchantId,
'req.groupName': this.searchForm.groupName,
'req.labelName': this.searchForm.labelName,
...this.page
}
this.$apis.crowdManage.getLabelTreeList(params).then(res => {
if (res.code == 0) {
res.data.groupUnitList.forEach(item => {
item.labelUnitList.forEach(label => {
label.checked = false
})
})
this.tableData = res.data.groupUnitList
this.tableTotal = res.data.total
this.getHistoryLabel()
}
})
},
//已选择标签状态保存
getHistoryLabel() {
let selectId = []
if (this.selectedArray.length > 0) {
for (let i = 0; i < this.selectedArray.length; i++) {
for (let k = 0; k < this.selectedArray[i].labelUnitList.length; k++) {
selectId.push(this.selectedArray[i].labelUnitList[k].labelId)
}
}
for (let m = 0; m < this.tableData.length; m++) {
for (let n = 0; n < this.tableData[m].labelUnitList.length; n++) {
if (selectId.indexOf(this.tableData[m].labelUnitList[n].labelId) != -1) {
this.tableData[m].labelUnitList[n].checked = true
}
}
}
}
},
//选择标签
selectTag(data) {
this.tableData.forEach(item => {
item.labelUnitList.forEach(label => {
if (label.labelId == data.labelId) {
label.checked = !label.checked
this.selectedLabelFn(item, data)
}
})
})
},
// 添加已选标签
selectedLabelFn(groupData, data) {
this.addClick = true
if (this.selectedArray.length > 0) {
for (let i = 0; i < this.selectedArray.length; i++) {
if (this.selectedArray[i].groupId == groupData.groupId) {
if (data.checked) {
this.selectedArray[i].labelUnitList.push(data)
} else {
for (let k = 0; k < this.selectedArray[i].labelUnitList.length; k++) {
if (this.selectedArray[i].labelUnitList[k].labelId == data.labelId) {
this.selectedArray[i].labelUnitList.splice(k--, 1)
}
}
}
}
}
if (!this.selectedArray.some(tag => tag.groupId == groupData.groupId)) {
this.selectedArray.push({
groupId: groupData.groupId,
groupName: groupData.groupName,
labelUnitList: [data]
})
}
} else {
this.selectedArray.push({
groupId: groupData.groupId,
groupName: groupData.groupName,
labelUnitList: [data]
})
}
this.handleLabel()
},
//处理已选标签
handleLabel() {
for (let i = 0; i < this.selectedArray.length; i++) {
let array = []
let idArray = []
if (this.selectedArray[i].labelUnitList.length == 0) {
this.selectedArray.splice(i--, 1)
return
}
for (let j = 0; j < this.selectedArray[i].labelUnitList.length; j++) {
array.push(this.selectedArray[i].labelUnitList[j].labelName)
idArray.push(this.selectedArray[i].labelUnitList[j].labelId)
}
this.selectedArray[i].labelIdList = idArray
this.selectedArray[i].combination = array.join('、')
let length = 40 - this.checkName(this.selectedArray[i].groupName)
this.selectedArray[i].combinationtext = this.cutMaxCharStr(this.selectedArray[i].combination, length)
this.$set(this.selectedArray, i, this.selectedArray[i])
}
},
//删除选中标签
closeTag(data, index) {
this.addClick = true
this.selectedArray.splice(index, 1)
this.tableData.forEach(t => {
if (t.groupId == data.groupId) {
t.labelUnitList.forEach(m => {
m.checked = false
})
}
})
//条件重置
this.$nextTick(() => {
document.getElementById('tagBox').style.height = 'auto'
let height = document.getElementById('selectTagBox').offsetHeight
console.log(height, '删除')
if (height > 96) {
document.getElementById('tagBox').style.height = 96 + 'px'
this.isDom = true
} else {
document.getElementById('tagBox').style.height = 'auto'
this.isDom = false
}
})
},
//点击标签组搜索
labelFilter(data) {
this.searchForm.groupName = data.groupName
this.searchForm.labelName = ''
//获取标签列表
this.getLabelList()
this.getLabelData()
},
//标签查询
searchTable() {
this.getLabelData()
},
//重置表格
resetTable() {
this.searchForm = {
groupName: '',
labelName: ''
}
this.page = {
'req.pageSize': 10,
'req.pageNum': 1
}
this.$refs.crowdManage.page[this.pageConf.pageSize] = 10
this.$refs.crowdManage.page[this.pageConf.pageNum] = 1
this.getLabelData()
},
handleCancel() {
this.$router.push('/crowdManage/index')
},
checkName(value) {
// 一个汉字2个字符,字母数字1个字符
var len = 0
for (var i = 0; i < value.length; i++) {
var c = value.charCodeAt(i)
//单字节加1
if ((c >= 0x0001 && c <= 0x007e) || (0xff60 <= c && c <= 0xff9f)) {
len++
} else {
len += 2
}
}
return len
},
cutMaxCharStr: function (e, unit) {
//e为传入字符串
let str = e
var len = 0
var singleNum = 0
var doubleNum = 0
for (var i = 0; i < e.length; i++) {
var c = e.charCodeAt(i)
//单字节加1
if ((c >= 0x0001 && c <= 0x007e) || (0xff60 <= c && c <= 0xff9f)) {
len++
} else {
len += 2
}
}
if (len > unit) {
var subLen = 0
var subLen1 = 0
var subLen2 = 0
for (var v = 0; v < e.length; v++) {
var ch = e.charCodeAt(v)
//单字节
if ((ch >= 0x0001 && ch <= 0x007e) || (0xff60 <= ch && ch <= 0xff9f)) {
singleNum += 1
subLen1++
} else {
doubleNum += 2
subLen2++
}
if (singleNum + doubleNum >= unit) {
subLen = subLen1 + subLen2
break
}
}
return str.substr(0, subLen)
}
return str
}
},
destroyed() {
window.removeEventListener('scroll', this.initHeight)
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
.container {
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
height: calc(100vh - 150px);
overflow-y: auto;
// padding: 20px;
.title {
padding: 20px 0 17px 20px;
font-size: 16px;
color: #333;
font-weight: 600;
border-bottom: 1px solid #d8d8d8;
&::after {
content: '';
}
}
.info-box {
width: 100%;
padding: 30px 0;
box-sizing: border-box;
.create-form {
width: 100%;
height: 246px;
box-sizing: border-box;
border-bottom: 1px solid #d8d8d8;
padding: 0 30px;
}
.el-form-line {
margin-bottom: 20px;
.label-word {
/deep/ .el-form-item__content {
line-height: 20px;
}
/deep/ .el-form-item__label {
line-height: 20px;
}
}
.el-input {
width: 415px;
}
/deep/ .el-form-item {
margin-bottom: 6px !important;
}
/deep/ .el-form-item__error {
color: #f56c6c;
font-size: 12px;
line-height: 1;
padding-top: 30px;
position: absolute;
top: 100%;
left: 0;
}
}
.limited {
font-size: 12px;
font-weight: 400;
color: #999999;
line-height: 17px;
margin-left: 118px;
margin-bottom: 20px;
margin-top: -20px;
}
.mr2 {
margin-right: 20px;
}
.label-wrap {
margin-top: 32px;
width: 100%;
.fixed-box {
background: #ffffff;
box-sizing: border-box;
padding: 0 30px;
}
.is_fixed {
width: calc(100vw - 250px);
position: fixed;
top: 60px;
z-index: 999;
padding: 20px 30px 20px 30px;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
}
.is_pb {
padding: 20px 30px 52px 30px !important;
}
.is_auto {
height: auto !important;
}
.search-tag-form {
position: relative;
}
.select-label-wrap {
margin-bottom: 20px;
overflow: hidden;
.select-label {
line-height: 26px;
height: 26px;
white-space: nowrap;
}
.selects {
height: 26px;
background: #ffffff;
border: 1px solid rgba(232, 232, 234, 1);
border-radius: 4px;
margin-right: 4px;
margin-bottom: 4px;
position: relative;
display: flex;
align-items: center;
flex-wrap: nowrap;
.label-group-name {
max-width: 533px;
padding-top: 3px;
padding-bottom: 3px;
padding-left: 8px;
padding-right: 30px;
color: #666666;
box-sizing: border-box;
.select-num {
line-height: 18px;
height: 18px;
background: #ffffff;
border-radius: 2px;
border: 1px solid #e7e7e9;
padding: 0 4px;
position: absolute;
right: 27px;
margin-left: 20px;
top: 2px;
}
}
// .label {
// padding: 3px 8px;
// background: #fafbfe;
// border: 1px solid rgba(232, 232, 234, 1);
// border-radius: 4px;
// margin-right: 4px;
// }
.el-icon-close {
position: absolute;
right: 8px;
margin-left: 10px;
}
}
}
/deep/ .search-form {
padding: 0 0 2px 0;
}
.pageContent {
padding: 0 30px;
}
.forecast {
position: absolute;
right: 40px;
top: 0;
line-height: 36px;
span {
margin-left: 4px;
cursor: pointer;
}
}
.expande-button-wrap {
position: absolute;
bottom: 16px;
left: 50%;
transform: translateX(-50%);
z-index: 99;
.expande-button {
color: $btnBlue;
cursor: pointer;
i {
height: 8px;
}
span {
height: 20px;
font-size: 16px;
font-weight: 400;
color: $btnBlue;
line-height: 20px;
}
}
}
}
.allTagsWrap {
.label {
background: #fafbfe;
border-radius: 4px;
border: 1px solid #e8e8ea;
text-align: center;
margin-right: 4px;
margin-top: 4px;
position: relative;
padding: 3px 8px;
box-sizing: border-box;
display: inline-block;
cursor: pointer;
}
.isChecked {
border: 1px solid #5850ff !important;
color: #5850ff;
.select-icon {
width: 16px;
height: 16px;
position: absolute;
top: 0;
right: 0;
}
}
}
}
}
.footer-panel {
// display: flex;
// align-items: center;
// justify-content: center;
position: fixed;
bottom: 0px;
height: 64px;
left: 220px;
width: 100%;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
div {
width: 170px;
position: relative;
transform: translateY(-50%);
left: 50%;
top: 50%;
margin-left: -220px;
.cancel-button {
margin-left: 20px;
}
}
}
.label-text {
margin-left: 10px;
font-size: 14px;
span {
color: $btnBlue;
}
}
.form-error {
color: #f56c6c;
font-size: 12px;
margin-left: 186px;
margin-top: 10px;
}
.sale-select {
display: flex;
align-items: center;
}
.tooltip-text {
line-height: 18px;
}
.crowd-dialog {
/deep/.el-dialog__header {
padding: 15px 20px;
}
/deep/.el-dialog__body {
padding: 20px;
}
}
.crowd-logic-dialog {
/deep/.el-dialog__header {
padding: 15px 20px;
}
/deep/.el-dialog__body {
padding: 20px;
min-height: 260px;
max-height: 690px;
overflow: auto;
}
}
.crowd-dialog-wrap {
.condition {
margin-bottom: 16px;
line-height: 21px;
b {
color: #666666;
}
span {
white-space: nowrap;
}
}
.static-image {
width: 335px;
height: 325px;
img {
width: 100%;
}
}
}
.crowd-logic-dialog-wrap {
display: flex;
.crowd-flex {
display: flex;
flex-direction: column;
align-items: center;
}
.crowd-line {
width: 1px;
background: #5850ff;
}
.moreover {
text-align: center;
font-size: 16px;
font-weight: 500;
color: #5850ff;
line-height: 35px;
width: 35px;
height: 35px;
background: #efeeff;
border-radius: 4px;
border: 1px solid #5850ff;
}
.crowd-logic-wrap {
width: 100%;
height: auto;
.crowd-logic-labels {
width: 625px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e5e5e5;
padding: 10px;
box-sizing: border-box;
margin-top: 10px;
.crowd-logic-label-group-name {
line-height: 21px;
}
.crowd-logic-tag {
padding: 1px 8px;
line-height: 24px;
height: 26px;
background: #f4f6fc;
border-radius: 4px;
border: 1px solid #e8e8ea;
margin-top: 8px;
margin-right: 8px;
}
.perhaps {
margin-top: 8px;
margin-right: 8px;
font-weight: 400;
}
}
}
.crowd-logic-wrap :nth-child(1) {
margin-top: 0;
}
}
</style>
<template>
<div class="scrm-sub-client-container">
<div class="container">
<div>
<div class="title">人群详情</div>
<div class="info-box">
<el-form class="create-form" :model="crowdForm" :rules="crowdRules" label-width="118px">
<div class="el-form-line">
<el-form-item label="人群名称:" prop="crowdName" class="label-word">
<div class="color-3">{{ crowdForm.crowdName }}</div>
</el-form-item>
</div>
<div class="el-form-line">
<el-form-item label="人群描述:" prop="groupNameRule" class="label-word">
<div class="color-3">{{ crowdForm.crowdDesc }}</div>
</el-form-item>
</div>
<div class="el-form-line">
<el-form-item label="标签筛选:" prop="groupNameRule" class="label-word">
<div class="flex">
<div class="font-14 color-58 mr2 hand" @click="open('dialogRuleVisible')">人群规则说明</div>
<div class="font-14 color-58 hand" @click="open('dialogLogicVisible')">人群规则逻辑</div>
</div>
</el-form-item>
</div>
<div class="el-form-line">
<el-form-item label="已选标签:" prop="groupNameRule" class="label-word">
<div class="pageContent">
<GLTable :tableData="selectedArray" :hasNum="hasNum" :hasPage="hasPage" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="labelUnitList" slot-scope="scope">
<div class="allTagsWrap flex">
<template v-for="(item, index) in scope.scope.labelUnitList">
<span :class="['label', 'color-6', 'white-hide', 'mt10']" :key="index">
{{ item.labelName }}
</span>
</template>
</div>
</span>
</GLTable>
</div>
</el-form-item>
</div>
</el-form>
</div>
</div>
</div>
<div class="footer-panel">
<div>
<el-button class="cancel-button" @click="$router.go(-1)">返回</el-button>
</div>
</div>
<el-dialog title="人群规则说明" class="crowd-dialog" width="720px" :before-close="handleClose" :visible.sync="dialogRuleVisible" :show-close="isShowCloseBtn">
<div class="crowd-dialog-wrap color-3">
<div class="condition font-14">
<b>说明:</b>
<br />
<span>
标签组内已选标签取
<b>并集(或)</b>
,即满足一个条件即可、标签组之间取
<b>交集(且)</b>
,即同时满足标签组条件。
</span>
</div>
<div class="flex-between">
<div class="static-image">
<img src="@/assets/crowdManage/sum.png" alt="" />
</div>
<div class="static-image">
<img src="@/assets/crowdManage/intersection.png" alt="" />
</div>
</div>
</div>
</el-dialog>
<el-dialog title="人群规则逻辑" class="crowd-logic-dialog" width="720px" :before-close="handleClose" :visible.sync="dialogLogicVisible" :show-close="isShowCloseBtn">
<div class="crowd-logic-dialog-wrap">
<div :class="{ 'crowd-flex': true }" v-if="this.selectedArray.length > 1">
<div class="crowd-line" id="lineHeight"></div>
<div class="moreover">且</div>
<div class="crowd-line" id="lineHeight2"></div>
</div>
<div class="crowd-logic-wrap" id="crowd-logic-wrap" :style="{ 'margin-left': this.selectedArray.length > 1 ? '20px' : '55px' }">
<div class="crowd-logic-labels" v-for="(logicTag, index) in this.selectedArray" :key="index">
<div class="crowd-logic-label-group-name font-14 color-3">{{ logicTag.groupName }}:</div>
<div class="flex">
<template v-for="(tag, id) in logicTag.labelUnitList">
<div class="crowd-logic-tag color-6 font-14" :key="id">{{ tag.labelName }}</div>
<template v-if="id < logicTag.labelUnitList.length - 1">
<div class="color-3 perhaps" :key="id">或</div>
</template>
</template>
</div>
</div>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'crowdDetail',
data() {
return {
crowdForm: {
crowdName: '',
crowdDesc: ''
},
crowdId: this.$route.params.id ? this.$route.params.id : '',
tableTotal: '',
isShowCloseBtn: true,
dialogRuleVisible: false,
dialogLogicVisible: false,
tableData: [],
hasPage: false,
hasNum: false,
page: {},
tableParams: {
tableColumns: [
{
label: '标签组',
prop: 'groupName',
width: 230,
align: 'left'
},
{
label: '标签组类型',
prop: 'groupType',
width: 180,
align: 'left'
},
{
label: '标签',
prop: 'labelUnitList',
addHtml: 'labelUnitList',
align: 'left'
}
]
},
crowdRules: {
crowdName: [{ required: true }]
},
selectedArray: []
}
},
created() {
console.log('this.$route.params.id', this.$route.params.id)
// 通过人群Id查询人群详情
this.getCrowdDetails()
},
mounted() {},
methods: {
//获取标签数据
getCrowdDetails() {
let params = {
'req.crowdId': this.crowdId
}
this.$apis.crowdManage.getCrowdDetails(params).then(res => {
console.log(res.code, res)
if (res.code == 0) {
this.crowdForm.crowdName = res.data.crowdName
this.crowdForm.crowdDesc = res.data.crowdDesc
console.log(JSON.parse(res.data.tagCombine))
this.selectedArray = res.data.tagCombine ? JSON.parse(res.data.tagCombine) : []
}
})
},
handleClose() {
this.dialogRuleVisible = false
this.dialogLogicVisible = false
},
open(value) {
this[value] = true
if (this.dialogLogicVisible == true && this.selectedArray.length > 1) {
this.$nextTick(() => {
let height = document.getElementById('crowd-logic-wrap').offsetHeight
if (height >= 650) {
document.getElementById('lineHeight').style.height = 308 + 'px'
document.getElementById('lineHeight2').style.height = 308 + 'px'
this.logicFix = true
} else {
let lineHeight = (height - 35) / 2
document.getElementById('lineHeight').style.height = lineHeight + 'px'
document.getElementById('lineHeight2').style.height = lineHeight + 'px'
}
})
}
}
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
.container {
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
height: calc(100vh - 150px);
overflow-y: auto;
// padding: 20px;
.title {
padding: 20px 0 17px 20px;
font-size: 16px;
color: #333;
font-weight: 600;
border-bottom: 1px solid #d8d8d8;
&::after {
content: '';
}
}
.info-box {
width: 100%;
padding: 30px 0;
box-sizing: border-box;
.create-form {
width: 100%;
box-sizing: border-box;
padding: 0 30px;
}
.el-form-line {
margin-bottom: 20px;
.label-word {
/deep/ .el-form-item__content {
line-height: 20px;
}
/deep/ .el-form-item__label {
line-height: 20px;
margin-right: 0;
}
}
}
.mr2 {
margin-right: 20px;
}
.allTagsWrap {
.label {
background: #f4f6fc;
border-radius: 4px;
border: 1px solid #e8e8ea;
text-align: center;
margin-right: 4px;
margin-top: 4px;
position: relative;
padding: 0 8px;
height: 26px;
line-height: 26px;
box-sizing: border-box;
display: inline-block;
}
.isChecked {
border: 1px solid #5850ff !important;
color: #5850ff;
.select-icon {
width: 16px;
height: 16px;
position: absolute;
top: 0;
right: 0;
}
}
}
}
}
.footer-panel {
position: fixed;
bottom: 0px;
height: 64px;
left: 220px;
width: 100%;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
div {
width: 80px;
position: relative;
transform: translateY(-50%);
left: 50%;
top: 50%;
margin-left: -220px;
}
}
.crowd-dialog {
/deep/.el-dialog__header {
padding: 15px 20px;
}
/deep/.el-dialog__body {
padding: 20px;
}
}
.crowd-logic-dialog {
/deep/.el-dialog__header {
padding: 15px 20px;
}
/deep/.el-dialog__body {
padding: 20px;
min-height: 260px;
max-height: 690px;
overflow: auto;
}
}
.crowd-dialog-wrap {
.condition {
margin-bottom: 16px;
line-height: 21px;
b {
color: #666666;
}
span {
white-space: nowrap;
}
}
.static-image {
width: 335px;
height: 325px;
img {
width: 100%;
}
}
}
.crowd-logic-dialog-wrap {
display: flex;
.crowd-flex {
display: flex;
flex-direction: column;
align-items: center;
}
.crowd-line {
width: 1px;
background: #5850ff;
}
.moreover {
text-align: center;
font-size: 16px;
font-weight: 500;
color: #5850ff;
line-height: 35px;
width: 35px;
height: 35px;
background: #efeeff;
border-radius: 4px;
border: 1px solid #5850ff;
}
.crowd-logic-wrap {
width: 100%;
height: auto;
.crowd-logic-labels {
width: 625px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e5e5e5;
padding: 10px;
box-sizing: border-box;
margin-top: 10px;
.crowd-logic-label-group-name {
line-height: 21px;
}
.crowd-logic-tag {
padding: 1px 8px;
line-height: 24px;
height: 26px;
background: #f4f6fc;
border-radius: 4px;
border: 1px solid #e8e8ea;
margin-top: 8px;
margin-right: 8px;
}
.perhaps {
margin-top: 8px;
margin-right: 8px;
font-weight: 400;
}
}
}
.crowd-logic-wrap :nth-child(1) {
margin-top: 0;
}
}
</style>
<template>
<div class="scrm-sub-client-container" v-loading="loading">
<el-tabs v-model="activeName" @tab-click="handleClick()">
<el-tab-pane label="推荐人群" name="first"></el-tab-pane>
<el-tab-pane label="自定义人群" name="second">
<GLButton class="addBtn" fn="新建人群" v-if="admin" @click="addClick">
<i class="el-icon-plus"></i>
新建人群
</GLButton>
</el-tab-pane>
</el-tabs>
<div class="pageContent">
<search-form class="searchTop border-shadow" :formModel="searchForm" :formList="tagsPartFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot">
<!-- <el-button @click="resetTable" plain>重置</el-button> -->
<el-button class="searchBtn" type="primary" @click="searchTable">查询</el-button>
</span>
</search-form>
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="crowdManage" :hasNum="false" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<template slot="xxx" slot-scope="scope">
<!-- <span @click="btnClick('detail', scope.scope)" class="blue-text">查看详情</span> -->
<GLButton type="text" @click="btnClick('detail', scope.scope)" class="blue-text" fn="查看详情">查看详情</GLButton>
<!-- <span style="margin-left: 20px" @click="btnClick('view', scope.scope)" class="blue-text">查看客户</span> -->
<GLButton class="blue-text leftDistance" type="text" fn="客户列表" v-if="userType !== 2" @click="btnClick('view', scope.scope)">查看客户</GLButton>
</template>
</GLTable>
</div>
</div>
</template>
<script>
import url from '@/assets/clientDataOverview/nodata.png'
export default {
name: 'crowdManage',
data() {
return {
loading: false,
activeName: 'first',
isReload: true,
url: url,
searchForm: {},
merchantId: '', //商户号
// crowdType:1,//人群类型
// totalCount: 0,
tagsPartFormList: [
{
type: 'input',
inputType: 'text',
prop: 'req.keyword',
label: '人群名称',
placeholder: '请输入人群名称',
clearable: true
}
],
pageConf: { pageSize: 'req.pageSize', pageNum: 'req.pageNum', totalCount: 'data.total' },
tableParams: {
listName: 'data.crowdUnitList',
tableColumns: [
{
label: '人群名称',
prop: 'crowdName',
// addHtml: 'crowdName',
align: 'left'
},
{
label: '人群描述',
prop: 'crowdDesc',
align: 'left'
// width: 180
},
{
label: '人数',
prop: 'total',
// addHtml: 'total',
align: 'left'
},
{
label: '操作',
prop: 'xxx',
fixed: 'right',
addHtml: 'xxx',
align: 'left',
width: 180
}
]
},
getListApi: this.$apis.crowdManage.getCrowdList,
expande: true,
needShowExpande: false
}
},
computed: {},
created() {
if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId
this.admin = this.$globalState.session.admin
this.userType = this.$globalState.session.userType
}
this.searchForm = { 'req.merchantId': this.merchantId, 'req.crowdType': this.crowdType }
},
mounted() {
//没数据的时候要算高度
setTimeout(() => {
if (!this.$refs.crowdManage.data.length) {
this.loading = true
this.$refs.crowdManage.setTableHeightFun()
this.loading = false
}
}, 200)
},
methods: {
btnClick(type, data) {
console.log(data)
if (type == 'detail') {
console.log(`/crowdManage/crowdDetail/${data.crowdId}`)
this.$router.push(`/crowdManage/crowdDetail/${data.crowdId}`)
}
if (type == 'view') {
this.$router.push(`/clientDataOverview/group/${data.crowdId}`)
}
},
addClick() {
this.$router.push('/crowdManage/crowdAdd')
},
setTableHeightEvent() {
this.$refs.clientGroupDetail.setTableHeightFun()
},
handleClick() {
this.searchForm = { 'req.keyword': '' }
this.searchTable()
// setTimeout(() =>{
// if(this.$refs.crowdManage.data.length == 0){
// this.$refs.crowdManage.setTableHeightFun()
// }
// this.loading =false
// },200)
},
beforeSearchFn() {
return new Promise(resolve => {
const crowdType = this.activeName == 'first' ? 1 : 2
this.searchForm = Object.assign(this.searchForm, { 'req.merchantId': this.merchantId, 'req.crowdType': crowdType })
resolve()
})
},
//搜索表格
searchTable() {
this.$refs.crowdManage.refreshTable()
}
//重置表格
// resetTable() {
// this.searchForm = { 'labelTreeReq.shopId': this.merchantId, 'labelTreeReq.edition': this.merchantModel }
// this.$refs.crowdManage.refreshTable()
// }
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
.addBtn {
height: 32px;
background: $btnBlue;
border-radius: 3px;
padding: 5px 16px;
color: #fff;
font-size: 16px;
margin-bottom: 10px;
&:hover {
background-color: $lightBtnBlue;
}
}
/deep/ .el-tabs__header {
margin: 0 0 20px;
}
/deep/ .el-tabs__nav-wrap::after {
content: none;
}
/deep/ .el-tabs__item {
font-size: 16px;
color: #717171;
letter-spacing: 0.8px;
}
/deep/ .is-active {
color: #5850ff;
font-weight: 600;
}
.leftDistance {
margin-left: 10px;
}
.scrm-sub-client-container {
/deep/.search-form .el-form-item__content {
width: auto;
}
.pageContent {
padding: 6px 20px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
background-color: #fff;
.el-button + .el-button {
margin-left: 10px;
}
.searchTop {
/deep/ .el-form-item:nth-child(2) {
position: static !important;
.el-form-item__content{
margin-left:15px!important;
}
}
}
.allTagsWrap {
position: relative;
}
}
}
</style>
...@@ -199,33 +199,33 @@ export default { ...@@ -199,33 +199,33 @@ export default {
label: '客户', label: '客户',
prop: 'customerName', prop: 'customerName',
addHtml: 'customerName', addHtml: 'customerName',
align: 'left' //align: 'left'
// width: 200 // width: 200
}, },
{ {
label: '创建时间', label: '创建时间',
prop: 'createdTime', prop: 'createdTime',
align: 'left' //align: 'left'
// width: 200 // width: 200
}, },
{ {
label: '现群名称', label: '现群名称',
prop: 'chatName', prop: 'chatName',
align: 'left' //align: 'left'
}, },
{ {
label: '现群主', label: '现群主',
prop: 'createdBy', prop: 'createdBy',
// minWidth: '180px', // minWidth: '180px',
addHtml: 'groupOwner', addHtml: 'groupOwner',
align: 'left' //align: 'left'
}, },
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
addHtml: 'status', addHtml: 'status',
// width: 250, // width: 250,
align: 'left' //align: 'left'
} }
] ]
}, },
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<!-- :class="[expande ? 'expande' : 'close']" --> <!-- :class="[expande ? 'expande' : 'close']" -->
<div id="allTagsWrap" class="allTagsWrap"> <div id="allTagsWrap" class="allTagsWrap">
<span v-for="(item, index) in showTagArray(scope.scope.labelList)" :key="index" class="ellipsis-1 tag-box-wrap"> <span v-for="(item, index) in showTagArray(scope.scope.labelList)" :key="index" class="ellipsis-1 tag-box-wrap">
<el-tooltip class="item" :content="item.name" placement="top"> <el-tooltip class="item" :content="item.name" placement="top">
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</el-tooltip> </el-tooltip>
...@@ -67,8 +67,8 @@ ...@@ -67,8 +67,8 @@
<template slot="xxx" slot-scope="scope"> <template slot="xxx" slot-scope="scope">
<!-- //这版关掉自店标签 1.0.1允许集团的门店打字店标签,也可以编辑--> <!-- //这版关掉自店标签 1.0.1允许集团的门店打字店标签,也可以编辑-->
<!-- v-if="scope.scope.labelType != '系统标签' && isShowEditBtn(scope.scope)" --> <!-- v-if="scope.scope.labelType != '系统标签' && isShowEditBtn(scope.scope)" -->
<span @click="btnClick('edit', scope.scope)" v-if="scope.scope.labelType != '系统标签' && isShowEditBtn(scope.scope)" class="blue-text" >编辑标签组</span> <span @click="btnClick('edit', scope.scope)" v-if="scope.scope.labelType != '系统标签' && isShowEditBtn(scope.scope)" class="blue-text">编辑标签组</span>
<GLButton class="blue-text leftDistance" type="text" fn="查看客户" v-if="userType!==2" @click="toViewCustomer(scope.scope)" >查看客户</GLButton> <GLButton class="blue-text leftDistance" type="text" fn="查看客户" v-if="userType !== 2" @click="toViewCustomer(scope.scope)">查看客户</GLButton>
</template> </template>
</GLTable> </GLTable>
</div> </div>
...@@ -233,7 +233,7 @@ export default { ...@@ -233,7 +233,7 @@ export default {
label: '标签组', label: '标签组',
prop: 'labelGroup', prop: 'labelGroup',
addHtml: 'labelGroup', addHtml: 'labelGroup',
width: 180 width: 230
}, },
{ {
label: '标签组类型', label: '标签组类型',
...@@ -252,7 +252,7 @@ export default { ...@@ -252,7 +252,7 @@ export default {
fixed: 'right', fixed: 'right',
addHtml: 'xxx', addHtml: 'xxx',
width: 180 width: 180
} }
] ]
// tableOption: { // tableOption: {
// width: 120 // width: 120
...@@ -276,7 +276,7 @@ export default { ...@@ -276,7 +276,7 @@ export default {
// maxlength: 30, // maxlength: 30,
// showWordLimit: true, // showWordLimit: true,
disabled: false, disabled: false,
clickFunc:this.watchInput clickFunc: this.watchInput
}, },
{ {
label: '标签组类型', label: '标签组类型',
...@@ -295,7 +295,7 @@ export default { ...@@ -295,7 +295,7 @@ export default {
], ],
tagRules: { tagRules: {
tagsName: [ tagsName: [
{ required: true, message: '请输入名称', trigger: 'blur' }, { required: true, message: '请输入名称', trigger: 'blur' }
// { // {
// validator: checkName, // validator: checkName,
// trigger: 'change' // trigger: 'change'
...@@ -373,17 +373,17 @@ export default { ...@@ -373,17 +373,17 @@ export default {
// toViewCustomer(info) { // toViewCustomer(info) {
// this.$router.push('/tagsManage/viewCustomers') // this.$router.push('/tagsManage/viewCustomers')
// }, // },
toViewCustomer(info) { toViewCustomer(info) {
console.log(info) console.log(info)
const id = info.labelGroup.id const id = info.labelGroup.id
const type = info.labelType const type = info.labelType
this.$router.push({ this.$router.push({
// path:`/tagsManage/viewCustomers/530` // path:`/tagsManage/viewCustomers/530`
path:`/tagsManage/viewCustomers/${id}/${type}` path: `/tagsManage/viewCustomers/${id}/${type}`
}) })
}, },
watchInput(){ watchInput() {
console.log('点击标签组名称输入框') console.log('点击标签组名称输入框')
}, },
showTagArray(list) { showTagArray(list) {
if (list.length == 0) { if (list.length == 0) {
...@@ -393,14 +393,13 @@ export default { ...@@ -393,14 +393,13 @@ export default {
return list.slice(0, 9) return list.slice(0, 9)
}, },
checkInputContent(e) { checkInputContent(e) {
//确保每个输入框的内容不和已存在的编辑标签相同 //确保每个输入框的内容不和已存在的编辑标签相同
let isHasSameTag = this.editTagList.some(ele => ele.name == e) let isHasSameTag = this.editTagList.some(ele => ele.name == e)
if (isHasSameTag) { if (isHasSameTag) {
this.$message.error('不允许输入已存在的标签') this.$message.error('不允许输入已存在的标签')
return e return e
} }
return this.$Utils.cutMaxCharStr(e) return this.$Utils.cutMaxCharStr(e)
}, },
isShowEditBtn(row) { isShowEditBtn(row) {
//集团模式下,只有集团能可以编辑企业,自店,其他只能编辑自店 //集团模式下,只有集团能可以编辑企业,自店,其他只能编辑自店
...@@ -710,7 +709,7 @@ export default { ...@@ -710,7 +709,7 @@ export default {
i.inputVisible = false i.inputVisible = false
} }
}) })
return this.$Utils.cutMaxCharStr(inputValue) return this.$Utils.cutMaxCharStr(inputValue)
}, },
handleSelect(value) { handleSelect(value) {
console.log('值内容', value) console.log('值内容', value)
...@@ -731,7 +730,7 @@ export default { ...@@ -731,7 +730,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/styles/variables.scss'; @import '@/styles/variables.scss';
@import '@/styles/resetelement.scss'; @import '@/styles/resetelement.scss';
.leftDistance{ .leftDistance {
margin-left: 10px; margin-left: 10px;
} }
.scrm-sub-client-container { .scrm-sub-client-container {
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</div> </div>
</div> </div>
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<div class="pageContent" > <div class="pageContent">
<div> <div>
<div class="clientNumExp"> <div class="clientNumExp">
<div class="clientNum"> <div class="clientNum">
...@@ -41,30 +41,30 @@ ...@@ -41,30 +41,30 @@
<div class="clientNumText">{{ tableTotal }}个</div> <div class="clientNumText">{{ tableTotal }}个</div>
</div> </div>
</div> </div>
<el-button class="export" size="small" type="primary" @click="handleExport">导出</el-button> <el-button class="export" size="small" type="primary" @click="handleExport">导出</el-button>
</div> </div>
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="viewCustomers" :layout="layout" :hasNum="true" :tableData="tableData" :tableTotal="tableTotal" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" @refreshTable="getCustomersListData" :tableParams="tableParams"> <GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="viewCustomers" :layout="layout" :hasNum="true" :tableData="tableData" :tableTotal="tableTotal" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" @refreshTable="getCustomersListData" :tableParams="tableParams">
<span slot="qiweimingcheng" slot-scope="scope"> <span slot="qiweimingcheng" slot-scope="scope">
<span>{{ myStandNo(scope.scope.carVin) }}</span> <span>{{ myStandNo(scope.scope.carVin) }}</span>
</span> </span>
<!-- 企微名称 --> <!-- 企微名称 -->
<div slot="nickNameList" slot-scope="scope" class="expandImg"> <div slot="nickNameList" slot-scope="scope" class="expandImg">
<div v-for="(list, idx) in scope.scope.nickNameList" :key="idx"> <div v-for="(list, idx) in scope.scope.nickNameList" :key="idx">
<div v-if="idx == 0"> <div v-if="idx == 0">
<span>{{ list.nickName }}</span> <span>{{ list.nickName }}</span>
<span class="smallFontSize" :class="[list.type == 1 ? 'pure-green-text' : '', list.type == 2 ? 'pure-yello-text' : '']">@{{ list.corpName }}</span> <span class="smallFontSize" :class="[list.type == 1 ? 'pure-green-text' : '', list.type == 2 ? 'pure-yello-text' : '']">@{{ list.corpName }}</span>
</div>
<span v-if="idx == 1">
<el-popover placement="right-start" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<div v-for="(i, index) in scope.scope.nickNameList" style="padding-bottom:3px !important" :key="index">
<span>{{ i.nickName }}</span>
<span style="height: 20px; font-size: 12px; letter-spacing: 0; line-height: 20px; font-weight: 400;margin-left:2px" :class="[i.type == 1 ? 'pure-green-text' : '', i.type == 2 ? 'pure-yello-text' : '']">@{{ i.corpName }}</span>
</div>
<img class="imgEll" src="@/assets/tagsManage/ellipsis.png" alt="" slot="reference" />
</el-popover>
</span>
</div> </div>
<span v-if="idx == 1">
<el-popover placement="right-start" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<div v-for="(i, index) in scope.scope.nickNameList" style="padding-bottom:3px !important" :key="index">
<span>{{ i.nickName }}</span>
<span style="height: 20px; font-size: 12px; letter-spacing: 0; line-height: 20px; font-weight: 400;margin-left:2px" :class="[i.type == 1 ? 'pure-green-text' : '', i.type == 2 ? 'pure-yello-text' : '']">@{{ i.corpName }}</span>
</div>
<img class="imgEll" src="@/assets/tagsManage/ellipsis.png" alt="" slot="reference" />
</el-popover>
</span>
</div> </div>
</div>
<span slot="carVin" slot-scope="scope"> <span slot="carVin" slot-scope="scope">
<span>{{ myStandNo(scope.scope.carVin) }}</span> <span>{{ myStandNo(scope.scope.carVin) }}</span>
</span> </span>
...@@ -332,7 +332,7 @@ export default { ...@@ -332,7 +332,7 @@ export default {
} }
}, },
computed: { computed: {
items: function () { items: function() {
var _search = this.searchLabel var _search = this.searchLabel
const labelList = this.labelList.filter(item => item.labelName.indexOf(_search) > -1) const labelList = this.labelList.filter(item => item.labelName.indexOf(_search) > -1)
return labelList return labelList
...@@ -351,18 +351,17 @@ export default { ...@@ -351,18 +351,17 @@ export default {
pageSize: this.$refs.viewCustomers.page.pageSize, pageSize: this.$refs.viewCustomers.page.pageSize,
pageNum: this.$refs.viewCustomers.page.pageNum pageNum: this.$refs.viewCustomers.page.pageNum
} }
this.exportParams = {...JSON.parse(JSON.stringify(this.allListParams))} this.exportParams = { ...JSON.parse(JSON.stringify(this.allListParams)) }
this.loading2 = true; this.loading2 = true
getCustomersList(params).then(res => { getCustomersList(params).then(res => {
this.tableData = res.data this.tableData = res.data
this.tableTotal = res.count this.tableTotal = res.count
if (res.data.length == 0) { if (res.data.length == 0) {
this.$refs.viewCustomers.setTableHeightFun() this.$refs.viewCustomers.setTableHeightFun()
} }
setTimeout(()=>{ setTimeout(() => {
this.loading2 = false; this.loading2 = false
},300) }, 300)
}) })
}, },
//获取标签组 //获取标签组
...@@ -528,7 +527,7 @@ export default { ...@@ -528,7 +527,7 @@ export default {
} }
.imgEll { .imgEll {
margin-left: 6.5px; margin-left: 6.5px;
cursor: pointer; cursor: pointer;
// margin-bottom:3px; // margin-bottom:3px;
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!