Commit 0f0f3470 by 前端

Merge branch 'v1.2.1' into 'master'

V1.2.1

See merge request !2
2 parents 912eda4d 134d362a
Showing 51 changed files with 1586 additions and 464 deletions
......@@ -11,6 +11,7 @@
"dependencies": {
"axios": "^0.21.1",
"core-js": "^3.4.4",
"dayjs": "^1.10.7",
"echarts": "^5.2.0",
"element-ui": "^2.4.5",
"glsx-common": "^1.4.6",
......
......@@ -26,7 +26,7 @@
</div>
<img src="./assets/logo.png" alt="" srcset="" />
</div> -->
<keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd">
<keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd,guestGroupDetail,group,viewCustomers">
<router-view></router-view>
</keep-alive>
</div>
......
......@@ -6,29 +6,50 @@
* @param {*} params
* @returns
*/
import { http } from '@/main'
import { http3 } from '@/main'
// const url = 'http://192.168.3.193:8395/rop-scrm-entmicro/router'
//获取数据概览上方的数据 /rop-scrm-datahub
export function getDataOverview(params){
params.method='entmicro.api.Customer.customer.view.data'
return http({
export function getDataOverview(params) {
params.method = 'entmicro.api.Customer.customer.view.data'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//获取数据概览下方柱状图的数据
export function getDataOverviewBarMap(params){
params.method='entmicro.api.customer.view.chart'
return http({
}
//获取数据概览下方柱状图的数据
export function getDataOverviewBarMap(params) {
params.method = 'entmicro.api.customer.view.chart'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
}
//客户分群列表接口
export function getCustomerList(params) {
params.method = 'entmicro.api.customer.cluster.page'
return http3({
url:'/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//客户分群列表导出
export function customerClusterListExport(params) {
params.method = 'entmicro.api.customer.customerClusterListExport'
return http3({
url:'/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
......@@ -6,12 +6,12 @@
* @param {*} params
* @returns
*/
import { http } from '@/main'
import { http2,http3 } from '@/main'
export function getTableList (params){
params.method='entmicro.api.customer.base.page'
return http({
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
......@@ -20,7 +20,7 @@
}
export function syncCustomerBase(params){
params.method='entmicro.api.synchro.syncCustomerBase'
return http({
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
......@@ -29,7 +29,7 @@
}
export function getTableDetail(params){
params.method='entmicro.api.customer.base.detail'
return http({
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
......@@ -38,7 +38,7 @@
}
export function getClientTableDetail(params){
params.method='entmicro.api.customer.detail'
return http({
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
......@@ -49,7 +49,7 @@
// 客户群的客户列表获取分页数据接口
export function getDetailTableList(params){
params.method='entmicro.api.customer.base.cust.page'
return http({
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
......@@ -57,3 +57,106 @@
})
}
/*
未授权时,打开进入页面即弹出提示。 触发条件:跟企业微信相关且该账户暂未绑定企业微信时提示
*/
export function getStatus(params) {
params.method = 'scrm.api.work.wechat.access.status'
return http3({
url: '/rop-scrm-wechat/router',
method: 'POST',
data: params,
sign: true
})
}
/*
跟进员工
*/
// POST /router/entmicro.api.customer.base.staff.page/1.0.0
export function getDetailStaffTableList(params){
params.method='entmicro.api.customer.base.staff.page'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
/*
退群客户
*/
export function getDetailQuitTableList(params){
params.method='entmicro.api.customer.base.quit.cust.page'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
/*
潜在客户
*/
export function getDetailPotentialTableList(params){
params.method='entmicro.api.customer.base.potential.cust.page'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//客户群管理(群聊管理)导出
export function clientGroupExportApi(params){
params.method=`entmicro.api.customer.base.list.export`
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
// 全部客户导出
export function clientExportApi(params){
params.method=`entmicro.api.customer.base.cust.export`
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
//跟进员工导出
export function followEmployeeExportApi(params){
params.method=`entmicro.api.customer.base.staff.export`
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
//退群客户导出
export function leaveGroupExportApi(params){
params.method=`entmicro.api.customer.base.quit.export`
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
//潜在客户导出
export function potentialClientExportApi(params){
params.method=`entmicro.api.customer.base.potential.export`
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
\ No newline at end of file
......@@ -6,9 +6,9 @@
* @param {*} params
* @returns
*/
import { http } from '@/main'
//const commonUrl='&format=json&appKey=48e5e13229b82c1b4e6e8c96151f0637&v=1.0.*×tamp=1654487354&source=sub-client-custom&sign=sdf9787dfs87987sf9879sdf87sdf'
import { http, http3 } from '@/main'
// const url = 'http://192.168.3.181:9636/rop-scrm-datahub/router'
//const commonUrl='&format=json&appKey=48e5e13229b82c1b4e6e8c96151f0637&v=1.0.*×tamp=1654487354&source=sub-client-custom&sign=sdf9787dfs87987sf9879sdf87sdf'
//获取客户列表内容
// const GETCLIENTTABLELIST = params => {
// return http({
......@@ -23,82 +23,96 @@
// 获取客户详情单用户标签
// params.method='datahub.api.label.querylabeltree'
export function getSingleClientTag(params){
params.method='scrm.api.datahub.user.getuserlabel'
export function getSingleClientTag(params) {
params.method = 'scrm.api.datahub.user.getuserlabel'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
}
export function getAllTagTree (params){
params.method='scrm.api.datahub.label.querylabeltree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll:true
})
export function getAllTagTree(params) {
// params.method='scrm.api.datahub.label.querylabeltree'
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// /router/datahub.api.user.addUserLabel/1.0.0
// 用户添加标签
export function addSingleClientTag (params){
params.method='scrm.api.datahub.user.addUserLabel'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll:true
})
//编辑用户标签(包含标签新增列表和删除列表)
export function addSingleClientTag(params) {
params.method = 'scrm.api.datahub.user.editUserLabel'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export function getTableList (params){
params.method='entmicro.api.customer.page'
export function getTableList(params) {
params.method = 'entmicro.api.customer.page'
// params.sessionId="mini-e72437ba-845e-4da3-9966-0b25684d6373-rop"
// params.timestamp=new Date().getTime()
// +'?method=org.ore.api.customer.page'
return http({
// +'?method=org.ore.api.customer.page'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export function syncCustomer(params) {
params.method = 'entmicro.api.synchro.syncCustomer'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export function syncCustomer(params){
params.method='entmicro.api.synchro.syncCustomer'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export function getTableDetail(params){
params.method='entmicro.api.customer.detail'
export function getTableDetail(params) {
params.method = 'entmicro.api.customer.detail'
// params.sessionId="mini-e72437ba-845e-4da3-9966-0b25684d6373-rop"
return http({
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
}
/*获取来源字典的
*/
export function getDictionaryFun(params){
params.method='entmicro.api.common.dictdata.list'
return http({
/*获取来源字典的
*/
export function getDictionaryFun(params) {
params.method = 'entmicro.api.common.dictdata.list'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
// entmicro.api.customer.list.export
//客户信息管理导出
export function clientManageExportApi(params) {
params.method = `entmicro.api.customer.customerListExport`
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
}
\ No newline at end of file
......@@ -6,13 +6,15 @@
* @param {*} params
* @returns
*/
import { http } from '@/main'
import { http2, http3 } from '@/main'
const URL = '/rop-scrm-entmicro/router'
const PATH = 'entmicro.api.one.template.'
const WURL = '/rop-scrm-wechat/router'
const PATH2 = 'entmicro.api.group.'
const templateList = params => {
params.method = `${PATH}page`
return http({
return http3({
url: URL,
method: 'GET',
data: params,
......@@ -22,7 +24,7 @@ const templateList = params => {
const insert = params => {
params.method = `${PATH}insert`
return http({
return http3({
url: URL,
method: 'POST',
data: params,
......@@ -32,7 +34,7 @@ const insert = params => {
const update = params => {
params.method = `${PATH}update`
return http({
return http3({
url: URL,
method: 'POST',
data: params,
......@@ -42,7 +44,7 @@ const update = params => {
const detail = params => {
params.method = `${PATH}detail`
return http({
return http3({
url: URL,
method: 'GET',
data: params,
......@@ -52,7 +54,7 @@ const detail = params => {
const status = params => {
params.method = `${PATH}status`
return http({
return http3({
url: URL,
method: 'GET',
data: params,
......@@ -62,7 +64,7 @@ const status = params => {
const listDepartmentTree = params => {
params.method = 'entmicro.api.department.listDepartmentTree'
return http({
return http3({
url: URL,
method: 'GET',
data: params,
......@@ -72,7 +74,7 @@ const listDepartmentTree = params => {
const nameVaild = params => {
params.method = 'entmicro.api.one.template.name.valid'
return http({
return http3({
url: URL,
method: 'GET',
data: params,
......@@ -82,7 +84,7 @@ const nameVaild = params => {
const updateNameVaild = params => {
params.method = 'entmicro.api.one.template.name.update.valid'
return http({
return http3({
url: URL,
method: 'GET',
data: params,
......@@ -90,6 +92,45 @@ const updateNameVaild = params => {
})
}
const getStatus = params => {
params.method = 'scrm.api.work.wechat.access.status'
return http3({
url: WURL,
method: 'POST',
data: params,
sign: true
})
}
//一客一群详情页
const getListApi = params => {
params.method = `${PATH}page`
return http3({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const customerList = params => {
params.method = `${PATH2}template.customer.page`
return http3({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const getFollower = params => {
params.method = 'entmicro.api.staff.listFollowerStaffByPage'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
templateList,
......@@ -99,5 +140,9 @@ export default {
update,
listDepartmentTree,
nameVaild,
updateNameVaild
getStatus,
updateNameVaild,
getListApi,
customerList,
getFollower
}
......@@ -6,11 +6,11 @@
* @param {*} params
* @returns
*/
import { http } from '@/main'
import { http3 } from '@/main'
//计算是第几次接触该页面
export function getLoginCount (params){
params.method='entmicro.api.common.findLoginCount'
return http({
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
......
......@@ -6,65 +6,98 @@
* @param {*} params
* @returns
*/
import { http } from '@/main'
import { http, http3 } from '@/main'
// const url = 'http://192.168.3.181:9636/rop-scrm-datahub/router'
export function getTableList(params) {
// params.method='scrm.api.datahub.label.querylabeltree'
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
export function getTableList (params){
params.method='scrm.api.datahub.label.querylabeltree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
//计算表格上面的数量
export function getTableTagNum(params){
params.method='scrm.api.datahub.label.queryLabelCount'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
// /router/datahub.api.label.addlabel/1.0.0
export function newAddTag(params){
params.method='scrm.api.datahub.label.addlabel'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll:true
})
}
})
}
//计算表格上面的数量
export function getTableTagNum(params) {
// params.method='scrm.api.datahub.label.queryLabelCount'
params.method = 'scrm.api.datahub.labelgroup.queryLabelCount'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
export function newAddTag(params) {
// params.method='scrm.api.datahub.label.addlabel'
params.method = 'scrm.api.datahub.labelgroup.addLabel'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//修改标签
export function updateTag(params){
params.method='scrm.api.datahub.label.updatelabel'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll:true
export function updateTag(params) {
// params.method='scrm.api.datahub.label.updatelabel'
params.method = 'scrm.api.datahub.labelgroup.updateLabel'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
})
}
//获取单条数据labelList数组
export function queryLabelListByGroupId(params){
params.method='scrm.api.datahub.label.queryLabelListByGroupId'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll:true
})
}
export function queryLabelListByGroupId(params) {
// params.method='scrm.api.datahub.label.queryLabelListByGroupId'
params.method = 'scrm.api.datahub.labelgroup.queryLabelListByGroupId'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 查看客户
export function getCustomersList(params) {
params.method = 'entmicro.api.customer.getCustomerPageByTag'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//根据groupId查询标签列表
export function getLabelList(params) {
params.method = 'scrm.api.datahub.labelgroup.queryLabelDetailByGroupId'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
// 根据标签获取客户列表导出
export function exportLabelList(params) {
params.method = 'entmicro.api.customer.customerPageByTagExport'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
\ No newline at end of file
@import '@/styles/variables.scss';
.el-tag {
color: #666!important;
font-size: 14px!important;
......@@ -5,7 +6,7 @@ height: 26px;
line-height: 26px;
}
.el-tag.el-tag--info {
background: #fafbfe !important;
background: transparent !important;
border: 1px solid #e8e8ea !important;
border-radius: 4px;
color: #666;
......@@ -25,4 +26,54 @@ background: transparent !important;
border-radius: 4px;
background-color: rgba(144, 147, 153, 0.3);
}
.el-message--info {
height: 40px;
background: #e6e9ff;
border: 1px solid $btnBlue;
border-radius: 4px;
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
}
.el-message .el-icon-info {
color: $btnBlue;
font-size: 16px;
}
.white-hide{
box-sizing: border-box;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.color-6{
color:#666666;
}
.color-3{
color:#333333;
}
.color-71{
color: #717171;
}
.color-58{
color: #5850ff;
}
.flex-start{
align-items: flex-start;
display: flex;
}
.flex{
display:flex;
align-items: center;
flex-wrap: wrap;
}
.flex-between{
display:flex;
align-items: center;
justify-content: space-between;
}
.font-20{
font-size: 20px;
}
.font-14{
font-size: 14px;
}
\ No newline at end of file
import Vue from 'vue'
import { message } from '../plugins/element.js'
// import { Message, MessageBox, Loading } from 'element-ui';
// import moment from 'moment'
let loadingInstance = ''
export const Util = {
getExplorer: function() {
var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null
if (ua.match(/msie/) != null || ua.match(/trident/) != null) {
browserType = 'IE'
} else if (ua.match(/firefox/) != null) {
browserType = '火狐'
} else if (ua.match(/ubrowser/) != null) {
browserType = 'UC'
} else if (ua.match(/opera/) != null) {
browserType = '欧朋'
} else if (ua.match(/bidubrowser/) != null) {
browserType = '百度'
} else if (ua.match(/metasr/) != null) {
browserType = '搜狗'
} else if (ua.match(/tencenttraveler/) != null || ua.match(/qqbrowse/) != null) {
browserType = 'QQ'
} else if (ua.match(/maxthon/) != null) {
browserType = '遨游'
} else {
browserType = '谷歌'
}
return browserType
},
exportFn:function(url) {
let browserType = getExplorer()
if (browserType == 'QQ') {
window.open(url)
return
}
let iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = url
document.body.appendChild(iframe)
},
/**
* 校验手机号码格式
*/
......@@ -26,7 +62,7 @@ export const Util = {
*/
isSpecialLetter: function (str) {
let reg = new RegExp("[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]");
return reg.test(str);
return reg.test(str);//true/false
},
/**
......@@ -116,10 +152,57 @@ export const Util = {
}
return n
},
/**
* 处理输入框只能输入30个字符,一个汉字2个字符,字母数字1个字符,超过截取最大数量字符
*/
cutMaxCharStr:function(e){//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 > 30) {
message.error('字数已达上限')
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 >= 30) {
subLen = subLen1 + subLen2
console.log(subLen1, subLen2, subLen)
console.log(singleNum, singleNum, '单双数')
break
}
}
return str.substr(0, subLen)
}
return str
}
}
export const validationTel = Util.validationTel;
export const checkPhone = Util.checkPhone;
export const getExplorer=Util.getExplorer;
export const exportFn=Util.exportFn;
export const cutMaxCharStr=Util.cutMaxCharStr;
<template>
<div>
<el-dialog
:title="title"
:visible.sync="isVisible"
:before-close="handleClose"
:close-on-click-modal="false"
:width="width"
:show-close="isShowCloseBtn"
class="app-dialog"
>
<el-dialog :title="title" :visible.sync="isVisible" :before-close="handleClose" :close-on-click-modal="false" :width="width" :show-close="isShowCloseBtn" :destroy-on-close="isDestroyClose" class="app-dialog">
<!-- :modal-append-to-body="false"
:append-to-body="true"-->
<div class="container">
......@@ -18,12 +10,7 @@
<div slot="footer">
<slot name="btn-front"></slot>
<el-button size="small" @click="handleClose" v-if="isHasCancelBtn">取消</el-button>
<el-button
type="primary"
size="small"
@click="handleConfirm"
:loading="btnLoading"
>{{ btnOkLabel }}</el-button>
<el-button type="primary" size="small" @click="handleConfirm" :loading="btnLoading">{{ btnOkLabel }}</el-button>
<!-- isShowThirdBtn 产品说暂时不要这个按钮-->
<!-- <el-button v-if="false" @click="btnClick">创建标签</el-button> -->
......@@ -44,6 +31,10 @@ export default {
type: Boolean,
default: false
},
isDestroyClose: {
type: Boolean,
default: false
},
isShowThirdBtn: {
type: Boolean,
default: false
......@@ -64,7 +55,7 @@ export default {
type: Boolean,
default: false
},
isHasCancelBtn:{
isHasCancelBtn: {
type: Boolean,
default: true
}
......@@ -89,8 +80,8 @@ export default {
padding: 20px 20px 10px;
}
.el-dialog__footer {
padding-top:16px ;
padding-bottom: 16px;
padding-top: 16px;
padding-bottom: 16px;
background: #fff;
}
.el-dialog__body {
......
......@@ -4,8 +4,8 @@
<el-form-item v-for="(item, index) in ruleData" :key="index" :label="item.label" :prop="item.prop || ''" :class="item.class" v-show="!item.hidden">
<template slot-scope="scope">
<template v-if="item.type === 'input'">
<el-input v-if="item.clickFunc" :type="item.inputText || 'text'" :readonly="item.readonly || false" @click.native="item.clickFunc" :class="item.clickFunc ? 'pointer' : ''" :ref="item.ref" v-model="ruleForm[item.prop]" @input="update($event)"></el-input>
<el-input v-else :type="item.inputText || 'text'" :readonly="item.readonly || false" :disabled="item.disabled || false" v-model="ruleForm[item.prop]" :maxlength="item.maxlength" :minlength="item.minlength" :placeholder="item.placeholder || '请输入'" :show-password="item.showPassword || false" :clearable="item.clearable" :show-word-limit="item.showWordLimit || false"></el-input>
<el-input v-if="item.clickFunc" :type="item.inputText || 'text'" :readonly="item.readonly || false" :disabled="item.disabled || false" @click.native="item.clickFunc" :class="item.clickFunc ? 'pointer' : ''" :placeholder="item.placeholder || '请输入'" :ref="item.ref" v-model.trim="ruleForm[item.prop]" @keyup.native="ruleForm[item.prop]=update($event)"></el-input>
<el-input v-else :type="item.inputText || 'text'" :readonly="item.readonly || false" :disabled="item.disabled || false" v-model.trim="ruleForm[item.prop]" :maxlength="item.maxlength" :minlength="item.minlength" :placeholder="item.placeholder || '请输入'" :show-password="item.showPassword || false" :clearable="item.clearable" :show-word-limit="item.showWordLimit || false"></el-input>
</template>
<template v-else-if="item.type == 'select'">
<el-select v-if="item.visibleFunc" v-model="ruleForm[item.prop]" :placeholder="item.placeholder || '请选择'" :filterable="item.filterable || false" @change="selectChange" @visible-change="item.visibleFunc">
......@@ -89,7 +89,8 @@ export default {
this.$emit('radioChange', event, prop)
},
update(e) {
this.$forceUpdate()
// this.$forceUpdate()
return this.$Utils.cutMaxCharStr(e.target.value)
}
}
}
......
......@@ -20,6 +20,7 @@
<div class="firstRowBtn" v-if="!expande && isShowBtns && isNeedThreeBtns">
<el-button plain @click="resetTable" size="small">重置</el-button>
<el-button type="primary" @click="searchTable" size="small">查询</el-button>
<el-button type="primary" size="small" @click="handleExport">导出</el-button>
<!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)" -->
<!-- <el-button type="primary" @click="syncClick" :loading="ploading" size="small" >同步数据</el-button> -->
</div>
......@@ -46,17 +47,7 @@
<slot name="form-slot"></slot>
</template>
</el-form-item>
<!-- <el-form-item>
<template>
<slot name="formsearch-slot"></slot>
</template>
</el-form-item> -->
</div>
<!-- <div class="rightBottomBtn">
<el-button plain @click="resetTable" size="small">重置</el-button>
<el-button type="primary" @click="searchTable" size="small">查询</el-button>
<el-button type="primary" @click="syncClick" :loading="ploading" size="small" v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)">同步数据</el-button>
</div> -->
</el-form>
</div>
</template>
......@@ -92,6 +83,10 @@ export default {
type: Boolean,
default: false
},
isThreeRowShow:{
type: Boolean,
default: false
},
merchantModel: {
type: Number,
default: 1
......@@ -123,8 +118,9 @@ export default {
//调用默认时间(30天)
this.getPassMonthFormatDate()
}
this.$nextTick(()=>{
var sf = document.getElementById('searchForm')
// this.$nextTick(() => {
console.log(sf.clientWidth,'555')
if (sf.clientWidth < 1280 && this.isHasSyncBtn) {
console.log(sf.clientWidth, 'sf')
document.querySelector('.itemWidth').style.maxWidth = 700 + 'px'
......@@ -132,16 +128,26 @@ export default {
if (sf.clientWidth < 952 && this.isHasSyncBtn) {
this.isShowBtns = false
}
let lineHeight = 75 //75
let lineHeight = 75 //75
if (document.getElementById('searchForm').offsetHeight > lineHeight * 2) {
// console.log('第一次searchForm高度', document.getElementById('searchForm').offsetHeight)
console.log('第一次searchForm高度', document.getElementById('searchForm').offsetHeight)
this.expande = false
this.needShowExpande = true
} else {
this.needShowExpande = false
this.expande = true
}
if( sf.clientWidth< 840 && this.isThreeRowShow){
document.querySelector('.itemWidth').style.minHeight= document.querySelector('.itemWidth').offsetHeight + 50 + 'px'
// 客户群里面四个表做特殊处理,当为苹果笔记本电脑尺寸时,不是现实展开收起按钮
this.needShowExpande = false
this.expande = true
}
})
//有数据不算表格高度,没数据算高度
// setTimeout(() => {
// this.$emit('setTableHeightEvent')
......@@ -209,12 +215,15 @@ export default {
syncClick() {
this.$emit('syncClick')
},
handleExport(){
this.$emit('handleExport')
},
expandeClick() {
this.expande = !this.expande
setTimeout(() => {
this.$emit('setTableHeightEvent')
}, 200)
// setTimeout(() => {
// this.$emit('setTableHeightEvent')
// }, 200)
},
//时间选择器显示默认一月的时间
/* 获取过去时间,并传值给现在时间 */
......@@ -256,8 +265,9 @@ export default {
}
</script>
<style lang="scss">
@import '@/styles/variables.scss';
.search-form {
padding: 18px 25px 0 0;
padding: 18px 0 0 0;
position: relative;
overflow: hidden;
min-height: 50px;
......@@ -271,11 +281,11 @@ export default {
right: 52px;
z-index: 1;
.el-button + .el-button {
margin-left: 20px;
margin-left: 10px;
}
}
.itemWidth {
max-width: 1050px;
max-width: 1027px;
min-width: 660px;
}
.expande-button-wrap {
......@@ -284,7 +294,7 @@ export default {
right: 0;
z-index: 99;
.expande-button {
color: #5850ff;
color: $btnBlue;
cursor: pointer;
i {
height: 8px;
......@@ -293,7 +303,7 @@ export default {
height: 20px;
font-size: 14px;
font-weight: 400;
color: #5850ff;
color: $btnBlue;
line-height: 20px;
}
}
......@@ -314,6 +324,9 @@ export default {
.el-select {
width: 215px;
}
.el-select>.el-input{
width: 215px;
}
.el-form-item__content {
width: 100%;
}
......
<template>
<div>
<div class="initPanel" :style="{ width: panelWidth, minHeight: panelMinHeight }">
{{ panelContent }}
<img src="@/assets/tagsManage/Shape.png" alt="" />
<i class="el-icon-close" v-if="isShowCloseBtn" @click="closeInitPanel"></i>
</div>
</div>
</template>
<script>
export default {
props: {
panelWidth: {
type: String,
default: ''
},
panelMinHeight: {
type: String,
default: '20px'
},
panelContent: {
type: String,
default: '请传入面板内容'
},
isShowCloseBtn:{
type:Boolean,
default:false
}
},
data() {
return {}
},
methods: {
closeInitPanel() {
this.$emit('closePanel')
}
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
.initPanel {
position: relative;
margin-bottom: 20px;
box-sizing: border-box;
background: #e6e9ff;
border: 1px solid $btnBlue;
border-radius: 4px;
padding: 10px 38px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 20px;
img {
position: absolute;
left: 16px;
top: 13px;
}
i {
position: absolute;
top: 14px;
right: 18px;
width: 9px;
height: 9px;
cursor: pointer;
}
}
</style>
......@@ -19,7 +19,7 @@ export const fetchConfig = function (isEnv = true) {
}
// 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/config')
return new Http({request:{timeout:3000}}).get('https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config2')
}
export const config = {
install(vue, cfg) {
......
......@@ -29,6 +29,7 @@ Vue.config.productionTip = false
Vue.prototype.$apis = apis
Vue.use(glsxTable);
Vue.prototype.$message = message
Vue.prototype.size = 'small'
// Vue.prototype.btn_size = 'mini'
Vue.prototype.$Constants = Constants
Vue.prototype.$Utils = Util
......@@ -41,4 +42,6 @@ Object.keys(filters).forEach(key => {
start()
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
export const http2 = params => Vue.prototype.$http2(params)
export const http3 = params => Vue.prototype.$http3(params)
export const http_common = params => Vue.prototype.$http_common(params)
......@@ -18,11 +18,18 @@ const staticRoutes = Object.freeze([
meta: {}
},
{
name: 'clientDataOverview',
path: "/clientDataOverview/group/:id",
component: resolve => require([`@/views/clientDataOverview/group.vue`], resolve),
meta: {}
},
{
name: 'clientManage',
path: "/clientManage/index",
component: resolve => require([`@/views/clientManage/index.vue`], resolve),
meta: {}
},
{
name: 'clientDetail',
path: "/clientManage/clientDetail",
......@@ -54,6 +61,12 @@ const staticRoutes = Object.freeze([
meta: {}
},
{
name: 'viewCustomers',
path: "/tagsManage/viewCustomers/:info/:type",
component: resolve => require([`@/views/tagsManage/viewCustomers.vue`], resolve),
meta: {},
},
{
name: 'expand',
path: "/expand/index",
component: resolve => require([`@/views/expand/index.vue`], resolve),
......@@ -88,47 +101,53 @@ const staticRoutes = Object.freeze([
path: "/guestGroup/add/:id",
component: resolve => require([`@/views/guestGroup/add.vue`], resolve),
meta: {}
},
{
name: 'guestDetail',
path: "/guestGroup/detail/:id",
component: resolve => require([`@/views/guestGroup/detail.vue`], resolve),
meta: {}
}
])
export default staticRoutes
// {
// path: "/clientMassTexting",
// name: "clientMassTexting",
// meta: { title: "客户群发" },
// hidden: true,
// keepAlive: false,
// component: () => import("../views/clientMassTexting/index.vue"),
// },
// {
// path: "/clientMassTexting/addMassTexting",
// name: "addMassTexting",
// meta: { title: "新增群发" },
// hidden: true,
// keepAlive: false,
// component: () => import("../views/clientMassTexting/addMassTexting.vue"),
// },
// {
// path: "/clientMassTexting/detailMassTexting",
// name: "detailMassTexting",
// meta: { title: "群发详情" },
// hidden: true,
// keepAlive: false,
// component: () => import("../views/clientMassTexting/detailMassTexting.vue"),
// },
// {
// path: "/clientMassTexting",
// name: "clientMassTexting",
// meta: { title: "客户群发" },
// hidden: true,
// keepAlive: false,
// component: () => import("../views/clientMassTexting/index.vue"),
// },
// {
// path: "/clientMassTexting/addMassTexting",
// name: "addMassTexting",
// meta: { title: "新增群发" },
// hidden: true,
// keepAlive: false,
// component: () => import("../views/clientMassTexting/addMassTexting.vue"),
// },
// {
// path: "/clientMassTexting/detailMassTexting",
// name: "detailMassTexting",
// meta: { title: "群发详情" },
// hidden: true,
// keepAlive: false,
// component: () => import("../views/clientMassTexting/detailMassTexting.vue"),
// },
// {
// path: "/clientPartGroup",
// name: "clientPartGroup",
// meta: { title: "客户分群" },
// hidden: true,
// keepAlive: false,
// component: () => import("../views/clientPartGroup/index.vue"),
// },
// {
// path: "/crowdCircleImage",
// name: "crowdCircleImage",
// meta: { title: "人群圈像" },
// hidden: true,
// keepAlive: false,
// component: () => import("../views/clientPartGroup/crowdCircleImage.vue"),
// },
// {
// path: "/clientPartGroup",
// name: "clientPartGroup",
// meta: { title: "客户分群" },
// hidden: true,
// keepAlive: false,
// component: () => import("../views/clientPartGroup/index.vue"),
// },
// {
// path: "/crowdCircleImage",
// name: "crowdCircleImage",
// meta: { title: "人群圈像" },
// hidden: true,
// keepAlive: false,
// component: () => import("../views/clientPartGroup/crowdCircleImage.vue"),
// },
\ No newline at end of file
......@@ -12,13 +12,18 @@ import 'glsx-components/dist/glsx-components.css'
let routes = []
let router = null
let instance = null
// http:调的是新版标签的接口,http2:调的是客户相关接口;http3:企微授权那边的接口 目前导出接口都测试的:http3
export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) {
const { response, request, sign, secret, sign_common, request_common } = await fetchConfig(globalState.configSwitch)//globalState.configSwitch
const { response, request,request2,request3, request4,sign, secret, sign_common, request_common } = await fetchConfig(globalState.configSwitch)//globalState.configSwitch
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http3 = new common.Http({ response, request: request3, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$http4 = new common.Http({ response, request: request4, sign, secret, alert: message.error, headers: { token: 'scrm-base-e2d4f962-4ca3-4044-83e7-01ba314d8e3d-rop' } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: "mini-14eda653-4284-4165-bb85-325bb82a516d-rop" } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
//Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
......
......@@ -10,7 +10,10 @@
.green-text {
color: #00A854;
}
.gray-text{
color:#666666;
margin-left:6px;
}
.red-text {
color: rgb(255, 0, 0);
}
......@@ -22,7 +25,7 @@
}
}
.pure-blue-text{
color:$btnBlue;
color:$btnBlue!important;
}
.green {
background-color: #00A854;
......
@import './variables.scss';
@import './common.scss';
@import './resetelement.scss';
body,html{
width:100%;
height:100%;
margin:0;
padding:0;
body,
html {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
background-color: $bgColor;
}
#app {
height: 100%;
overflow: auto;
}
// html, body, #app {
// width: 100%;
// height: 100%;
// }
}
// #app {
// height: 100%;
// overflow: auto;
// }
// html, body, #app {
// width: 100%;
// height: 100%;
// }
// 默认去掉所有p元素的上下边距
p{
margin-top: 0;
margin-bottom: 0;
}
button{
p {
margin-top: 0;
margin-bottom: 0;
}
button {
border: none;
&:hover{
cursor: pointer;
&:hover {
cursor: pointer;
}
}
// 子系统不设外边距
.scrm-sub-client-container{
padding: 0 20px 20px 40px;
}
.el-table .cell{
}
// 子系统不设外边距
.scrm-sub-client-container {
padding: 0 20px 20px 40px;
}
.el-table .cell {
// line-height: 20px!important;
}
\ No newline at end of file
}
\ No newline at end of file
......@@ -21,59 +21,8 @@
line-height: 28px;
}
// .el-dialog__footer {
// .el-button+.el-button {
// margin-left: 20px;
// }
// .el-button {
// font-size: 14px;
// font-weight: 400;
// padding: 9px 21px;
// background: $btnBlue;
// border-radius: 4px;
// }
// .el-button:first-child {
// background: #ffffff;
// border-radius: 4px;
// border: 1px solid #999999;
// box-sizing: border-box;
// font-weight: 600;
// color: #999999;
// &:hover{
// border-color: $btnBlue;
// color: $btnBlue;
// }
// }
// .el-button:nth-child(2){
// // height: 32px;
// background: $btnBlue;
// border: 1px solid $btnBlue;
// color: #fff;
// border:1px solid $btnBlue;
// &:hover{
// background-color: $lightBtnBlue;
// border:1px solid $lightBtnBlue;
// }
// }
// .el-button:nth-child(3){
// background: #ffffff;
// border: 1px solid #999999;
// box-sizing: border-box;
// font-weight: 600;
// color: #999999;
// &:hover{
// border-color: $btnBlue;
// color: $btnBlue;
// }
// }
// }
/deep/ .el-input__inner:focus{border-color:$borderBlue!important;}
/deep/ .el-input__inner:focus{border-color:$btnBlue!important;}
/deep/.el-range-editor.is-active,
.el-range-editor.is-active:hover {
border-color: $borderBlue;
border-color: $btnBlue;
}
// /deep/.el-table__fixed-right{
// height: 100% !important;
// }
\ No newline at end of file
$bgColor:#F4F5FA;
$btnBlue:#5850ff;
$borderBlue:#5850ff;
$lightBtnBlue:#9994FF;
import { Message } from 'element-ui'
let util = {}
util.cloneText = function (message) {
let input = document.createElement('input')
input.value = message
document.body.appendChild(input)
input.select()
input.setSelectionRange(0, input.value.length), document.execCommand('Copy')
document.body.removeChild(input)
Message.success('复制成功')
}
util.getBeforeDate = function (sign = '-') {
let day = new Date();
let month = day.getMonth() + 1;
let date = day.getDate();
if (month < 10) month = '0' + month;
if (date < 10) date = '0' + date;
var s = day.getFullYear() + sign + month + sign + date;
return s;
}
util.getBeforeMonth = function (days) {
let month = new Date().getMonth() + 1;
let year = new Date().getFullYear();
let arr = new Array();
for (let i = 0; i < days; i++) {
if (month <= 0) {
year = year - 1;
month = month + 12;
}
if (month < 10) month = '0' + month;
arr[i] = year + '年' + month + '月'
month--
}
return arr;
}
/**
* 格式化时间
* @param {Array} time
*/
util.formatTime = function (time) {
return {
startTime: time ? time[0] + ' ' + '00:00:00' : '',
endTime: time ? time[1] + ' ' + '23:59:59' : ''
}
}
util.tringToDate = function (dateStr, separator) {
if (!separator) {
separator = "-";
}
var dateArr = dateStr.split(separator);
var year = parseInt(dateArr[0]);
var month;
//处理月份为04这样的情况
if (dateArr[1].indexOf("0") == 0) {
month = parseInt(dateArr[1].substring(1));
} else {
month = parseInt(dateArr[1]);
}
var day = parseInt(dateArr[2]);
var date = new Date(year, month - 1, day);
return date;
}
util.getDay = function (num, str = '-') {
var today = new Date();
var nowTime = today.getTime();
var ms = 24 * 3600 * 1000 * num;
today.setTime(parseInt(nowTime + ms));
var oYear = today.getFullYear();
var oMoth = (today.getMonth() + 1).toString();
if (oMoth.length <= 1) oMoth = '0' + oMoth;
var oDay = today.getDate().toString();
if (oDay.length <= 1) oDay = '0' + oDay;
return oYear + str + oMoth + str + oDay;
}
util.openUrl = function (url) {
const link = document.createElement('a')
link.href = url
link.target = '_blank'
link.rel = 'opener'
link.click()
}
util.downloadIamge = function (imgsrc, name = new Date().getTime()) {
//下载图片地址和图片名
var image = new Image();
// 解决跨域 Canvas 污染问题
image.setAttribute("crossOrigin", "anonymous");
image.onload = function () {
var canvas = document.createElement("canvas");
canvas.width = image.width;
canvas.height = image.height;
var context = canvas.getContext("2d");
context.drawImage(image, 0, 0, image.width, image.height);
var url = canvas.toDataURL("image/png"); //得到图片的base64编码数据
var a = document.createElement("a"); // 生成一个a元素
var event = new MouseEvent("click"); // 创建一个单击事件
a.download = name || "photo"; // 设置图片名称
a.href = url; // 将生成的URL设置为a.href属性
a.dispatchEvent(event); // 触发a的单击事件
};
image.src = imgsrc;
}
export default util
\ No newline at end of file
<template>
<div class="scrm-sub-client-container">
<div class="head-container">
<div class="head-container-title color-3 font-20"> {{describeData[id-1].name}}</div>
<div class="head-container-content color-6 font-14">{{ describeData[id-1].info }}</div>
<!-- <div class="reminder font-14 color-3">企业标签 | 自动更新</div> -->
<div class="back color-58 font-14" @click="goBack">返回人群管理</div>
</div>
<div class="main-container">
<div class="main-container-head flex-between">
<div class="main-container-head-title color-3 font-20">
全部客户
<span class="main-container-head-number font-14">{{ totalCount }}个</span>
</div>
<el-button type="primary" class="export flex" @click="handleExport()">导出</el-button>
</div>
<GLTable ref="groupRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :noDataImg="url" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<span slot="customerName" class="flex-center" slot-scope="scope">
<el-tooltip effect="dark" :content="scope.scope.customerName" placement="top">
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span>
</el-tooltip>
<span style="font-size: 12px" :class="[scope.scope.type == 1 ? 'pure-blue-text' : '', scope.scope.type == 2 ? 'pure-yello-text' : '']">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span>
</span>
<!-- 企微名称 -->
<div slot="nickNameList" slot-scope="scope" class="expandImg">
<div v-for="(list, idx) in scope.scope.nickNameList" :key="idx">
<div v-if="idx == 0">
<span>{{ list.nickName }}</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 style="padding-bottom:3px !important" v-for="(i, index) in scope.scope.nickNameList" :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>
</GLTable>
</div>
</div>
</template>
<script>
import { getCustomerList, customerClusterListExport } from '@/api/modules/clientDataOverview'
import url from '@/assets/empty.png'
export default {
name: 'group',
data() {
return {
getListApi: getCustomerList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableSearchForm: {},
id: this.$route.params.id ? this.$route.params.id : '',
totalCount: '',
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName',
minWidth: '120'
},
{
label: '企微名称',
prop: 'nickNameList',
addHtml: 'nickNameList',
minWidth: 200
},
{
label: '联系电话',
prop: 'customerPhone',
minWidth: '110'
},
{
label: '车牌号',
prop: 'carNumber'
},
{
label: '车架号(后6位)',
prop: 'carVin',
minWidth: '110'
},
{
label: '车系',
prop: 'audi',
line: 2
},
{
label: '跟进员工',
prop: 'followStaff',
// addHtml: 'followStaff',
minWidth: 140
},
{
label: '是否加企微', //1. 加入,0.未加入
prop: 'isJoinName',
width: 100
},
{
label: '添加时间',
prop: 'addTime',
width: 150
}
]
},
describeData: [
{
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() {
let { id } = this
this.init(id)
},
computed: {
describe() {
let id = this.id - 1
return this.describeData[id]
}
},
methods: {
init(id) {
this.tableSearchForm = {
crowdId: id
}
// this.getTotalCount()
},
//导出
handleExport() {
var params = {
crowdId: this.id,
pageSize: 10,
pageNum: 1
}
customerClusterListExport(params).then(res => {
this.$Utils.exportFn(res)
})
},
setTableFinishFun() {
this.totalCount = this.$refs.groupRef.total
this.$refs.groupRef.data.length ? (this.$refs.groupRef.tableHeightValues = '') : this.$refs.groupRef.setTableHeightFun()
},
goBack() {
this.$router.replace({ path: '/clientDataOverview/index' })
}
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
.expandImg {
display: flex;
justify-content: center;
.smallFontSize {
margin-left: 2px;
height: 20px;
font-size: 12px;
letter-spacing: 0;
line-height: 20px;
font-weight: 400;
}
.imgEll {
margin-left: 6.5px;
cursor: pointer;
// margin-bottom:3px;
}
}
.pure-green-text {
color: #61cc43;
}
.pure-yello-text {
color: #fb8f28;
}
.scrm-sub-client-container {
.head-container {
position: relative;
margin-bottom: 10px;
width: 100%;
height: 112px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
padding: 20px;
box-sizing: border-box;
&-title {
font-weight: 500;
line-height: 20px;
letter-spacing: 1px;
margin-bottom: 10px;
}
&-content {
font-weight: 400;
line-height: 20px;
width: calc(100% - 156px);
}
.back {
font-weight: 400;
line-height: 22px;
padding: 5px 16px;
border-radius: 4px;
border: 1px solid $btnBlue;
position: absolute;
right: 20px;
top: 20px;
color: $btnBlue;
cursor: pointer;
}
}
.main-container {
width: 100%;
height: 100%;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
padding: 20px;
box-sizing: border-box;
.main-container-head {
margin-bottom: 20px;
&-title {
font-weight: 500;
line-height: 20px;
letter-spacing: 1px;
}
&-number {
color: $btnBlue;
margin-left: 6px;
font-weight: 400;
line-height: 20px;
}
.export {
width: 74px;
height: 32px;
box-sizing: border-box;
// font-weight: 400;
padding: 6px 23px;
// background: #ffffff;
// border-radius: 4px;
// border: 1px solid rgba(105, 105, 105, 0.3);
}
}
}
.pure-blue-text {
color: #61cc43;
}
.pure-yello-text {
color: #fb8f28;
}
}
</style>
\ No newline at end of file
<template>
<div class="sub-container">
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button>
</span>
</search-form>
<!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 -->
......@@ -13,7 +14,8 @@
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span>
</el-tooltip>
<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 ? '@企微' : scope.scope.type == null ? '' :''}}</span>
<!-- <span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' :''}}</span> -->
</span>
<span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
......@@ -29,7 +31,7 @@
</template>
<script>
import { getDetailTableList } from '@/api/modules/clientGroupManage'
import { getDetailTableList,clientExportApi } from '@/api/modules/clientGroupManage'
export default {
props: {
url: {
......@@ -98,16 +100,19 @@ export default {
tableColumns: [
{
label: '本群昵称',
prop: 'groupNickName'
prop: 'groupNickName',
minWidth:120
},
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName'
addHtml: 'customerName',
minWidth: 150
},
{
label: '手机号码',
prop: 'customerPhone'
prop: 'customerPhone',
minWidth:120
},
{
label: '性别',
......@@ -117,16 +122,18 @@ export default {
{
label: '入群方式',
prop: 'joinScene',
addHtml: 'joinScene'
addHtml: 'joinScene',
minWidth:120
},
{
label: '邀请人',
prop: 'invitorName'
prop: 'invitorName',
minWidth:120
},
{
label: '入群时间',
prop: 'joinTime',
width: 95
width: 140
}
],
tableOption: {
......@@ -149,16 +156,31 @@ export default {
}
},
methods: {
getParams(){
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
}
delete params.daterange
return params
},
beforeSearchFn() {
// return new Promise((resolve, reject) => {
// this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
// if (this.searchFormTable.daterange) {
// this.searchFormTable.beginTime = this.searchForm.daterange[0]
// this.searchFormTable.endTime = this.searchForm.daterange[1]
// delete this.searchFormTable.daterange
// } else {
// if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
// }
// resolve()
// })
return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange
} else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
}
this.searchFormTable = this.getParams()
resolve()
})
},
......@@ -169,13 +191,20 @@ export default {
//content是第一页的数据
console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total
this.$emit('getTotal',this.clientTableDataNum)
// this.$emit('getTotal',this.clientTableDataNum)
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun()
// }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
},
//导出
handleExport(){
var params = this.getParams()
clientExportApi(params).then(res => {
this.$Utils.exportFn(res)
})
},
//搜索表格
searchTable() {
this.$refs.clientGroupDetail.refreshTable()
......
<template>
<div class="sub-container">
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button>
</span>
</search-form>
<GLTable ref="clientGroupDetail" @setTableFinishFun="setTableFinishFun" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
......@@ -22,7 +23,7 @@
</template>
<script>
// import { getDetailTableList } from '@/api/modules/clientGroupManage'
import { getDetailStaffTableList,followEmployeeExportApi } from '@/api/modules/clientGroupManage'
export default {
props: {
url: {
......@@ -92,16 +93,19 @@ export default {
tableColumns: [
{
label: '本群昵称',
prop: 'groupNickName'
prop: 'groupNickName',
minWidth:120
},
{
label: '员工名称',
prop: 'customerName',
prop: 'staffName',
minWidth: 150
},
{
label: '手机号码',
prop: 'customerPhone'
prop: 'customerPhone',
minWidth:120
},
{
label: '性别',
......@@ -111,21 +115,23 @@ export default {
{
label: '入群方式',
prop: 'joinScene',
addHtml: 'joinScene'
addHtml: 'joinScene',
minWidth:120
},
{
label: '邀请人',
prop: 'invitorName'
prop: 'invitorName',
minWidth:120
},
{
label: '入群时间',
prop: 'joinTime',
width: 95
width: 140
}
]
},
getListApi: '',
getListApi: getDetailStaffTableList,
clientTableDataNum: 0
}
},
......@@ -135,16 +141,31 @@ export default {
}
},
methods: {
getParams(){
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
}
delete params.daterange
return params
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange
} else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
}
// return new Promise((resolve, reject) => {
// this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
// if (this.searchFormTable.daterange) {
// this.searchFormTable.beginTime = this.searchForm.daterange[0]
// this.searchFormTable.endTime = this.searchForm.daterange[1]
// delete this.searchFormTable.daterange
// } else {
// if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
// }
// resolve()
// })
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve()
})
},
......@@ -155,13 +176,20 @@ export default {
//content是第一页的数据
console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total
this.$emit('getTotal',this.clientTableDataNum)
// this.$emit('getTotal',this.clientTableDataNum)
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun()
// }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
},
//导出
handleExport(){
var params = this.getParams()
followEmployeeExportApi(params).then(res => {
this.$Utils.exportFn(res)
})
},
//搜索表格
searchTable() {
this.$refs.clientGroupDetail.refreshTable()
......
<template>
<div class="sub-container">
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button>
</span>
</search-form>
<GLTable ref="clientGroupDetail" @setTableFinishFun="setTableFinishFun" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
......@@ -12,7 +13,7 @@
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span>
</el-tooltip>
<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 ? '@企微' : scope.scope.type == null ? '' :''}} </span>
</span>
<span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
......@@ -28,7 +29,7 @@
</template>
<script>
// import { getDetailTableList } from '@/api/modules/clientGroupManage'
import { getDetailQuitTableList,leaveGroupExportApi } from '@/api/modules/clientGroupManage'
export default {
props: {
url: {
......@@ -96,16 +97,19 @@ export default {
tableColumns: [
{
label: '本群昵称',
prop: 'groupNickName'
prop: 'groupNickName',
minWidth:120
},
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName'
addHtml: 'customerName',
minWidth: 150
},
{
label: '手机号码',
prop: 'customerPhone'
prop: 'customerPhone',
minWidth:120
},
{
label: '性别',
......@@ -115,16 +119,18 @@ export default {
{
label: '入群方式',
prop: 'joinScene',
addHtml: 'joinScene'
addHtml: 'joinScene',
minWidth:120
},
{
label: '邀请人',
prop: 'invitorName'
prop: 'invitorName',
minWidth:120
},
{
label: '入群时间',
prop: 'joinTime',
width: 95
width: 140
}
],
tableOption: {
......@@ -137,7 +143,7 @@ export default {
]
}
},
getListApi: '',
getListApi: getDetailQuitTableList,
clientTableDataNum: 0
}
},
......@@ -147,16 +153,31 @@ export default {
}
},
methods: {
getParams(){
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
}
delete params.daterange
return params
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange
} else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
}
// return new Promise((resolve, reject) => {
// this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
// if (this.searchFormTable.daterange) {
// this.searchFormTable.beginTime = this.searchForm.daterange[0]
// this.searchFormTable.endTime = this.searchForm.daterange[1]
// delete this.searchFormTable.daterange
// } else {
// if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
// }
// resolve()
// })
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve()
})
},
......@@ -173,6 +194,13 @@ export default {
// }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
},
//导出
handleExport(){
var params = this.getParams()
leaveGroupExportApi(params).then(res => {
this.$Utils.exportFn(res)
})
},
//搜索表格
searchTable() {
this.$refs.clientGroupDetail.refreshTable()
......
<template>
<div class="sub-container">
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button>
</span>
</search-form>
<!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 -->
......@@ -13,7 +14,7 @@
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span>
</el-tooltip>
<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 ? '@企微' : scope.scope.type == null ? '' :''}} </span>
</span>
<span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
......@@ -29,7 +30,7 @@
</template>
<script>
import { getDetailTableList } from '@/api/modules/clientGroupManage'
import { getDetailPotentialTableList,potentialClientExportApi } from '@/api/modules/clientGroupManage'
export default {
props: {
url: {
......@@ -52,43 +53,36 @@ export default {
}
}
},
{
type: 'select',
prop: 'customerSex',
label: '性别',
placeholder: '请选择性别',
options: [
{
label: '全部',
value: null
},
{
label: '男',
value: 1
},
{
label: '女',
value: 2
},
{
label: '未知',
value: 0
}
]
},
// {
// type: 'select',
// prop: 'customerSex',
// label: '性别',
// placeholder: '请选择性别',
// options: [
// {
// label: '全部',
// value: null
// },
// {
// label: '男',
// value: 1
// },
// {
// label: '女',
// value: 2
// },
// {
// label: '未知',
// value: 0
// }
// ]
// },
{
type: 'input',
inputType: 'text',
prop: 'groupNickName',
label: '本群昵称',
placeholder: '请输入本群昵称'
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
}
],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
......@@ -100,20 +94,15 @@ export default {
label: '本群昵称',
prop: 'groupNickName'
},
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName'
},
{
label: '手机号码',
prop: 'customerPhone'
},
{
label: '性别',
prop: 'customerSex',
addHtml: 'customerSex'
},
// {
// label: '手机号码',
// prop: 'customerPhone'
// },
// {
// label: '性别',
// prop: 'customerSex',
// addHtml: 'customerSex'
// },
{
label: '入群方式',
prop: 'joinScene',
......@@ -126,20 +115,20 @@ export default {
{
label: '入群时间',
prop: 'joinTime',
width: 95
width: 140
}
],
tableOption: {
width: 80,
btnList: [
{
name: '详情',
pType: 'detail'
}
]
}
// tableOption: {
// width: 80,
// btnList: [
// {
// name: '详情',
// pType: 'detail'
// }
// ]
// }
},
getListApi: getDetailTableList,
getListApi: getDetailPotentialTableList,
clientTableDataNum: 0
}
},
......@@ -149,16 +138,31 @@ export default {
}
},
methods: {
getParams(){
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
}
delete params.daterange
return params
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange
} else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
}
// return new Promise((resolve, reject) => {
// this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
// if (this.searchFormTable.daterange) {
// this.searchFormTable.beginTime = this.searchForm.daterange[0]
// this.searchFormTable.endTime = this.searchForm.daterange[1]
// delete this.searchFormTable.daterange
// } else {
// if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
// }
// resolve()
// })
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve()
})
},
......@@ -175,6 +179,13 @@ export default {
// }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
},
//导出
handleExport(){
var params = this.getParams()
potentialClientExportApi(params).then(res => {
this.$Utils.exportFn(res)
})
},
//搜索表格
searchTable() {
this.$refs.clientGroupDetail.refreshTable()
......
......@@ -161,6 +161,7 @@ export default {
}
</script>
<style scoped lang="scss">
@import '@/styles/variables.scss';
.select-emp-panel {
display: flex;
.emp-tree-panel {
......@@ -219,7 +220,7 @@ export default {
margin-right: 10px;
font-size: 15px;
/deep/ .el-tree-node:focus > .el-tree-node__content {
color: #5850ff;
color: $btnBlue;
background: #f2f5fa;
}
}
......
<template>
<div class="square-main" v-loading="loading">
<el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="员工">
<el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item size="small">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<div class="table-box">
<GLTable
:key="key"
v-if="dialogVisible"
ref="followTable"
:layout="layout"
:tableData="tableData"
:hasNum="false"
:tableTotal="tableTotal"
:pageConf="pageConf"
:tableParams="tableParams"
@refreshTable="handleSearch"
@selectionTable="selectionTable"
@row-click="rowClick"
></GLTable>
<div class="form-tips">必须配置至少1个跟进专员</div>
</div>
<span slot="footer" class="dialog-footer">
<a class="dialog-jump" @click="jumpUrl">新增专员</a>
<el-button size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { utils } from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'SelectFollow',
data() {
return {
loading: false,
dialogVisible: false,
tableSearchForm: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'data',
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: 'id',
checkSelectKey: 'id',
checkSelectVal: [],
// 多选ref的名称
mutiSelectName: 'salelist',
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
}
]
},
layout: 'total',
tableData: [],
tableTotal: 0,
selectItem: [],
selectEmp: [],
checkSelect: [],
key: new Date()
}
},
methods: {
jumpUrl() {
util.openUrl(location.origin + '/home/followUp/index')
},
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.followTable.page.pageSize,
pageNum: this.$refs.followTable.page.pageNum
}
this.$apis.groupGuest.getFollower(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.count > 10) {
this.layout = 'total, pager'
}
this.tableData.forEach(item => {
this.selectEmp.forEach((itm, index) => {
if (itm.staffId == item.id) {
this.$refs.followTable.$refs.salelistMutiTable.toggleRowSelection(item)
this.selectEmp.splice(index, 1)
}
})
if (this.checkSelect) this.tableParams.checkSelectVal = this.checkSelect
})
})
},
init(item, checkMember) {
this.checkSelect = checkMember
this.tableSearchForm = {}
this.selectEmp = JSON.parse(JSON.stringify(item))
this.dialogVisible = true
this.$nextTick(() => {
this.$refs.followTable.page.pageNum = 1
this.getFollower()
})
},
handleSearch() {
this.getFollower()
},
selectionTable(val) {
this.selectItem = val
},
handleClose() {
this.handleCancel()
},
rowClick(row) {
if (this.checkSelect.find(i => i == row.id)) return
this.$refs.followTable.$refs.salelistMutiTable.toggleRowSelection(row)
},
handleCancel: utils.debounce(function() {
this.dialogVisible = false
this.$refs.followTable.$refs.salelistMutiTable.clearSelection()
}, 300),
handleSelect: utils.debounce(function() {
this.loading = true
let selectEmp = this.selectEmp.map(item => {
return {
id: item.staffId,
staffName: item.staffName
}
})
const selectItem = this.selectItem.concat(selectEmp)
if (selectItem.length == 0) {
this.$message.error('请选择跟进专员')
return
}
this.loading = false
this.dialogVisible = false
this.$emit('selectTable', this.selectItem.concat(selectEmp))
this.$refs.followTable.$refs.salelistMutiTable.clearSelection()
}, 300)
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
.dialog-jump {
color: $btnBlue;
float: left;
line-height: 24px;
text-decoration: underline;
cursor: pointer;
}
.square-main {
/deep/ {
.el-table {
height: 40vh;
overflow-y: auto;
}
.el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
}
}
.form-tips {
position: absolute;
bottom: 0;
right: 0;
font-size: 12px;
color: #999;
line-height: 32px;
}
.table-box {
position: relative;
}
</style>
\ No newline at end of file
......@@ -102,16 +102,13 @@ export default {
this.innerTags.forEach(item => {
userIds.push(item.userId)
})
// this.$emit('handSelectdEmp', this.empType[this.typeIndex].id, userIds)
}
// onCancel() {
// this.$emit('closeDrawer')
// }
},
mounted() {}
}
</script>
<style scoped lang="scss">
@import '@/styles/variables.scss';
.drawer-sale-panel {
padding: 0px 20px;
.sale-reload {
......@@ -148,8 +145,8 @@ export default {
font-size: 14px;
color: #7d7d7d;
&.checked {
border: 1px solid #5850ff;
color: #5850ff;
border: 1px solid $btnBlue;
color: $btnBlue;
}
i {
position: absolute;
......
......@@ -2,7 +2,7 @@
<div class="scrm-sub-client-container">
<div class="btn-header">
<!-- <el-button class="addBtn" @click="btnClick('create')">新建群组</el-button> -->
<GLButton class="addBtn" @click="btnClick('create')" fn="新建群组">新建群组</GLButton>
<GLButton class="addBtn" @click="btnClick('create')" fn="新建群组">新建群组</GLButton>
<span class="toptips">
<span>配置群聊不会自动拉群,邀请客户入群后群聊才会正式生效,一个客户默认拉一个群聊。</span>
</span>
......@@ -13,8 +13,9 @@
class="searchTop border-shadow"
:formModel="searchForm"
:formList="searchFormData"
labelWidth="70px"
>
<span class="inline-b" style="float: right;" slot="form-slot">
<span class="inline-b" style="float: right" slot="form-slot">
<el-button type="primary" @click="searchTable">查询</el-button>
</span>
</search-form>
......@@ -47,7 +48,7 @@
trigger="hover"
content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
>
<span slot="reference">...({{scope.scope.userList.length}})</span>
<span slot="reference">...({{ scope.scope.userList.length }})</span>
<div class="entmicro-hover">
<el-tag
type="info"
......@@ -70,13 +71,19 @@
>{{ scope.scope.status == '1' ? '启用' : '停用' }}</span>
</span>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<!-- <el-button type="text" @click="btnClick('edit', scope.scope)">修改</el-button> -->
<GLButton type="text" @click="btnClick('edit', scope.scope)" fn="修改群组">修改</GLButton>
<GLButton type="text" @click="btnClick('status', scope.scope)" fn="启用禁用">{{ scope.scope.status == 1 ? '停用' : '启用' }}</GLButton>
<!-- <el-button type="text" @click="btnClick('edit', scope.scope)">修改</el-button>
<el-button type="text" @click="btnClick('detail', scope.scope)">查看详情</el-button>-->
<GLButton type="text" @click="btnClick('edit', scope.scope)" fn="修改群组">修改</GLButton>
<GLButton
type="text"
@click="btnClick('status', scope.scope)"
fn="启用禁用"
>{{ scope.scope.status == 1 ? '停用' : '启用' }}</GLButton>
<GLButton type="text" @click="btnClick('detail', scope.scope)" fn="客户群详情">查看详情</GLButton>
<!-- <el-button
type="text"
@click="btnClick('status', scope.scope)"
>{{ scope.scope.status == 1 ? '停用' : '启用' }}</el-button> -->
>{{ scope.scope.status == 1 ? '停用' : '启用' }}</el-button>-->
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -97,8 +104,8 @@ export default {
type: 'input',
inputType: 'text',
prop: 'groupName',
label: '组名',
placeholder: '请输入组名搜索',
label: '群聊名称',
placeholder: '请输入群聊名称搜索',
clearable: true
}
],
......@@ -112,8 +119,8 @@ export default {
},
tableColumns: [
{
label: '组名',
prop: 'orgName',
label: '群聊名称',
prop: 'groupName',
width: 200
},
{
......@@ -238,8 +245,35 @@ export default {
// if (val.path == '/guestGroup/index') this.searchTable()
// }
// },
mounted() {},
mounted() {
this.wxTips()
},
methods: {
wxTips() {
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
menu.forEach(item => {
if (!item.children) {
return
}
item.children.forEach(itm => {
if (itm.path == '/enterpriseWechat/index') {
this.$apis.groupGuest.getStatus({}).then(res => {
if (res.status != 'SUCCESS') {
const h = this.$createElement
this.$message({
showClose: true,
duration: 0,
message: h('p', null, [h('span', null, '此功能需完成【企业微信授权】后方可使用! '), h('span', { on: { click: this.jumpWx }, style: { marginRight: '150px', cursor: 'pointer', color: '#5850ff' } }, ['企业微信授权 ', h('i', { class: 'el-icon-d-arrow-right' }, '')])])
})
}
})
}
})
})
},
jumpWx() {
this.$history.push('/settings/enterpriseWechat/index')
},
//搜索表格
searchTable() {
this.$refs.gueastGroup.refreshTable()
......@@ -252,6 +286,9 @@ export default {
case 'edit':
this.$router.push('/guestGroup/add/' + rowData.id)
break
case 'detail':
this.$router.push('/guestGroup/detail/' + rowData.id)
break
case 'status':
this.$confirm(`是否确认${rowData.status == 1 ? '停用' : '启用'}?`, '提示', {
confirmButtonText: '确定',
......@@ -369,7 +406,6 @@ export default {
margin-right: 10px;
margin-bottom: 10px;
cursor: pointer;
background-color: #fff !important;
}
/deep/ {
.search-form {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!