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,10 +6,10 @@ ...@@ -6,10 +6,10 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http2,http3 } from '@/main' import { http2, http3 } from '@/main'
export function getTableList (params){ export function getTableList(params) {
params.method='entmicro.api.customer.base.page' params.method = 'entmicro.api.customer.base.page'
return http3({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
data: params, data: params,
sign: true sign: true
}) })
} }
export function syncCustomerBase(params){ export function syncCustomerBase(params) {
params.method='entmicro.api.synchro.syncCustomerBase' params.method = 'entmicro.api.synchro.syncCustomerBase'
return http3({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
...@@ -27,35 +27,35 @@ ...@@ -27,35 +27,35 @@
sign: true sign: true
}) })
} }
export function getTableDetail(params){ export function getTableDetail(params) {
params.method='entmicro.api.customer.base.detail' params.method = 'entmicro.api.customer.base.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
}) })
} }
export function getClientTableDetail(params){ export function getClientTableDetail(params) {
params.method='entmicro.api.customer.detail' 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
}) })
} }
/* /*
未授权时,打开进入页面即弹出提示。 触发条件:跟企业微信相关且该账户暂未绑定企业微信时提示 未授权时,打开进入页面即弹出提示。 触发条件:跟企业微信相关且该账户暂未绑定企业微信时提示
...@@ -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,8 +151,8 @@ export function leaveGroupExportApi(params){ ...@@ -151,8 +151,8 @@ 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',
......
...@@ -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,7 +55,6 @@ export function addSingleClientTag(params) { ...@@ -57,7 +55,6 @@ export function addSingleClientTag(params) {
data: params, data: params,
sign: true, sign: true,
returnAll: true returnAll: true
}) })
} }
export function getTableList(params) { export function getTableList(params) {
...@@ -94,7 +91,7 @@ export function getTableDetail(params) { ...@@ -94,7 +91,7 @@ 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) {
......
/**
* 新增参数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
...@@ -14,3 +14,4 @@ Vue.component('glsx-button', _button) ...@@ -14,3 +14,4 @@ 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')) 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,15 +11,16 @@ ...@@ -11,15 +11,16 @@
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) { install(vue, 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: {}
}, },
...@@ -44,69 +43,87 @@ const staticRoutes = Object.freeze([ ...@@ -44,69 +43,87 @@ const staticRoutes = Object.freeze([
// }, // },
{ {
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",
......
...@@ -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>
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
</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>
...@@ -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,7 +160,7 @@ export default { ...@@ -189,7 +160,7 @@ 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)
} }
} }
} }
......
...@@ -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>
......
...@@ -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>
...@@ -58,9 +58,9 @@ ...@@ -58,9 +58,9 @@
</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,34 +113,34 @@ export default { ...@@ -113,34 +113,34 @@ 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,
options: [ label: '跟进员工',
{ placeholder: '请输入跟进员工',
label: '全部', options: []
value: null
}, },
{ {
label: '正常', type: 'input',
value: 0 inputType: 'text',
prop: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
}, },
{ {
label: '删除好友', type: 'input',
value: -1 inputType: 'text',
} prop: 'nickName',
] label: '企微名称',
placeholder: '请输入企微名称'
}, },
{ {
type: 'select', type: 'select',
...@@ -164,7 +164,39 @@ export default { ...@@ -164,7 +164,39 @@ export default {
}, },
{ {
type: 'select', type: 'select',
prop: 'status',
label: '当前状态',
placeholder: '请选择当前状态',
options: [
{
label: '全部',
value: null
},
{
label: '正常',
value: 0
},
{
label: '删除好友',
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',
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
......
<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'
} }
] ]
}, },
......
...@@ -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: '标签组类型',
...@@ -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'
...@@ -379,10 +379,10 @@ export default { ...@@ -379,10 +379,10 @@ export default {
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) {
...@@ -400,7 +400,6 @@ export default { ...@@ -400,7 +400,6 @@ export default {
return e return e
} }
return this.$Utils.cutMaxCharStr(e) return this.$Utils.cutMaxCharStr(e)
}, },
isShowEditBtn(row) { isShowEditBtn(row) {
//集团模式下,只有集团能可以编辑企业,自店,其他只能编辑自店 //集团模式下,只有集团能可以编辑企业,自店,其他只能编辑自店
...@@ -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">
...@@ -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)
}) })
}, },
//获取标签组 //获取标签组
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!