Commit 28125d45 by 前端

Merge branch 'xuyl_dev_v2.7.0' into 'master'

Xuyl dev v2.7.0

See merge request !142
2 parents 0dddd9c4 8049b8c0
Showing 63 changed files with 5069 additions and 2312 deletions
......@@ -15,10 +15,11 @@
"echarts": "^5.2.0",
"element-ui": "^2.4.5",
"glsx-common": "^1.4.6",
"glsx-components": "^1.4.2",
"glsx-components": "^1.4.7",
"glsx-table": "^1.1.0",
"jquery": "^3.6.0",
"sha1": "^1.1.1",
"swiper": "^4.0.0",
"vue": "^2.6.10",
"vue-animate-number": "^0.4.2",
"vue-router": "^3.1.3",
......
......@@ -26,7 +26,7 @@
</div>
<img src="./assets/logo.png" alt="" srcset="" />
</div> -->
<keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd,guestGroupDetail,group,viewCustomers,crowdDetail,crowdAdd,crowdManage,leadBasicInfo,leadAllocation,leadManage">
<keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd,guestGroupDetail,group,viewCustomers,crowdDetail,crowdAdd,crowdManage,leadBasicInfo,leadAllocation,leadManage,marketingPeople,grouping">
<router-view></router-view>
</keep-alive>
</div>
......@@ -58,8 +58,6 @@ export default {
line-height: 36px;
}
#app {
background: #f4f5fa;
padding: 0px 20px 20px 20px;
position: absolute;
box-sizing: border-box;
width: 100%;
......
......@@ -6,62 +6,137 @@
* @param {*} params
* @returns
*/
import { http3 } from '@/main'
import {
http3,
http
} 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'
params.method = 'entmicro.api.Customer.customer.view.data'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
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 http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
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
})
params.method = 'entmicro.api.customer.cluster.page'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取人群管理客户列表数据接口
export function getcrowdManageList(params) {
params.method = 'entmicro.api.customer.crowd.page'
return http3({
url:'/rop-scrm-entmicro/router',
// url:'http://192.168.3.193:8395/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'entmicro.api.customer.crowd.page'
return http3({
url: '/rop-scrm-entmicro/router',
// url:'http://192.168.3.193:8395/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
})
params.method = 'entmicro.api.customer.customerClusterListExport'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//获取客户分群展示
export function customerClusterListShow(params) {
params.method = 'scrm.api.datahub.crowdgroup.queryCrowdGroupList'
return http3({
// http://scrm.dev.glsx.com.cn
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
// 通过分群Id查询人群列表详情请求
export function marketingPeopleListShow(params) {
params.method = 'scrm.api.sop.crowd.listWithSop'
return http3({
// http://192.168.3.226:9636
url: '/rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// 通过门店/分群名称查询分群id
export function searchCrowdIdByCrowdname(params) {
params.method = 'scrm.api.datahub.crowd.queryCrowdIdByCrowdName'
return http3({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
// 删除sop事件
const deleteSopEventApi = params => {
params.method = 'scrm.api.sop.sopInfo.delete'
return http({
url: '/rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 结束sop事件
const endSopEventApi = params => {
params.method = 'scrm.api.sop.sopInfo.updateEndStatus'
return http({
url: '/rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export function getSopInfoListApi(params) {
params.method = 'scrm.api.sop.crowd.sopList'
return http({
url: '/rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
export default { endSopEventApi, deleteSopEventApi }
\ No newline at end of file
......@@ -7,9 +7,7 @@
* @returns
*/
import { http, http3 } from '@/main'
// http 对应的域名http://ismv.branch.glsx.com.cn
// 查询推荐人群和自定义人群列表
const getCrowdList = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
......@@ -22,7 +20,6 @@ const getCrowdList = params => {
returnAll: true
})
}
//通过人群Id查询人群详情
const getCrowdDetails = params => {
params.method = 'scrm.api.datahub.user.queryCrowdDetailsById'
......@@ -45,7 +42,6 @@ const addCrowd = params => {
returnAll: true
})
}
//根据标签组合查询人群客户数
const getCrowdCount = params => {
params.method = 'scrm.api.datahub.user.queryCrowdCountByTagCombine'
......@@ -68,7 +64,6 @@ const getSearchBox = params => {
returnAll: true
})
}
//标签组树查询
const getLabelTreeList = params => {
params.method = 'scrm.api.datahub.labelgroup.queryLabelGroupTree'
......@@ -80,12 +75,82 @@ const getLabelTreeList = params => {
returnAll: true
})
}
//查询分群列表树
const queryCrowdGroupTree = params => {
params.method = 'scrm.api.datahub.crowdgroup.queryCrowdGroupTree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//创建分群
const addCrowdGroup = params => {
params.method = 'scrm.api.datahub.crowdgroup.addCrowdGroup'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//编辑分群
const editCrowdGroup = params => {
params.method = 'scrm.api.datahub.crowdgroup.editCrowdGroup'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//删除分群
const deleteCrowdGroup = params => {
params.method = 'scrm.api.datahub.crowdgroup.deleteCrowdGroup'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//删除分群
const queryCrowdGroupDetailsByCrowdGroupId = params => {
params.method = 'scrm.api.datahub.crowdgroup.queryCrowdGroupDetailsByCrowdGroupId'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//活动配置列表
const activityPage = params => {
params.method = 'marketing.api.activity.config.page'
return http3({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getCrowdList,
getCrowdDetails,
addCrowd,
getCrowdCount,
getSearchBox,
getLabelTreeList
getLabelTreeList,
queryCrowdGroupTree,
addCrowdGroup,
editCrowdGroup,
deleteCrowdGroup,
queryCrowdGroupDetailsByCrowdGroupId,
activityPage
}
@import '@/styles/variables.scss';
.glsx-table .emptyBg .noDataImg {
margin-top: 0px !important;
}
.el-tag {
color: #666 !important;
font-size: 14px !important;
......@@ -114,6 +118,10 @@
margin-top: 10px;
}
.wid50 {
width: 50%;
}
.circleStatusRed {
width: 6px;
height: 6px;
......@@ -162,4 +170,26 @@
display: inline-block;
vertical-align: middle;
margin-right: 8px;
}
.normalTitle {
font-size: 16px;
padding-left: 20px;
font-weight: 600;
display: block;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #E5E5E5;
}
.questionImg {
margin-left: 4px;
width: 16px;
height: 16px;
vertical-align: middle;
padding-right: 8px;
}
.headPortrait {
vertical-align: middle;
}
\ No newline at end of file
export const Constants = {
CLIENT_STATUS: {
'0': '正常, green-text',
'1': '删除好友, red-text'
},
//性别选项
GENDER_OPTION: [
{
label: '全部',
value: null
},
{
label: '男',
value: 1
},
{
label: '女',
value: 2
},
{
label: '未知',
value: 0
}
],
SOURCE_OPTION: [
{
label: '全部',
value: 0
},
{
label: '直接导入',
value: 1
},
{
label: '扫描二维码',
value: 'first'
},
{
label: '搜索手机号',
value: 2
},
{
label: '名片分享',
value: 3
},
{
label: '群聊',
value: 4
},
{
label: '手机通讯录',
value: 5
},
{
label: '微信联系人',
value: 6
},
{
label: '来自微信的添加好友申请',
value: 7
},
{
label: '第三方应用的客户人员',
value: 8
},
{
label: '搜索邮箱',
value: 9
},
{
label: '内部成员共享',
value: 10
},
{
label: '管理员/负责人分配',
value: 11
},
{
label: '未知来源',
value: 12
}
],
//标签类型
LABEL_OPTION: [
{
label: '企业标签',
value: '企业标签'
},
{
label: '自店标签',
value: '自店标签'
},
{
label: '系统标签',
value: '系统标签'
}
],
// 文件大小提示语
FILESIZEMSG: '单个文件大小不能超过10M',
CLIENT_STATUS: {
'0': '正常, green-text',
'1': '删除好友, red-text'
},
//性别选项
GENDER_OPTION: [{
label: '全部',
value: null
},
{
label: '男',
value: 1
},
{
label: '女',
value: 2
},
{
label: '未知',
value: 0
}
],
SOURCE_OPTION: [{
label: '全部',
value: 0
},
{
label: '直接导入',
value: 1
},
{
label: '扫描二维码',
value: 'first'
},
{
label: '搜索手机号',
value: 2
},
{
label: '名片分享',
value: 3
},
{
label: '群聊',
value: 4
},
{
label: '手机通讯录',
value: 5
},
{
label: '微信联系人',
value: 6
},
{
label: '来自微信的添加好友申请',
value: 7
},
{
label: '第三方应用的客户人员',
value: 8
},
{
label: '搜索邮箱',
value: 9
},
{
label: '内部成员共享',
value: 10
},
{
label: '管理员/负责人分配',
value: 11
},
{
label: '未知来源',
value: 12
}
],
//标签类型
LABEL_OPTION: [{
label: '企业标签',
value: '企业标签'
},
{
label: '自店标签',
value: '自店标签'
},
{
label: '系统标签',
value: '系统标签'
}
],
// 文件格式提示
FILETYPEMSG: '文件格式只支持jpg/jpeg/gif/png',
// 文件大小提示语
FILESIZEMSG: '单个文件大小不能超过10M',
// 文件上传个数限制
FILEUPLOADLIMIT: '最多只能上传5张图片',
// 文件格式提示
FILETYPEMSG: '文件格式只支持jpg/jpeg/gif/png',
// 删除文件失败
// 文件上传个数限制
FILEUPLOADLIMIT: '最多只能上传5张图片',
// 新增成功
ADDSUCCESSMSG: '新增成功',
// 删除文件失败
// 编辑成功
EDITSUCCESSMSG: '编辑成功',
// 新增成功
ADDSUCCESSMSG: '新增成功',
// 删除成功
DELETESUCCESSMSG: '删除成功',
// 编辑成功
EDITSUCCESSMSG: '编辑成功',
// 操作成功
OPERATESUCCESSMSG: '操作成功',
// 删除成功
DELETESUCCESSMSG: '删除成功',
// 操作失败
OPERATEFAILMSG: '操作失败',
// 操作成功
OPERATESUCCESSMSG: '操作成功',
// 错误提示
ERRORMSG: '出错了,请联系管理员',
// 操作失败
OPERATEFAILMSG: '操作失败',
// 请选择门店
CHOSSESTOREMSG: '请选择门店',
// 错误提示
ERRORMSG: '出错了,请联系管理员',
// 缺少参数
LACKPARAMSMSG: '缺少参数',
// 请选择门店
CHOSSESTOREMSG: '请选择门店',
// 付费方式 0用户续费,1后台续费
PAYWAYSTATUS: {
'0': '用户续费',
'1': '后台续费',
null: '--'
},
// 缺少参数
LACKPARAMSMSG: '缺少参数',
// 续费时长
PERIODSTATUS: {
'0': '六个月',
'1': '一年',
'2': '两年',
'3': '三年',
null: '--'
},
// 设备状态
DEVICESTATUS: {
0: '未激活',
1: '已激活',
2: '已过期'
},
DESCRIBEDATA: [
{
name: '潜在意向客户',
info: '无购车且无其他交易行为的所有客户'
},
{
name: '潜在意向客户已加微',
info: '在潜在意向客户中,已加企微的客户'
},
{
name: '潜在意向客户未加微',
info: '在潜在意向客户中,未加企微的客户'
},
{
name: '基盘客户',
info: '有购车或其他交易行为的所有客户'
// 付费方式 0用户续费,1后台续费
PAYWAYSTATUS: {
'0': '用户续费',
'1': '后台续费',
null: '--'
},
{
name: '基盘客户已加微',
info: '在基盘客户中,已加企微的客户'
},
{
name: '基盘客户未加微',
info: '在基盘客户中,未加企微的客户'
},
{
name: '新车客户',
info: '购车时间3个月的客户'
},
{
name: '车险待续保客户',
info: '近一个月内车险即将到期的客户'
},
{
name: '新车待首保客户',
info: '购车时间5~7个月内,且无保养记录的客户'
},
{
name: '沉默客户',
info: '超过180天未到店的客户'
// 续费时长
PERIODSTATUS: {
'0': '六个月',
'1': '一年',
'2': '两年',
'3': '三年',
null: '--'
},
{
name: '已加企微,待匹配客户',
info: '已加企微,且未匹配到潜在意向和基盘客户的客户'
}
]
}
// 设备状态
DEVICESTATUS: {
0: '未激活',
1: '已激活',
2: '已过期'
},
DESCRIBEDATA: [{
name: '潜在意向客户',
info: '无购车且无其他交易行为的所有客户',
id: 4
},
{
name: '潜在意向已加企微客户',
info: '在潜在意向客户中,已加企微的客户',
id: 5
},
{
name: '潜在意向未加企微客户',
info: '在潜在意向客户中,未加企微的客户',
id: 6
},
{
name: '基盘客户',
info: '有购车或其他交易行为的所有客户',
id: 1
},
{
name: '基盘已加企微客户',
info: '在基盘客户中,已加企微的客户',
id: 2
},
{
name: '基盘未加企微客户',
info: '在基盘客户中,未加企微的客户',
id: 3
},
// {
// name: '新车客户',
// info: '购车时间3个月的客户',
// id: 7
// },
// {
// name: '车险待续保客户',
// info: '近一个月内车险即将到期的客户',
// id: 8
// },
// {
// name: '新车待首保客户',
// info: '购车时间5~7个月内,且无保养记录的客户',
// id: 9
// },
// {
// name: '沉默客户',
// info: '超过180天未到店的客户',
// id: 10
// },
{
name: '已加企微,待匹配客户',
info: '已加企微,且未匹配到潜在意向或基盘客户的客户',
id: 7
},
{
name: '已加企微,待匹配客户(已绑定手机号)',
info: '已加企微,且未匹配到潜在意向或基盘客户的客户(已绑定手机号)',
id: 8
},
{
name: '未加企微,未匹配客户',
info: '未添加企微或添加企微后删除好友,且未匹配到意向和基盘客户的客户',
id: 9
}
]
}
\ No newline at end of file
import Vue from 'vue'
import { message } from '../plugins/element.js'
import { getStaffList } from '@/api/modules/clientManage'
// 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)
},
/**
* 校验手机号码格式
*/
checkPhone: function(mobile) {
let myreg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return myreg.test(mobile)
},
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)
},
/**
* 校验手机号码格式
*/
checkPhone: function (mobile) {
let myreg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/;
return myreg.test(mobile);
},
/**
* 校验固定电话
*/
validationTel: function (tel) {
let reg = /^0[\d]{2,3}-[\d]{7,8}$/;
return reg.test(tel);
},
/**
* 是否特殊字符
*/
isSpecialLetter: function (str) {
let reg = new RegExp("[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]");
return reg.test(str);//true/false
},
/**
* 获取当前时间
*/
// getCurrentDate: function () {
// let time = new Date();
// let y = time.getFullYear();
// let m = time.getMonth() + 1;
// let d = time.getDate();
// return {
// date: y + '/' + m + '/' + d
// }
// },
/**
* 获取浏览器参数
*/
getUrlParams: function (name) {
let vars = [],
hash;
let hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for (let i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars[name];
},
/**
* 根据当前时间,计算往后30天的日期
*/
getAfterDate: function (day) {//计算往后day天
let date1 = new Date();
let date2 = new Date(date1);
let time = 30;
if (day) {
time = day;
}
date2.setDate(date1.getDate() + time);
let _date = date2.getFullYear() + '-' + (date2.getMonth() + 1) + '-' + date2.getDate();
return {
date: _date,
year: date2.getFullYear(),
month: date2.getMonth() + 1,
day: date2.getDate()
};
},
/**
* 日期格式转换
*/
// dateFormate: function (str, type) {
// let txt = 'YYYY-MM-DD HH:mm:ss'
// if (!str) {
// return false;
// }
// if (type) {
// txt = type
// }
// let n = new Date(str);
// const m = moment(n).format(txt)
// return m
// },
/**
* 字段截取
*/
cutStr: function (str, num) {
if (!str) {
return ''
}
/**
* 校验固定电话
*/
validationTel: function(tel) {
let reg = /^0[\d]{2,3}-[\d]{7,8}$/
return reg.test(tel)
},
let m = 10
let n = str
if (num) {
m = num
}
if (str.length > m) {
n = str.slice(0, m) + '...'
}
/**
* 是否特殊字符
*/
isSpecialLetter: function(str) {
let reg = new RegExp("[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]")
return reg.test(str) //true/false
},
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++
* 获取当前时间
*/
// getCurrentDate: function () {
// let time = new Date();
// let y = time.getFullYear();
// let m = time.getMonth() + 1;
// let d = time.getDate();
// return {
// date: y + '/' + m + '/' + d
// }
// },
/**
* 获取浏览器参数
*/
getUrlParams: function(name) {
let vars = [],
hash
let hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&')
for (let i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=')
vars.push(hash[0])
vars[hash[0]] = hash[1]
}
if (singleNum + doubleNum >= 30) {
subLen = subLen1 + subLen2
console.log(subLen1, subLen2, subLen)
console.log(singleNum, singleNum, '单双数')
break
return vars[name]
},
/**
* 根据当前时间,计算往后30天的日期
*/
getAfterDate: function(day) {
//计算往后day天
let date1 = new Date()
let date2 = new Date(date1)
let time = 30
if (day) {
time = day
}
}
return str.substr(0, subLen)
}
return str
}
date2.setDate(date1.getDate() + time)
}
let _date = date2.getFullYear() + '-' + (date2.getMonth() + 1) + '-' + date2.getDate()
return {
date: _date,
year: date2.getFullYear(),
month: date2.getMonth() + 1,
day: date2.getDate()
}
},
/**
* 日期格式转换
*/
// dateFormate: function (str, type) {
// let txt = 'YYYY-MM-DD HH:mm:ss'
// if (!str) {
// return false;
// }
// if (type) {
// txt = type
// }
// let n = new Date(str);
// const m = moment(n).format(txt)
// return m
// },
/**
* 字段截取
*/
cutStr: function(str, num) {
if (!str) {
return ''
}
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;
let m = 10
let n = str
if (num) {
m = num
}
if (str.length > m) {
n = str.slice(0, m) + '...'
}
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
break
}
}
return str.substr(0, subLen)
}
return str
},
getStaffListApi: async function(val, searchFormLlist, searchName) {
const searchForm = JSON.parse(searchFormLlist)
const params = {
staffName: val ? val.trim() : ''
}
let id, staff
await getStaffList(params).then(res => {
if (res.length == 0) {
return ''
}
id = searchForm.findIndex(item => {
return item.name == searchName
})
staff = res.map(item => {
return {
label: item.staffName,
value: item.staffName
}
})
staff.unshift({
label: '全部',
value: ''
})
})
return { id, staff }
}
}
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
export const getStaffListApi = Util.getStaffListApi
\ No newline at end of file
<template>
<div class="swiper-container" id="swiper">
<div class="swiper-wrapper">
<slot></slot>
</div>
<div class="swiper-pagination"></div>
</div>
</template>
<script>
import Swiper from 'swiper'
import 'swiper/dist/css/swiper.min.css'
export default {
data() {
return {}
},
mounted() {
let previewSwiper = new Swiper('.swiper-container', {
grabCursor: true,
// spaceBetween: 20,
mousewheel: true,
// slidesPerView: 'auto',
observer: true, //修改swiper自己或子元素时,自动初始化
observeParents: true, //修改swiper的父元素时,自动初始化swiper
breakpoints: {
//当宽度小于等于1919
1440: {
slidesPerView: 4,
spaceBetween: 20
},
2800: {
slidesPerView: 5,
spaceBetween: 20
}
},
pagination: {
el: '.swiper-pagination',
type: 'progressbar'
}
})
this.$nextTick(() => {
setTimeout(function() {
previewSwiper.slideTo(0, 0, false)
}, 700)
})
}
}
</script>
<style lang="scss" scoped>
.swiper-container-horizontal > .swiper-pagination-progressbar {
width: 60px;
height: 5px;
bottom: 0px;
top: auto;
right: 0;
margin: auto;
border-radius: 5px;
background: #dddee0;
/deep/.swiper-pagination-progressbar-fill {
background: #5850ff;
border-radius: 3px;
}
}
#swiper {
padding: 0 20px;
.swiper-wrapper {
margin-bottom: 20px;
.swiper-slide {
}
}
}
</style>
......@@ -15,9 +15,9 @@ export default {
type: String,
default: ''
},
isCloseShowNumTag:{
type:Boolean,
default:false
isCloseShowNumTag: {
type: Boolean,
default: false
},
totalData: {
type: Array,
......@@ -44,7 +44,7 @@ export default {
this.customerRatio = this.totalData.map(item => item.customerRatio * 100)
this.entmicroCount = this.totalData.map(item => item.newEntmicroCount)
this.entmicroRatio = this.totalData.map(item => item.entmicroRatio * 100)
this.entmicroRatio = this.totalData.map(item => item.entmicroRatio * 100)
this.initChart()
}
......@@ -59,7 +59,7 @@ export default {
this.customerRatio = this.totalData.map(item => item.customerRatio * 100)
this.entmicroCount = this.totalData.map(item => item.newEntmicroCount)
this.entmicroRatio = this.totalData.map(item => item.entmicroRatio * 100)
this.entmicroRatio = this.totalData.map(item => item.entmicroRatio * 100)
this.initChart()
}
......@@ -80,12 +80,29 @@ export default {
}
},
formatter: function(datas) {
var res = datas[0].name + '<br/>'
var res = datas[0].name + ' | 新增' + '<br/>'
let circleColor
for (var i = 0, length = datas.length; i < length; i++) {
if (datas[i].seriesName == '新增客户' || datas[i].seriesName == '新增企微客户') {
res += datas[i].seriesName + ':' + datas[i].data + '人' + '<br/>'
} else {
res += datas[i].seriesName + ':' + datas[i].data + '%' + '<br/>'
// if (datas[i].seriesName == '新增客户' || datas[i].seriesName == '新增企微客户') {
// res += datas[i].seriesName + ':' + datas[i].data + '人' + '<br/>'
// } else {
// res += datas[i].seriesName + ':' + datas[i].data + '%' + '<br/>'
// }
if (datas[i].seriesName == '全部客户') {
circleColor = '#928DFF'
res += `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${circleColor};"></span>` + datas[i].seriesName + ':' + datas[i].data + '人' + '<br/>'
}
if (datas[i].seriesName == '全部客户环比') {
circleColor = '#5850FF'
res += `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${circleColor};"></span>` + datas[i].seriesName + ':' + datas[i].data + '%' + '<br/>'
}
if (datas[i].seriesName == '企微客户') {
circleColor = '#FEBE6B'
res += `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${circleColor};"></span>` + datas[i].seriesName + ':' + datas[i].data + '人' + '<br/>'
}
if (datas[i].seriesName == '企微客户环比') {
circleColor = '#FE9C1C'
res += `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${circleColor};"></span>` + datas[i].seriesName + ':' + datas[i].data + '%' + '<br/>'
}
}
return res
......@@ -116,7 +133,8 @@ export default {
// },
itemGap: 20, //图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。
// data: ['全部客户', '全部客户环比', '企微客户', '企微客户环比'], //图例的数据数组。
data: ['新增客户', '新增客户环比', '新增企微客户', '新增企微客户环比'], //图例的数据数组。
// data: ['新增客户', '新增客户环比', '新增企微客户', '新增企微客户环比'], //图例的数据数组。
data: ['全部客户', '全部客户环比', '企微客户', '企微客户环比'], //图例的数据数组。
inactiveColor: '#ccc' //图例关闭时的颜色。
},
grid: {
......@@ -210,7 +228,7 @@ export default {
],
series: [
{
name: '新增客户',
name: '全部客户',
type: 'bar',
data: this.customerCount, //[33600, 18000, 17500, 20000, 17000, 480, 1000, 800, 520, 650, 920, 600],
label: {
......@@ -220,11 +238,11 @@ export default {
position: 'top'
},
itemStyle: {
color: '#5850ff'
color: '#928DFF'
}
},
{
name: '新增客户环比',
name: '全部客户环比',
type: 'line',
yAxisIndex: 1,
data: this.customerRatio, //[2.0, 2.2, -3.3, 4.5, 6.3, -10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2],
......@@ -233,11 +251,11 @@ export default {
}
},
{
name: '新增企微客户',
name: '企微客户',
type: 'bar',
data: this.entmicroCount, //[22000, 10000, 10000, 13000, 11500, 4000, 7000, 6500, 4500, 5500, 7000, 6000],
itemStyle: {
color: '#FE9C1C'
color: '#FEBE6B'
},
label: {
show: this.isCloseShowNumTag ? false : true,
......@@ -246,7 +264,7 @@ export default {
}
},
{
name: '新增企微客户环比',
name: '企微客户环比',
type: 'line',
yAxisIndex: 1,
data: this.entmicroRatio, //[2.6, 2.2, 3.0, 3.8, 6.8, 10.9, 18.3, 23.0, 23.9, 16.0, 10.0, 8.2],
......
......@@ -34,7 +34,7 @@ export default {
},
mounted() {
this.$nextTick(() => {
console.log(this.topDataObj, '饼图')
this.pieData[0].value = this.topDataObj.entmicroNotAddCustomerCount
this.pieData[1].value = this.topDataObj.entmicroAddCustomerCount
this.initChart()
......@@ -63,7 +63,7 @@ export default {
trigger: 'item', //模板变量有 {a}、{b}、{c}、{d},分别表示系列名,数据名,数据值,百分比。{d}数据会根据value值计算百分比
formatter: '{b} : {c}人 ({d}%)'
},
color: ['#FE9C1C ', '#716AFF'],
color: ['#5850FF', '#FFB21F'],
// legend: {
// orient: "vertical",
// bottom: "bottom",
......@@ -72,8 +72,9 @@ export default {
{
name: '客户总数',
type: 'pie',
radius: '118px',
center: ['50%', '65%'],
// radius: '118px',
center: ['50%', '36%'],
radius: ['32%', '48%'],
stillShowZeroSum: false,
data: this.pieData,
// data: [
......@@ -98,13 +99,20 @@ export default {
// },
label: {
position: 'inner',
formatter: '{d}%',
show: true,
color: '#fff'
// position: 'inner',
// formatter: '{d}%',
// show: true,
// color: '#fff'
// formatter: "{b}:\n{c}人({d}%)",
formatter: '{b}\n{d}%',
// fontWeight: "bold",
// color:'red'
color: '#666666',
textStyle: {
fontWeight: 'normal',
fontSize: 14,
lineHeight: 21
}
// color: ["#1296db", "#d42378"],
},
labelLine: { show: true }
......
<template>
<div class="contain">
<!-- :style="{ width: width, height: height }" -->
<div class="echart" ref="myChart" :style="{ width: width, height: height }"></div>
</div>
</template>
<script>
export default {
props: {
width: {
type: String,
// default: () => {
// return "";
// },
default: ''
},
height: {
type: String,
default: ''
},
topDataObj: {
type: Object,
default: () => {}
}
},
data() {
return {
pieData: [
{ value: 0, name: '未加企微' },
{ value: 0, name: '已加企微' }
]
}
},
mounted() {
this.$nextTick(() => {
this.pieData[0].value = this.topDataObj.entmicroNotAddCustomerCount
this.pieData[1].value = this.topDataObj.entmicroAddCustomerCount
this.initChart()
})
},
methods: {
initChart() {
// 基于准备好的dom,初始化echarts实例
let myChart = this.$echarts.init(this.$refs.myChart)
// 绘制图表
myChart.setOption({
/* title: {
text: '客户总数',
subtext: '已加和未加企微的所有潜客和已购买客户',
left: '20',
top: '20',
textStyle: {
},
subtextStyle: {
fontSize: '12px',
fontWeight: '400',
color: '#808080'
}
},*/
tooltip: {
trigger: 'item', //模板变量有 {a}、{b}、{c}、{d},分别表示系列名,数据名,数据值,百分比。{d}数据会根据value值计算百分比
formatter: '{b} : {c}人 ({d}%)'
},
color: ['#5850FF', '#FFB21F'],
// legend: {
// orient: "vertical",
// bottom: "bottom",
// },
series: [
{
name: '客户总数',
type: 'pie',
// radius: '118px',
center: ['50%', '36%'],
radius: ['32%', '48%'],
stillShowZeroSum: false,
data: this.pieData,
// data: [
// { value: 3000, name: '未加企微' },
// { value: 7000, name: '已加企微' }
// ],
// emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
//下面控制显示饼状图上百分比
normal: {
// color: function (params) {
// //自定义颜色
// var colorList = [
// "#00FFFF",
// "#00FF00"
// ];
// return colorList[params.dataIndex];
// },
label: {
position: 'inner',
formatter: '{d}%',
// show: true,
color: '#fff',
// fontSize:14,
// formatter: "{b}:\n{c}人({d}%)",
// fontWeight: "bold",
// color: '#666666'
// color: ["#1296db", "#d42378"],
},
labelLine: { show: true }
}
}
// },
}
]
})
}
}
}
</script>
<style lang="scss" scoped>
.contain {
position: relative;
z-index: 9;
}
</style>
......@@ -75,7 +75,7 @@ export default {
color: #333333;
line-height: 20px;
text-align: left;
max-width: 228px;
min-width: 260px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
......
......@@ -120,9 +120,9 @@ export default {
}
this.$nextTick(()=>{
var sf = document.getElementById('searchForm')
console.log(sf.clientWidth,'555')
if (sf.clientWidth < 1280 && this.isHasSyncBtn) {
console.log(sf.clientWidth, 'sf')
document.querySelector('.itemWidth').style.maxWidth = 700 + 'px'
}
if (sf.clientWidth < 952 && this.isHasSyncBtn) {
......@@ -131,7 +131,7 @@ export default {
let lineHeight = 75 //75
if (document.getElementById('searchForm').offsetHeight > lineHeight * 2) {
console.log('第一次searchForm高度', document.getElementById('searchForm').offsetHeight)
this.expande = false
this.needShowExpande = true
} else {
......@@ -160,7 +160,7 @@ export default {
// $(window).bind('resize', function() {
// if (resizeTimer) clearTimeout(resizeTimer)
// resizeTimer = setTimeout(function() {
// console.log('窗口发生改变了!')
//
// }, 100)
// })
// window.onresize = () => {
......
<template>
<div class="square-main" v-loading="loading">
<el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<GLDialog title="选择跟进专员" :visible.sync="dialogVisible">
<el-form :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="员工">
<el-input v-model="tableSearchForm.username" placeholder="请输入员工姓名"></el-input>
......@@ -17,10 +17,10 @@
</GLTable>
<span slot="footer" class="dialog-footer">
<a class="dialog-jump" @click="jumpUrl">新增专员</a>
<el-button size="small" @click="handleCancel">取 消</el-button>
<el-button plain size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button>
</span>
</el-dialog>
</GLDialog>
</div>
</template>
<script>
......@@ -127,6 +127,9 @@ export default {
}
</script>
<style lang="scss" scoped>
/deep/.glsx-table .emptyBg .noDataImg {
margin-top: 150px !important;
}
/deep/ .el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
box-shadow: none;
}
......
......@@ -30,17 +30,30 @@ Vue.prototype.$apis = apis
Vue.use(glsxTable)
Vue.prototype.$message = message
Vue.prototype.size = 'small'
// Vue.prototype.btn_size = 'mini'
// Vue.prototype.btn_size = 'mini'
Vue.prototype.$Constants = Constants
Vue.prototype.$Utils = Util
Vue.prototype.$Commons = common
Vue.prototype.$echarts = echarts
//过滤器统一处理预加载
//过滤器统一处理预加载
Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key])
Vue.filter(key, filters[key])
})
export { bootstrap, mount, unmount } from '@/setup'
Vue.config.errorHandler = function(err, vm, info) {
let {
message, // 异常信息
name, // 异常名称
stack // 异常堆栈信息
} = err
// vm 为抛出异常的 Vue 实例
// info 为 Vue 特定的错误信息,比如错误所在的生命周期钩子
console.error(`组件${vm.$vnode.tag},特定的错误信息:${info},异常信息:${message},异常名称:${name},异常堆栈信息:${stack}`)
}
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)
export const http_common = params => Vue.prototype.$http_common(params)
\ No newline at end of file
import { getCustomersList, exportLabelList } from '@/api/modules/tagsManage'
import { getStaffList } from '@/api/modules/clientManage'
export default {
data() {
return {
tagHeight: 0,
tagHeightStatus: false,
tagCheckItem: [],
allListParams: [],
crowdForm: {
crowdName: '',
crowdDesc: ''
}
}
},
mounted() {
this.getStaffList()
this.getCustomersListData()
},
watch: {
tagCheckItem: {
handler() {
if (this.tagCheckItem.length == 0) {
this.tagHeight = 0
}
this.allListParams = []
const tagNode = this.$common.utils.deepClone(this.tagCheckItem)
tagNode.forEach(group_item => {
group_item.children.forEach(label_item => {
if (label_item) {
this.allListParams.push({
groupId: group_item.id,
groupName: group_item.name,
groupType: group_item.labelType,
labelId: label_item.id,
labelName: label_item.name
})
data() {
return {
tagHeight: 0,
tagHeightStatus: false,
tagCheckItem: [],
allListParams: [],
crowdForm: {
crowdName: '',
crowdDesc: ''
}
})
})
this.getCustomersListData()
},
deep: true
},
tagHeight: {
handler(val) {
if (val == 0) {
setTimeout(() => {
this.tagHeightStatus = false
}, 300)
} else {
this.tagHeightStatus = true
}
},
deep: true
}
},
methods: {
//获取跟进员工
getStaffList() {
getStaffList({}).then(res => {
if (res.length == 0) {
return ''
}
const id = this.tagsPartFormList.findIndex(item => {
return item.name == 'followStaff'
})
const staff = res.map(item => {
return {
label: item.staffName,
value: item.staffName
}
})
staff.unshift({ label: '全部', value: '' })
this.$nextTick(() => {
this.tagsPartFormList[id].optionList = staff
})
console.log(this.tagsPartFormList[id])
})
},
tagLength(children) {
return children.filter(item => item).length
},
goDetail(scope) {
this.$router.push('/clientManage/clientDetail?id=' + scope.oneId)
mounted() {
this.getStaffList()
this.getCustomersListData()
},
jumpGroup() {
this.$router.push({
path: '/crowdManage/index',
query: {
selectTab: 1
watch: {
tagCheckItem: {
handler() {
if (this.tagCheckItem.length == 0) {
this.tagHeight = 0
}
this.allListParams = []
const tagNode = this.$common.utils.deepClone(this.tagCheckItem)
tagNode.forEach(group_item => {
group_item.children.forEach(label_item => {
if (label_item) {
this.allListParams.push({
groupId: group_item.id,
groupName: group_item.name,
groupType: group_item.labelType,
labelId: label_item.id,
labelName: label_item.name
})
}
})
})
this.getCustomersListData()
},
deep: true
},
tagHeight: {
handler(val) {
if (val == 0) {
setTimeout(() => {
this.tagHeightStatus = false
}, 300)
} else {
this.tagHeightStatus = true
}
},
deep: true
}
})
},
//删除标签组
removeItem(index) {
this.tagCheckItem.splice(index, 1)
this.$refs.tagTree.getTreeNode(this.tagCheckItem)
},
treeScroll(id) {
const h = document.querySelector('.node_' + id).offsetTop
this.$refs.tagTree.handleScroll(h)
},
//获取选中的标签并排序
getCheckItem(item) {
const tree_id = []
const labelTree = this.$common.utils.deepClone(this.$refs.tagTree.labelTree)
labelTree.forEach(tree_node => {
tree_node.children.forEach(t_node => {
tree_id.push(t_node.id)
})
})
this.tagCheckItem = []
let group_all = item.getCheckedNodes().filter(item => item.labelType)
let group_Label = item.getCheckedNodes().filter(item => !item.children)
let label_id = []
group_Label.forEach(item => {
label_id.push(item.id)
})
let group_half = item.getHalfCheckedNodes().filter(item => item.labelType)
let group = [...group_half, ...group_all].sort((a, b) => {
return tree_id.indexOf(a.id) - tree_id.indexOf(b.id)
})
this.tagCheckItem = this.$common.utils.deepClone(group)
group.forEach((tag, idx) => {
tag.children.forEach((item, index) => {
if (!label_id.includes(item.id)) {
this.tagCheckItem[idx].children[index] = null
}
})
})
this.tagCheckItem.forEach(tag => {
tag.children = tag.children.filter(item => item)
})
},
//导出
handleExport() {
const params = {
...JSON.parse(JSON.stringify({ tagLists: this.allListParams })),
combineType: 2
}
exportLabelList(params).then(res => {
this.$Utils.exportFn(res)
})
},
//客户列表
getCustomersListData() {
if (this.searchForm.createTime) {
this.searchForm.beginTime = new Date(this.searchForm.createTime[0]).toLocaleDateString().replace(/-/g, '/')
this.searchForm.endTime = new Date(this.searchForm.createTime[1]).toLocaleDateString().replace(/-/g, '/')
}
delete this.searchForm.createTime
const tagLists = this.$common.utils.deepClone(this.allListParams)
this.userLoading = true
const params = {
...JSON.parse(JSON.stringify({ tagLists })),
...JSON.parse(JSON.stringify(this.searchForm)),
combineType: 2,
pageSize: this.$refs.viewCustomers.page.pageSize,
pageNum: this.$refs.viewCustomers.page.pageNum
}
getCustomersList(params)
.then(res => {
this.userLoading = false
this.tableData = res.data
this.tableTotal = res.count
this.$nextTick(() => {
if (tagLists.length == 0) {
document.querySelector('.noDataText').innerText = '当前未选择标签,快去选择标签查看客户吧!'
} else {
document.querySelector('.noDataText') ? (document.querySelector('.noDataText').innerText = '暂无数据') : ''
methods: {
//获取跟进员工
getStaffList() {
getStaffList({}).then(res => {
if (res.length == 0) {
return ''
}
const id = this.tagsPartFormList.findIndex(item => {
return item.name == 'followStaff'
})
const staff = res.map(item => {
return {
label: item.staffName,
value: item.staffName
}
})
staff.unshift({ label: '全部', value: '' })
this.$nextTick(() => {
this.tagsPartFormList[id].optionList = staff
})
})
},
tagLength(children) {
return children.filter(item => item).length
},
goDetail(scope) {
this.$router.push('/clientManage/clientDetail?id=' + scope.oneId)
},
jumpGroup() {
this.$router.push({
path: '/crowdManage/index',
query: {
selectTab: 1
}
})
},
//删除标签组
removeItem(index) {
this.tagCheckItem.splice(index, 1)
this.$refs.tagTree.getTreeNode(this.tagCheckItem)
},
treeScroll(id) {
const h = document.querySelector('.node_' + id).offsetTop
this.$refs.tagTree.handleScroll(h)
},
//获取选中的标签并排序
getCheckItem(item) {
const tree_id = []
const labelTree = this.$common.utils.deepClone(this.$refs.tagTree.labelTree)
labelTree.forEach(tree_node => {
tree_node.children.forEach(t_node => {
tree_id.push(t_node.id)
})
})
this.tagCheckItem = []
let group_all = item.getCheckedNodes().filter(item => item.labelType)
let group_Label = item.getCheckedNodes().filter(item => !item.children)
let label_id = []
group_Label.forEach(item => {
label_id.push(item.id)
})
let group_half = item.getHalfCheckedNodes().filter(item => item.labelType)
let group = [...group_half, ...group_all].sort((a, b) => {
return tree_id.indexOf(a.id) - tree_id.indexOf(b.id)
})
this.tagCheckItem = this.$common.utils.deepClone(group)
group.forEach((tag, idx) => {
tag.children.forEach((item, index) => {
if (!label_id.includes(item.id)) {
this.tagCheckItem[idx].children[index] = null
}
})
})
this.tagCheckItem.forEach(tag => {
tag.children = tag.children.filter(item => item)
})
},
//导出
handleExport() {
const params = {
...JSON.parse(JSON.stringify({ tagLists: this.allListParams })),
combineType: 2
}
})
if (this.tableData == 0) {
this.$refs.viewCustomers.setTableHeightFun()
} else {
this.$refs.viewCustomers.tableHeightValues = ''
}
})
.catch(err => {
this.userLoading = false
})
},
//创建人群
groupConfirmDialog() {
console.log(this.allListParams)
if (this.tagCheckItem.length == 0) {
this.$message.error('必须选择一个标签')
return
}
if (!this.crowdForm.crowdName) {
this.$message.error('请输入人群名称')
return
}
const tagCombine = this.allListParams.reduce((prev, cur) => {
const index = prev.findIndex(group => cur.groupId == group.groupId)
if (index == -1) {
return prev.concat({ groupId: cur.groupId, labelIdList: [cur.labelId] })
} else {
prev[index].labelIdList.push(cur.labelId)
return prev
}
}, [])
const params = {
'req.merchantId': this.merchantId,
'req.crowdType': 2, //类型 1-推荐 2-自定义
'req.crowdName': this.crowdForm.crowdName,
'req.crowdDesc': this.crowdForm.crowdDesc,
'req.tagCombine': JSON.stringify(tagCombine)
}
this.$apis.crowdManage
.addCrowd(params)
.then(res => {
if (res.data.code == 0) {
this.groupVisible = false
this.successVisible = true
} else {
this.$message({
type: 'error',
message: res.data.message
exportLabelList(params).then(res => {
this.$Utils.exportFn(res)
})
}
})
.catch(err => {
this.$message({
type: 'error',
message: err.message
})
})
},
//客户列表
getCustomersListData() {
if (this.searchForm.createTime) {
this.searchForm.beginTime = new Date(this.searchForm.createTime[0]).toLocaleDateString().replace(/-/g, '/')
this.searchForm.endTime = new Date(this.searchForm.createTime[1]).toLocaleDateString().replace(/-/g, '/')
}
delete this.searchForm.createTime
const tagLists = this.$common.utils.deepClone(this.allListParams)
this.userLoading = true
const params = {
...JSON.parse(JSON.stringify({ tagLists })),
...JSON.parse(JSON.stringify(this.searchForm)),
combineType: 2,
pageSize: this.$refs.viewCustomers.page.pageSize,
pageNum: this.$refs.viewCustomers.page.pageNum
}
getCustomersList(params)
.then(res => {
this.userLoading = false
this.tableData = res.data
this.tableTotal = res.count
this.$nextTick(() => {
if (tagLists.length == 0) {
document.querySelector('.noDataText').innerText = '当前未选择标签,快去选择标签查看客户吧!'
} else {
document.querySelector('.noDataText') ? (document.querySelector('.noDataText').innerText = '暂无数据') : ''
}
})
if (this.tableData == 0) {
this.$refs.viewCustomers.setTableHeightFun()
} else {
this.$refs.viewCustomers.tableHeightValues = ''
}
})
.catch(err => {
this.userLoading = false
})
},
//创建人群
groupConfirmDialog() {
if (this.tagCheckItem.length == 0) {
this.$message.error('必须选择一个标签')
return
}
if (!this.crowdForm.crowdName) {
this.$message.error('请输入人群名称')
return
}
const tagCombine = this.allListParams.reduce((prev, cur) => {
const index = prev.findIndex(group => cur.groupId == group.groupId)
if (index == -1) {
return prev.concat({ groupId: cur.groupId, labelIdList: [cur.labelId] })
} else {
prev[index].labelIdList.push(cur.labelId)
return prev
}
}, [])
const params = {
'req.merchantId': this.merchantId,
'req.crowdType': 2, //类型 1-推荐 2-自定义
'req.crowdName': this.crowdForm.crowdName,
'req.crowdDesc': this.crowdForm.crowdDesc,
'req.tagCombine': JSON.stringify(tagCombine)
}
this.$apis.crowdManage
.addCrowd(params)
.then(res => {
if (res.data.code == 0) {
this.groupVisible = false
this.successVisible = true
} else {
this.$message({
type: 'error',
message: res.data.message
})
}
})
.catch(err => {
this.$message({
type: 'error',
message: err.message
})
})
}
}
}
}
}
\ No newline at end of file
const staticRoutes = Object.freeze([{
name: 'Home',
path: '/',
meta: {},
component: resolve => require([`@/views/home/index.vue`], resolve)
},
{
name: 'About',
path: '/about',
component: resolve => require([`@/views/about/index.vue`], resolve),
meta: {}
},
{
name: 'clientDataOverview',
path: '/clientDataOverview/index',
component: resolve => require([`@/views/clientDataOverview/index.vue`], resolve),
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',
component: resolve => require([`@/views/clientManage/clientDetail.vue`], resolve),
meta: {}
},
// {
// name: 'clientDemo',
// path: "/clientManage/clientDemo",
// component: resolve => require([`@/views/clientManage/demo.vue`], resolve),
// meta: {}
// },
{
name: 'clientGroupManage',
path: '/clientGroupManage/index',
component: resolve => require([`@/views/clientGroupManage/index.vue`], resolve),
meta: {}
},
{
name: 'clientGroupDetail',
path: '/clientGroupManage/clientGroupDetail',
component: resolve => require([`@/views/clientGroupManage/clientGroupDetail.vue`], resolve),
meta: {}
},
{
name: 'tagsManage',
path: '/tagsManage/index',
component: resolve => require([`@/views/tagsManage/index.vue`], resolve),
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),
meta: {}
},
{
name: 'employee',
path: '/employee/index',
component: resolve => require([`@/views/employee/index.vue`], resolve),
meta: {}
},
{
name: 'employee',
path: '/employee/detail',
component: resolve => require([`@/views/employee/detail.vue`], resolve),
meta: {}
},
{
name: 'employee',
path: '/employee/add',
component: resolve => require([`@/views/employee/add.vue`], resolve),
meta: {}
},
{
name: 'guestGuest',
path: '/guestGroup/index',
component: resolve => require([`@/views/guestGroup/index.vue`], resolve),
meta: {}
},
{
name: 'guestAdd',
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: {}
},
{
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: {}
},
{
name: 'leadManage',
path: '/leadManage/index',
component: resolve => require([`@/views/leadManage/index.vue`], resolve),
meta: {}
},
{
name: 'leadAllocation',
path: '/leadManage/leadAllocation',
component: resolve => require([`@/views/leadManage/leadAllocation.vue`], resolve),
meta: {}
},
{
name: 'leadBasicInfo',
path: '/leadManage/leadBasicInfo/:id/:type',
component: resolve => require([`@/views/leadManage/leadBasicInfo.vue`], resolve),
meta: {}
}
const staticRoutes = Object.freeze([
{
name: 'Home',
path: '/',
meta: {},
component: resolve => require([`@/views/home/index.vue`], resolve)
},
{
name: 'About',
path: '/about',
component: resolve => require([`@/views/about/index.vue`], resolve),
meta: {}
},
{
name: 'clientDataOverview',
path: '/clientDataOverview/index',
component: resolve => require([`@/views/clientDataOverview/index.vue`], resolve),
meta: {}
},
{
name: 'grouping',
path: '/clientDataOverview/grouping',
component: resolve => require([`@/views/clientDataOverview/grouping.vue`], resolve),
meta: {}
},
{
name: 'clientDataOverview',
path: '/clientDataOverview/group/:id',
component: resolve => require([`@/views/clientDataOverview/group.vue`], resolve),
meta: {}
},
{
name: 'marketingPeople',
path: '/clientDataOverview/marketingPeople',
component: resolve => require([`@/views/clientDataOverview/marketingPeople`], resolve),
meta: {}
},
{
name: 'clientManage',
path: '/clientManage/index',
component: resolve => require([`@/views/clientManage/index.vue`], resolve),
meta: {}
},
{
name: 'clientDetail',
path: '/clientManage/clientDetail',
component: resolve => require([`@/views/clientManage/clientDetail.vue`], resolve),
meta: {}
},
// {
// name: 'clientDemo',
// path: "/clientManage/clientDemo",
// component: resolve => require([`@/views/clientManage/demo.vue`], resolve),
// meta: {}
// },
{
name: 'clientGroupManage',
path: '/clientGroupManage/index',
component: resolve => require([`@/views/clientGroupManage/index.vue`], resolve),
meta: {}
},
{
name: 'clientGroupDetail',
path: '/clientGroupManage/clientGroupDetail',
component: resolve => require([`@/views/clientGroupManage/clientGroupDetail.vue`], resolve),
meta: {}
},
{
name: 'tagsManage',
path: '/tagsManage/index',
component: resolve => require([`@/views/tagsManage/index.vue`], resolve),
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),
meta: {}
},
{
name: 'employee',
path: '/employee/index',
component: resolve => require([`@/views/employee/index.vue`], resolve),
meta: {}
},
{
name: 'employee',
path: '/employee/detail',
component: resolve => require([`@/views/employee/detail.vue`], resolve),
meta: {}
},
{
name: 'employee',
path: '/employee/add',
component: resolve => require([`@/views/employee/add.vue`], resolve),
meta: {}
},
{
name: 'guestGuest',
path: '/guestGroup/index',
component: resolve => require([`@/views/guestGroup/index.vue`], resolve),
meta: {}
},
{
name: 'guestAdd',
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: {}
},
{
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: {}
},
{
name: 'leadManage',
path: '/leadManage/index',
component: resolve => require([`@/views/leadManage/index.vue`], resolve),
meta: {}
},
{
name: 'leadAllocation',
path: '/leadManage/leadAllocation',
component: resolve => require([`@/views/leadManage/leadAllocation.vue`], resolve),
meta: {}
},
{
name: 'leadBasicInfo',
path: '/leadManage/leadBasicInfo/:id/:type',
component: resolve => require([`@/views/leadManage/leadBasicInfo.vue`], resolve),
meta: {}
}
])
export default staticRoutes
// {
......@@ -183,4 +196,4 @@ export default staticRoutes
// hidden: true,
// keepAlive: false,
// component: () => import("../views/clientPartGroup/crowdCircleImage.vue"),
// },
\ No newline at end of file
// },
......@@ -2,53 +2,54 @@ import Vue from 'vue'
import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import ElementUI from 'element-ui'
import { GLButton, GLTable, GLCombiForm } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { GLButton, GLTable, GLCombiForm, GLDialog } from 'glsx-components' //权限按钮 (根据权限动态创建)
import GLFull from '@/components/GLFull'
import { getRoutes } from '@/router'
import render from './render'
Vue.use(ElementUI)
Vue.use(GLTable)
Vue.use(GLCombiForm)
Vue.use(GLDialog)
Vue.component('GLFull', GLFull)
import 'glsx-components/dist/glsx-components.css'
let routes = []
let router = null
let instance = null
// http:调的是新版标签的接口,http2:调的是客户相关接口;http3:企微授权那边的接口 目前导出接口都测试的:http3
// http:调的是新版标签的接口,http2:调的是客户相关接口;http3:企微授权那边的接口 目前导出接口都测试的:http3
export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) {
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'] })
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
// { name, id, }
subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase })
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'] })
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
// { name, id, }
subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase })
}
export async function mount(props) {
const insts = render(props.routerBase, routes)
router = insts.router
instance = insts.vm
const insts = render(props.routerBase, routes)
router = insts.router
instance = insts.vm
}
export async function unmount() {
instance.$destroy()
instance.$el.innerHTML = ''
instance = null
router = null
instance.$destroy()
instance.$el.innerHTML = ''
instance = null
router = null
}
function subscribe({ messenger }) {
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
\ No newline at end of file
.el-select {
width: 100%;
width: 100%;
}
.el-pagination {
display: flex;
margin-top: 18px;
display: flex;
margin-top: 18px;
}
.glsx-table .el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: $btnBlue;
color: #fff;
.el-message-box__btns .el-button--small {
min-width: 68px;
}
.el-dialog__header .el-dialog__title {
height: 28px;
font-size: 20px;
font-weight: bold;
color: #333333;
line-height: 28px;
.glsx-table .el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: $btnBlue;
color: #fff;
}
/deep/ .el-input__inner:focus {
border-color: $btnBlue !important;
border-color: $btnBlue !important;
}
/deep/.el-range-editor.is-active,
.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;
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;
padding-left: 0;
margin-bottom: 0;
font-size: 20px;
line-height: 1;
color: #333;
}
.el-message-box__title {
display: block !important;
display: block !important;
}
.el-message-box__headerbtn {
display: block !important;
color: #666666;
display: block !important;
color: #666666;
}
.el-message-box__header {
position: relative;
padding: 15px 20px;
border-bottom: 1px solid #e6e6e6;
position: relative;
padding: 15px 20px;
border-bottom: 1px solid #e6e6e6;
}
.el-message-box__content {
text-align: center;
padding: 60px 0;
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;
display: block !important;
font-size: 33px !important;
color: #5850ff !important;
position: relative;
left: 50%;
transform: translateX(-50%);
margin-bottom: 12px;
}
// .el-message-box__status.el-icon-error {
// display: block !important;
// font-size: 33px !important;
// position: relative;
// left: 50%;
// transform: translateX(-50%);
// margin-bottom: 12px;
// }
.el-tooltip__popper.is-dark {
background: #666666 !important;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06) !important;
font-size: 12px;
font-weight: 400;
color: #ffffff;
line-height: 18px;
background: #666666 !important;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06) !important;
font-size: 12px;
font-weight: 400;
color: #ffffff;
line-height: 18px;
}
.el-tooltip__popper[x-placement^="top"] .popper__arrow {
border-top-color: #666666 !important;
border-top-color: #666666 !important;
}
.el-tooltip__popper[x-placement^="top"] .popper__arrow:after {
border-top-color: #666666 !important;
}
border-top-color: #666666 !important;
}
\ No newline at end of file
import { Message } from "element-ui";
import { debounce } from "./index.js";
import { Message } from 'element-ui'
import { debounce } from './index.js'
// const error = debounce((msg, getToken) => {
// if(window.__POWERED_BY_QIANKUN__) {
// let stateRes = {
......@@ -20,70 +20,68 @@ import { debounce } from "./index.js";
// }
// }
// }, 1000, true);
const error=msg=>{
if(msg){
const error = msg => {
if (msg) {
Message({
message:msg,
type:'error'
message: msg,
type: 'error'
})
}
}
const checkStatus = (status, msg) => {
const checkStatus = (status, msg) => {
switch (status) {
case 400:
error(`Bad Request 错误的请求`);
break;
case 401:
error('用户没有权限(令牌、用户名、密码错误)!');
break;
case 403:
error('用户得到授权,但是访问是被禁止的。!');
break;
// 404请求不存在
case 404:
error('网络请求错误,未找到该资源!');
break;
case 405:
error('网络请求错误,请求方法未允许!');
break;
case 408:
error('网络请求超时!');
break;
case 500:
error('服务器错误,请联系管理员!');
break;
case 501:
error('网络未实现!');
break;
case 502:
error('网络错误!');
break;
case 503:
error('服务不可用,服务器暂时过载或维护!');
break;
case 504:
error('网络超时!');
break;
case 505:
error('http版本不支持该请求!');
break;
case 603:
error('尚未登录或登录已过期,请重新登录', 'removeToken');
break;
case 505:
error('http版本不支持该请求!');
break;
case 'fail':
error('网络连接错误');
break;
case 'custom':
error(`${msg}`);
break;
default:
case 400:
error(`Bad Request 错误的请求`)
break
case 401:
error('用户没有权限(令牌、用户名、密码错误)!')
break
case 403:
error('用户得到授权,但是访问是被禁止的。!')
break
// 404请求不存在
case 404:
error('网络请求错误,未找到该资源!')
break
case 405:
error('网络请求错误,请求方法未允许!')
break
case 408:
error('网络请求超时!')
break
case 500:
error('服务器错误,请联系管理员!')
break
case 501:
error('网络未实现!')
break
case 502:
error('网络错误!')
break
case 503:
error('服务不可用,服务器暂时过载或维护!')
break
case 504:
error('网络超时!')
break
case 505:
error('http版本不支持该请求!')
break
case 603:
error('尚未登录或登录已过期,请重新登录', 'removeToken')
break
case 505:
error('http版本不支持该请求!')
break
case 'fail':
error('网络连接错误')
break
case 'custom':
error(`${msg}`)
break
default:
}
}
}
export {
checkStatus
}
\ No newline at end of file
export { checkStatus }
\ No newline at end of file
export function debounce(fn, delay, triggerNow) {
var t = null
console.log('ceshi')
var debounced = function() {
var _self = this,
args = arguments
if (t) {
clearTimeout(t)
}
if (triggerNow) {
var exec = !t
var t = null
t = setTimeout(function() {
t = null
}, delay)
var debounced = function() {
var _self = this,
args = arguments
if (t) {
clearTimeout(t)
}
if (triggerNow) {
var exec = !t
t = setTimeout(function() {
t = null
}, delay)
if (exec) {
// 初次进来
fn.apply(_self, args)
}
} else {
t = setTimeout(function() {
fn.apply(_self, args)
}, delay)
if (exec) {
// 初次进来
fn.apply(_self, args)
}
} else {
t = setTimeout(function() {
fn.apply(_self, args)
}, delay)
}
}
}
debounced.remove = function() {
clearTimeout(t)
t = null
}
debounced.remove = function() {
clearTimeout(t)
t = null
}
return debounced
return debounced
}
//格式化日期
export const formatDate = (date, fmt) => {
if (!date) {
date = new Date()
}
export const formatDate = (date, fmt = '-') => {
//shijianchuo是整数,否则要parseInt转换
var time = new Date(date)
var y = time.getFullYear()
var m = time.getMonth() + 1
var d = time.getDate()
var h = time.getHours()
var mm = time.getMinutes()
var s = time.getSeconds()
return y + fmt + add0(m) + fmt + add0(d) + ' ' + add0(h) + ':' + add0(mm)
}
let o = {
'M+': date.getMonth() + 1, //月份
'd+': date.getDate(), //日
'h+': date.getHours(), //小时
'm+': date.getMinutes(), //分
's+': date.getSeconds(), //秒
'q+': Math.floor((date.getMonth() + 3) / 3), //季度
S: date.getMilliseconds(), //毫秒  1-3 位  只能一位占位符
'U+': date.getMilliseconds() //毫秒   可以1-3位占位符
}
fmt = fmt || 'yyyy-MM-dd hh:mm'
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
for (let k in o) if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length))
return fmt
function add0(m) {
return m < 10 ? '0' + m : m
}
//正则表示式是干什么的? 字符串匹配利器(难,规则多)
export function formatDate2(date, fmt) {
//1.获取年份
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
}
//2.获取
//M+ ->正则表达式一个规则
//
let o = {
'M+': date.getMonth() + 1,
'd+': date.getDate(),
'h+': date.getHours(),
'm+': date.getMinutes(),
's+': date.getSeconds()
}
for (let k in o) {
if (new RegExp(`(${k})`).test(fmt)) {
let str = o[k] + ''
fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : padLeftZero(str))
//1.获取年份
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
}
//2.获取
//M+ ->正则表达式一个规则
//
let o = {
'M+': date.getMonth() + 1,
'd+': date.getDate(),
'h+': date.getHours(),
'm+': date.getMinutes(),
's+': date.getSeconds()
}
}
return fmt
for (let k in o) {
if (new RegExp(`(${k})`).test(fmt)) {
let str = o[k] + ''
fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : padLeftZero(str))
}
}
return fmt
}
//填补左边的零(一般返回字符串最后两位)
function padLeftZero(str) {
return ('00' + str).substr(str.length)
}
return ('00' + str).substr(str.length)
}
\ No newline at end of file
......@@ -153,7 +153,7 @@ export default {
},
// 自定义筛选函数
filterNode(value, data, where) {
console.log(value, data, where)
if (!value) return true
return data[this.defaultProps.label].indexOf(value) !== -1
},
......@@ -189,29 +189,29 @@ export default {
add(fromData, toData, obj) {
// 树形穿梭框模式transfer时,返回参数为左侧树移动后数据、右侧树移动后数据、移动的{keys,nodes,halfKeys,halfNodes}对象
// 通讯录模式addressList时,返回参数为右侧收件人列表、右侧抄送人列表、右侧密送人列表
console.log('fromData:', fromData)
console.log('toData:', toData)
console.log('obj:', obj)
},
// 移除按钮
remove(fromData, toData, obj) {
// 树形穿梭框模式transfer时,返回参数为左侧树移动后数据、右侧树移动后数据、移动的{keys,nodes,halfKeys,halfNodes}对象
// 通讯录模式addressList时,返回参数为右侧收件人列表、右侧抄送人列表、右侧密送人列表
console.log('fromData:', fromData)
console.log('toData:', toData)
console.log('obj:', obj)
},
// 左侧源数据选中事件
leftCheckChange(nodeObj, treeObj, checkAll) {
console.log(nodeObj)
console.log(treeObj)
console.log(checkAll)
},
// 右侧目标数据选中事件
rightCheckChange(nodeObj, treeObj, checkAll) {
console.log(nodeObj)
console.log(treeObj)
console.log(checkAll)
},
// 自定义节点 仅树形结构支持
renderContent(h, { node, data }) {
......
<template>
<div>
<GLDialog :title="dialogTitle" :visible.sync="groupVisible">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="grouping-ruleForm">
<el-form-item label="分群名称" prop="crowdGroupName" size="small">
<el-input v-model="ruleForm.crowdGroupName" placeholder="请输入分群名称" maxlength="30" show-word-limit></el-input>
</el-form-item>
<el-form-item label="分群描述" size="small">
<el-input v-model="ruleForm.crowdGroupDesc" placeholder="请输入分群描述" maxlength="100" show-word-limit></el-input>
</el-form-item>
<el-form-item label="概览是否展示" size="small">
<el-radio-group v-model="ruleForm.isDisplay">
<el-radio :label="1">是</el-radio>
<el-radio :label="2">否</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="选择展示位" size="small" v-show="ruleForm.isDisplay == 1">
<el-select v-model="ruleForm.displayLoc" placeholder="请选择">
<el-option v-for="item in 12" :key="item" :label="`${item}号展示位`" :value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="选择人群" size="small">
<div class="group-tree-container">
<div class="group-tree-panel" :style="{ height: heightBox + 'px' }">
<template v-for="(item, index) in crowdUnitList">
<div :key="item" v-if="item.selectGroup && item.children && item.selectGroup.length != item.children.length">
<span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }" @click.self="handleExpand(index)"></span>
<el-checkbox :indeterminate="item.isIndeterminateGroup" v-model="item.gruopCheckAll" @change="handleGroup(item.gruopCheckAll, index)">{{ item.crowdName }}</el-checkbox>
<el-checkbox-group :style="{ 'max-height': item.checked ? heightBox - 70 + 'px' : '0px' }" v-model="item.groupArr" @change="handleCheckedGroup(item.groupArr, index)" v-show="item.checked">
<template v-for="crowd in item.children">
<el-checkbox v-if="isChecked(crowd, item)" :label="crowd" :key="crowd.crowdId">{{ crowd.crowdName }}</el-checkbox>
</template>
</el-checkbox-group>
</div>
</template>
</div>
<div class="group-tree-operation">
<div :class="[{ 'group-tree-btn': true, active: rightSelectNum }]" @click="handleRight"><i class="el-icon-arrow-right"></i></div>
<div :class="[{ 'group-tree-btn': true, active: leftSelectNum }]" @click="handleLeft"><i class="el-icon-arrow-left"></i></div>
</div>
<div class="group-tree-panel" :style="{ height: heightBox + 'px' }">
<template v-for="(item, index) in crowdUnitList">
<div :key="item" v-if="item.selectGroup && item.selectGroup.length > 0">
<span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked_right }" @click.self="handleExpandChecked(index)"></span>
<el-checkbox :indeterminate="item.isIndeterminateGroup_right" v-model="item.gruopCheckAll_right" @change="handleGroupChecked(item.gruopCheckAll_right, index)">{{ item.crowdName }}</el-checkbox>
<el-checkbox-group :style="{ 'max-height': item.checked_right ? heightBox - 70 + 'px' : '0px' }" v-model="item.groupArr_right" @change="handleCheckedGroupChecked(item.groupArr_right, index)" v-show="item.checked_right">
<template v-for="crowd in item.children">
<el-checkbox v-if="!isChecked(crowd, item)" :label="crowd" :key="crowd.crowdId">{{ crowd.crowdName }}</el-checkbox>
</template>
</el-checkbox-group>
</div>
</template>
</div>
<div class="el-form-item__error" v-show="crowdStatus">请选择人群</div>
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="groupVisible = false">取 消</el-button>
<el-button type="primary" size="small" @click="handleSelect">提 交</el-button>
</span>
</GLDialog>
</div>
</template>
<script>
export default {
name: 'addGrouping',
data() {
return {
heightBox: 0,
rightSelectNum: 0,
leftSelectNum: 0,
groupVisible: false,
crowdStatus: false,
dialogTitle: '新建分群',
ruleForm: {},
rules: {
crowdGroupName: [{ required: true, message: '请输入分群名称', trigger: 'blur' }]
},
crowdUnitList: [],
crowdUnitListReset: []
}
},
watch: {
crowdUnitList: {
handler(val) {
this.crowdStatus = false
},
deep: true
}
},
props: {
// dialogTitle: {
// type: String,
// default: '新建分群'
// }
},
mounted() {
let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 520
this.getCrowdList()
},
methods: {
async getCrowdList() {
const commonParam = { pageSize: 100, pageNum: 1, merchantId: this.$globalState.session.merchantId }
const params1 = {
req: {
crowdType: 1,
...commonParam
}
}
const params2 = {
req: {
...commonParam,
crowdType: 2
}
}
const crowdUnitList1 = this.$apis.crowdManage.getCrowdList(params1)
const crowdUnitList2 = this.$apis.crowdManage.getCrowdList(params2)
const crowdUnitList = await Promise.all([crowdUnitList1, crowdUnitList2])
/*
groupArr: 勾选的人群
checked: 是否展开
isIndeterminateGroup:树节点选中
gruopCheckAll: 全选
selectGroup:右边树的选中数据
*/
this.crowdUnitList = [
{ crowdName: '推荐人群', children: crowdUnitList[0].data.crowdUnitList, groupArr: [], groupArr_right: [], checked: true, checked_right: true, isIndeterminateGroup: false, isIndeterminateGroup_right: false, gruopCheckAll: false, gruopCheckAll_right: false, selectGroup: [] },
{ crowdName: '自定义人群', children: crowdUnitList[1].data.crowdUnitList, groupArr: [], groupArr_right: [], checked: false, checked_right: false, isIndeterminateGroup: false, isIndeterminateGroup_right: false, gruopCheckAll: false, gruopCheckAll_right: false, selectGroup: [] }
]
this.crowdUnitListReset = this.$common.utils.deepClone(this.crowdUnitList)
},
//判断是否选中
isChecked(crowd, item) {
return !item.selectGroup.includes(crowd)
},
//推送右侧
handleRight() {
if (this.rightSelectNum == 0) {
return
}
this.crowdUnitList.forEach(group => {
group.selectGroup = group.selectGroup.concat(group.groupArr)
group.groupArr = []
group.gruopCheckAll = false
group.gruopCheckAll_right = false
if (group.groupArr_right.length) {
group.isIndeterminateGroup_right = true
}
group.isIndeterminateGroup = false
this.rightSelectNum = 0
})
this.autoExpand()
},
//推送左侧
handleLeft() {
if (this.leftSelectNum == 0) {
return
}
this.crowdUnitList.forEach(group => {
group.selectGroup = this.getReduceGroup(group.selectGroup, group.groupArr_right, 'crowdId')
group.groupArr_right = []
group.gruopCheckAll = false
group.gruopCheckAll_right = false
if (group.groupArr.length) {
group.isIndeterminateGroup = true
}
group.isIndeterminateGroup_right = false
this.leftSelectNum = 0
})
this.autoExpand()
},
handleSelect() {
this.$refs['ruleForm'].validate(valid => {
if (valid) {
let crowdArr = []
this.crowdUnitList.forEach(crowd => {
crowdArr = [...crowdArr, ...crowd.selectGroup]
})
if (crowdArr.length == 0) {
this.crowdStatus = true
return
}
const crowdIdList = []
crowdArr.forEach(arr => {
crowdIdList.push(arr.crowdId)
})
const params = {
req: {
merchantId: this.$globalState.session.merchantId,
crowdGroupType: 2,
crowdIdList
}
}
if (this.ruleForm.isDisplay == 2) {
delete this.ruleForm.displayLoc
}
Object.assign(params.req, this.ruleForm)
let crowdGroup
if (this.ruleForm.crowdGroupId) {
crowdGroup = 'editCrowdGroup'
} else {
crowdGroup = 'addCrowdGroup'
}
this.$apis.crowdManage[crowdGroup](params).then(res => {
if (res.data.code == 0) {
this.groupVisible = false
this.$message.success('操作成功')
this.$parent.searchTable()
} else {
// res.data.message
this.$message.error(res.data.message)
}
})
}
})
},
init(row) {
this.rightSelectNum = 0
this.leftSelectNum = 0
this.crowdUnitList = this.$common.utils.deepClone(this.crowdUnitListReset)
this.ruleForm = {
isDisplay: 1,
displayLoc: 1
}
if (row) {
this.ruleForm.crowdGroupId = row.crowdGroupId
this.dialogTitle = '编辑分群'
this.queryCrowdGroupDetailsByCrowdGroupId(row)
} else {
this.dialogTitle = '新建分群'
}
this.groupVisible = true
},
queryCrowdGroupDetailsByCrowdGroupId(row) {
const { crowdGroupName, crowdGroupDesc, crowdGroupId, crowdUnitList, isDisplay, displayLoc } = row
this.ruleForm = {
crowdGroupName,
crowdGroupDesc,
crowdGroupId,
displayLoc,
isDisplay
}
const arr1 = [],
arr2 = []
const crowdId1 = [],
crowdId2 = []
this.crowdUnitList[0].children.forEach(item => {
crowdId1.push(item.crowdId)
})
this.crowdUnitList[1].children.forEach(item => {
crowdId2.push(item.crowdId)
})
crowdUnitList.forEach(item => {
if (crowdId1.includes(item.crowdId)) {
arr1.push(item.crowdId)
}
if (crowdId2.includes(item.crowdId)) {
arr2.push(item.crowdId)
}
})
this.setTreeChecked(arr1, arr2)
},
setTreeChecked(arr1, arr2) {
this.crowdUnitList[0].children.forEach(item => {
if (arr1.includes(item.crowdId)) {
this.crowdUnitList[0].selectGroup.push(item)
}
})
this.crowdUnitList[1].children.forEach(item => {
if (arr2.includes(item.crowdId)) {
this.crowdUnitList[1].selectGroup.push(item)
}
})
this.autoExpand()
},
autoExpand() {
if (this.crowdUnitList[0].selectGroup.length == 0 && this.crowdUnitList[1].selectGroup.length > 0) {
this.crowdUnitList[0].checked_right = false
this.crowdUnitList[1].checked_right = true
}
if (this.crowdUnitList[0].selectGroup.length > 0 && this.crowdUnitList[1].selectGroup.length == 0) {
this.crowdUnitList[0].checked = false
this.crowdUnitList[1].checked = true
}
},
//左侧展开
handleExpand(index) {
this.crowdUnitList.forEach((item, idx) => {
if (idx == index) {
item.checked = !item.checked
} else {
item.checked = false
}
})
},
//右侧展开
handleExpandChecked(index) {
this.crowdUnitList.forEach((item, idx) => {
if (idx == index) {
item.checked_right = !item.checked_right
} else {
item.checked_right = false
}
})
},
getReduceGroup(arr1, arr2, identification) {
const selectGroupId = []
arr2.forEach(group => {
selectGroupId.push(group[identification])
})
return arr1.filter(child => !selectGroupId.includes(child[identification]))
},
//左侧全选
handleGroup(val, index) {
const surplusArr = this.getReduceGroup(this.crowdUnitList[index].children, this.crowdUnitList[index].selectGroup, 'crowdId')
this.crowdUnitList[index].groupArr = val ? surplusArr : []
this.crowdUnitList[index].isIndeterminateGroup = false
this.rightShow()
},
//左侧单选
handleCheckedGroup(value, index) {
const surplusArr = this.getReduceGroup(this.crowdUnitList[index].children, this.crowdUnitList[index].selectGroup, 'crowdId')
let checkedCount = value.length
this.crowdUnitList[index].gruopCheckAll = checkedCount === surplusArr.length
this.crowdUnitList[index].isIndeterminateGroup = checkedCount > 0 && checkedCount < surplusArr.length
this.rightShow()
},
//按钮判断
rightShow() {
let selectNum = 0
this.crowdUnitList.forEach(item => {
selectNum += item.groupArr.length
})
this.rightSelectNum = selectNum
},
//按钮判断
leftShow() {
let selectNum = 0
this.crowdUnitList.forEach(item => {
selectNum += item.groupArr_right.length
})
this.leftSelectNum = selectNum
},
//右侧全选
handleGroupChecked(val, index) {
this.crowdUnitList[index].groupArr_right = val ? this.crowdUnitList[index].selectGroup : []
this.crowdUnitList[index].isIndeterminateGroup_right = false
this.leftShow()
},
//右侧全选
handleCheckedGroupChecked(value, index) {
let checkedCount = value.length
this.crowdUnitList[index].gruopCheckAll_right = checkedCount === this.crowdUnitList[index].selectGroup.length
this.crowdUnitList[index].isIndeterminateGroup_right = checkedCount > 0 && checkedCount < this.crowdUnitList[index].selectGroup.length
this.leftShow()
}
}
}
</script>
<style lang="scss" scoped>
.group-tree-container {
display: flex;
.group-tree-operation {
width: 32px;
margin: 0px 16px;
display: flex;
flex-direction: column;
justify-content: center;
.group-tree-btn {
width: 32px;
height: 32px;
background: #f7f7f7;
border-radius: 4px;
border: 1px solid #dcdfe6;
text-align: center;
line-height: 32px;
cursor: pointer;
&.active {
background: #5850ff;
color: #ffffff;
}
&:first-child {
margin-bottom: 16px;
}
}
}
.group-tree-panel {
width: 50%;
border-radius: 2px;
padding: 8px;
border: 1px solid #eeeeee;
.el-tree-node__expand-icon {
font-size: 16px;
color: #000000;
}
/deep/ {
.el-checkbox-group {
margin-left: 30px;
overflow-y: auto;
animation: all ease-in 0.5s;
.el-checkbox {
display: block;
}
}
}
}
}
</style>
<template>
<div class="scrm-sub-client-container">
<div class="pageContent">
<GLCombiForm :rowNumber="1" :formObj="searchForm" :formData="searchFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<GLTable :hasNum="true" @setTableFinishFun="setTableFinishFun" :beforeSearchFn="beforeSearchFn" ref="marketingPlan" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :tableParams="tableParams">
<template slot="options" slot-scope="scope">
<el-button v-if="scope.scope.sopStatus != 1" type="text" @click="handleJump(scope.scope.id)">SOP分析</el-button>
<el-button v-if="scope.scope.sopStatus == 2" type="text" @click="handleEnd(scope.scope)">结束</el-button>
<el-button v-if="scope.scope.sopStatus != 3" type="text" @click="handleEdit(scope.scope)">编辑</el-button>
<el-button v-if="scope.scope.sopStatus == 1" type="text" @click="handleDelete(scope.scope)">删除</el-button>
</template>
</GLTable>
</div>
</div>
</template>
<script>
import { getSopInfoListApi } from '@/api/modules/clientDataOverview'
export default {
props: ['crowdGroupId'],
data() {
return {
searchForm: {
crowdGroupId: this.crowdGroupId
},
searchFormList: [
{
type: 'input',
inputType: 'text',
name: 'crowdName',
label: '人群名称'
},
{
type: 'select',
name: 'sopStatus',
label: '营销状态',
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: ''
},
{
label: '未开始',
value: '1'
},
{
label: '进行中',
value: '2'
},
{
label: '已结束',
value: '3'
}
],
placeholder: '请选择'
}
],
baseData: {
sopStatusList: [
{
confId: 1,
confName: '未开始'
},
{
confId: 2,
confName: '进行中'
},
{
confId: 3,
confName: '已结束'
}
]
},
getListApi: getSopInfoListApi,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'list',
tableColumns: [
{
label: '人群名称',
prop: 'crowdName'
// line: 1,
// width: 220
},
{
label: 'SOP名称',
prop: 'sopName'
// width: 240,
// line: 1
},
{
label: '营销时间',
prop: 'startDate',
width: 220,
line: 1
},
{
label: '营销状态',
prop: 'sopStatus',
formatter: cellValue => {
return this.baseData.sopStatusList.map(item => item.confId).includes(cellValue.sopStatus) ? this.baseData.sopStatusList.find(item => item.confId == cellValue.sopStatus).confName : '-'
}
},
{
label: '完成度',
prop: 'sopStatistics',
formatter: cellValue => {
return cellValue.sopStatistics ? Math.round((cellValue.sopStatistics.finishEventCount / cellValue.sopStatistics.eventCount) * 100).toFixed(0) + '%' : '-'
}
},
{
label: '操作',
prop: 'options',
addHtml: 'options',
width: 180
}
]
}
}
},
mounted() {
//没数据的时候要算高度
},
methods: {
// 结束
handleEnd(row) {
this.secondConfirm('结束', '结束SOP后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'clientDataOverview', 'endSopEventApi', { sopId: row.id })
},
handleDelete(row) {
this.secondConfirm('删除', 'SOP删除后,不可恢复。是否确定删除?', 'clientDataOverview', 'deleteSopEventApi', { sopId: row.id })
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'gl-message-box',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.$apis[apiModule][apiName](apiParams).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
fn && fn()
this.searchTable()
}
})
}
}
})
},
// 跳转SOP分析
handleJump(id) {
const { crowdGroupName, crowdGroupDesc } = this.$route.query
let query = JSON.stringify({
crowdId: this.crowdGroupId,
crowdGroupDesc,
selectTab: 'second',
crowdGroupName
})
if (this.$route.query && this.$route.query.flag == 1) {
query = JSON.stringify({
crowdId: this.crowdGroupId,
crowdGroupDesc,
crowdGroupName,
selectTab: 'second',
flag: 1
})
}
this.$history.push(`/marketing/sop/sopAnalysisList?fromPage=${encodeURI(`/custom/clientDataOverview/marketingPeople?crowQuery=${query}`)}&id=${id}`)
},
// 跳转到编辑营销SOP
handleEdit(row) {
const { crowdGroupName, crowdGroupDesc } = this.$route.query
let query = JSON.stringify({
crowdId: this.crowdGroupId,
selectTab: 'second',
crowdGroupDesc,
crowdGroupName
})
this.$history.push(`/marketing/sop/editSop?fromPage=${encodeURI(`/custom/clientDataOverview/marketingPeople?crowQuery=${query}`)}&addOrEdit=edit&id=${row.id}&$title=编辑SOP`)
},
setTableFinishFun() {
this.$refs.marketingPlan.data.length ? (this.$refs.marketingPlan.tableHeightValues = '') : this.$refs.marketingPlan.setTableHeightFun()
},
setTableHeightEvent() {
this.$refs.marketingPlan.setTableHeightFun()
},
// 搜索表格
searchTable() {
this.$refs.marketingPlan.refreshTable()
},
//重置表格
resetTable() {
this.searchForm = {
crowdGroupId: this.crowdGroupId
}
this.$refs.marketingPlan.refreshTable()
}
}
}
</script>
<style lang="scss" scoped>
.gl-footer {
z-index: 100;
}
/deep/ .el-tabs__content {
margin-bottom: 64px;
}
.pageContent {
padding: 20px 20px 30px;
background-color: #fff;
}
</style>
<template>
<div class="scrm-sub-client-container">
<div class="head-container">
<template v-if="crowdType == ''">
<div class="head-container-title color-3 font-20">{{ $Constants.DESCRIBEDATA[id - 1].name }}</div>
<div class="head-container-content color-6 font-14">{{ $Constants.DESCRIBEDATA[id - 1].info }}</div>
<template v-if="crowdType == '3'">
<div class="head-container-title color-3 font-20">{{ groupCorwdTitle }}</div>
<div class="head-container-content color-6 font-14">{{ groupCorwdDesc }}</div>
</template>
<template v-else>
<div class="head-container-title color-3 font-20">{{ crowdForm.crowdName }}</div>
......@@ -19,16 +19,22 @@
全部客户
<span class="main-container-head-number font-14">{{ totalCount }}个</span>
</div>
<GLButton size="small" @click="handleExport" class="export" fn="导出">导出</GLButton>
<div>
<el-button size="small" @click="handleExport" class="export">导出</el-button>
<el-button plain size="small" @click="createMarketSOP()">
营销SOP
</el-button>
</div>
</div>
<GLTable ref="groupRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :noDataImg="url" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<span slot="customerName" slot-scope="scope" style="display:flex;align-items:center">
<span slot="customerName" slot-scope="scope" style="display: flex; align-items: center">
<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>
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName ? scope.scope.customerName : '--' }}</span>
</el-tooltip>
</span>
<!-- 企微名称 -->
<div slot="nickNameList" slot-scope="scope" class="expandImg">
<div v-if="scope.scope.nickNameList.length == 0">--</div>
<div v-for="(list, idx) in scope.scope.nickNameList" :key="idx">
<div v-if="idx == 0">
<span>{{ list.nickName }}</span>
......@@ -52,16 +58,19 @@
</div>
</div>
</template>
<script>
import { getCustomerList, getcrowdManageList, customerClusterListExport } from '@/api/modules/clientDataOverview'
import { getCustomerList, getcrowdManageList, customerClusterListExport, searchCrowdIdByCrowdname } from '@/api/modules/clientDataOverview'
import { getStaffList } from '@/api/modules/clientManage'
// import Constants from '@common/constants.js'
import url from '@/assets/empty.png'
export default {
name: 'group',
data() {
return {
getListApi: this.$route.params.crowdType ? getcrowdManageList : getCustomerList,
groupCorwdTitle: '',
groupCorwdDesc: '',
corwdId: '', //传到营销SOP的crowId
getListApi: this.$route.params.crowdType == '1' || this.$route.params.crowdType == '2' ? getcrowdManageList : getCustomerList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableSearchForm: {
customerPhone: '',
......@@ -91,11 +100,11 @@ export default {
name: 'nickName',
label: '企微名称'
},
{
type: 'input',
name: 'customerName',
label: '客户名称'
},
// {
// type: 'input',
// name: 'customerName',
// label: '客户名称'
// },
{
type: 'select',
name: 'isJoin',
......@@ -131,40 +140,41 @@ export default {
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName',
minWidth: 150
width: 170
},
{
label: '企微名称',
prop: 'nickNameList',
addHtml: 'nickNameList',
minWidth: 220
width: 220
},
{
label: '联系电话',
prop: 'customerPhone',
minWidth: 130
width: 130
},
{
label: '车牌号',
prop: 'carNumber',
minWidth: 120
width: 120
},
{
label: '车架号',
prop: 'carVin',
minWidth: 140,
line:1
width: 270,
line: 1
},
{
label: '车系',
prop: 'audi',
minWidth: 170
width: 170
},
{
label: '跟进员工',
prop: 'followStaff',
// addHtml: 'followStaff',
minWidth: 170
width: 170,
line: 1
},
{
label: '是否加企微', //1. 加入,0.未加入
......@@ -190,18 +200,87 @@ export default {
}
]
},
url: url
}
},
created() {
let { id } = this
this.init(id)
this.groupCorwdTitle = this.$Constants.DESCRIBEDATA.find(item => item.id == id) ? this.$Constants.DESCRIBEDATA.find(item => item.id == id).name : ''
this.groupCorwdDesc = this.$Constants.DESCRIBEDATA.find(item => item.id == id) ? this.$Constants.DESCRIBEDATA.find(item => item.id == id).info : ''
if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId
}
// 针对广汇替换字段
// cgacar
if ((this.id == 4 || this.id == 5 || this.id == 6) && location.host.includes('cgacar')) {
this.tableParams.tableColumns.splice(
3,
3,
{
label: '线索时间',
prop: 'clueTime',
width: 170,
line: 1
},
{
label: '意向车型',
prop: 'intentSeries',
width: 170,
line: 1
},
{
label: '线索来源',
prop: 'clueSource',
width: 150,
line: 1
}
)
}
},
mounted() {
this.getStaffList()
},
methods: {
// 跳转到营销SOP
async createMarketSOP() {
let marketQuery
if (this.crowdType == 1 || this.crowdType == 2) {
marketQuery = JSON.parse(this.$route.query.crowdInfo)
}
if (this.crowdType == 3) {
let params = {
'req.crowdName': this.groupCorwdTitle,
'req.merchantId': this.merchantId
}
await searchCrowdIdByCrowdname(params).then(res => {
this.corwdId = res
})
marketQuery = {
crowdDesc: this.groupCorwdDesc,
crowdId: this.corwdId,
crowdName: this.groupCorwdTitle,
total: this.totalCount
}
}
var params = {
addOrEdit: 'add',
fromPage: `/custom/clientDataOverview/group/${this.id}/${this.crowdType}`,
$title: encodeURI('新建SOP'),
info: {
// 人群
customerOptType: 2,
crowdList: []
}
}
params.info.crowdList.push(marketQuery)
this.$common.utils.storage.set('sopInfo', params)
this.$history.push({
path: 'marketing/sop/editSop'
})
},
//获取跟进员工
getStaffList() {
getStaffList({}).then(res => {
......@@ -218,11 +297,10 @@ export default {
}
})
staff.unshift({ label: '全部', value: '' })
this.$nextTick(() => {
this.tagsPartFormList[id].optionList = staff
})
console.log(this.tagsPartFormList[id])
})
},
handleSearch() {
......@@ -265,7 +343,7 @@ export default {
pageSize: 10,
pageNum: 1
}
if (this.crowdType) params.customCrowd = true
if (this.crowdType == 1 || this.crowdType == 2) params.customCrowd = true
customerClusterListExport(params).then(res => {
this.$Utils.exportFn(res)
})
......@@ -275,12 +353,27 @@ export default {
this.$refs.groupRef.data.length ? (this.$refs.groupRef.tableHeightValues = '') : this.$refs.groupRef.setTableHeightFun()
},
goBack() {
this.$router.go(-1)
if (this.crowdType == 1) {
this.$router.push({
path: '/crowdManage/index',
query: {
selectTab: 1
}
})
} else if (this.crowdType == 2) {
this.$router.push({
path: '/crowdManage/index',
query: {
selectTab: 2
}
})
} else {
this.$router.push('/clientDataOverview/index')
}
}
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
.expandImg {
......@@ -348,7 +441,7 @@ export default {
padding: 20px;
box-sizing: border-box;
.main-container-head {
margin-bottom: 20px;
margin-bottom: 10px;
&-title {
font-weight: 500;
line-height: 20px;
......
<template>
<div>
<div class="header-button"><el-button type="primary" size="small" icon="el-icon-plus" @click="handleAdd()">新建分群</el-button></div>
<div class="scrm-sub-client-container">
<div class="pageContent">
<GLCombiForm :rowNumber="1" :formObj="searchForm" :formData="clientGroupFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="clientGroupManage" :hasNum="false" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" :tableParams="tableParams" :expand-row-keys="expandArr">
<div slot="groupInfo" slot-scope="scope" v-if="scope.scope.crowdUnitList && scope.scope.crowdUnitList.length">
<div class="table-tr">
<div class="tabel-th">人群名称</div>
<div class="tabel-th">人群总人数</div>
<div class="tabel-th">已加企微人数</div>
<div class="tabel-th">未加企微人数</div>
</div>
<div class="table-tr" v-for="item in scope.scope.crowdUnitList" :key="item">
<div class="tabel-td">{{ item.crowdName }}</div>
<div class="tabel-td">{{ item.total }}</div>
<div class="tabel-td">{{ item.wechatTotal }}</div>
<div class="tabel-td">{{ item.notWechatTotal }}</div>
</div>
</div>
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <auth-button :data="scope.scope"></auth-button> -->
<el-button type="text" @click="goDetail(scope.scope)" class="blue-text">
查看客户
</el-button>
<el-button type="text" @click="handleAdd(scope.scope)" class="blue-text">
编辑
</el-button>
<el-button type="text" @click="handleDelete(scope.scope)" class="blue-text">
删除
</el-button>
<!-- <GLButton @click="goDetail(scope.scope.id, scope.scope.custGroupName)" fn="客户群详情" type="text">详情</GLButton> -->
</template>
</GLTable>
</div>
</div>
<add-or-edit ref="addOrEditForm"></add-or-edit>
</div>
</template>
<script>
import { getTableList, syncCustomerBase, clientGroupExportApi } from '@/api/modules/clientGroupManage'
import addOrEdit from './addOrEdit.vue'
import url from '@/assets/clientDataOverview/nodata.png'
export default {
name: 'grouping',
components: {
addOrEdit
},
data() {
return {
firstSearch: true,
expandArr: [],
isReload: true,
url: url,
sloading: false,
searchForm: {
keyword: ''
},
searchFormTable: {},
groupParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '人群名称',
prop: 'couponName'
},
{
label: '人群总数',
prop: 'couponName'
},
{
label: '已加企微人数',
prop: 'couponName'
},
{
label: '未加企微人数',
prop: 'couponName'
}
]
},
clientGroupFormList: [
{
type: 'input',
inputType: 'text',
name: 'keyword',
label: '分群名称',
placeholder: '请输入分群关键字'
}
],
pageConf: { pageSize: 'req.pageSize', pageNum: 'req.pageNum', totalCount: 'data.total' },
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data.crowdGroupUnitList',
mutiSelectUniqueKey: 'crowdGroupId',
tableColumns: [
{
label: '',
prop: '',
columnattrs: {
type: 'expand',
'default-expand-all': true
},
addHtml: 'groupInfo'
},
{
label: '分群名称',
prop: 'crowdGroupName',
width: 300,
line: 1
},
{
label: '分群总人数',
prop: 'total'
},
{
label: '已加企微数',
prop: 'wechatTotal'
},
{
label: '未加企微数',
prop: 'notWechatTotal'
},
{
label: '概览是否展示',
prop: 'isDisplay',
formatter: cellValue => {
return cellValue.isDisplay == 1 ? '展示' : '不展示'
}
},
{
label: '展示位',
prop: 'displayLoc',
formatter: cellValue => {
return cellValue.displayLoc ? cellValue.displayLoc + '号展示位' : '--'
}
},
{
label: '操作',
width: 180,
prop: 'auth-button',
addHtml: 'auth-button'
}
]
// tableOption: {
// width: 240
// // btnList: [
// // {
// // name: '详情',
// // // pType: 'detail'
// // }
// // ]
// }
},
getListApi: this.$apis.crowdManage.queryCrowdGroupTree,
merchantModel: 1,
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
flushTime: false
}
},
filters: {
filterTable(list) {
return [{ couponName: 9 }]
}
},
methods: {
handleAdd(row) {
this.$refs.addOrEditForm.init(row)
},
//删除
handleDelete(scope) {
this.$confirm('是否确认将此分群删除?', '删除', {
confirmButtonText: '是',
cancelButtonText: '否',
customClass: 'gl-message-box',
type: 'warning'
})
.then(async () => {
const activityPage = await this.$apis.crowdManage.activityPage({ pageSize: 1, pageNum: 1, custGroupId: scope.crowdGroupId })
if (activityPage.data.length) {
this.againConfirm()
} else {
this.$apis.crowdManage
.deleteCrowdGroup({
'req.crowdGroupId': scope.crowdGroupId
})
.then(res => {
if (res) {
this.$message({
type: 'success',
message: '删除成功!'
})
}
this.searchTable()
})
}
})
.catch(() => {})
},
againConfirm() {
this.$confirm('此分群已被招揽活动任务调用,不支持删除', '提示', {
confirmButtonText: '确定',
// cancelButtonText: '否',
showCancelButton: false,
customClass: 'gl-message-box',
type: 'error'
})
.then(async () => {})
.catch(() => {})
},
setTableHeightEvent() {
this.$refs.clientGroupManage.setTableHeightFun()
},
setTableFinishFun(content) {
// if (!this.flushTime) {
// this.flushTime = true
// this.searchTable()
// }
//接收到的数据为空
// if (!this.$refs.clientGroupManage.data.length) {
// this.$refs.clientGroupManage.setTableHeightFun()
// }
if (this.firstSearch) {
this.expandArr = this.$refs.clientGroupManage.data.length ? [this.$refs.clientGroupManage.data[0].crowdGroupId + ''] : []
this.firstSearch = false
}
this.$refs.clientGroupManage.data.length ? (this.$refs.clientGroupManage.tableHeightValues = '') : this.$refs.clientGroupManage.setTableHeightFun()
},
//导出
handleExport() {
var params = this.getParams()
clientGroupExportApi(params).then(res => {
this.$Utils.exportFn(res)
})
},
searchTable() {
this.$refs.clientGroupManage.refreshTable()
},
getParams() {
var params = {
req: {
merchantId: this.$globalState.session.merchantId,
keyword: this.searchForm.keyword
}
}
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 = this.getParams()
resolve()
})
},
resetTable() {
this.searchForm = {
keyword: ''
}
this.isReload = false
this.$nextTick(() => {
this.isReload = true
})
},
goDetail(item) {
this.$router.push(`/clientDataOverview/marketingPeople?crowdId=${item.crowdGroupId}&crowdGroupName=${item.crowdGroupName}&crowdGroupDesc=${item.crowdGroupDesc}`)
}
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
.GLFooter {
z-index: 100;
}
.header-button {
margin-bottom: 10px;
}
.table-tr {
width: 100%;
display: flex;
border-top: 1px solid #e8e8ea;
&:first-child {
background: #f4f6fc;
color: #333333;
font-weight: 700;
}
div {
height: 40px;
line-height: 40px;
padding-left: 10px;
width: 25%;
}
}
.scrm-sub-client-container {
margin-bottom: 60px;
.pageTitle {
position: relative;
margin-bottom: 20px;
height: 20px;
font-size: 20px;
font-weight: 700;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
}
.pageContent {
/deep/ {
.expanded {
& + tr:hover td {
background: none !important;
}
}
.el-table__expand-icon {
width: 14px;
height: 14px;
background: rgba(88, 80, 255, 0.3);
border-radius: 2px;
position: relative;
&.el-table__expand-icon--expanded {
transform: rotate(0deg);
}
&::after {
top: 0px;
left: 0px;
content: '+';
color: #5850ff;
width: 14px;
height: 14px;
font-size: 14px;
}
i {
display: none;
}
&.el-table__expand-icon--expanded {
&::after {
top: 0px;
left: 0px;
content: '-';
color: #5850ff;
width: 14px;
height: 14px;
font-size: 14px;
}
}
}
}
.leadList {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
div {
text-align: center;
span:nth-child(1) {
font-weight: 600;
font-size: 16px;
}
}
/deep/ .el-button {
color: #5850ff;
border: 1px solid #5850ff;
}
}
.glsx-table {
/deep/ .el-table__fixed,
/deep/ .el-table__fixed-right {
height: 100% !important; //设置高优先,以覆盖内联样式
}
}
padding: 20px 20px 30px;
// min-width: 1300px;
background-color: #fff;
.el-button + .el-button {
margin-left: 10px;
}
}
.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;
}
}
</style>
......@@ -222,7 +222,6 @@ export default {
height: 17px;
align-items: center;
font-size: 12px;
font-family: Helvetica;
color: #8c8c8c;
display: flex;
justify-content: space-between;
......
......@@ -8,191 +8,332 @@
</template>
<!-- @click="goNextPage" -->
<div class="bannerWrapBox" v-if="isHasCustomerCountBanner">
<!-- <img src="@/assets/clientDetail/defaultAvator.png" class="inTimeBtn" alt="" /> -->
<img class="bannerWrap" usemap="#planetmap" src="@/assets/clientDataOverview/companyBanner.png" alt="" />
<map name="planetmap" id="planetmap" style="cursor: pointer">
<!-- href="https://www.baidu.com" -->
<area shape="rect" coords="849,97,933,121" @click="goNextPage" target="_blank" />
</map>
</div>
<h3 class="pageSubTitle">客户分层</h3>
<div class="topmsg">
<div class="leftPieEcharts">
<span class="title">客户总数</span>
<span class="subtitle" v-if="accountLevel == 4">门店的所有客户数,包括企微客户,导入和外部系统接入客户,并根据手机号码识别同一客户后合并去重</span>
<span class="subtitle" v-else>企业的所有客户数,包括企业客户和旗下所有门店客户,并根据手机号码识别同一客户后合并去重</span>
<span class="clientTotal">
<!-- 可以动态跑数字 -->
<!-- <animate-number from="0" :to="(topDataObj.customerCount || 0) | overThousandFilter" :key="(topDataObj.customerCount || 0) | overThousandFilter" duration="2000"></animate-number> -->
{{ (topDataObj.customerCount || 0) | overThousandFilter }}人
<!-- <span class="person-text">人</span> -->
</span>
<template v-if="isShowData">
<div class="topIcon">
<span class="top-inWechat">已加企微</span>
<span class="top-outWechat">未加企微</span>
<span class="normalTitle">
客户分层
<span>| 数据统计截止时间:{{ updateTime }}</span>
</span>
<div style="display: flex">
<div class="leftPieEcharts">
<div class="leftIntro">
<span class="title">客户总数</span>
<el-popover placement="top" width="400" trigger="hover" content="门店的所有客户数,包括企微客户、导入和外部系统接入客户,并根据手机号码识别同一客户后合并去重">
<span class="dataOverPopover">门店的所有客户数,包括企微客户、导入和外部系统接入客户,并根据手机号码识别同一客户后合并去重</span>
<img class="questionImg" v-if="accountLevel == 4" src="@/assets/clientDataOverview/grayquestion.png" slot="reference" />
</el-popover>
<el-popover placement="top" width="400" trigger="hover" content="门店的所有客户数,包括企微客户、导入和外部系统接入客户,并根据手机号码识别同一客户后合并去重">
<span class="dataOverPopover">门店的所有客户数,包括企微客户、导入和外部系统接入客户,并根据手机号码识别同一客户后合并去重</span>
<img class="questionImg" v-if="accountLevel !== 4" src="@/assets/clientDataOverview/grayquestion.png" slot="reference" />
</el-popover>
</div>
<div class="qiwei-total">
<div class="qiwei-describe">
<div class="inWechat">已加企微</div>
<div class="blueNum">{{ (topDataObj.entmicroAddCustomerCount || 0) | overThousandFilter }}人</div>
</div>
<div class="qiwei-describe">
<div class="outWechat">未加企微</div>
<div class="yellowNum">{{ (topDataObj.entmicroNotAddCustomerCount || 0) | overThousandFilter }}人</div>
<p class="clientTotal">
<!-- 可以动态跑数字 -->
<!-- <animate-number from="0" :to="(topDataObj.customerCount || 0) | overThousandFilter" :key="(topDataObj.customerCount || 0) | overThousandFilter" duration="2000"></animate-number> -->
{{ (topDataObj.customerCount || 0) | overThousandFilter }}
<span class="totalUnit">人</span>
</p>
<template v-if="isShowData">
<div class="qiwei-total">
<div class="qiwei-describe">
<div class="inWechat">已加企微</div>
<div class="blueNum">{{ (topDataObj.entmicroAddCustomerCount || 0) | overThousandFilter }}人</div>
</div>
<div class="qiwei-describe">
<div class="outWechat">未加企微</div>
<div class="yellowNum">{{ (topDataObj.entmicroNotAddCustomerCount || 0) | overThousandFilter }}人</div>
</div>
</div>
</div>
<!-- 引入echart组件 -->
<pie-echart width="100%" height="448px" :topDataObj="topDataObj"></pie-echart>
<div class="personsMap" v-if="topDataObj.entmicroAddCustomerCount > 0">
<!-- <pictorial-bar width="100%" height="500px" :entmicroAddCustomerCount="topDataObj.entmicroAddCustomerCount" :entmicroNotAddCustomerCount="topDataObj.entmicroNotAddCustomerCount"></pictorial-bar> -->
</div>
</template>
<no-data :type="'hasIconText'" v-if="!isShowData"></no-data>
</div>
<div class="itembox">
<div class="buy">
<div class="buy-total item" @click="goto(4)" fn="人群客户列表" mode="div">
<!-- <span>购买(存档)客户数</span> -->
<span>基盘客户数</span>
<span>有购车或其他交易行为的所有客户</span>
<span v-if="!isEmptyObj">
{{ (topDataObj.purchaseCustomerCount || 0) | overThousandFilter }}人
<!-- <span class="person-text">人</span> -->
</span>
<span v-if="!isEmptyObj">
占比:{{ purchasePercent }}%
<i class="triangle" :class="{ active: isBuyUp === 2 }" v-if="isBuyUp"></i>
<i v-else>--</i>
</span>
<no-data :type="'hasText'" v-if="isEmptyObj"></no-data>
<!-- <i class="vertical-line"></i> -->
</div>
<el-divider direction="vertical"></el-divider>
<div class="rightWrap">
<div class="inCompanyWechatNum item smallWrap" @click="goto(5)" fn="人群客户列表" mode="div">
<span>已加企微客户数</span>
<span>
{{ (topDataObj.purchaseCustomerAddCount || 0) | overThousandFilter }}人
<!-- <span class="person-text">人</span> -->
</span>
<span>在基盘客户中,已加企微的客户</span>
<!-- <button class="btn">企微魔方&gt;&gt;</button> -->
<!-- <i class="horizontal-line"></i> -->
<!-- 引入echart组件 -->
<pie-echart width="100%" height="270px" :topDataObj="topDataObj"></pie-echart>
<!-- <pie-echart-copy class="pieCopy" width="100%" height="300px" :topDataObj="topDataObj"></pie-echart-copy> -->
<div class="personsMap" v-if="topDataObj.entmicroAddCustomerCount > 0">
<!-- <pictorial-bar width="100%" height="500px" :entmicroAddCustomerCount="topDataObj.entmicroAddCustomerCount" :entmicroNotAddCustomerCount="topDataObj.entmicroNotAddCustomerCount"></pictorial-bar> -->
</div>
<el-divider></el-divider>
<div class="outCompanyWechatNum item smallWrap" @click="goto(6)" fn="人群客户列表" mode="div">
<span>未加企微客户数</span>
<span>
{{ (topDataObj.purchaseCustomerNAddCount || 0) | overThousandFilter }}人
<!-- <span class="person-text">人</span> -->
</span>
<span>在基盘客户中,未加企微的客户</span>
<button class="btn" @click.stop="toGuideCompanyWechat" v-if="accountLevel == 4">
引流企微
<i class="el-icon-d-arrow-right"></i>
</button>
</div>
</div>
</template>
<no-data :type="'hasIconText'" v-if="!isShowData"></no-data>
</div>
<div class="no-buy mgt10">
<div class="no-buy-total item" @click="goto(1)" fn="人群客户列表" mode="div">
<span>潜在意向客户数</span>
<span>无购车且无其他交易行为的所有客户</span>
<span v-if="!isEmptyObj">
{{ (topDataObj.purposeCustomerCount || 0) | overThousandFilter }}人
<!-- <span class="person-text">人</span> -->
</span>
<span v-if="!isEmptyObj">
占比:{{ purposePercent }}%
<!-- active: !isNoBuyUp 有active就是绿色-->
<i class="triangle" :class="{ active: isNoBuyUp === 2 }" v-if="isNoBuyUp"></i>
<i v-else>--</i>
</span>
<!-- <i class="vertical-line"></i> -->
<no-data :type="'hasText'" v-if="isEmptyObj"></no-data>
</div>
<el-divider direction="vertical"></el-divider>
<div class="rightWrap">
<div class="inCompanyWechatNum item smallWrap" @click="goto(2)" fn="人群客户列表" mode="div">
<span>已加企微客户数</span>
<span>
{{ (topDataObj.purposeCustomerAddCount || 0) | overThousandFilter }}人
<!-- <span class="person-text">人</span> -->
</span>
<span>在潜在意向客户中,已加企微的客户</span>
<!-- <i class="horizontal-line"></i> -->
<div class="itembox">
<div style="display: flex; overflow: hidden">
<div class="buy">
<div class="buy-total item" @click="goto(1)" fn="人群客户列表" mode="div">
<div class="buyTitle">
<span class="client">基盘客户</span>
<el-popover v-if="isAddScrm" placement="top" trigger="hover" content="有购车或其他交易行为的所有客户">
<span class="dataOverPopover">
有购车或其他交易行为的所有客户
<br />
占比:基盘客户 / 门店客户总数 * 100%
</span>
<img class="questionImg" src="@/assets/clientDataOverview/grayquestion.png" slot="reference" />
</el-popover>
<el-popover v-if="!isAddScrm" placement="top" trigger="hover" content="有购车或其他交易行为的所有客户(数据来源于ERP,起始时间2019年)">
<span class="dataOverPopover">
有购车或其他交易行为的所有客户(数据来源于ERP,起始时间2019年)
<br />
占比:基盘客户 / 门店客户总数 * 100%
</span>
<img class="questionImg" src="@/assets/clientDataOverview/grayquestion.png" slot="reference" />
</el-popover>
</div>
<div class="proportion">
<span class="proNum" v-if="!isEmptyObj">
{{ (topDataObj.purchaseCustomerCount || 0) | overThousandFilter }}
<span class="proPerson">人</span>
</span>
<span class="ratio" v-if="!isEmptyObj">
占比:
<img src="@/assets/clientDataOverview/upIcon.png" />
{{ purchasePercent }}%
</span>
</div>
<el-divider></el-divider>
<no-data :type="'hasText'" v-if="isEmptyObj"></no-data>
<div class="firmClient">
<div @click.stop="goto(2)" fn="人群客户列表" mode="div" class="wid50">
<div class="clientCompleted">
<span>已加企微</span>
<el-popover placement="top" trigger="hover" content="在基盘客户中,已加企微的客户">
<span class="dataOverPopover">
在基盘客户中,已加企微的客户
<br />
占比:基盘已加企微客户 / 基盘客户 * 100%
</span>
<img class="questionImg" src="@/assets/clientDataOverview/grayquestion.png" slot="reference" />
</el-popover>
</div>
<p class="clientNum">
{{ (topDataObj.purchaseCustomerAddCount || 0) | overThousandFilter }}
<span class="personText">人</span>
<span class="numPro">占比:{{ topDataObj.purchaseCustomerAddPercent | percentageDeal }}%</span>
</p>
</div>
<div @click.stop="goto(3)" fn="人群客户列表" mode="div" class="wid50">
<div class="clientCompleted">
<span>未加企微</span>
<el-popover placement="top" trigger="hover" content="在基盘客户中,未加企微的客户">
<span class="dataOverPopover">
在基盘客户中,未加企微的客户
<br />
占比:基盘未加企微客户 / 基盘客户 * 100%
</span>
<img class="questionImg" src="@/assets/clientDataOverview/grayquestion.png" slot="reference" />
</el-popover>
</div>
<p class="clientNum">
{{ (topDataObj.purchaseCustomerNAddCount || 0) | overThousandFilter }}
<span class="personText">人</span>
<span class="numPro">占比:{{ topDataObj.purchaseCustomerNAddPercent | percentageDeal }}%</span>
</p>
</div>
</div>
</div>
<!-- <el-divider direction="vertical"></el-divider> -->
</div>
<el-divider></el-divider>
<div class="outCompanyWechatNum item smallWrap" @click="goto(3)" fn="人群客户列表" mode="div">
<span>未加企微客户数</span>
<span>
{{ (topDataObj.purposeCustomerNAddCount || 0) | overThousandFilter }}人
<!-- <span class="person-text">人</span> -->
</span>
<span>在潜在意向客户中,未加企微的客户</span>
<!-- &nbsp;&nbsp;&gt;&gt;-->
<button class="btn" @click.stop="toGuideCompanyWechat" v-if="accountLevel == 4">
引流企微
<i class="el-icon-d-arrow-right"></i>
</button>
<div class="buy">
<div class="buy-total item" @click="goto(4)" fn="人群客户列表" mode="div">
<div class="buyTitle">
<span class="client">潜在意向客户</span>
<el-popover v-if="isAddScrm" placement="top" trigger="hover" content="无购车且无其他交易行为的所有客户">
<span class="dataOverPopover">
无购车且无其他交易行为的所有客户
<br />
占比:潜在意向客户 / 门店客户总数 * 100%
</span>
<img class="questionImg" src="@/assets/clientDataOverview/grayquestion.png" slot="reference" />
</el-popover>
<el-popover v-if="!isAddScrm" placement="top" trigger="hover" content="无购车且无其他交易行为的所有客户(数据来源于DMP、展厅助手)">
<span class="dataOverPopover">
无购车且无其他交易行为的所有客户(数据来源于DMP、展厅助手)
<br />
占比:潜在意向客户 / 门店客户总数 * 100%
</span>
<img class="questionImg" src="@/assets/clientDataOverview/grayquestion.png" slot="reference" />
</el-popover>
</div>
<div class="proportion">
<span class="proNum" v-if="!isEmptyObj">
{{ (topDataObj.purposeCustomerCount || 0) | overThousandFilter }}
<span class="proPerson">人</span>
</span>
<span class="ratio" v-if="!isEmptyObj">
占比:
<img src="@/assets/clientDataOverview/upIcon.png" />
{{ purposePercent }}%
</span>
</div>
<el-divider></el-divider>
<no-data :type="'hasText'" v-if="isEmptyObj"></no-data>
<div class="firmClient">
<div @click.stop="goto(5)" fn="人群客户列表" mode="div" class="wid50">
<div class="clientCompleted">
<span>已加企微</span>
<el-popover placement="top" trigger="hover" content="在潜在意向客户中,已加企微的客户">
<span class="dataOverPopover">
在潜在意向客户中,已加企微的客户
<br />
占比:潜在意向已加企微客户 / 潜在意向客户 * 100%
</span>
<img class="questionImg" src="@/assets/clientDataOverview/grayquestion.png" slot="reference" />
</el-popover>
</div>
<p class="clientNum">
{{ (topDataObj.purposeCustomerAddCount || 0) | overThousandFilter }}
<span class="personText">人</span>
<span class="numPro">占比:{{ topDataObj.purposeCustomerAddPercent | percentageDeal }}%</span>
</p>
</div>
<div @click.stop="goto(6)" fn="人群客户列表" mode="div" class="wid50">
<div class="clientCompleted">
<span>未加企微</span>
<el-popover placement="top" trigger="hover" content="在潜在意向客户中,未加企微的客户">
<span class="dataOverPopover">
在潜在意向客户中,未加企微的客户
<br />
占比:潜在意向未加企微客户 / 潜在意向客户 * 100%
</span>
<img class="questionImg" src="@/assets/clientDataOverview/grayquestion.png" slot="reference" />
</el-popover>
</div>
<p class="clientNum">
{{ (topDataObj.purposeCustomerNAddCount || 0) | overThousandFilter }}
<span class="personText">人</span>
<span class="numPro">占比:{{ topDataObj.purposeCustomerNAddPercent | percentageDeal }}%</span>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="intended mgt10" @click="goto(11)">
<div class="intend-name">已加企微,待匹配客户</div>
<div class="intend-info">已加企微,且未匹配到潜在意向和基盘客户的客户</div>
<div class="intend-statistics">
<div class="intend-statistics-num">{{ (topDataObj.waitMatchCustomerAddCount || 0) | overThousandFilter }}人</div>
<div class="intend-statistics-rate">
占比:{{ (topDataObj.waitMatchPercent && topDataObj.waitMatchPercent.toFixed(2)) || 0 }}%
<i class="triangle" :class="{ active: topDataObj.waitMatchUp === 2 }" v-if="topDataObj.waitMatchUp"></i>
<i v-else>--</i>
<div class="intendedTop">
<!-- 已加企微,待匹配客户 -->
<div class="intended" @click="goto(7)">
<p class="intend-name">
<span class="nameHover">已加企微,待匹配客户</span>
<span class="intend-phone" @click.stop="goto(8)">(已绑定手机号{{ (topDataObj.notMatchCustomerAddPhoneCount || 0) | overThousandFilter }}人)</span>
<el-popover placement="top" trigger="hover" content="已加企微,且未匹配到潜在意向或基盘客户的客户">
<span class="dataOverPopover">
已加企微,且未匹配到潜在意向或基盘客户的客户
<br />
占比:已加企微,待匹配客户 / 门店客户总数 * 100%
</span>
<img class="questionImg" src="@/assets/clientDataOverview/grayquestion.png" slot="reference" />
</el-popover>
</p>
<div class="proportion">
<span class="proNum" v-if="!isEmptyObj">
{{ (topDataObj.waitMatchCustomerAddCount || 0) | overThousandFilter }}
<span class="proPerson">人</span>
</span>
<span class="ratio" v-if="!isEmptyObj">
占比:
<img src="@/assets/clientDataOverview/upIcon.png" />
{{ (topDataObj.waitMatchPercent && topDataObj.waitMatchPercent.toFixed(2)) || 0 }}%
<i class="triangle" :class="{ active: topDataObj.waitMatchUp === 2 }" v-if="topDataObj.waitMatchUp"></i>
<i v-else>--</i>
</span>
</div>
</div>
<!-- 未加企微,未匹配客户 -->
<div class="intended" @click="goto(9)">
<p class="intend-name">
<span class="nameHover">未加企微,未匹配客户</span>
<el-popover placement="top" trigger="hover" content="未添加企微或添加企微后删除好友,且未匹配到意向和基盘客户的客户">
<span class="dataOverPopover">
未添加企微或添加企微后删除好友,且未匹配到意向和基盘客户的客户
<br />
占比:未加企微,未匹配客户 / 门店客户总数 * 100%
</span>
<img class="questionImg" src="@/assets/clientDataOverview/grayquestion.png" slot="reference" />
</el-popover>
</p>
<div class="proportion">
<span class="proNum" v-if="!isEmptyObj">
{{ (topDataObj.notMatchCustomerNAddCount || 0) | overThousandFilter }}
<span class="proPerson">人</span>
</span>
<span class="ratio" v-if="!isEmptyObj">
占比:
<img src="@/assets/clientDataOverview/upIcon.png" />
{{ topDataObj.notMatchCustomerNAddPercent | percentageDeal }}%
<i class="triangle" :class="{ active: topDataObj.waitMatchUp === 2 }" v-if="topDataObj.waitMatchUp"></i>
<i v-else>--</i>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="middlemsg">
<h3 class="pageSubTitle">客户分群</h3>
<div class="itembox">
<template v-for="(item, index) in titles">
<div class="item" @click="goto(item.id)" fn="人群客户列表" mode="div" :key="index">
<p>{{ item.name }}</p>
<p>{{ item.subName }}</p>
<p>
{{ item.num | overThousandFilter }}人
<!-- <span class="person-text">人</span> -->
</p>
<img :src="item.url" alt="" />
<div class="middlemsg-qiwei-total">
<div class="qiwei-describe">
<div class="inWechat">已加企微</div>
<div class="num">
{{ (item.add(topDataObj) || 0) | overThousandFilter }}
<span class="person-text">人</span>
<div class="settiongBox">
<span class="normalTitle">
客户分群
<span>| 数据统计截止时间:{{ updateTime }}</span>
</span>
<span class="setting" v-if="(userType == 2 && isMerchantStaffAdmin == true) || (userType == 1 && accountLevel == 4)" @click="goToGrouping()">设置</span>
</div>
<div :class="{ fourItemBox: isFourDisplay, fiveItemBox: isFiveDisplay }">
<template v-for="(item, index) in customerSegmentation">
<!-- fn="人群客户列表" mode="div" -->
<div class="item" @click="goToGroupOperating(item)" :key="index" v-if="index < displayNum">
<div class="itemTitle">
<span class="itemName">{{ item.crowdGroupName }}</span>
<el-popover placement="top" trigger="hover" :content="item.crowdGroupDesc">
<span class="dataOverPopover">{{ item.crowdGroupDesc }}</span>
<img class="questionImg" src="@/assets/clientDataOverview/grayquestion.png" slot="reference" />
</el-popover>
</div>
<div class="itemBottom">
<p class="totalNum">
{{ item.total | overThousandFilter }}
<span class="enum">人</span>
</p>
<div class="middlemsg-qiwei-total">
<div class="qiwei-describe">
<div class="inWechat">已加企微</div>
<div class="num">
{{ (item.wechatTotal || 0) | overThousandFilter }}
<span class="person-text">人</span>
</div>
</div>
</div>
<div class="qiwei-describe">
<div class="inWechat">未加企微</div>
<div class="num">
{{ (item.noAdd(topDataObj) || 0) | overThousandFilter }}
<span class="person-text">人</span>
<div class="qiwei-describe">
<div class="inWechat">未加企微</div>
<div class="num">
{{ (item.notWechatTotal || 0) | overThousandFilter }}
<span class="person-text">人</span>
</div>
</div>
</div>
</div>
</div>
</template>
</div>
<div class="set">
<span v-if="customerSegmentation && customerSegmentation.length > displayNum && !closeFlag" @click="expandClick('expand')">
展开
<i class="el-icon-arrow-down color-58"></i>
</span>
<span v-if="closeFlag" @click="expandClick('close')">
收起
<i class="el-icon-arrow-up color-58"></i>
</span>
</div>
</div>
<h3 class="pageSubTitle">客户增长趋势</h3>
<!-- <h3 class="pageSubTitle">客户增长趋势</h3> -->
<div class="bottommsg">
<span class="normalTitle">
客户增长趋势
<span>| 数据统计截止时间:{{ updateTime }}</span>
</span>
<no-data :type="'hasIconText'" v-if="!isShowBarMap"></no-data>
<template v-if="isShowBarMap">
<span class="timeDuring">{{ allMapList[0].dateTime }}~{{ allMapList[allMapList.length - 1].dateTime }}</span>
......@@ -201,7 +342,7 @@
<button class="btn7 optionBtn" :class="{ activeDayIcon: this.timeGap == 7 }" @click="clickSeven">近7天</button>
<div class="clientAddTrend">
<div class="one1">
<span>区间统计:</span>
<span>区间合计:</span>
<span>
全部客户:
<a>{{ bottomDataObj.customerCount | overThousandFilter }}人</a>
......@@ -226,35 +367,37 @@
<multiple-echart v-if="isReload" width="100%" height="420px" :totalData="allMapList" :isCloseShowNumTag="isCloseShowNumTag"></multiple-echart>
</template>
</div>
<el-dialog title="提示" :visible.sync="dialogVisible" top="15vh" width="30%" :before-close="handleClose">
<GLDialog title="提示" :visible.sync="dialogVisible">
<span>企微魔方正在开发中,敬请期待...</span>
</el-dialog>
</GLDialog>
</div>
</template>
<script>
import $ from 'jquery'
import { rwdImageMaps } from './jquery.rwdImageMaps.js'
import { getDataOverview, getDataOverviewBarMap } from '@/api/modules/clientDataOverview'
import { getDataOverview, getDataOverviewBarMap, customerClusterListShow } from '@/api/modules/clientDataOverview'
import { getLoginCount } from '@/api/modules/loginCount'
import pieEchart from '@/components/echarts/pieEchart'
import multipleEchart from '@/components/echarts/multipleEchart'
// import pictorialBar from '@/components/echarts/pictorialBar'
import url1 from '../../assets/clientDataOverview/cars.png'
import url2 from '../../assets/clientDataOverview/renewal.png'
import url3 from '../../assets/clientDataOverview/maintenance.png'
import url4 from '../../assets/clientDataOverview/silence.png'
import noData from '@/components/noData/noData'
import { formatDate } from '@/utils'
export default {
name: 'clientDataOverview',
components: {
pieEchart,
multipleEchart,
// pictorialBar,
noData
},
data() {
return {
isFourDisplay: '',
isFiveDisplay: '',
screenWidth: null,
displayNum: '', //展示的数目
closeFlag: false, //展开收起 显示收起的时候为true
isAddScrm: true,
crowdType: 3,
isCloseShowNumTag: false,
isReload: true,
isShowModal: false,
......@@ -274,60 +417,7 @@ export default {
burseholderCustomerCount: 0,
silenceCustomerCount: 0
},
titles: [
{
name: '新车客户数',
subName: '购车时间3个月的客户',
num: 0,
add: obj => {
return obj.newCarCustomerAddCount
},
noAdd: obj => {
return obj.newCarCustomerNAddCount
},
url: url1,
id: 7
},
{
name: '车险待续保客户数',
subName: '近一个月内车险即将到期的客户',
num: 0,
add: obj => {
return obj.needRenewalCustomerAddCount
},
noAdd: obj => {
return obj.needRenewalCustomerNAddCount
},
url: url2,
id: 8
},
{
name: '新车待首保客户数',
subName: '购车时间5~7个月内,且无保养记录的客户',
num: 0,
add: obj => {
return obj.burseholderCustomerAddCount
},
noAdd: obj => {
return obj.burseholderCustomerNAddCount
},
url: url3,
id: 9
},
{
name: '沉默客户数',
subName: '超过180天未到店的客户',
num: 0,
add: obj => {
return obj.silenceCustomerAddCount
},
noAdd: obj => {
return obj.silenceCustomerNAddCount
},
url: url4,
id: 10
}
],
customerSegmentation: [], //客户分群展示列表
isNoBuyUp: 0, //默认环比为增
isBuyUp: 0,
bottomDataObj: {},
......@@ -346,14 +436,45 @@ export default {
mounted() {
document.body.style.overflow = 'hidden'
this.screenWidth = document.body.clientWidth
var that = this
window.addEventListener('resize', () => {
that.screenWidth = document.body.clientWidth
that.isReload = false
that.$nextTick(() => {
that.isReload = true
})
})
},
filters: {
percentageDeal(val) {
if (val) return (val * 100).toFixed(2) || 0
return 0
}
},
watch: {
screenWidth: {
handler: function(val) {
if (val >= 1440) {
if (!this.closeFlag) {
this.displayNum = 5
}
this.isFourDisplay = false
this.isFiveDisplay = true
this.backupNum = 5
} else {
if (!this.closeFlag) {
this.displayNum = 4
}
this.isFourDisplay = true
this.isFiveDisplay = false
this.backupNum = 4
}
},
deep: true
}
},
computed: {
isEmptyObj() {
if (Object.keys(this.topDataObj).length == 0) {
......@@ -378,6 +499,8 @@ export default {
//运行在qiankun容器中
this.accountLevel = this.$globalState.session.accountLevel
this.userType = this.$globalState.session.userType
this.merchantId = this.$globalState.session.merchantId
this.isMerchantStaffAdmin = this.$globalState.session.isMerchantStaffAdmin
}
// 掉两个数据接口
......@@ -386,20 +509,38 @@ export default {
//先看登录次数,首次进来为true,不管客户总数是否为0,都显示banner;
//不是首次进来,登录次数为2,客户总数大于0,不显示banner,小于0,继续显示banner;
this.getDataOverviewBarMapFun()
this.customerListShow()
if (location.host.includes('cgacar')) {
this.isAddScrm = false
}
},
methods: {
expandClick(val) {
if (val == 'expand') {
this.closeFlag = true
this.displayNum = this.customerSegmentation.length || ''
} else {
this.closeFlag = false
this.displayNum = this.backupNum
}
},
goToGrouping() {
this.$router.push('/clientDataOverview/grouping')
},
customerListShow() {
let param = {
'req.merchantId': this.merchantId,
'req.isDisplay': 1
}
customerClusterListShow(param).then(res => {
this.customerSegmentation = res.crowdGroupUnitList
this.updateTime = formatDate(res.updateTime)
})
},
goToGroupOperating(item) {
this.$router.push(`/clientDataOverview/marketingPeople?crowdId=${item.crowdGroupId}&crowdGroupName=${item.crowdGroupName}&crowdGroupDesc=${item.crowdGroupDesc}&flag=1`)
},
goNextPage() {
// window.open('https://www.baidu.com', '_blank')
// this.dialogVisible = true
// let timer = 3
// setInterval(() => {
// timer--
// if (timer == 0) {
// this.dialogVisible = false
// }
// }, 1000)
// this.$router.push('drainage/square/index')
this.$history.push('/drainage/square/index')
//要引流企微魔方
// this.getDataOverviewFun()
......@@ -452,7 +593,6 @@ export default {
tipPanelEle.style.top = baseNavEleHeight + baseSubNavEleHeight + bannerWrapEle.offsetTop + bannerWrapEle.clientHeight + 10 + 'px'
knewBtnEle.style.top = baseNavEleHeight + baseSubNavEleHeight + bannerWrapEle.offsetTop + bannerWrapEle.clientHeight + tipPanelEle.clientHeight + 20 + 'px'
// }, 300)
console.log(window, '子系统')
window.addEventListener('resize', () => {
tipPanelEle.style.display = 'block'
document.querySelector('.modalLayer').style.width = document.querySelector('.bannerWrap').clientWidth + 'px'
......@@ -489,18 +629,14 @@ export default {
}
this.topDataObj = res
console.log(this.topDataObj, 'this.topDataObj')
// this.titles[0].num = res.newCarCustomerCount
// this.titles[1].num = res.needRenewalCustomerCount
// this.titles[2].num = res.burseholderCustomerCount
// this.titles[4].num = res.silenceCustomerCount
console.log(res, '这是上面数据')
this.isNoBuyUp = res.purposeUp
this.isBuyUp = res.purchaseUp
//先看登录次数,首次进来为true,不管客户总数是否为0,都显示banner;
//不是首次进来,登录次数为2,客户总数大于0,不显示banner,小于等于0,继续显示banner;
console.log(this.accountLevel, this.isShowModal, this.topDataObj.customerCount, 'myData')
if (this.isShowModal && this.accountLevel !== 4) {
this.isShowModal = false //关掉引导层
}
......@@ -530,14 +666,13 @@ export default {
// $('img[usemap]').rwdImageMaps()
// })
// }
console.log(this.isHasCustomerCountBanner, 'true/fasle')
this.$set(this.titles[0], 'num', res.newCarCustomerCount)
this.$set(this.titles[1], 'num', res.needRenewalCustomerCount)
this.$set(this.titles[2], 'num', res.burseholderCustomerCount)
this.$set(this.titles[3], 'num', res.silenceCustomerCount)
// this.$set(this.titles[0], 'num', res.newCarCustomerCount)
// this.$set(this.titles[1], 'num', res.needRenewalCustomerCount)
// this.$set(this.titles[2], 'num', res.burseholderCustomerCount)
// this.$set(this.titles[3], 'num', res.silenceCustomerCount)
})
// .catch(err => {
// console.log('错误信息:', err)
//
// })
},
//首次进来获取下方柱状图数据(一进来默认传7天)
......@@ -546,7 +681,6 @@ export default {
if (!res) {
return
}
console.log('下方数据', res)
this.bottomDataObj = res
if (dayCount == 7) {
this.sevenDayStorage = res
......@@ -554,7 +688,6 @@ export default {
this.thirtyDayStorage = res
}
this.allMapList = res.customerGrowthTrends
console.log(this.allMapList, '数组')
this.isShowBarMap = true //第一次有数据进来,就让图表显示
},
clickThirty() {
......@@ -585,7 +718,8 @@ export default {
//跳转到人群客户列表
goto(id) {
if (this.userType == 2) return
this.$router.push('/clientDataOverview/group/' + id)
// this.$router.push('/clientDataOverview/group/' + id )
this.$router.push(`/clientDataOverview/group/${id}/${this.crowdType}`)
}
}
}
......@@ -594,11 +728,28 @@ export default {
<style lang="scss" scoped>
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
.dataOverPopover {
font-size: 12px;
line-height: 18px;
color: #666666;
}
// .pieCopy {
// //设置两个pie重合
// top: -300px;
// }
.scrm-sub-client-container {
.person-text {
font-size: 16px !important;
}
.normalTitle {
span {
margin-left: 6px;
font-size: 14px;
color: #666666;
letter-spacing: 0;
font-weight: 400;
}
}
.modalLayer {
position: fixed;
z-index: 99;
......@@ -607,13 +758,6 @@ export default {
// visibility: hidden;
display: none;
// width: 155px;
// width: 100%;
// height: 207px;
// border: 4px;
// filter: blur(15px);
// border-radius: 60px;
// box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.79);
outline: 5000px solid rgba(0, 0, 0, 0.79);
border: 2px solid #fff;
border-radius: 4px;
......@@ -622,10 +766,6 @@ export default {
position: fixed;
z-index: 100;
top: 25%;
// top: 0;
// left: 0;
// bottom: 0;
// right: 0;
width: 100%;
}
......@@ -633,32 +773,16 @@ export default {
position: fixed;
display: inline-block;
z-index: 100;
// width: 124px;
// height: 40px;
left: 50%;
bottom: 18%;
transform: translateX(-50%);
// font-size: 16px;
// font-weight: 500;
// color: #fff;
// background-color: $btnBlue;
// border-radius: 4px;
}
.bannerWrapBox {
width: 100%;
min-width: 1050px;
// position: relative;
// .inTimeBtn {
// position: absolute;
// bottom: 20px;
// right: 50px;
// }
.bannerWrap {
width: 100%;
// height: 146px;
//object-fit: contain; //保持图片的原始比例,最大程度展示
}
}
......@@ -673,25 +797,26 @@ export default {
letter-spacing: 1px;
}
.topmsg {
display: flex;
// display: flex;
min-width: 1050px;
background: #ffffff;
.leftPieEcharts {
position: relative;
background-color: #fff;
width: 372px;
height: 554px; //470
height: 370px;
// height: 480px; //470
box-sizing: border-box;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
.title {
position: absolute;
left: 20px;
top: 20px;
font-weight: bold;
font-size: 16px;
color: #333333;
height: 22px;
line-height: 22px;
.leftIntro {
margin-top: 20px;
.title {
margin-left: 20px;
font-weight: bold;
font-size: 16px;
color: #333333;
}
}
.subtitle {
position: absolute;
padding-right: 16px;
......@@ -703,15 +828,15 @@ export default {
line-height: 20px;
}
.clientTotal {
position: absolute;
right: 20px;
top: 20px;
height: 26px;
font-size: 26px;
font-weight: 500;
margin: 16px 0 10px 20px;
font-size: 36px;
color: #333333;
line-height: 26px;
z-index: 9;
font-weight: 700;
.totalUnit {
font-size: 16px;
color: #333333;
font-weight: 400;
}
}
.topIcon {
position: absolute;
......@@ -756,58 +881,39 @@ export default {
width: 372px;
padding: 0 57px;
position: absolute;
bottom: 38px;
bottom: 18px;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
}
.inWechat {
// position: absolute;
// left: 57px;
// top: 365px;
height: 20px;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
z-index: 9;
margin-bottom: 4px;
text-align: center;
margin-bottom: 8px;
}
.blueNum {
// position: absolute;
// left: 57px;
// top: 389px;
height: 25px;
font-size: 18px;
text-align: center;
font-weight: 600;
color: #716aff;
color: #333333;
line-height: 25px;
z-index: 9;
}
.outWechat {
// position: absolute;
// right: 57px;
// top: 365px;
height: 20px;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
background-color: #fff;
z-index: 9;
margin-bottom: 4px;
text-align: center;
margin-bottom: 8px;
}
.yellowNum {
// position: absolute;
// right: 57px;
// top: 389px;
font-size: 18px;
font-weight: 600;
color: #fe9c1c;
color: #333333;
line-height: 25px;
text-align: center;
}
......@@ -820,8 +926,8 @@ export default {
}
}
.itembox {
width: calc(100% - 382px);
width: calc(100% - 392px);
margin-top: 20px;
.item {
// border: 1px solid rgba(121, 121, 121, 1);
height: 86px;
......@@ -829,8 +935,6 @@ export default {
}
.item.no-buy-total,
.item.buy-total {
// height: 238px;
width: 50%;
position: relative;
height: auto;
cursor: pointer;
......@@ -879,10 +983,6 @@ export default {
line-height: 22px;
// vertical-align: middle;
> .triangle {
// position: absolute;
// left: 51.8%;
// top: 165px;
// margin-bottom: 20px;
display: inline-block;
vertical-align: middle;
width: 0px;
......@@ -918,229 +1018,314 @@ export default {
.no-buy,
.buy {
display: flex;
margin-left: 10px;
background-color: #fff;
height: 222px;
&:last-child {
margin-top: 10px;
}
}
.intended {
height: 90px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-left: 10px;
position: relative;
box-sizing: border-box;
cursor: pointer;
.intend-name {
height: 22px;
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 22px;
padding: 20px 0 8px 24px;
font-weight: bold;
}
.intend-info {
height: 20px;
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
margin-left: 24px;
width: calc(100% - 433px);
}
.intend-statistics {
position: absolute;
display: flex;
left: 364px;
top: 32px;
&-num {
font-size: 26px;
font-weight: 600;
color: #424242;
line-height: 26px;
letter-spacing: 1px;
margin-right: 12px;
margin-left: 16px;
width: 50%;
background-color: #f9f9fc;
padding-bottom: 20px;
.buy-total {
width: 100%;
.buyTitle {
margin-top: 16px;
.client {
margin-left: 16px;
font-size: 16px;
color: #333333;
font-weight: 600;
&:hover {
color: #625aff;
}
}
}
&-rate {
font-size: 16px;
font-weight: 500;
color: #565656;
line-height: 22px;
.proportion {
padding: 24px 0 16px 16px;
// border-bottom: 1px solid #e5e5e5;
width: 100%;
box-sizing: border-box;
.proNum {
font-size: 26px;
color: #333333;
line-height: 26px;
font-weight: 700;
.proPerson {
font-size: 14px;
color: #333333;
font-weight: 400;
}
}
.ratio {
margin-left: 16px;
font-size: 14px;
color: #666666;
img {
vertical-align: middle;
}
}
}
.triangle {
display: inline-block;
vertical-align: middle;
width: 0px;
height: 0px;
border-bottom: 6px solid #ff2020;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
&.active {
border-bottom: 6px solid #2cca74;
transform: rotate(180deg);
/deep/ .el-divider--horizontal {
width: 96%;
margin: 4px auto;
text-align: center;
}
.firmClient {
display: flex;
justify-content: space-between;
.clientCompleted {
margin: 20px 0 10px 16px;
display: flex;
font-size: 14px;
color: #666666;
}
.clientNum {
margin: 10px 0px 10px 16px;
font-size: 16px;
color: #333333;
font-weight: 700;
.personText {
font-size: 12px;
color: #333333;
font-weight: 400;
}
.numPro {
margin-left: 16px;
font-size: 12px;
color: #666666;
font-weight: 400;
}
}
.marketingBtn {
margin: 16px 0 10px 16px;
font-size: 14px;
color: #625aff;
/deep/ .el-dropdown-link {
color: #625aff;
}
}
}
}
}
.rightWrap {
width: 48%;
margin-left: 20px;
cursor: pointer;
position: relative;
.intendedTop {
display: flex;
margin-top: 16px;
.intended {
// height: 110px;
width: 50%;
background: #f9f9fc;
margin-left: 16px;
padding: 16px 32px 20px 16px;
cursor: pointer;
.intend-name {
font-size: 16px;
color: #333333;
letter-spacing: 0.8px;
font-weight: 600;
white-space: nowrap;
.nameHover {
&:hover {
color: #625aff;
}
}
.smallWrap {
position: relative;
> span {
position: absolute;
&:first-child {
font-weight: bold;
height: 22px;
font-size: 16px;
color: #333333;
line-height: 22px;
top: 20px;
.intend-phone {
font-size: 14px;
color: #666666;
font-weight: 400;
&:hover {
color: #625aff;
}
}
&:nth-child(2) {
height: 26px;
}
.proportion {
padding: 26px 0 0 0px;
.proNum {
font-size: 26px;
font-weight: 600;
color: #333333;
line-height: 26px;
right: 20px;
top: 20px;
font-weight: 700;
.proPerson {
font-size: 14px;
color: #333333;
font-weight: 400;
}
}
&:nth-child(3) {
top: 50px;
height: 20px;
.ratio {
margin-left: 16px;
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
color: #666666;
img {
vertical-align: middle;
}
}
}
.btn {
position: absolute;
top: 82px;
padding: 6px 20px;
box-sizing: border-box;
border-radius: 4px;
border: 1px solid $btnBlue;
background-color: #fff;
color: #6861ff;
font-size: 14px;
font-weight: 400;
}
}
.inCompanyWechatNum {
// background-color: red;
// position: absolute;
width: 100%;
.horizontal-line {
position: absolute;
width: 100%;
height: 1px;
background: #f0f0f0;
bottom: 0;
right: 0;
}
}
.el-divider--horizontal {
display: block;
height: 1px;
width: 100%;
margin: 0;
}
}
}
}
.middlemsg {
margin-top: 16px;
min-width: 1050px;
.itembox {
background: #ffffff;
padding-bottom: 1px;
.settiongBox {
display: flex;
width: 100%;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #e5e5e5;
.normalTitle {
border-bottom: none;
}
.setting {
font-size: 16px;
color: #5850ff;
margin-right: 20px;
font-weight: 500;
cursor: pointer;
}
}
.set {
text-align: center;
font-size: 16px;
color: #5850ff;
margin-bottom: 20px;
}
.fourItemBox {
margin: 20px 20px 0 20px;
// display: flex;
// justify-content: space-between;
display: grid;
grid-template-columns: 25% 25% 25% 25%;
.item {
width: 25%;
// padding: 20px;
position: relative;
height: 215px;
border: 1px solid #fff;
background-color: #fff;
box-sizing: border-box;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
// border: 1px solid rgba(121, 121, 121, 1);
cursor: pointer;
&:not(:first-child) {
margin-left: 20px;
margin-right: 16px;
margin-bottom: 16px;
// width: 25%;
&:nth-child(4n) {
margin-right: 0;
}
&:hover {
border: 1px solid $btnBlue;
}
p {
position: absolute;
&:first-child {
left: 20px;
top: 20px;
height: 22px;
.itemTitle {
height: 54px;
background: #f4f6fc;
display: flex;
align-items: center;
.itemName {
font-size: 16px;
font-weight: bold;
color: #333333;
line-height: 22px;
}
&:nth-child(2) {
width: calc(100% - 98px);
left: 20px;
top: 46px;
height: 20px;
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
font-weight: 600;
padding-left: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&:nth-child(3) {
left: 20px;
top: 87px;
height: 26px;
}
.itemBottom {
padding-bottom: 20px;
border-left: 1px solid #e5e5e5;
border-right: 1px solid #e5e5e5;
border-bottom: 1px solid #e5e5e5;
.totalNum {
font-size: 26px;
font-weight: 600;
color: #333333;
line-height: 26px;
font-weight: 700;
padding: 24px 0 32px 16px;
.enum {
font-size: 18px;
font-weight: 400;
color: #333333;
vertical-align: middle;
}
}
.middlemsg-qiwei-total {
display: flex;
justify-content: space-between;
.qiwei-describe {
padding: 0px 16px;
.inWechat {
color: #666666;
font-size: 14px;
}
.num {
margin-top: 4px;
font-size: 16px;
color: #333333;
font-weight: 600;
.person-text {
font-size: 14px;
color: #333333;
font-weight: 400;
}
}
}
}
}
img {
position: absolute;
right: 20px;
top: 20px;
}
}
}
&-qiwei-total {
width: 100%;
padding: 0 20px;
position: absolute;
bottom: 20px;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
.qiwei-describe {
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
margin-bottom: 4px;
text-align: center;
}
.num {
font-size: 16px;
font-weight: 600;
color: #333333;
line-height: 22px;
text-align: center;
.person-text {
font-weight: 500;
.fiveItemBox {
margin: 20px 20px 0 20px;
// display: flex;
// justify-content: space-between;
display: grid;
grid-template-columns: 20% 20% 20% 20% 20%;
.item {
cursor: pointer;
margin-right: 16px;
margin-bottom: 16px;
// width: 25%;
&:nth-child(5n) {
margin-right: 0;
}
.itemTitle {
height: 54px;
background: #f4f6fc;
display: flex;
align-items: center;
.itemName {
font-size: 16px;
font-weight: 600;
padding-left: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.itemBottom {
padding-bottom: 20px;
border-left: 1px solid #e5e5e5;
border-right: 1px solid #e5e5e5;
border-bottom: 1px solid #e5e5e5;
.totalNum {
font-size: 26px;
color: #333333;
line-height: 26px;
font-weight: 700;
padding: 24px 0 32px 16px;
.enum {
font-size: 18px;
font-weight: 400;
color: #333333;
vertical-align: middle;
}
}
.middlemsg-qiwei-total {
display: flex;
justify-content: space-between;
.qiwei-describe {
padding: 0px 16px;
.inWechat {
color: #666666;
font-size: 14px;
}
.num {
margin-top: 4px;
font-size: 16px;
color: #333333;
font-weight: 600;
.person-text {
font-size: 14px;
color: #333333;
font-weight: 400;
}
}
}
}
}
}
}
......@@ -1151,6 +1336,7 @@ export default {
min-width: 1050px;
height: 578px;
background-color: #fff;
margin-top: 16px;
.timeDuring {
margin-left: 20px;
margin-top: 20px;
......
<template>
<div>
<!-- 大标题 -->
<p class="topTitle">
<span class="title">{{ crowdGroupName }}</span>
<span class="desc">{{ crowdGroupDesc == 'null' ? '' : crowdGroupDesc }}</span>
</p>
<!-- 切换导航栏 -->
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="营销人群" name="first">
<div class="pageContent">
<div class="markPeople">
<span>营销人群</span>
<span v-if="itemArr && itemArr.length > displayNum && !closeFlag" @click="expandClick('expand')">
展开营销人群
<i class="el-icon-arrow-down color-58"></i>
</span>
<span v-if="closeFlag" @click="expandClick('close')">
收起营销人群
<i class="el-icon-arrow-up color-58"></i>
</span>
</div>
<el-divider></el-divider>
<!-- 营销人群展示 -->
<div :class="{ secondBigMarketItem: isSecondBigMarketItem, bigMarketItem: isBigMarketItem }" v-if="closeFlag">
<div v-for="(item, idx) in itemArr" :key="idx" :class="[{ active: isActive == idx }, 'marketItem']" @click="choickItem(idx, item.crowdName, item.crowdId, item.sop)">
<template v-if="idx < displayNum">
<p class="peopleName">{{ item.crowdName }}</p>
<div class="itemBox">
<p class="peopleNum">
{{ item.total }}
<span>人</span>
</p>
<p class="peopledesc">{{ item.crowdDesc }}</p>
<el-button :class="['createSOP', { isDisableSOP: item.sop == 'Y' }]" @click.stop="createMarketSOP(item)" :disabled="item.sop == 'Y' ? true : false">创建营销SOP</el-button>
</div>
</template>
</div>
</div>
<!-- 轮播展示 -->
<div v-show="!closeFlag">
<GLSwiper>
<div v-for="(item, idx) in itemArr" :key="idx" :class="[{ active: isActive == idx }, 'marketItem', 'swiper-slide']" @click="choickItem(idx, item.crowdName, item.crowdId, item.sop)">
<div class="marketItem-border">
<p class="peopleName">{{ item.crowdName }}</p>
<div class="itemBox">
<p class="peopleNum">
{{ item.total }}
<span>人</span>
</p>
<p class="peopledesc">{{ item.crowdDesc }}</p>
<el-button :class="['createSOP', { isDisableSOP: item.sop == 'Y' }]" @click.stop="createMarketSOP(item)" :disabled="item.sop == 'Y' ? true : false">创建营销SOP</el-button>
</div>
</div>
</div>
</GLSwiper>
</div>
</div>
<div class="otherPageContent">
<GLCombiForm v-if="activeName == 'first'" :formObj="searchForm" :formData="marketPeopleFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<div class="leadList">
<div>
<span>{{ showTitle }}</span>
</div>
<div>
<el-button size="small" @click="handleExport">导出</el-button>
<el-button class="marketSOP" size="small" :disabled="sopStatus == 'Y'" @click="marketSOP()">营销SOP</el-button>
</div>
</div>
<GLTable v-loading="loading" :hasNum="true" @setTableHeightEvent="setTableHeightEvent" @setTableFinishFun="setTableFinishFun" :beforeSearchFn="beforeSearchFn" ref="marketPeople" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :tableParams="tableParams">
<!-- 企微名称 -->
<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>
<!-- 操作 -->
<div slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="goDetail(scope.scope)" class="blue-text">详情</el-button>
</div>
</GLTable>
</div>
</el-tab-pane>
<el-tab-pane label="营销计划" name="second">
<template v-if="activeName == 'second'"><marketing-plan :crowdGroupId="crowdGroupId"></marketing-plan></template>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import { marketingPeopleListShow, getcrowdManageList, customerClusterListExport } from '@/api/modules/clientDataOverview'
import marketingPlan from './components/marketingPlan.vue'
import GLSwiper from '@/components/GLSwiper'
export default {
name: 'marketingPeople',
components: { marketingPlan, GLSwiper },
data() {
return {
sopStatus: '',
isSecondBigMarketItem: '',
isBigMarketItem: '',
screenWidth: null,
selectTab: 1,
queryTab: '',
crowdGroupId: '',
crowdGroupName: '',
crowdGroupDesc: '',
activeName: 'first',
searchForm: {
crowdId: '',
customCrowd: true
},
backupCrowdId: '',
isActive: 0,
displayNum: '', //展示的数目
displayNumCopy: '', //展示的数目
closeFlag: false, //展开收起
showTitle: '', // 展示的标题
itemArr: [],
marketPeopleFormList: [
{
type: 'input',
inputType: 'text',
name: 'carNumber',
label: '车牌号'
},
{
type: 'input',
inputType: 'text',
name: 'carSeries',
label: '车系'
},
{
type: 'select',
name: 'followStaff',
label: '跟进员工',
optionLabel: 'label',
optionId: 'value',
optionList: []
},
{
type: 'input',
inputType: 'text',
name: 'customerPhone',
label: '联系电话'
},
{
type: 'input',
inputType: 'text',
name: 'nickName',
label: '企微名称'
},
{
type: 'input',
inputType: 'text',
name: 'customerName',
label: '客户名称'
},
{
type: 'select',
name: 'isJoin',
label: '是否已加企微',
placeholder: '请选择',
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: null
},
{
label: '是',
value: 1
},
{
label: '否',
value: 0
}
]
},
{
type: 'datePicker',
name: 'carBuyDate',
label: '购车时间',
valueFormat: 'yyyy-MM-dd',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
},
{
type: 'datePicker',
name: 'InsEndDate',
label: '车险到期时间',
valueFormat: 'yyyy-MM-dd',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
}
],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableParams: {
listName: 'data',
tableColumns: [
{
label: '客户名称',
prop: 'customerName',
// addHtml: 'customerName',
width: 300,
line: 1
},
{
label: '企微名称',
prop: 'nickNameList',
addHtml: 'nickNameList',
width: 220
},
{
label: '联系电话',
prop: 'customerPhone',
width: 130
},
{
label: '车架号',
prop: 'carVin',
width: 140,
line: 1
},
{
label: '车牌号',
prop: 'carNumber',
width: 120
},
{
label: '车系',
prop: 'audi',
width: 170
},
{
label: '跟进员工',
prop: 'followStaff',
width: 170,
line: 1
},
{
label: '是否加企微', //1. 加入,0.未加入
prop: 'isJoinName',
width: 130
},
{
label: '购车时间',
prop: 'buyDate',
width: 130
},
{
label: '添加时间',
prop: 'addTime',
width: 130
},
{
label: '操作',
width: '66px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
getListApi: getcrowdManageList,
status: true
}
},
created() {
this.crowdGroupId = this.$route.query.crowdId || ''
this.crowdGroupName = this.$route.query.crowdGroupName
this.crowdGroupDesc = this.$route.query.crowdGroupDesc
// 判断营销SOP返回来的页面
this.queryTab = this.$route.query.selectTab || ''
if (this.queryTab) {
this.activeName = this.queryTab == 'first' ? 'first' : 'second'
}
// 判断分析SOP回来的页面
if (this.$route.query.crowQuery) {
let crowInfo = JSON.parse(this.$route.query.crowQuery)
this.crowdGroupId = crowInfo.crowdId
this.crowdGroupName = crowInfo.crowdGroupName
this.crowdGroupDesc = crowInfo.crowdGroupDesc
this.activeName = crowInfo.selectTab == 'first' ? 'first' : 'second'
}
this.getFollowStaffList()
},
mounted() {
this.screenWidth = document.body.clientWidth
window.addEventListener('resize', () => {
this.screenWidth = document.body.clientWidth
})
},
watch: {
screenWidth: {
handler: function(val) {
if (val >= 1440) {
if (!this.closeFlag) {
this.displayNum = 5
}
this.displayNumCopy = 5
this.isBigMarketItem = false
this.isSecondBigMarketItem = true
} else {
if (!this.closeFlag) {
this.displayNum = 4
}
this.displayNumCopy = 4
this.isBigMarketItem = true
this.isSecondBigMarketItem = false
}
},
// immediate: true,
deep: true
}
},
methods: {
// 获取跟进员工
async getFollowStaffList() {
const formListBackup = JSON.stringify(this.marketPeopleFormList)
const { id, staff } = await this.$Utils.getStaffListApi('', formListBackup, 'followStaff')
this.$nextTick(() => {
this.marketPeopleFormList[id].optionList = staff
})
},
// 导出
handleExport() {
var params = {
customCrowd: true,
crowdId: this.backupCrowdId ? this.backupCrowdId : this.theFirstGroudId,
pageSize: 10,
pageNum: 1
}
customerClusterListExport(params).then(res => {
this.$Utils.exportFn(res)
})
},
marketSOP() {
let params = this.itemArr[this.isActive]
this.createMarketSOP(params)
},
// 处理时间参数
getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm))
if (params.carBuyDate) {
params.beginCarBuyDate = this.searchForm.carBuyDate[0]
params.endCarBuyDate = this.searchForm.carBuyDate[1]
} else {
if (params.beginCarBuyDate) delete params.beginCarBuyDate && delete params.endCarBuyDate
}
if (params.InsEndDate) {
params.beginCInsEndDate = this.searchForm.InsEndDate[0]
params.endInsEndDate = this.searchForm.InsEndDate[1]
} else {
if (params.beginCInsEndDate) delete params.beginCInsEndDate && delete params.endInsEndDate
}
delete params.carBuyDate
delete params.InsEndDate
return params
},
async beforeSearchFn() {
if (this.status) {
this.status = false
let params = {
croupGroupId: this.crowdGroupId
}
await marketingPeopleListShow(params).then(res => {
this.itemArr = res
this.showTitle = this.itemArr[0].crowdName
this.theFirstGroudId = this.searchForm.crowdId = this.itemArr[0].crowdId
this.sopStatus = this.itemArr[0].sop
})
}
return new Promise((resolve, reject) => {
this.searchForm = this.getParams()
resolve()
})
},
// 跳转到详情页面
goDetail(scope) {
this.$router.push('/clientManage/clientDetail?id=' + scope.oneId)
},
// 搜索表格
searchTable() {
this.$refs.marketPeople.refreshTable()
},
//重置表格
resetTable() {
this.searchForm = {
customCrowd: true,
crowdId: this.backupCrowdId ? this.backupCrowdId : this.theFirstGroudId
}
this.$refs.marketPeople.refreshTable()
},
// 跳转到营销SOP
createMarketSOP(info) {
let marketQuery = {
crowdDesc: info.crowdDesc,
crowdId: info.crowdId,
crowdName: info.crowdName,
total: info.total
}
var params = {
addOrEdit: 'add',
fromPage: `/custom/clientDataOverview/marketingPeople?crowdId=${this.crowdGroupId}&crowdGroupName=${this.crowdGroupName}&crowdGroupDesc=${this.crowdGroupDesc}&selectTab=first`,
$title: encodeURI('新建SOP'),
info: {
// 人群
customerOptType: 2,
crowdList: []
}
}
params.info.crowdList.push(marketQuery)
this.$common.utils.storage.set('sopInfo', params)
this.$history.push({
path: 'marketing/sop/editSop'
})
},
expandClick(val) {
if (val == 'expand') {
this.closeFlag = true
this.displayNum = this.itemArr.length || ''
} else {
this.closeFlag = false
this.displayNum = this.displayNumCopy
}
},
// 选择的人群
choickItem(idx, title, Cid, sop) {
this.sopStatus = sop
this.isActive = idx
this.showTitle = title
this.backupCrowdId = Cid
// 发送请求查询列表
this.searchForm = {
crowdId: Cid,
customCrowd: true
}
this.searchTable()
},
setTableFinishFun() {
// this.$refs.marketPeople.data.length ? (this.$refs.marketPeople.tableHeightValues = '') : this.$refs.marketPeople.setTableHeightFun()
},
setTableHeightEvent() {
this.$refs.marketPeople.setTableHeightFun()
},
handleClick(tab) {}
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-tabs__content {
margin-bottom: 64px;
}
.expandImg {
display: flex;
.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;
}
}
.pure-green-text {
color: #61cc43;
}
.pure-yello-text {
color: #fb8f28;
}
.marketItem-border {
min-height: 251px;
.peopleName {
height: 54px;
line-height: 54px;
background: #f7f7fc;
font-size: 16px;
font-weight: 600;
padding-left: 16px;
vertical-align: middle;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.itemBox {
border-left: 1px solid #ededf0;
border-right: 1px solid #ededf0;
border-bottom: 1px solid #ededf0;
padding: 0 16px;
box-sizing: border-box;
.peopleNum {
padding: 24px 0;
font-size: 26px;
font-weight: 600;
color: #333333;
span {
font-size: 14px;
font-weight: 400;
}
}
.peopledesc {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
word-break: break-all;
font-size: 14px;
color: #999999;
line-height: 20px;
height: 40px;
}
.createSOP {
margin: 24px 0;
border-radius: 4px;
border: 1px solid #5850ff;
width: 100%;
color: #5850ff;
padding: 9px 20px;
}
.isDisableSOP {
color: #c0bcff;
border: 1px solid #c0bcff;
}
}
}
.active {
border: 1px solid #5850ff;
}
.topTitle {
.title {
color: #333333;
font-size: 20px;
font-weight: 600;
}
.desc {
margin-left: 8px;
font-size: 14px;
color: #666666;
}
}
/deep/.el-tabs__header {
padding: 5px 0;
.el-tabs__item {
font-size: 16px;
}
}
.pageContent {
padding: 0 0 20px;
background-color: #fff;
.markPeople {
padding: 20px 20px 0;
display: flex;
justify-content: space-between;
font-weight: 600;
color: #333333;
span:last-child {
color: #5850ff;
cursor: pointer;
}
}
.bigMarketItem {
padding: 0 20px;
display: grid;
grid-template-columns: 25% 25% 25% 25%;
.marketItem {
margin-right: 20px;
margin-bottom: 20px;
// width: 25%;
&:nth-child(4n) {
margin-right: 0;
}
.peopleName {
height: 54px;
line-height: 54px;
background: #f7f7fc;
font-size: 16px;
font-weight: 600;
padding-left: 16px;
vertical-align: middle;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.itemBox {
border-left: 1px solid #ededf0;
border-right: 1px solid #ededf0;
border-bottom: 1px solid #ededf0;
padding: 0 16px;
box-sizing: border-box;
.peopleNum {
padding: 24px 0;
font-size: 26px;
font-weight: 600;
color: #333333;
span {
font-size: 14px;
font-weight: 400;
}
}
.peopledesc {
font-size: 14px;
color: #999999;
line-height: 20px;
height: 40px;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
word-break: break-all;
}
.createSOP {
margin: 24px 0;
border-radius: 4px;
border: 1px solid #5850ff;
width: 100%;
color: #5850ff;
padding: 9px 20px;
}
.isDisableSOP {
color: #c0bcff;
border: 1px solid #c0bcff;
}
}
}
}
.secondBigMarketItem {
padding: 0 20px;
display: grid;
grid-template-columns: 20% 20% 20% 20% 20%;
.marketItem {
margin-right: 20px;
margin-bottom: 20px;
// width: 25%;
&:nth-child(5n) {
margin-right: 0;
}
.peopleName {
height: 54px;
line-height: 54px;
background: #f7f7fc;
font-size: 16px;
font-weight: 600;
padding-left: 16px;
vertical-align: middle;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.itemBox {
border-left: 1px solid #ededf0;
border-right: 1px solid #ededf0;
border-bottom: 1px solid #ededf0;
padding: 0 16px;
box-sizing: border-box;
.peopleNum {
padding: 24px 0;
font-size: 26px;
font-weight: 600;
color: #333333;
span {
font-size: 14px;
font-weight: 400;
}
}
.peopledesc {
font-size: 14px;
color: #999999;
line-height: 20px;
height: 40px;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
word-break: break-all;
}
.createSOP {
margin: 24px 0;
border-radius: 4px;
border: 1px solid #5850ff;
width: 100%;
color: #5850ff;
padding: 9px 20px;
}
.isDisableSOP {
color: #c0bcff;
border: 1px solid #c0bcff;
}
}
}
}
.progressBar {
width: 40px;
height: 4px;
background: #dddee0;
border-radius: 3px;
margin: 20px auto 0px;
.progress {
background: #5850ff;
height: 4px;
width: 0;
border-radius: 3px;
}
}
}
.gl-footer {
z-index: 100;
}
.otherPageContent {
padding: 20px 20px 30px;
margin-top: 16px;
background-color: #fff;
.leadList {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
div {
text-align: center;
span:nth-child(1) {
font-weight: 600;
font-size: 20px;
}
}
/deep/ .el-button {
color: #5850ff;
border: 1px solid #5850ff;
}
.marketSOP {
color: #666666;
border: 1px solid #d1d1d1;
}
}
}
.PageContent2 {
padding: 20px 20px 30px;
background-color: #fff;
}
</style>
......@@ -67,13 +67,15 @@
<template v-if="currentIndex == 3">
<potential-client ref="childCompPotential" :url="url"></potential-client>
</template>
<basic-dialog title="" width="547px" :isVisible="dialogVisible" btnOkLabel="我知道了" :isHasCancelBtn="false" @confirmDialog="handleConfirm" @closeDialog="handleClose">
<GLDialog mode="small" :visible.sync="dialogVisible">
<div class="content-body">
<p>该客户暂无员工跟进,无法查看该客户详情,</p>
<p class="bottomText">赶紧去加好友吧!</p>
</div>
</basic-dialog>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="dialogVisible = false">我知道了</el-button>
</span>
</GLDialog>
</div>
</div>
</div>
......@@ -134,9 +136,9 @@ export default {
// deep: true,
// // immediate:true,
// handler(val) {
// console.log('val值:',val)
//
// if(val){
// console.log('7777777777777')
//
// this.searchTable()
// }
// }
......@@ -165,7 +167,7 @@ export default {
},
async getTableDetail(id = this.$route.query.id) {
const res = await getTableDetail({ id: id, pageNum: 1, pageSize: 10 })
console.log('获取客户群数据', res)
if (!res) {
return false
}
......@@ -289,7 +291,7 @@ export default {
font-weight: 400;
color: #666666;
line-height: 20px;
max-width: 131px;
max-width: 120px;
}
}
}
......@@ -344,34 +346,12 @@ export default {
.el-button + .el-button {
margin-left: 20px;
}
// .el-button {
// font-size: 14px;
// font-weight: 400;
// padding: 9px 21px;
// background: $btnBlue;
// border-radius: 4px;
// border: none;
// }
// .el-button:first-child {
// background: #ffffff;
// border-radius: 4px;
// border: 1px solid #999999;
// font-weight: 400;
// color: #666666;
// }
.glsx-table {
margin-top: 20px;
}
}
}
/deep/ .el-dialog__header {
border: 0;
}
/deep/ .el-dialog__body {
border-bottom: 1px solid #e6e6e6;
padding: 0px 65px 35px;
min-height: 0;
.container {
.content-body {
font-size: 18px;
text-align: center;
font-weight: 400;
......@@ -380,11 +360,5 @@ export default {
margin-top: 10px;
}
}
}
/deep/ .el-dialog__footer {
text-align: center;
padding-top: 15px;
padding-bottom: 15px;
}
}
</style>
......@@ -62,12 +62,15 @@
</template>
<template v-if="currentIndex == 3"></template>
<basic-dialog title="" width="547px" :isVisible="dialogVisible" btnOkLabel="我知道了" :isHasCancelBtn="false" @confirmDialog="handleConfirm" @closeDialog="handleClose">
<GLDialog title="" :visible.sync="dialogVisible">
<div class="content-body">
<p>该客户暂无员工跟进,无法查看该客户详情,</p>
<p class="bottomText">赶紧去加好友吧!</p>
</div>
</basic-dialog>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="dialogVisible = false">我知道了</el-button>
</span>
</GLDialog>
</div>
</div>
</div>
......@@ -113,7 +116,6 @@ export default {
url: url,
leftPanelList: {},
flushTime: false
}
},
......@@ -126,9 +128,9 @@ export default {
// deep: true,
// // immediate:true,
// handler(val) {
// console.log('val值:',val)
//
// if(val){
// console.log('7777777777777')
//
// this.searchTable()
// }
// }
......@@ -146,7 +148,7 @@ export default {
},
async getTableDetail(id = this.$route.query.id) {
const res = await getTableDetail({ id: id })
console.log('获取客户群数据', res)
if (!res) {
return false
}
......
......@@ -71,12 +71,15 @@
<span @click="goDetail(scope.scope.id)" class="blue-text">详情</span>
</template>
</GLTable>
<basic-dialog title="" width="547px" :isVisible="dialogVisible" btnOkLabel="我知道了" :isHasCancelBtn="false" @confirmDialog="handleConfirm" @closeDialog="handleClose">
<GLDialog mode="small" :visible.sync="dialogVisible">
<div class="content-body">
<p>该客户暂无员工跟进,无法查看该客户详情,</p>
<p class="bottomText">赶紧去加好友吧!</p>
</div>
</basic-dialog>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="dialogVisible = false">我知道了</el-button>
</span>
</GLDialog>
</div>
</div>
</div>
......@@ -215,9 +218,9 @@ export default {
// deep: true,
// // immediate:true,
// handler(val) {
// console.log('val值:',val)
//
// if(val){
// console.log('7777777777777')
//
// this.searchTable()
// }
// }
......@@ -227,7 +230,7 @@ export default {
methods: {
async getTableDetail(id = this.$route.query.id) {
const res = await getTableDetail({ id: id })
console.log('获取客户群数据', res)
if (!res) {
return false
}
......@@ -236,9 +239,9 @@ export default {
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
// console.log(this.searchForm,'数据')
// console.log(this.searchForm.daterange,this.searchForm.id,this.searchFormTable,'时间选择器')
// console.log(this.searchForm)
//
//
//
if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1]
......@@ -254,7 +257,7 @@ export default {
},
setTableFinishFun(content) {
//content是第一页的数据
console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
......@@ -418,47 +421,20 @@ export default {
.el-button + .el-button {
margin-left: 20px;
}
// .el-button {
// font-size: 14px;
// font-weight: 400;
// padding: 9px 21px;
// background: $btnBlue;
// border-radius: 4px;
// border: none;
// }
// .el-button:first-child {
// background: #ffffff;
// border-radius: 4px;
// border: 1px solid #999999;
// font-weight: 400;
// color: #666666;
// }
.glsx-table {
margin-top: 20px;
}
}
}
/deep/ .el-dialog__header {
border: 0;
}
/deep/ .el-dialog__body {
border-bottom: 1px solid #e6e6e6;
padding: 0px 65px 35px;
min-height: 0;
.container {
font-size: 18px;
text-align: center;
font-weight: 400;
color: #333333;
.bottomText {
margin-top: 10px;
}
}
}
/deep/ .el-dialog__footer {
.container-body {
font-size: 18px;
text-align: center;
padding-top: 15px;
padding-bottom: 15px;
font-weight: 400;
color: #333333;
.bottomText {
margin-top: 10px;
}
}
}
</style>
......@@ -101,39 +101,44 @@ export default {
{
label: '本群昵称',
prop: 'groupNickName',
minWidth: 120
width: 170,
line: 1
},
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName',
minWidth: 150
width: 170,
line: 1
},
{
label: '手机号码',
prop: 'customerPhone',
minWidth: 120
line: 1,
width:200
},
{
label: '性别',
prop: 'customerSex',
addHtml: 'customerSex'
addHtml: 'customerSex',
},
{
label: '入群方式',
prop: 'joinScene',
addHtml: 'joinScene',
minWidth: 150
width: 190,
line: 1
},
{
label: '邀请人',
prop: 'invitorName',
minWidth: 120
width: 120,
line: 1
},
{
label: '入群时间',
prop: 'joinTime',
width: 170
width: 170,
}
],
tableOption: {
......@@ -189,7 +194,7 @@ export default {
},
setTableFinishFun(content) {
//content是第一页的数据
console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total
// this.$emit('getTotal',this.clientTableDataNum)
//接收到的数据为空
......
......@@ -174,7 +174,7 @@ export default {
},
setTableFinishFun(content) {
//content是第一页的数据
console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total
// this.$emit('getTotal',this.clientTableDataNum)
//接收到的数据为空
......
......@@ -187,7 +187,7 @@ export default {
},
setTableFinishFun(content) {
//content是第一页的数据
console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
......
......@@ -170,7 +170,7 @@ export default {
},
setTableFinishFun(content) {
//content是第一页的数据
console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
......
......@@ -18,7 +18,7 @@
</span>
<span slot="delFlag" slot-scope="scope">
<span :class="{ circleStatusGreen: scope.scope.delFlag == 0, circleStatusGray: scope.scope.delFlag == -1 }"></span>
{{ scope.scope.delFlag == -1 ? '已解散' : scope.scope.delFlag == 0 ? '正常' : '' }}
<span>{{ scope.scope.delFlag == -1 ? '已解散' : scope.scope.delFlag == 0 ? '正常' : '' }}</span>
</span>
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <auth-button :data="scope.scope"></auth-button> -->
......@@ -133,7 +133,7 @@ export default {
label: '群聊名称',
prop: 'custGroupName',
line: 1,
minWidth: 160
width: 160
},
{
label: '当前成员总数',
......@@ -223,7 +223,7 @@ export default {
// 'searchForm.daterange':{
// deep: true,
// handler(val) {
// console.log('val值:',val)
//
// if(val){
// this.searchTable()
// }
......@@ -285,7 +285,7 @@ export default {
this.$refs.clientGroupManage.setTableHeightFun()
},
setTableFinishFun(content) {
console.log(content, this.$refs.clientGroupManage.data.length, '获取数据')
// if (!this.flushTime) {
// this.flushTime = true
// this.searchTable()
......@@ -315,7 +315,7 @@ export default {
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
}
console.log('params', params)
delete params.daterange
return params
},
......@@ -395,7 +395,6 @@ export default {
}
}
padding: 20px 20px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// min-width: 1300px;
background-color: #fff;
.el-button + .el-button {
......
......@@ -82,6 +82,18 @@
<!-- 1-是,2-否 -->
<span>{{ leftPanelInfo.isJoin == 1 ? '是' : leftPanelInfo.isJoin == 0 ? '否' : '' }}</span>
</p>
<template v-if="isCgacar">
<p>
<span>关注公众号:</span>
<!-- 1-是,2-否 -->
<span>{{ leftPanelInfo.subscribeName }}</span>
</p>
<p>
<span>登录小程序:</span>
<!-- 1-是,2-否 -->
<span>{{ leftPanelInfo.isLoginAppletName }}</span>
</p>
</template>
<p>
<span>当前状态:</span>
......@@ -225,19 +237,23 @@
</div>
</div>
</div>
<div class="footer-panel">
<!-- <div class="footer-panel">
<div>
<el-button type="primary" @click="goBack">返回</el-button>
</div>
</div>
<basic-dialog class="phone-fill-box" :width="'720px'" title="添加联系电话" :isVisible="phoneVisible" @confirmDialog="phoneConfirmDialog" @closeDialog="phoneVisible = false" :isShowCloseBtn="true">
</div> -->
<GLDialog title="添加联系电话" :visible.sync="phoneVisible">
<div class="dialog-form">
<label>联系电话:</label>
<el-input v-model.trim="contactPhone" size="small" placeholder="请输入11位的手机号" maxlength="11"></el-input>
</div>
</basic-dialog>
<basic-dialog class="tags" :title="tagsDialogTitle" :width="'712px'" :isDestroyClose="true" :btnLoading="sloading" :isShowThirdBtn="true" :isShowCloseBtn="true" @btnEvent="goNewTag" :isVisible="tagsVisible" @confirmDialog="handleConfirm" @closeDialog="handleClose">
<slot>
<span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="phoneVisible = false">取 消</el-button>
<el-button type="primary" size="small" @click="phoneConfirmDialog">确 定</el-button>
</span>
</GLDialog>
<GLDialog :title="tagsDialogTitle" :isDestroyClose="true" :btnLoading="sloading" :isShowThirdBtn="true" :isShowCloseBtn="true" @btnEvent="goNewTag" :visible.sync="tagsVisible" >
<div>
<p class="hint-text color-6">
<span class="color-3">说明:</span>
仅支持{{ '企业' | tagType }}标签
......@@ -268,8 +284,12 @@
</div>
</template>
</div>
</slot>
</basic-dialog>
</div>
<span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="handleClose">取 消</el-button>
<el-button type="primary" size="small" @click="handleConfirm">确 定</el-button>
</span>
</GLDialog>
</div>
</template>
......@@ -574,7 +594,8 @@ export default {
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
userType: 0, //1是商户,2是员工
userid: 0, //小龙需要用户id
staffId: 0
staffId: 0,
isCgacar: false
}
},
......@@ -586,11 +607,13 @@ export default {
this.accountLevel = this.$globalState.session.accountLevel
this.userType = this.$globalState.session.userType
}
if (location.host.includes('cgacar')) {
this.isCgacar = true
}
this.id = this.$route.query.id ? this.$route.query.id : ''
this.getPageDetail()
//舍弃调用小龙的获取单用户标签的接口
// this.getSingleClientTag(this.$route.query.id, this.merchantId)
console.log(this.tagsParams, 'kkkk')
},
filters: {
filterCar(val) {
......@@ -619,9 +642,13 @@ export default {
},
tabClick(index) {
this.currentIndex = index
if (this.currentIndex == 2 && this.clientTagsList.length <= 0) {
this.$refs.clientTagsListRef.setTableHeightFun()
}
this.$nextTick(() => {
if (this.currentIndex == 2 && this.clientTagsList.length <= 0) {
this.$refs.clientTagsListRef.setTableHeightFun()
// this.$refs.clientTagsListRef.tableHeightValues =
}
})
},
showTagArray(list) {
if (list.length == 0) {
......@@ -630,7 +657,7 @@ export default {
return list.slice(0, 9)
},
/* *
/* *
用途:js中字符串超长作固定长度加省略号(...)处理
参数说明:
str:需要进行处理的字符串,可含汉字
......@@ -683,7 +710,7 @@ export default {
this.tagsList = filterArr
this.labelIdList = filterArr.map(item => item.labelId)
// console.log(this.tagsList, '当前被选中的标签')
//
} else {
this.$message.error(res.message)
}
......@@ -725,13 +752,13 @@ export default {
goNewTag() {
this.$router.push({ path: '/tagsManage/index' })
},
goBack() {
this.$router.go(-1)
},
// goBack() {
// this.$router.go(-1)
// },
//点击添加按钮
btnClick(pType, scope) {
console.log(pType, scope)
switch (pType) {
case 'create':
this.tagsDialogTitle = '设置标签'
......@@ -778,7 +805,7 @@ export default {
})
this.allTagsList = allTagsList
// console.log(this.allTagsList, ' this.allTagsList')
//
} else {
this.$message.error(res.message)
}
......@@ -830,14 +857,15 @@ export default {
})
})
})
const userIdList = this.nickNameList.map(item => item.userId)
let param = {
'req.OneId': this.id,
'req.merchantId': this.merchantId,
'req.uuId': this.userid,
'req.staffId': this.staffId,
'req.labelIdAddList': labelIdAddList,
'req.labelIdDelList': labelIdDelList
'req.labelIdDelList': labelIdDelList,
'req.userIdList': userIdList
}
addSingleClientTag(param)
.then(res => {
......@@ -865,7 +893,7 @@ export default {
// this.companyTagsList = []
// this.ownShopTagsList = []
// }
// console.log('进来')
//
this.tagsVisible = !this.tagsVisible
this.allTagsList = []
},
......@@ -989,7 +1017,7 @@ export default {
display: flex;
width: 100%;
margin-top: 20px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
min-height: calc(100vh - 194px);
overflow-y: auto;
margin-bottom: 78px;
......@@ -1115,6 +1143,18 @@ export default {
}
// 处理客户标签的样式
.clientTagsWrap {
/deep/ .el-table:before {
background-color: #fff !important;
}
/deep/ .el-table__empty-block {
height: auto;
position: absolute;
top: 50%;
transform: translateY(-50%);
}
/deep/ .glsx-table .emptyBg .noDataImg {
margin-top: 0;
}
.allTagsWrap {
position: relative;
.tag-box-wrap {
......@@ -1233,10 +1273,8 @@ export default {
}
.tags {
/deep/.app-dialog {
.el-dialog__body {
.container {
padding: 32px 74px;
}
.container {
padding: 32px 74px;
}
}
.hint-text {
......@@ -1340,9 +1378,4 @@ export default {
}
}
}
.phone-fill-box {
/deep/ .el-dialog__body {
min-height: 195px;
}
}
</style>
......@@ -69,7 +69,7 @@ export default {
let height = this.$refs.tableList.$el.parentElement.clientHeight
this.tableHeight = `${height}px`
console.log(this.tableHeight, 'tableHeight')
})
this.dataList = []//demo.data.rows.concat([])
......
......@@ -13,34 +13,11 @@
</div>
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="clientManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams">
<span slot="customerName" slot-scope="scope">
<GLFull :labelWidth="70" :identification="`node_${scope.scope.id}`">{{ scope.scope.customerName }}</GLFull>
<GLFull :labelWidth="70" :identification="`node_${scope.scope.id}`">{{ scope.scope.customerName ? scope.scope.customerName : '--' }}</GLFull>
</span>
<span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : scope.scope.customerSex == 2 ? '女' : '' }}</span>
</span>
<div slot="followStaff" class="entmicro" slot-scope="scope">
<div v-if="!followList(scope.scope.followStaff).length">--</div>
<div class="entmicro-tag" style="padding-right:3px" v-for="(tag, idx) in followList(scope.scope.followStaff)" :key="idx">
<el-tooltip effect="dark" :content="tag" placement="top">
<el-tag type="info" class="ellipsis-1" v-if="idx < 2" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ tag }}
</el-tag>
</el-tooltip>
<el-tag type="info" v-if="followList(scope.scope.followStaff).length > 2 && idx == 2">
<el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<div slot="reference">...({{ followList(scope.scope.followStaff).length }})</div>
<div class="entmicro-hover">
<el-tag style="margin-left:4px" type="info" v-for="(i, index) in followList(scope.scope.followStaff)" :key="index" :disable-transitions="false">
<i class="el-icon-user-solid" style="color: #75acff"></i>
{{ i }}
</el-tag>
</div>
</el-popover>
</el-tag>
</div>
</div>
<!-- 企微名称 -->
<div slot="nickNameList" slot-scope="scope" class="expandImg">
<div v-if="!scope.scope.nickNameList.length">--</div>
......@@ -68,7 +45,14 @@
<span style="display: inline-block; max-width: 120px; text-align: left">{{ toLabel(scope.scope.addWay) }}</span>
</el-tooltip>
</span>
<!-- subscribe -->
<span slot="subscribe" slot-scope="scope">
<span>{{ scope.scope.subscribe == '1' ? '是' : '否' }}</span>
</span>
<span slot="isLoginApplet" slot-scope="scope">
<span>{{ scope.scope.isLoginApplet == '1' ? '是' : '否' }}</span>
</span>
<span slot="isJoin" slot-scope="scope">
<span>{{ scope.scope.isJoin ? '是' : '否' }}</span>
</span>
......@@ -78,10 +62,6 @@
<span>{{ statusText(scope.scope.status) }}</span>
</span>
</span>
<!-- <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<auth-button :data="scope.scope"></auth-button>
<span @click="goDetail(scope.scope.oneId)" class="blue-text">详情</span>
</template> -->
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="goDetail(scope.scope.oneId)">详情</el-button>
<!-- <GLButton @click="goDetail(scope.scope.oneId)" fn="客户详情" type="text">详情</GLButton> -->
......@@ -222,6 +202,29 @@ export default {
optionId: 'value',
placeholder: '请选择性别',
optionList: this.$Constants.GENDER_OPTION
},
{
type: 'datePicker',
name: 'purchaseCar',
label: '购车时间',
valueFormat: 'yyyy-MM-dd',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
},
{
type: 'input',
inputType: 'text',
name: 'carVin',
label: '车架号'
},
{
type: 'input',
inputType: 'text',
name: 'carNumber',
label: '车牌号'
}
],
......@@ -229,29 +232,34 @@ export default {
tableParams: {
listName: 'data',
tableOption: false,
// mutiSelectName: 'employeeList',
// mutiSelectUniqueKey: 'id',
tableColumns: [
{
label: '客户ID',
prop: 'oneId',
minWidth: 170
width: 290,
line: 1
},
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName',
width: 120
width: 170,
line: 1
},
{
label: '企微名称',
prop: 'nickNameList',
addHtml: 'nickNameList',
minWidth: 190
width: 190
},
{
label: '联系电话',
prop: 'customerPhone',
addHtml: 'customerPhone',
minWidth: 130
width: 130
},
{
label: '性别',
......@@ -261,8 +269,8 @@ export default {
{
label: '跟进员工',
prop: 'followStaff',
addHtml: 'followStaff',
minWidth: 280
// addHtml: 'followStaff',
width: 320
},
{
label: '是否加企微', //1. 加入,0.未加入
......@@ -274,17 +282,18 @@ export default {
label: '当前状态',
prop: 'status',
addHtml: 'status',
minWidth: 130
width: 120
},
{
label: '所属渠道',
prop: 'sourceChannel',
minWidth: 100
width: 140,
line: 1
},
{
label: '添加来源',
prop: 'addWayName',
minWidth: 120
width: 120
},
{
label: '添加时间',
......@@ -292,9 +301,33 @@ export default {
width: 170
},
{
label: '车系',
prop: 'audi',
width: 250,
line: 1
},
{
label: '车架号',
prop: 'carVin',
width: 270,
line: 1
},
{
label: '车牌号',
prop: 'carNumber',
width: 140,
line: 1
},
{
label: '购车时间',
prop: 'buyDate',
width: 250,
line: 1
},
{
label: '操作',
prop: 'optionBtns',
width: '65px',
width: '66px',
addHtml: 'optionBtns',
fixed: 'right'
}
......@@ -318,6 +351,73 @@ export default {
this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel
}
if (location.host.includes('cgacar')) {
// cgacar
this.clientManageFormList.push(
{
type: 'select',
name: 'subscribe',
label: '关注公众号',
placeholder: '请选择',
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: null
},
{
label: '是',
value: 1
},
{
label: '否',
value: 0
}
]
},
{
type: 'select',
name: 'isLoginApplet',
label: '登录小程序',
placeholder: '请选择',
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: null
},
{
label: '是',
value: 1
},
{
label: '否',
value: 0
}
]
}
)
this.tableParams.tableColumns.splice(
6,
0,
{
label: '关注公众号',
prop: 'subscribe',
width: 140,
line: 1,
addHtml: 'subscribe'
},
{
label: '登录小程序',
prop: 'isLoginApplet',
width: 140,
line: 1,
addHtml: 'isLoginApplet'
}
)
}
this.getDictionaryFun()
this.getStaffList()
},
......@@ -364,7 +464,14 @@ export default {
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
}
if (params.purchaseCar) {
params.beginCarBuyDate = this.searchForm.purchaseCar[0]
params.endCarBuyDate = this.searchForm.purchaseCar[1]
} else {
if (params.beginCarBuyDate) delete params.beginCarBuyDate && delete params.endCarBuyDate
}
delete params.daterange
delete params.purchaseCar
return params
},
beforeSearchFn() {
......@@ -568,7 +675,7 @@ export default {
}
}
padding: 20px 20px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// min-width: 1300px;
background-color: #fff;
.el-button + .el-button {
......
......@@ -112,13 +112,11 @@
</div>
</div>
</div>
<div class="footer-panel">
<div>
<el-button class="cancel-button" @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSubmit">保存</el-button>
</div>
</div>
<el-dialog title="人群规则说明" class="crowd-dialog" width="720px" :before-close="handleClose" :visible.sync="dialogRuleVisible" :show-close="isShowCloseBtn">
<GLFooter>
<el-button class="cancel-button" @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSubmit">保存</el-button>
</GLFooter>
<GLDialog title="人群规则说明" :visible.sync="dialogRuleVisible" :hasFooter="false">
<div class="crowd-dialog-wrap color-3">
<div class="condition font-14">
<b>说明:</b>
......@@ -140,8 +138,8 @@
</div>
</div>
</div>
</el-dialog>
<el-dialog title="人群规则逻辑" class="crowd-logic-dialog" width="720px" :before-close="handleClose" :visible.sync="dialogLogicVisible" :show-close="isShowCloseBtn">
</GLDialog>
<GLDialog title="人群规则逻辑" :visible.sync="dialogLogicVisible" :hasFooter="false">
<div class="crowd-logic-dialog-wrap">
<div :class="{ 'crowd-flex': true }" v-if="this.selectedArray.length > 1">
<div class="crowd-line" id="lineHeight"></div>
......@@ -162,7 +160,7 @@
</div>
</div>
</div>
</el-dialog>
</GLDialog>
</div>
</template>
......@@ -255,13 +253,12 @@ export default {
document.getElementById('tagBox').style.height = 'auto'
let height = document.getElementById('selectTagBox').offsetHeight
console.log(height, '数据监听')
if (!this.isFixed || this.addClick) {
//判断是否可以触发
this.isClick = false
this.expande = false
}
console.log(this.isClick)
if (!this.isClick || this.addClick || !this.isFixed) {
//获取当前元素的高
......@@ -346,7 +343,7 @@ export default {
this.$router.push({
path: '/crowdManage/index',
query: {
selectTab: 1
selectTab: 2
}
})
} else {
......@@ -393,6 +390,7 @@ export default {
this.$confirm('暂未选中标签,无法生成人群规则逻辑,快去选标签吧?', '提示', {
confirmButtonText: '我知道了',
cancelButtonText: '取消',
customClass: 'gl-message-box',
showCancelButton: false,
type: 'warning'
})
......@@ -444,7 +442,7 @@ export default {
clearTimeout(timeOut)
}
timeOut = setTimeout(() => {
var scrollTop = document.querySelector('#container').scrollTop
var scrollTop = document.querySelector('.el-main-scroll>.el-scrollbar__wrap').scrollTop
this.isFixed = scrollTop > this.offsetTop ? true : false
if (!this.isFixed) {
document.getElementById('placeholder').style.height = document.getElementById('boxFixed').offsetHeight + 'px'
......@@ -490,6 +488,8 @@ export default {
}
}
},
//选择标签
selectTag(data) {
this.tableData.forEach(item => {
......@@ -501,6 +501,8 @@ export default {
})
})
},
// 添加已选标签
selectedLabelFn(groupData, data) {
this.addClick = true
......@@ -570,7 +572,7 @@ export default {
this.$nextTick(() => {
document.getElementById('tagBox').style.height = 'auto'
let height = document.getElementById('selectTagBox').offsetHeight
console.log(height, '删除')
if (height > 96) {
document.getElementById('tagBox').style.height = 96 + 'px'
this.isDom = true
......@@ -607,7 +609,7 @@ export default {
this.getLabelData()
},
handleCancel() {
this.$router.push('/crowdManage/index')
this.$router.push(`/crowdManage/index?selectTab=2`)
},
checkName(value) {
// 一个汉字2个字符,字母数字1个字符
......@@ -673,8 +675,8 @@ export default {
@import '@/styles/variables.scss';
.container {
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
margin-bottom: 80px;
margin-bottom: 16px;
// padding: 20px;
.title {
......@@ -935,25 +937,6 @@ export default {
.tooltip-text {
line-height: 18px;
}
.crowd-dialog {
/deep/.el-dialog__header {
padding: 15px 20px;
}
/deep/.el-dialog__body {
padding: 20px;
}
}
.crowd-logic-dialog {
/deep/.el-dialog__header {
padding: 15px 20px;
}
/deep/.el-dialog__body {
padding: 20px;
min-height: 260px;
max-height: 690px;
overflow: auto;
}
}
.crowd-dialog-wrap {
.condition {
......
......@@ -44,12 +44,7 @@
</div>
</div>
</div>
<div class="footer-panel">
<div>
<el-button type="primary" @click="goBack">返回</el-button>
</div>
</div>
<el-dialog title="人群规则说明" class="crowd-dialog" width="720px" :before-close="handleClose" :visible.sync="dialogRuleVisible" :show-close="isShowCloseBtn">
<GLDialog title="人群规则说明" :visible.sync="dialogRuleVisible" :hasFooter="false">
<div class="crowd-dialog-wrap color-3">
<div class="condition font-14">
<b>说明:</b>
......@@ -71,8 +66,8 @@
</div>
</div>
</div>
</el-dialog>
<el-dialog title="人群规则逻辑" class="crowd-logic-dialog" width="720px" :before-close="handleClose" :visible.sync="dialogLogicVisible" :show-close="isShowCloseBtn">
</GLDialog>
<GLDialog title="人群规则逻辑" class="crowd-logic-dialog" :visible.sync="dialogLogicVisible" :hasFooter="false">
<div class="crowd-logic-dialog-wrap">
<div :class="{ 'crowd-flex': true }" v-if="this.selectedArray.length > 1">
<div class="crowd-line" id="lineHeight"></div>
......@@ -93,7 +88,7 @@
</div>
</div>
</div>
</el-dialog>
</GLDialog>
</div>
</template>
......@@ -107,6 +102,7 @@ export default {
crowdDesc: ''
},
crowdId: this.$route.params.id ? this.$route.params.id : '',
crowdPage: this.$route.query.crowdType ? this.$route.query.crowdType : '',
tableTotal: '',
isShowCloseBtn: true,
dialogRuleVisible: false,
......@@ -147,17 +143,18 @@ export default {
}
},
created() {
console.log('this.$route.params.id', this.$route.params.id)
// 通过人群Id查询人群详情
this.getCrowdDetails()
},
mounted() {},
mounted() {
},
methods: {
goBack() {
this.$router.push({
path: '/crowdManage/index',
query: {
selectTab: 1
selectTab: this.crowdPage
}
})
},
......@@ -167,11 +164,11 @@ export default {
'req.crowdId': this.crowdId
}
this.$apis.crowdManage.getCrowdDetails(params).then(res => {
console.log(res.code, res)
if (res.code == 0) {
this.crowdForm.crowdName = res.data.crowdName
this.crowdForm.crowdDesc = res.data.crowdDesc
console.log(JSON.parse(res.data.tagCombine))
this.selectedArray = res.data.tagCombine ? JSON.parse(res.data.tagCombine) : []
}
})
......@@ -205,7 +202,7 @@ export default {
@import '@/styles/variables.scss';
.container {
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
height: calc(100vh - 164px);
overflow-y: auto;
// padding: 20px;
......@@ -273,44 +270,6 @@ export default {
}
}
}
.footer-panel {
position: fixed;
bottom: 0px;
height: 78px;
left: 220px;
width: 100%;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
z-index: 999;
div {
display: inline-block;
position: relative;
transform: translate(-50%, -50%);
left: 50%;
top: 50%;
margin-left: -110px;
}
}
.crowd-dialog {
/deep/.el-dialog__header {
padding: 15px 20px;
}
/deep/.el-dialog__body {
padding: 20px;
}
}
.crowd-logic-dialog {
/deep/.el-dialog__header {
padding: 15px 20px;
}
/deep/.el-dialog__body {
padding: 20px;
min-height: 260px;
max-height: 690px;
overflow: auto;
}
}
.crowd-dialog-wrap {
.condition {
margin-bottom: 16px;
......
......@@ -28,6 +28,7 @@
<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>
<el-button type="text" class="blue-text" @click="createMarketSOP(scope.scope)">营销SOP</el-button>
</template>
</GLTable>
</div>
......@@ -65,31 +66,26 @@ export default {
{
label: '人群名称',
prop: 'crowdName',
addHtml: 'crowdName',
align: 'left',
minWidth: 160
addHtml: 'crowdName'
// width: 160
// width: 431
},
{
label: '人群描述',
prop: 'crowdDesc',
addHtml: 'crowdDesc',
align: 'left',
minWidth: 160
addHtml: 'crowdDesc'
// width: 160
},
{
label: '人数',
prop: 'total',
// addHtml: 'total',
align: 'left'
prop: 'total'
},
{
label: '操作',
prop: 'xxx',
fixed: 'right',
addHtml: 'xxx',
align: 'left',
width: 180
width: 250
}
]
},
......@@ -107,38 +103,63 @@ export default {
this.userType = this.$globalState.session.userType
}
this.searchForm = { 'req.merchantId': this.merchantId, 'req.crowdType': this.crowdType }
//标签管理保存初始化保存自定义人群状态
// if (this.$route.query.selectTab == 1) {
// this.activeName = 'second'
// // window.history.pushState(null, null, location.origin + location.pathname)
// }
//
if (this.$route.query.selectTab) {
this.$route.query.selectTab == 1 || this.$route.query.selectTab == 'first' ? (this.activeName = 'first') : (this.activeName = 'second')
}
},
mounted() {},
methods: {
createMarketSOP(crowd) {
var params = {
addOrEdit: 'add',
fromPage: `/custom/crowdManage/index?selectTab=${this.activeName}`,
$title: encodeURI('新建SOP'),
info: {
// 人群
customerOptType: 2,
crowdList: []
}
}
params.info.crowdList.push(crowd)
this.$common.utils.storage.set('sopInfo', params)
this.$history.push({
path: 'marketing/sop/editSop'
})
},
btnClick(type, data) {
const crowdType = this.activeName == 'first' ? 1 : 2
const transData = JSON.stringify(data)
if (type == 'detail') {
this.$router.push(`/crowdManage/crowdDetail/${data.crowdId}`)
this.$router.push(`/crowdManage/crowdDetail/${data.crowdId}?crowdType=${crowdType}`)
}
if (type == 'view') {
const crowdType = this.activeName == 'first' ? 1 : 2
this.$router.push(`/clientDataOverview/group/${data.crowdId}/${crowdType}`)
this.$router.push(`/clientDataOverview/group/${data.crowdId}/${crowdType}?crowdInfo=${transData}`)
}
},
addClick() {
this.$router.push('/crowdManage/crowdAdd')
},
setTableFinishFun() {
console.log(this.$refs.crowdManage.data.length)
if (!this.$refs.crowdManage.data.length) {
this.$nextTick(() => this.$refs.crowdManage.setTableHeightFun())
} else {
this.$refs.crowdManage.tableHeightValues = ''
}
},
setTableHeightEvent() {
this.$refs.crowdManage.setTableHeightFun()
},
handleClick() {
this.searchForm = { 'req.keyword': '' }
this.searchTable()
},
beforeSearchFn() {
if (this.$route.query.selectTab) {
this.activeName = 'second'
// window.history.pushState(null, null, location.origin + location.pathname)
}
return new Promise(resolve => {
const crowdType = this.activeName == 'first' ? 1 : 2
this.searchForm = Object.assign(this.searchForm, { 'req.merchantId': this.merchantId, 'req.crowdType': crowdType })
......@@ -184,7 +205,7 @@ export default {
}
}
/deep/ .el-tabs__header {
margin: 0 0 20px;
margin: 0 0 10px;
}
/deep/ .el-tabs__nav-wrap::after {
content: none;
......@@ -228,7 +249,7 @@ export default {
.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;
......@@ -246,7 +267,7 @@ export default {
}
}
.crowdTable {
padding: 0 20px;
// padding: 0 20px;
/deep/ .line-ellipsis {
white-space: nowrap;
......
......@@ -137,7 +137,7 @@ export default {
},
methods: {
setTableFinishFun(content) {
console.log('表格完成', this.$refs.employeeManage.data)
},
setTableHeightEvent() {
this.$refs.employeeManage.setTableHeightFun()
......
......@@ -36,7 +36,7 @@ export default {
},
methods: {
expandeClick() {
console.log('expandeClick')
this.expande = !this.expande
},
......
......@@ -12,21 +12,13 @@
</div>
<el-form :model="basicForm" :rules="basicRules" ref="basicForm" label-width="124px">
<el-form-item label="自定义群名" prop="groupName">
<el-input
v-model.trim="basicForm.groupName"
size="small"
placeholder="为群聊设个自定义组名,如“VIP服务群”"
maxlength="10"
></el-input>
<el-input v-model.trim="basicForm.groupName" size="small" placeholder="为群聊设个自定义组名,如“VIP服务群”" maxlength="10"></el-input>
</el-form-item>
<el-form-item label="群聊命名规则" prop="groupNameRule">
<el-radio-group
v-model="basicForm.groupNameRule"
style="line-height: 40px; font-size: 14px; max-width: 600px;"
>
<el-radio-group v-model="basicForm.groupNameRule" style="line-height: 40px; font-size: 14px; max-width: 600px;">
<el-radio v-for="(rule, index) in nameRules" :label="rule.id" :key="index">
{{ rule.rule }}
<span class="rule-tips">{{rule.tips}}</span>
<span class="rule-tips">{{ rule.tips }}</span>
</el-radio>
</el-radio-group>
<!-- <div class="form-tips">群聊名称后缀将以日期及序号进行累加,如“新车售后一组211011-1群”</div> -->
......@@ -45,15 +37,9 @@
<div :key="followkey" class="sale-select" v-show="basicForm.followList.length">
<div class="el-input-tag input-tag-wrapper">
<div style="max-height: 64px">
<el-tag
v-for="(tag, idx) in basicForm.followList"
:key="idx"
type="info"
closable
:disable-transitions="false"
@close="removeFollow(idx)"
>
<i class="el-icon-user-solid"></i>
<el-tag v-for="(tag, idx) in basicForm.followList" :key="idx" type="info" closable :disable-transitions="false" @close="removeFollow(idx)">
<!-- <i class="el-icon-user-solid"></i> -->
<img class="headPortrait" src="@/assets/headPortrait.png" />
{{ tag.staffName }}
</el-tag>
</div>
......@@ -75,15 +61,9 @@
<div :key="key" class="sale-select" v-show="basicForm.userList.length">
<div class="el-input-tag input-tag-wrapper">
<div style="max-height: 64px">
<el-tag
v-for="(tag, idx) in basicForm.userList"
:key="idx"
type="info"
closable
:disable-transitions="false"
@close="remove(tag, idx)"
>
<i class="el-icon-user-solid"></i>
<el-tag v-for="(tag, idx) in basicForm.userList" :key="idx" type="info" closable :disable-transitions="false" @close="remove(tag, idx)">
<!-- <i class="el-icon-user-solid"></i> -->
<img class="headPortrait" src="@/assets/headPortrait.png" />
{{ tag.staffName }}
</el-tag>
</div>
......@@ -117,16 +97,14 @@
<el-button type="primary" @click="handleSubmit">确定</el-button>
<el-button @click="handleCancel">取消</el-button>
</div>
<basic-dialog
:title="'选择成员'"
:width="'1142px'"
:isVisible="membersVisible"
@confirmDialog="handleConfirm"
@closeDialog="membersVisible = !membersVisible"
>
<GLDialog :title="'选择成员'" :visible.sync="membersVisible">
<!-- <SelectMembers islord="false" :selectData="selectData" ref="membersForm"></SelectMembers> -->
<SelectMember ref="membersForm" v-if="membersVisible" :selectData="selectData" :followData="followData"></SelectMember>
</basic-dialog>
<span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="membersVisible = false">取消</el-button>
<el-button type="primary" size="small" @click="handleConfirm">确定</el-button>
</span>
</GLDialog>
<!-- <SelectMember ref="membersForm"></SelectMember> -->
<select-follow @selectTable="selectTable" ref="selectEmpForm"></select-follow>
</div>
......@@ -148,7 +126,7 @@ export default {
},
data() {
const validatorUser = (rule, value, callback) => {
console.log(this.basicForm.userList)
const followList = this.basicForm.followList
let userList = []
if (this.basicForm.userList && this.basicForm.userList.length) {
......@@ -156,11 +134,11 @@ export default {
} else {
userList = this.basicForm.followList
}
console.log(userList)
if (!this.basicForm.followList.length) {
callback(new Error('请选择跟进专员'))
} else {
console.log(this.basicForm.followList)
if (userList.length < 2) {
this.$message({
type: 'error',
......@@ -173,7 +151,7 @@ export default {
}
}
// const nameVaild = (rule, value, callback) => {
// console.log(this.$route.params.id)
//
// if (value) {
// const params = {
// templateName: value
......@@ -245,7 +223,7 @@ export default {
deep: true
}
// membersVisible(val) {
// console.log(val)
//
// if (!val) {
// this.$refs.membersForm.resetSearch()
// }
......@@ -299,7 +277,7 @@ export default {
apiName = 'update'
params.id = this.basicForm.id
}
console.log(params)
this.$apis.groupGuest[apiName](params)
.then(res => {
if (res) {
......@@ -338,7 +316,7 @@ export default {
this.basicForm.userList = this.selectData
this.basicForm.followList = res.userList.filter(item => item.follow == 1)
}
console.log(this.basicForm)
// this.selectData = res.userList
this.$nextTick(() => {
this.editStatus = false
......@@ -351,6 +329,7 @@ export default {
this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'gl-message-box',
type: 'warning'
})
.then(() => {
......@@ -362,7 +341,7 @@ export default {
}
},
remove(val, idx) {
console.log(val, idx)
if (this.$refs.membersForm) {
this.$refs.membersForm.remove(val)
this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags)
......@@ -407,7 +386,7 @@ export default {
.container {
margin-bottom: 84px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// padding: 20px;
.title {
padding: 20px 0 17px 20px;
......@@ -453,10 +432,10 @@ export default {
justify-content: center;
position: fixed;
bottom: 0px;
height: 64px;
height: 120px;
width: 100%;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
// background: #ffffff;
// box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
.label-text {
margin-left: 10px;
......
<template>
<div class="square-main" v-loading="loading">
<el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<GLDialog title="选择跟进专员" :visible.sync="dialogVisible">
<el-form :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="员工">
<el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input>
......@@ -18,7 +18,7 @@
<el-button size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button>
</span>
</el-dialog>
</GLDialog>
</div>
</template>
......@@ -68,7 +68,7 @@ export default {
},
methods: {
jumpUrl() {
util.openUrl(location.origin + '/home/followUp/index')
util.openUrl(location.origin + '/settings/followUp/index')
},
getFollower() {
var params = {
......
......@@ -89,7 +89,8 @@
:disable-transitions="false"
@close="remove(tag)"
>
<i class="el-icon-user-solid"></i>
<!-- <i class="el-icon-user-solid"></i> -->
<img class="headPortrait" src="@/assets/headPortrait.png" />
{{ tag.staffName }}
</el-tag>
</div>
......
......@@ -5,25 +5,13 @@
<div class="sale-select">
<div class="el-input-tag input-tag-wrapper" @click="foucusTagInput">
<div class="tag-box">
<el-tag
v-for="(tag, idx) in innerTags"
:key="idx"
type="info"
closable
:disable-transitions="false"
@close="remove(tag)"
>
<i class="el-icon-user-solid"></i>
<el-tag v-for="(tag, idx) in innerTags" :key="idx" type="info" closable :disable-transitions="false" @close="remove(tag)">
<!-- <i class="el-icon-user-solid"></i> -->
<img class="headPortrait" src="@/assets/headPortrait.png" />
{{ tag.staffName }}
</el-tag>
</div>
<el-input
size="small"
v-model.trim="newTag"
placeholder="选择员工"
@input="inputTag"
style="outline: none; border: none"
></el-input>
<el-input size="small" v-model.trim="newTag" placeholder="选择员工" @input="inputTag" style="outline: none; border: none"></el-input>
</div>
<div>
<el-button size="small" class="sale-select-btn" type="primary" @click="searchEmp">查询</el-button>
......@@ -31,12 +19,7 @@
</div>
<div>
<div class="select-sale-panel">
<select-emp
:selectData="selectData"
:islord="islord"
@selectTable="selectTable"
ref="selectEmpTabel"
></select-emp>
<select-emp :selectData="selectData" :islord="islord" @selectTable="selectTable" ref="selectEmpTabel"></select-emp>
<div class="popper__arrow"></div>
</div>
</div>
......@@ -106,7 +89,7 @@ export default {
},
mounted() {}
}
</script>
</script>
<style scoped lang="scss">
@import '@/styles/variables.scss';
.drawer-sale-panel {
......
......@@ -43,8 +43,8 @@
</div>
</div>
<basic-dialog :title="dialogTitle" :width="'712px'" :isVisible="dialogVisible" @confirmDialog="handleConfirm" @closeDialog="closeDialog">
<slot>
<GLdialog :title="dialogTitle" :visible.sync="dialogVisible">
<div>
<el-form v-if="dialogTitle == '添加网页消息'" :model="linkForm" :rules="linkRules" ref="linkForm" label-width="120px">
<el-form-item label="网页标题" prop="title">
<el-input v-model="linkForm.title" placeholder="请输入网页标题"></el-input>
......@@ -77,8 +77,12 @@
<div class="form-tips">建议图片大小在2M以内,建议尺寸:352*282px</div>
</el-form-item>
</el-form>
</slot>
</basic-dialog>
</div>
<span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="closeDialog">取 消</el-button>
<el-button type="primary" size="small" @click="handleConfirm">确 定</el-button>
</span>
</GLdialog>
</div>
</template>
<script>
......@@ -143,17 +147,17 @@ export default {
}
},
mounted() {
console.log(this.previewList)
this.eventBus.$emit('update', this.previewList)
// this.updateList(this.previewList)
// obj.init('video')
},
methods: {
handleImgChange(e, targetItem) {
console.log(e, targetItem)
var reader = new FileReader()
var file = e.srcElement.files[0]
console.log(file)
// 默认1MB
const limitSize = targetItem.limitSize || 1
const isLt = file.size / 1024 / 1024 < limitSize
......@@ -166,12 +170,12 @@ export default {
var image = new Image()
image.src = e.target.result
image.onload = () => {
console.log(file, targetItem)
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
console.log(res)
this.previewList.push({
attType: ATT_TYPE.IMAGE,
attContent: res
......@@ -197,7 +201,7 @@ export default {
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
console.log(res)
this.previewList.push({
attType: ATT_TYPE.VEDIO,
attContent: res
......@@ -209,7 +213,7 @@ export default {
handleImg(e) {
var reader = new FileReader()
var file = e.srcElement.files[0]
console.log(file)
// 默认1MB
const limitSize = 10
const isLt = file.size / 1024 / 1024 < limitSize
......@@ -227,7 +231,7 @@ export default {
this.$set(this.appletForm, 'picUrl', 'dfasdfasfa')
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
console.log(res)
this.$set(this.appletForm, 'picUrl', res)
}
})
......@@ -235,7 +239,7 @@ export default {
}
},
switchDailog(funName) {
console.log(funName)
if (funName == 'link') {
this.dialogTitle = '添加网页消息'
} else if (funName == 'applet') {
......@@ -249,7 +253,7 @@ export default {
case '添加网页消息':
this.$refs.linkForm.validate(valid => {
if (valid) {
console.log(this.linkForm)
this.previewList.push({
attType: ATT_TYPE.URL,
attContent: this.linkForm
......@@ -260,16 +264,16 @@ export default {
// this.linkForm = {}
// this.$refs.linkForm.clearValidate()
} else {
console.log('error submit!!')
return false
}
})
break
case '添加小程序':
console.log(this.appletForm)
this.$refs.appletForm.validate(valid => {
if (valid) {
console.log(this.appletForm)
this.previewList.push({
attType: ATT_TYPE.MINIPROGRAM,
attContent: this.appletForm
......@@ -279,25 +283,25 @@ export default {
// this.appletForm = {}
// this.$refs.appletForm.clearValidate()
} else {
console.log('error submit!!')
return false
}
})
break
default:
console.log(dialogTitle)
}
},
close(index) {
console.log(index)
// this.previewList
this.previewList.splice(index, 1)
this.eventBus.$emit('update', this.previewList)
},
textInput(val) {
console.log(val)
const hasText = this.previewList.some(item => item.attType == 1)
console.log(hasText)
if (hasText) {
this.$set(this.previewList, 0, {
attContent: val,
......@@ -309,7 +313,7 @@ export default {
attType: ATT_TYPE.TEXT
})
}
console.log(this.previewList)
},
closeDialog() {
if (this.dialogVisible) {
......
......@@ -31,7 +31,8 @@
<div class="entmicro">
<div class="entmicro-tag" v-for="(tag, idx) in followList" :key="tag.id">
<el-tag type="info" v-if="idx < 6" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
<!-- <i class="el-icon-user-solid"></i> -->
<img class="headPortrait" src="@/assets/headPortrait.png" />
{{ tag.staffName }}{{ tag.departmentName ? `(${tag.departmentName})` : '' }}
</el-tag>
<el-tag type="info" v-if="followList.length > 6 && idx == 6">
......@@ -39,7 +40,8 @@
<span slot="reference">...({{ followList.length }})</span>
<div class="entmicro-hover">
<el-tag type="info" v-for="(i, index) in followList" :key="index" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
<!-- <i class="el-icon-user-solid"></i> -->
<img class="headPortrait" src="@/assets/headPortrait.png" />
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
</el-tag>
</div>
......@@ -53,7 +55,8 @@
<div class="entmicro">
<div class="entmicro-tag" v-for="(tag, idx) in memberList" :key="tag.id">
<el-tag type="info" v-if="idx < 6" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
<!-- <i class="el-icon-user-solid"></i> -->
<img class="headPortrait" src="@/assets/headPortrait.png" />
{{ tag.staffName }}{{ tag.departmentName ? `(${tag.departmentName})` : '' }}
</el-tag>
<el-tag type="info" v-if="memberList.length > 6 && idx == 6">
......@@ -61,7 +64,8 @@
<span slot="reference">...({{ memberList.length }})</span>
<div class="entmicro-hover">
<el-tag type="info" v-for="(i, index) in memberList" :key="index" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
<!-- <i class="el-icon-user-solid"></i> -->
<img class="headPortrait" src="@/assets/headPortrait.png" />
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
</el-tag>
</div>
......@@ -96,7 +100,8 @@
</span>
<div slot="groupOwner" slot-scope="scope">
<el-tag type="info" v-show="scope.scope.lordName" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
<!-- <i class="el-icon-user-solid"></i> -->
<img class="headPortrait" src="@/assets/headPortrait.png" />
{{ scope.scope.lordName }}{{ scope.scope.departmentName ? `(${scope.scope.departmentName})` : '' }}
</el-tag>
</div>
......@@ -115,7 +120,7 @@
</span>
</GLTable>
</div>
<div
<!-- <div
class="footer-panel"
:style="{
left: footerLeft + 'px',
......@@ -123,7 +128,7 @@
}"
>
<el-button @click="handleCancel" type="primary">取消</el-button>
</div>
</div> -->
</div>
</template>
<script>
......@@ -388,7 +393,7 @@ export default {
}
},
created() {
console.log(this.$route.params.id)
this.userId = this.$route.params.id
this.getGroupList(this.$route.params.id)
},
......@@ -429,9 +434,9 @@ export default {
}
})
},
handleCancel() {
this.$router.push('/guestGroup/index')
},
// handleCancel() {
// this.$router.push('/guestGroup/index')
// },
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchForm = {
......
......@@ -9,7 +9,7 @@
</div>
<div class="container">
<search-form class="searchTop border-shadow" :formModel="searchForm" :formList="searchFormData" labelWidth="70px">
<search-form class="searchTop border-shadow" :formModel="searchForm" :formList="searchFormData" labelWidth="85px">
<span class="inline-b" style="float: right" slot="form-slot">
<el-button type="primary" @click="searchTable">查询</el-button>
</span>
......@@ -18,16 +18,18 @@
<GLTable ref="gueastGroup" @setTableFinishFun="setTableFinishFun" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf">
<div slot="entmicro-name" class="entmicro" slot-scope="scope">
<div class="entmicro-tag" v-for="(tag, idx) in scope.scope.userList" :key="idx">
<el-tag type="info" v-if="idx < 2" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
<el-tag type="info" v-if="idx < 3" :disable-transitions="false">
<!-- <i class="el-icon-user-solid"></i> -->
<img class="headPortrait" src="@/assets/headPortrait.png" />
{{ tag.staffName }}{{ tag.departmentName ? `(${tag.departmentName})` : '' }}
</el-tag>
<el-tag type="info" v-if="scope.scope.userList.length > 2 && idx == 2">
<el-tag type="info" v-if="scope.scope.userList.length > 3 && idx == 3">
<el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<span slot="reference">...({{ scope.scope.userList.length }})</span>
<div class="entmicro-hover">
<el-tag type="info" v-for="(i, index) in scope.scope.userList" :key="index" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
<el-tag class="toptip" type="info" v-for="(i, index) in scope.scope.userList" :key="index" :disable-transitions="false">
<!-- <i class="el-icon-user-solid"></i> -->
<img class="headPortrait" src="@/assets/headPortrait.png" />
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
</el-tag>
</div>
......@@ -36,8 +38,8 @@
</div>
</div>
<span slot="status" slot-scope="scope">
<span :class="{ circleStatusGray: scope.scope.status === 2, circleStatusGreen: scope.scope.status === 1 }"></span>
<span>{{ scope.scope.status == '1' ? '启用' : '停用' }}</span>
<span :class="{ circleStatusGray: scope.scope.status === 2, circleStatusGreen: scope.scope.status === 1 }"></span>
<span>{{ 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>
......@@ -69,7 +71,7 @@ export default {
type: 'input',
inputType: 'text',
prop: 'groupName',
label: '群聊名称',
label: '群聊名称:',
placeholder: '请输入群聊名称搜索',
clearable: true
}
......@@ -92,25 +94,25 @@ export default {
{
label: '默认成员',
prop: 'entmicroName',
minWidth: 250,
minWidth: 320,
addHtml: 'entmicro-name'
},
{
label: '创建时间',
prop: 'createdTime',
line: 1,
minWidth: 110
line: 1
// minWidth: 110
},
{
label: '状态',
prop: 'status',
minWidth: 130,
// minWidth: 130,
addHtml: 'status'
},
{
label: '操作',
prop: 'optionBtns',
width: '170px',
width: '200px',
addHtml: 'optionBtns',
fixed: 'right'
}
......@@ -263,6 +265,7 @@ export default {
this.$confirm(`是否确认${rowData.status == 1 ? '停用' : '启用'}?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'gl-message-box',
type: 'warning'
})
.then(() => {
......@@ -297,7 +300,7 @@ export default {
})
break
default:
console.log('gaocuole')
}
},
setTableFinishFun() {
......@@ -342,12 +345,12 @@ export default {
}
}
.btn-header {
margin-bottom: 20px;
margin-bottom: 10px;
}
.container {
margin-bottom: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
}
.addBtn {
......@@ -402,9 +405,15 @@ export default {
}
.el-tag {
margin-right: 10px;
margin-bottom: 10px;
// margin-bottom: 10px;
cursor: pointer;
}
.toptip {
margin-bottom: 10px;
&:nth-last-of-type(-n + 4) {
margin-bottom: 0;
}
}
/deep/ {
.search-form {
padding-top: 0;
......
......@@ -12,7 +12,7 @@ export default {
name: 'home',
methods: {
test() {
console.log('点击了按钮')
this.$messenger.send({ message: { from: 11, message: '11111' } })
}
}
......
......@@ -46,7 +46,7 @@ export default {
*/
routerChange(url) {
this.$router.push(url).catch(err => {
console.log(err)
})
},
/**
......
......@@ -2,7 +2,7 @@
<div>
<div class="scrm-sub-client-container">
<div class="pageContent">
<GLCombiForm :formObj="searchForm" :formData="leadManageFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<GLCombiForm :rowNumber="1" :formObj="searchForm" :formData="leadManageFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<!-- 线索分配 -->
<div class="leadList">
<div>
......@@ -19,14 +19,13 @@
<!-- 线索状态 -->
<template slot="status" slot-scope="scope">
<span :class="{ circleStatusYellow: scope.scope.status == 0, circleStatusPurple: scope.scope.status == 1, circleStatusGreen: scope.scope.status == 2 }"></span>
<span>
{{ scope.scope.status == 0 ? '待跟进' : scope.scope.status == 1 ? '跟进中' : scope.scope.status == 2 ? '已完成' : '' }}
</span>
<span>{{ scope.scope.status == 0 ? '待跟进' : scope.scope.status == 1 ? '跟进中' : scope.scope.status == 2 ? '已完成' : '' }}</span>
</template>
<!-- 跟进员工 -->
<template slot="userName" slot-scope="scope">
<el-tag type="info" :disable-transitions="false" v-if="scope.scope.userName">
<i class="el-icon-user-solid"></i>
<!-- <i class="el-icon-user-solid"></i> -->
<img class="headPortrait" src="@/assets/headPortrait.png" />
{{ scope.scope.userName }}
</el-tag>
</template>
......@@ -37,7 +36,8 @@
</div>
</div>
<!-- 功能介绍 -->
<el-dialog title="功能介绍" :visible.sync="showFuncIntro" width="55%" :before-close="handleClose">
<GLDialog mode="big" :bigTitle="true" :visible.sync="showFuncIntro" :hasFooter="true">
<span slot="custombigtitle">功能介绍</span>
<div class="dialogEncircle ">
<span class="funcText">线索管理模块可查看客户在小程序端留存的售前售后线索,通过配置跟进员工,使线索展示在员工企微任务栏并推送消息提醒,员工跟进线索并输入跟进记录后完成线索跟进</span>
<div class="funcIro">
......@@ -70,7 +70,7 @@
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="showFuncIntro = false">关闭</el-button>
</span>
</el-dialog>
</GLDialog>
</div>
</template>
......@@ -267,7 +267,7 @@ export default {
},
// 搜索表格
searchTable() {
console.log(this.searchForm)
this.$refs.leadManage.refreshTable()
},
//重置表格
......@@ -308,7 +308,7 @@ export default {
}
.pageContent {
padding: 20px 20px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// min-width: 1300px;
background-color: #fff;
/deep/ .el-icon-user-solid {
......@@ -350,38 +350,35 @@ export default {
color: #5850ff;
}
}
/deep/.el-dialog__body {
padding: 30px 70px;
.dialogEncircle {
// width: 100%;
.funcText {
line-height: 20px;
color: #333;
font-weight: 600;
font-size: 14px;
}
.funcIro {
margin-top: 15px;
display: flex;
justify-content: space-between;
> div {
width: 23%;
div {
height: calc(100% - 65px);
display: flex;
align-items: center;
img {
width: 100%;
}
}
p {
margin-left: 5px;
margin-top: 22px;
color: #333;
line-height: 20px;
font-size: 14px;
.dialogEncircle {
// width: 100%;
.funcText {
line-height: 20px;
color: #333;
font-weight: 600;
font-size: 14px;
}
.funcIro {
margin-top: 15px;
display: flex;
justify-content: space-between;
> div {
width: 23%;
div {
height: calc(100% - 65px);
display: flex;
align-items: center;
img {
width: 100%;
}
}
p {
margin-left: 5px;
margin-top: 22px;
color: #333;
line-height: 20px;
font-size: 14px;
}
}
}
}
......
......@@ -2,57 +2,65 @@
<div>
<div class="scrm-sub-client-container">
<div class="pageContent" :style="{ height: clientHeight + 'px' }">
<!-- 售前线索跟进员工 -->
<div class="drainage-form-item">
<label>
售前线索跟进员工
<el-popover placement="top" width="400" trigger="hover" content="请在首页-跟进专员模块里创建售前专员,并选择员工来跟进新车询价、试驾预约线索。">
<img src="@/assets/leadManage/grayquestion.png" slot="reference" class="count-item-question" />
</el-popover>
:
</label>
<div style="position: relative">
<el-button size="small" @click="handleAddEmp(1)">
<i class="el-icon-plus"></i>
选择跟进专员
</el-button>
<span class="drainage-coutom-count">
只能选择
<span class="count">1</span>
个
</span>
<div class="el-input-tag input-tag-wrapper" v-if="choicedStaff.beforeUserName">
<el-tag effect="plain" type="info" :key="idx" :disable-transitions="false" closable @close="handleClose(1)">
<i class="el-icon-user-solid"></i>
{{ this.choicedStaff.beforeUserName }}
</el-tag>
<div class="baseTitle">
<p class="title">基本信息</p>
<hr />
</div>
<div class="combine">
<!-- 售前线索跟进员工 -->
<div class="drainage-form-item">
<label>
售前线索跟进员工
<el-popover placement="top" width="400" trigger="hover" content="请在首页-跟进专员模块里创建售前专员,并选择员工来跟进新车询价、试驾预约线索。">
<img src="@/assets/leadManage/grayquestion.png" slot="reference" class="count-item-question" />
</el-popover>
:
</label>
<div style="position: relative">
<el-button size="small" @click="handleAddEmp(1)">
<i class="el-icon-plus"></i>
选择跟进专员
</el-button>
<span class="drainage-coutom-count">
只能选择
<span class="count">1</span>
个
</span>
<div class="el-input-tag input-tag-wrapper" v-if="choicedStaff.beforeUserName">
<el-tag effect="plain" type="info" :key="idx" :disable-transitions="false" closable @close="handleClose(1)">
<!-- <i class="el-icon-user-solid"></i> -->
<img class="headPortrait" src="@/assets/headPortrait.png" />
{{ this.choicedStaff.beforeUserName }}
</el-tag>
</div>
</div>
</div>
</div>
<!-- 售后线索跟进员工 -->
<div class="drainage-form-item">
<label>
售后线索跟进员工
<el-popover placement="top" width="400" trigger="hover" content="请在首页-跟进专员模块里创建售后专员,并选择员工来跟进维保预约、救援服务线索。">
<img src="@/assets/leadManage/grayquestion.png" slot="reference" class="count-item-question" />
</el-popover>
:
</label>
<div style="position: relative">
<el-button size="small" @click="handleAddEmp(2)">
<i class="el-icon-plus"></i>
选择跟进专员
</el-button>
<span class="drainage-coutom-count">
只能选择
<span class="count">1</span>
个
</span>
<div class="el-input-tag input-tag-wrapper" v-if="choicedStaff.afterUserName">
<el-tag effect="plain" type="info" :key="idx" :disable-transitions="false" closable @close="handleClose(2)">
<i class="el-icon-user-solid"></i>
{{ choicedStaff.afterUserName }}
</el-tag>
<!-- 售后线索跟进员工 -->
<div class="drainage-form-item">
<label>
售后线索跟进员工
<el-popover placement="top" width="400" trigger="hover" content="请在首页-跟进专员模块里创建售后专员,并选择员工来跟进维保预约、救援服务线索。">
<img src="@/assets/leadManage/grayquestion.png" slot="reference" class="count-item-question" />
</el-popover>
:
</label>
<div style="position: relative">
<el-button size="small" @click="handleAddEmp(2)">
<i class="el-icon-plus"></i>
选择跟进专员
</el-button>
<span class="drainage-coutom-count">
只能选择
<span class="count">1</span>
个
</span>
<div class="el-input-tag input-tag-wrapper" v-if="choicedStaff.afterUserName">
<el-tag effect="plain" type="info" :key="idx" :disable-transitions="false" closable @close="handleClose(2)">
<!-- <i class="el-icon-user-solid"></i> -->
<img class="headPortrait" src="@/assets/headPortrait.png" />
{{ choicedStaff.afterUserName }}
</el-tag>
</div>
</div>
</div>
</div>
......@@ -90,7 +98,7 @@ export default {
this.getStaff()
},
mounted() {
this.clientHeight = document.documentElement.clientHeight - 180
this.clientHeight = document.documentElement.clientHeight - 130
},
methods: {
// 删除跟进员工
......@@ -140,83 +148,95 @@ export default {
if (this.type == 2) {
;(this.choicedStaff.afterUserId = item.userId), (this.choicedStaff.afterUserName = item.userName), (this.choicedStaff.afterUserUuid = item.userUuid)
}
console.log(this.choicedStaff)
}
}
}
</script>
<style lang="scss" scoped>
.gl-footer {
margin-top: 16px;
}
.scrm-sub-client-container {
.pageContent {
padding: 6px 20px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// min-width: 1300px;
background-color: #fff;
.drainage-form-item {
display: flex;
margin-top: 20px;
/deep/ {
.el-input__inner {
width: 448px;
}
.baseTitle {
.title {
padding: 15px 30px 0px 20px;
font-size: 16px;
color: #333333;
font-weight: 600;
}
label {
color: #333;
text-align: right;
margin-right: 10px;
height: 36px;
line-height: 36px;
font-size: 14px;
img {
width: 16px;
height: 16px;
vertical-align: middle;
// margin-left: 5px;
}
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding-left: 5px;
max-height: 68px;
overflow: auto;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 567px;
}
.combine {
padding: 0px 20px 30px;
.drainage-form-item {
display: flex;
align-items: center;
margin-top: 6px;
font-size: 14px;
height: 46px;
/deep/ .el-tag {
height: 26px;
line-height: 26px;
padding: 0 8px;
margin-left: 5px;
margin-top: 20px;
/deep/ {
.el-input__inner {
width: 448px;
}
}
i {
// margin-left: 3px;
color: #75acff;
label {
color: #333;
text-align: right;
margin-right: 10px;
height: 36px;
line-height: 36px;
font-size: 14px;
img {
width: 16px;
height: 16px;
vertical-align: middle;
// margin-left: 5px;
}
}
}
.drainage-coutom-count {
color: #999;
font-size: 14px;
.count {
color: #5850ff;
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding-left: 5px;
max-height: 68px;
overflow: auto;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 567px;
display: flex;
align-items: center;
margin-top: 6px;
font-size: 14px;
height: 46px;
/deep/ .el-tag {
height: 26px;
line-height: 26px;
padding: 0 8px;
margin-left: 5px;
}
i {
// margin-left: 3px;
color: #75acff;
font-size: 14px;
}
}
.drainage-coutom-count {
color: #999;
font-size: 14px;
.count {
color: #5850ff;
}
}
/deep/ .el-button--small {
height: 36px;
}
}
/deep/ .el-button--small {
height: 36px;
}
}
}
......
......@@ -14,7 +14,7 @@
<yl-descriptions v-if="leadType == 5 || leadType == 6" ref="ylDeacriptions" :tableModel="orderDescriModel" :showData="leadBaseList" />
</div>
<!-- 跟进记录 -->
<div class="baseTitle" >
<div class="baseTitle">
<p class="title">跟进记录</p>
<hr />
<div class="timestamp" v-if="this.leadFollowRecord.length > 0">
......@@ -28,15 +28,12 @@
</el-timeline-item>
</el-timeline>
</div>
<div :style="{ 'height': clientHeight- 450 + 'px' }" class="noRecord" v-else>
<div :style="{ height: clientHeight - 450 + 'px' }" class="noRecord" v-else>
<img src="@/assets/leadManage/noRecord.png" alt="" />
</div>
</div>
</div>
</div>
<GLFooter class="gl-footer">
<el-button @click="goback()" type="primary" size="small">返回</el-button>
</GLFooter>
</div>
</template>
<script>
......@@ -53,6 +50,7 @@ export default {
leadType: '', //线索类型
leadBaseList: {}, //线索详情基本信息
leadFollowRecord: [], //线索详情跟进记录
copySameDescri: [],
theSameDescri: [
{
colList: [
......@@ -103,10 +101,7 @@ export default {
// 维保预约
orderDescri: [
{
colList: [
{ thColspan: 1, tdColspan: 2, label: '车牌号', name: 'plateNum' },
{ thColspan: 1, tdColspan: 2, label: '里程数(km)', name: 'mileage' }
]
colList: [{ thColspan: 1, tdColspan: 5, label: '试驾车辆', name: 'carName' }]
},
{
colList: [{ thColspan: 1, tdColspan: 5, label: '门店', name: 'merchantName' }]
......@@ -118,6 +113,7 @@ export default {
this.leadId = this.$route.params.id ? this.$route.params.id : ''
this.leadType = this.$route.params.type ? this.$route.params.type : ''
this.getBaseDetail()
this.addCol()
},
mounted() {
this.clientHeight = document.documentElement.clientHeight - 140
......@@ -133,12 +129,19 @@ export default {
},
// 维保预约
orderDescriModel() {
return this.theSameDescri.concat(this.orderDescri)
return this.copySameDescri.concat(this.orderDescri)
}
},
methods: {
goback() {
this.$router.push('/leadManage/index')
addCol() {
let addcolList = {
colList: [
{ thColspan: 1, tdColspan: 2, label: '预约时间', name: 'appointDate' },
{ thColspan: 1, tdColspan: 2, label: '到店时间', name: 'appointTime' }
]
}
this.copySameDescri = JSON.parse(JSON.stringify(this.theSameDescri))
this.copySameDescri.splice(3, 0, addcolList)
},
getBaseDetail() {
let params = { id: this.leadId }
......@@ -207,7 +210,7 @@ export default {
.scrm-sub-client-container {
.pageContent {
// padding: 6px 0px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// min-width: 1300px;
background-color: #fff;
.leadAllocation {
......@@ -269,7 +272,7 @@ export default {
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;//img如果超出这个div会隐藏超出部分
overflow: hidden; //img如果超出这个div会隐藏超出部分
}
}
}
......
......@@ -94,9 +94,39 @@ export default {
this.$emit('getCheckItem', this.$refs.tagTree)
})
},
filterNode(value, data) {
filterNode(value, data, node) {
if (!value) return true
return data.name.indexOf(value) !== -1
// let val = value.toLowerCase()
// this.$nextTick(() => {
// this.setTreeHeight()
// })
// return this.chooseNode(val, data, node) // 调用过滤二层方法
},
chooseNode(value, data, node) {
if (data.name.indexOf(value) !== -1) {
return true
}
const level = node.level
// 如果传入的节点本身就是一级节点就不用校验了
if (level === 1) {
return false
}
// 先取当前节点的父节点
let parentData = node.parent
// 遍历当前节点的父节点
let index = 0
while (index < level - 1) {
// 如果匹配到直接返回,此处name值是中文字符,enName是英文字符。判断匹配中英文过滤
if (parentData.data.name.indexOf(value) !== -1) {
return true
}
// 否则的话再往上一层做匹配
parentData = parentData.parent
index++
}
// 没匹配到返回false
return false
},
//勾选
checkChange() {
......@@ -165,15 +195,28 @@ export default {
this.$nextTick(() => {
status && this.updateTreeNode()
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.maxHeight = this.$parent.heightBox - 205 + 'px'
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.overflow = 'auto'
this.setTreeHeight()
})
this.loading = false
})
},
nodeExpand() {
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.maxHeight = this.$parent.heightBox - 205 + 'px'
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.overflow = 'auto'
setTreeHeight(domNode) {
const nodeHeight = document.querySelectorAll('.el-tree>.el-tree-node').length * 30
if (domNode) {
domNode.style.maxHeight = this.$parent.heightBox - 80 - nodeHeight + 'px'
domNode.style.overflow = 'auto'
} else {
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.maxHeight = this.$parent.heightBox - 80 - nodeHeight + 'px'
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.overflow = 'auto'
}
},
nodeExpand(data, node, target) {
if (data.sort) {
this.$nextTick(() => {
const domNode = target.$refs.node.lastElementChild
this.setTreeHeight(domNode)
})
}
}
},
mounted() {
......@@ -184,7 +227,7 @@ export default {
<style lang="scss" scoped>
.content-wrap {
padding: 16px 3px 16px 16px;
padding: 16px 3px 0px 16px;
box-sizing: border-box;
height: 100%;
.tree-input {
......@@ -201,7 +244,6 @@ export default {
}
.tag-tree {
margin-top: 20px;
height: calc(100% - 80px);
overflow-y: auto;
/deep/ {
.el-tree-node {
......
......@@ -30,7 +30,7 @@
<i class="el-icon-close" @click="closeInitPanel"></i>
</div>
<div class="client-main-box">
<div class="client-tag" :style="{ height: heightBox + 'px' }">
<div class="client-tag">
<tag-group @getCheckItem="getCheckItem" ref="tagTree" @editTag="btnClick"></tag-group>
</div>
<div class="client-tabel">
......@@ -95,6 +95,9 @@
>
保存为人群
</el-button>
<el-button plain size="small" @click="createMarketSOP()">
营销SOP
</el-button>
</div>
</div>
<!-- noDataText="你当前还没有添加的标签" -->
......@@ -130,7 +133,7 @@
</div>
</div>
</div>
<el-dialog title="人群规则说明" class="crowd-dialog" width="720px" :before-close="handleRuleClose" :visible.sync="dialogRuleVisible" :show-close="isShowCloseBtn">
<GLDialog title="人群规则说明" :visible.sync="dialogRuleVisible" :hasFooter="false">
<div class="crowd-dialog-wrap color-3">
<div class="condition font-14">
<b>说明:</b>
......@@ -152,84 +155,86 @@
</div>
</div>
</div>
</el-dialog>
<basic-dialog class="role" :title="tagDialogTitle" width="712px" :isVisible="tagVisible" @confirmDialog="handleConfirm" @closeDialog="handleClose">
<slot>
<div class="form-title">
<span>说明:</span>
此处添加的标签均为人工标签,即后续标签更新由员工更新打标签
</GLDialog>
<GLDialog class="role" :title="tagDialogTitle" :visible.sync="tagVisible">
<div class="form-title">
<span>说明:</span>
此处添加的标签均为人工标签,即后续标签更新由员工更新打标签
</div>
<rule-form :ruleForm="tagForm" :rules="tagRules" :ruleData="tagDialogData" :labelWidth="'120px'" labelPosition="right" ref="tagForm">
<div slot="tagsGroup-type">
<el-select v-model="tagForm.initTagsGroup" placeholder="请选择" :disabled="tagDialogTitle != '添加标签组'" @change="handleSelect">
<el-option v-for="item in tagsGroupList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<!-- id="tagTipMsgRef" -->
<span class="tagTipMsg" v-if="tagDialogTitle == '添加标签组' && !tagForm.initTagsGroup">
<template v-if="!(merchantModel == 1 && (accountLevel == 2 || accountLevel == 3 || accountLevel == 4))">{{ '企业' | tagType }}标签</template>
<template v-if="!((merchantModel == 2 && accountLevel == 4) || (merchantModel == 1 && accountLevel == 1))">
<template v-if="!(merchantModel == 1 && (accountLevel == 2 || accountLevel == 3 || accountLevel == 4))">和</template>
自店标签分别
</template>
最多3000个
</span>
<span class="tagTipMsg" v-if="tagDialogTitle == '添加标签组' && tagForm.initTagsGroup == 1">
{{ '企业' | tagType }}标签已创建
<span class="pure-blue-text">{{ numberObj.bizLabelCount }}</span>
个
</span>
<span class="tagTipMsg" v-if="tagDialogTitle == '添加标签组' && tagForm.initTagsGroup == 2">
自店标签已创建
<span class="pure-blue-text">{{ numberObj.rcLabelCount }}</span>
个
</span>
<span class="tagTipMsg" v-if="tagDialogTitle == '编辑标签组'">
{{ tagForm.initTagsGroup == 1 ? (merchantModel == 1 ? '集团标签' : '企业标签') : '自店标签' }}最多3000个,已创建
<span class="pure-blue-text">{{ tagForm.initTagsGroup == 1 ? numberObj.bizLabelCount : numberObj.rcLabelCount }}</span>
个
</span>
<!-- 企业标签最多3000个,已创建3个 -->
<!-- 自店标签最多3000个,已创建3个 -->
</div>
<rule-form :ruleForm="tagForm" :rules="tagRules" :ruleData="tagDialogData" :labelWidth="'120px'" labelPosition="right" ref="tagForm">
<div slot="tagsGroup-type">
<el-select v-model="tagForm.initTagsGroup" placeholder="请选择" :disabled="tagDialogTitle != '添加标签组'" @change="handleSelect">
<el-option v-for="item in tagsGroupList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<!-- id="tagTipMsgRef" -->
<span class="tagTipMsg" v-if="tagDialogTitle == '添加标签组' && !tagForm.initTagsGroup">
<template v-if="!(merchantModel == 1 && (accountLevel == 2 || accountLevel == 3 || accountLevel == 4))">{{ '企业' | tagType }}标签</template>
<template v-if="!((merchantModel == 2 && accountLevel == 4) || (merchantModel == 1 && accountLevel == 1))">
<template v-if="!(merchantModel == 1 && (accountLevel == 2 || accountLevel == 3 || accountLevel == 4))">和</template>
自店标签分别
</template>
最多3000个
</span>
<span class="tagTipMsg" v-if="tagDialogTitle == '添加标签组' && tagForm.initTagsGroup == 1">
{{ '企业' | tagType }}标签已创建
<span class="pure-blue-text">{{ numberObj.bizLabelCount }}</span>
个
</span>
<span class="tagTipMsg" v-if="tagDialogTitle == '添加标签组' && tagForm.initTagsGroup == 2">
自店标签已创建
<span class="pure-blue-text">{{ numberObj.rcLabelCount }}</span>
个
</span>
<span class="tagTipMsg" v-if="tagDialogTitle == '编辑标签组'">
{{ tagForm.initTagsGroup == 1 ? (merchantModel == 1 ? '集团标签' : '企业标签') : '自店标签' }}最多3000个,已创建
<span class="pure-blue-text">{{ tagForm.initTagsGroup == 1 ? numberObj.bizLabelCount : numberObj.rcLabelCount }}</span>
个
<div slot="modeType">
<el-input v-model.trim="tagForm.mode" disabled style="width:190px"></el-input>
</div>
<div slot="tagsInput-type">
<div class="tagsWrap" v-if="tagDialogTitle == '编辑标签组'">
<span class="tag" :class="{ inputWrapShow: item.inputVisible }" v-for="item in editTagList" :key="item.id">
<!-- maxlength="30" show-word-limit -->
<el-input class="input-new-tag" v-if="item.inputVisible" v-model.trim="item.name" ref="saveTagInput" size="small" @blur="item.name = handleInputConfirm(item.name, item.id)" @keyup.enter.native="item.name = handleInputConfirm(item.name, item.id)"></el-input>
<el-tooltip class="item" :content="item.name" placement="top">
<span class="ellipsis-1" v-if="!item.inputVisible">{{ item.name }}</span>
</el-tooltip>
<img class="editIcon" src="@/assets/tagsManage/edit.png" @click="showInput(item.id)" alt="" v-show="!item.inputVisible" />
</span>
<!-- 企业标签最多3000个,已创建3个 -->
<!-- 自店标签最多3000个,已创建3个 -->
</div>
<div slot="modeType">
<el-input v-model.trim="tagForm.mode" disabled style="width:190px"></el-input>
<div class="row-tag" v-for="(item, index) in tagForm.tagsList" :key="index">
<!-- :onkeyup="(item.name = item.name.replace(/\s+/g, ''))" maxlength="30" show-word-limit @input="checkInputContent"-->
<el-input v-model.trim="item.name" placeholder="添加标签名称(至少添加一个标签)" @keyup.native="item.name = checkInputContent(item.name)"></el-input>
<span class="el-icon-circle-close" @click="deleteRow(index)"></span>
</div>
<div slot="tagsInput-type">
<div class="tagsWrap" v-if="tagDialogTitle == '编辑标签组'">
<span class="tag" :class="{ inputWrapShow: item.inputVisible }" v-for="item in editTagList" :key="item.id">
<!-- maxlength="30" show-word-limit -->
<el-input class="input-new-tag" v-if="item.inputVisible" v-model.trim="item.name" ref="saveTagInput" size="small" @blur="item.name = handleInputConfirm(item.name, item.id)" @keyup.enter.native="item.name = handleInputConfirm(item.name, item.id)"></el-input>
<el-tooltip class="item" :content="item.name" placement="top">
<span class="ellipsis-1" v-if="!item.inputVisible">{{ item.name }}</span>
</el-tooltip>
<img class="editIcon" src="@/assets/tagsManage/edit.png" @click="showInput(item.id)" alt="" v-show="!item.inputVisible" />
</span>
</div>
<div class="row-tag" v-for="(item, index) in tagForm.tagsList" :key="index">
<!-- :onkeyup="(item.name = item.name.replace(/\s+/g, ''))" maxlength="30" show-word-limit @input="checkInputContent"-->
<el-input v-model.trim="item.name" placeholder="添加标签名称(至少添加一个标签)" @keyup.native="item.name = checkInputContent(item.name)"></el-input>
<span class="el-icon-circle-close" @click="deleteRow(index)"></span>
</div>
<!-- 需要后台告诉已经创建多少个标签了 -->
<div class="addtagIcon" v-if="tagForm.initTagsGroup == 1" :style="{ color: numberObj.bizLabelCount >= 3000 ? '#EEE' : '' }" @click="addRow(tagForm.initTagsGroup)">
<i class="el-icon-circle-plus-outline"></i>
<span class="addTagText">新增标签</span>
</div>
<div class="addtagIcon" v-if="tagForm.initTagsGroup == 2" :style="{ color: numberObj.rcLabelCount >= 3000 ? '#EEE' : '' }" @click="addRow(tagForm.initTagsGroup)">
<i class="el-icon-circle-plus-outline"></i>
<span class="addTagText">新增标签</span>
</div>
<div class="addtagIcon" v-if="tagForm.initTagsGroup == ''" @click="addRow(tagForm.initTagsGroup)">
<i class="el-icon-circle-plus-outline"></i>
<span class="addTagText">新增标签</span>
</div>
<!-- v-if="tagNameRules" -->
<div class="el-form-item__error" v-if="tagNameRules">请至少添加一个标签</div>
<!-- 需要后台告诉已经创建多少个标签了 -->
<div class="addtagIcon" v-if="tagForm.initTagsGroup == 1" :style="{ color: numberObj.bizLabelCount >= 3000 ? '#EEE' : '' }" @click="addRow(tagForm.initTagsGroup)">
<i class="el-icon-circle-plus-outline"></i>
<span class="addTagText">新增标签</span>
</div>
<div class="addtagIcon" v-if="tagForm.initTagsGroup == 2" :style="{ color: numberObj.rcLabelCount >= 3000 ? '#EEE' : '' }" @click="addRow(tagForm.initTagsGroup)">
<i class="el-icon-circle-plus-outline"></i>
<span class="addTagText">新增标签</span>
</div>
</rule-form>
</slot>
</basic-dialog>
<basic-dialog class="group-box" title="保存为人群" :isVisible="groupVisible" @confirmDialog="groupConfirmDialog" @closeDialog="groupVisible = false">
<div class="addtagIcon" v-if="tagForm.initTagsGroup == ''" @click="addRow(tagForm.initTagsGroup)">
<i class="el-icon-circle-plus-outline"></i>
<span class="addTagText">新增标签</span>
</div>
<!-- v-if="tagNameRules" -->
<div class="el-form-item__error" v-if="tagNameRules">请至少添加一个标签</div>
</div>
</rule-form>
<span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="handleClose">取消</el-button>
<el-button type="primary" size="small" @click="handleConfirm">确定</el-button>
</span>
</GLDialog>
<GLDialog title="保存为人群" :visible.sync="groupVisible" :hasFooter="true">
<div class="dialog-form">
<div class="dialog-form-item">
<label>
......@@ -253,8 +258,12 @@
<span>{{ crowdForm.crowdDesc.length }}/100</span>
</div>
</div>
</basic-dialog>
<el-dialog title="提示" :visible.sync="successVisible" width="30%">
<span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="groupVisible = false">取消</el-button>
<el-button type="primary" size="small" @click="groupConfirmDialog">确定</el-button>
</span>
</GLDialog>
<GLDialog title="提示" :visible.sync="successVisible" :hasFooter="false">
<div class="success-panel">
<i class="el-icon-circle-check"></i>
</div>
......@@ -262,7 +271,7 @@
<div class="success-tips-h1">已保存为人群</div>
<div class="success-tips-h2" @click="jumpGroup">立即前往“人群管理”></div>
</div>
</el-dialog>
</GLDialog>
<div class="loading-containner" v-if="userLoading">
<div class="loading-box">客户列表加载中</div>
</div>
......@@ -274,7 +283,7 @@ import { getLoginCount } from '@/api/modules/loginCount'
import tagGroup from './components/tagGroup.vue'
import url from '@/assets/clientDataOverview/nodata.png'
import tag from '@/mixins/tag'
import util from '@/utils/util'
import { utils } from 'glsx-common'
export default {
mixins: [tag],
name: 'tagsManage',
......@@ -300,7 +309,6 @@ export default {
}
}
var checkTagsInput = (rule, value, callBack) => {
console.log('value值为:', value, typeof value, value.length)
if (value && value.length == 0) {
return callBack(new Error('请添加标签'))
} else {
......@@ -308,6 +316,8 @@ export default {
}
}
return {
isShowCloseBtn: true,
dialogMode: 'mid',
successVisible: false,
userLoading: false,
dialogRuleVisible: false,
......@@ -531,7 +541,6 @@ export default {
this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel
this.userType = this.$globalState.session.userType
console.log(this.$globalState.session, '555')
// if (this.merchantModel == 1) {
// if (!(this.accountLevel == 1 && this.userType == 1)) this.tagsGroupList.splice(0, 1) //只能创建自店标签
// }
......@@ -576,8 +585,30 @@ export default {
// toViewCustomer(info) {
// this.$router.push('/tagsManage/viewCustomers')
// },
// 跳转到营销SOP
createMarketSOP() {
let getDatas = JSON.parse(
JSON.stringify(this.allListParams)
.replace(/groupId/g, 'labelGroupId')
.replace(/groupName/g, 'labelGroupName')
.replace(/groupType/g, 'labelGroupType')
)
var params = {
addOrEdit: 'add',
fromPage: '/custom/tagsManage/index',
$title: encodeURI('新建SOP'),
info: {
// 标签
customerOptType: 3,
labelList: [...getDatas]
}
}
this.$common.utils.storage.set('sopInfo', params)
this.$history.push({
path: 'marketing/sop/editSop'
})
},
toViewCustomer(info) {
console.log(info)
const id = info.labelGroup.id
const type = info.labelType
this.$router.push({
......@@ -585,9 +616,7 @@ export default {
path: `/tagsManage/viewCustomers/${id}/${type}`
})
},
watchInput() {
console.log('点击标签组名称输入框')
},
watchInput() {},
showTagArray(list) {
if (list.length == 0) {
return []
......@@ -596,7 +625,6 @@ export default {
return list.slice(0, 9)
},
checkInputContent: function(e) {
console.log(e)
//确保每个输入框的内容不和已存在的编辑标签相同
let isHasSameTag = this.editTagList.some(ele => ele.name == e)
if (isHasSameTag) {
......@@ -626,7 +654,6 @@ export default {
return true //门店版都显示编辑按钮
},
expandeClick() {
// console.log('expandeClick')
this.expande = !this.expande
},
closeInitPanel() {
......@@ -660,7 +687,6 @@ export default {
this.getCustomersListData()
},
btnClick(pType, rowData) {
console.log(pType, rowData, 'btnClick')
switch (pType) {
case 'create':
this.tagDialogTitle = '添加标签组'
......@@ -702,7 +728,7 @@ export default {
this.tagForm.tagsName = rowData.labelGroup.name //标签组名
this.tagForm.initTagsGroup = rowData.labelType == '企业标签' || rowData.labelType == '集团标签' ? 1 : rowData.labelType == '自店标签' ? 2 : '' //标签组类型
},
handleConfirm() {
handleConfirm: utils.debounce(function() {
this.$refs.tagForm.$children[0].validate(valid => {
if (!valid) {
if (this.tagForm.tagsList.length <= 0 && this.tagDialogTitle == '添加标签组') {
......@@ -732,7 +758,7 @@ export default {
this.$message.error('不能提交相同的标签,请修改')
return
}
this.newAddTagFun()
this.newAddTagFun(1)
//this.handleClose() //这里不管
} else {
//修改标签(允许同时增加标签)
......@@ -763,7 +789,69 @@ export default {
// this.handleClose()
}
})
},
}, 300),
// handleConfirm() {
// this.$refs.tagForm.$children[0].validate(valid => {
// if (!valid) {
// if (this.tagForm.tagsList.length <= 0 && this.tagDialogTitle == '添加标签组') {
// this.tagNameRules = true
// this.$message.error('至少要添加一个标签')
// // return
// }
// return
// }
// if (this.tagForm.tagsList.length <= 0 && this.tagDialogTitle == '添加标签组') {
// this.tagNameRules = true
// this.$message.error('至少要添加一个标签')
// return
// }
// if (this.tagDialogTitle == '添加标签组') {
// //过滤掉没有输入值得标签输入框
// this.tagForm.tagsList = this.tagForm.tagsList.filter(item => item.name != '')
// if (this.tagForm.tagsList.length <= 0) {
// this.$message.error('不能提交空标签')
// return
// }
// //如果存在添加标签的输入框的内容的标签相同则不提交
// let isSameTagFlag = false
// var tempArr = this.tagForm.tagsList.map(item => item.name)
// isSameTagFlag = this.isHasSome(tempArr)
// if (isSameTagFlag) {
// this.$message.error('不能提交相同的标签,请修改')
// return
// }
// this.newAddTagFun(1)
// //this.handleClose() //这里不管
// } else {
// //修改标签(允许同时增加标签)
// let isHasEmpty = this.editTagList.some(ele => ele.name == '')
// if (isHasEmpty) {
// this.$message.error('不能提交空的编辑标签')
// return
// }
// if (this.tagForm.tagsList.length > 0) {
// //过滤掉没有输入值得标签输入框
// this.tagForm.tagsList = this.tagForm.tagsList.filter(item => item.name != '')
// //如果存在添加标签的输入框的内容和可编辑的标签相同则不提交
// let ishasSameTagFlag = false
// this.editTagList.forEach(item => {
// for (let i = 0; i < this.tagForm.tagsList.length; i++) {
// if (this.tagForm.tagsList[i].name == item.name) {
// ishasSameTagFlag = true
// }
// }
// })
// if (ishasSameTagFlag) {
// this.$message.error('不能提交已存在的标签,请修改')
// return
// }
// }
// this.updateTagFun()
// this.newAddTagFun()
// // this.handleClose()
// }
// })
// },
handleRuleClose() {
this.dialogRuleVisible = false
},
......@@ -776,14 +864,11 @@ export default {
this.tagForm.initTagsGroup = 2
}
this.tagForm.tagsName = ''
// console.log(this.tagForm.initTagsGroup, '7777')
// console.log(this.tagForm, '内')
}
// console.log(this.tagForm, '外')
this.tagForm.tagsList = [] //取消时清空新增标签
this.tagVisible = !this.tagVisible
},
newAddTagFun() {
newAddTagFun(status) {
//满足条件进行提交
let params = {}
params['labelDTO.dataFrom'] = 'cs'
......@@ -794,14 +879,14 @@ export default {
params['labelDTO.labelType'] = this.tagForm.initTagsGroup == 1 ? (this.$globalState.session.merchantModel == 1 ? '集团标签' : '企业标签') : '自店标签'
params['labelDTO.labelList'] = this.tagForm.tagsList
params['labelDTO.isAddLabelGroupEnter'] = this.tagDialogTitle == '添加标签组' ? true : false
console.log(params)
newAddTag(params).then(res => {
if (!res) {
return
}
if (res.data.code == 0) {
if (this.tagForm.tagsList.length > 0) {
this.$message.success('添加成功')
// this.$message.success('添加成功')
status && this.$message.success('添加成功')
}
if (this.tagDialogTitle == '编辑标签组') {
this.tagForm.tagsName = ''
......@@ -847,7 +932,7 @@ export default {
// this.tagForm.tagsName = ''
// this.tagForm.initTagsGroup = ''
// this.tagForm.tagsList = []
this.$refs.tagTree.getTableList(true) //刷新下表格
// this.$refs.tagTree.getTableList(true) //刷新下表格 //重复请求了
})
},
//删除一行标签
......@@ -888,9 +973,7 @@ export default {
})
return this.$Utils.cutMaxCharStr(inputValue)
},
handleSelect(value) {
console.log('值内容', value)
}
handleSelect(value) {}
//注意问问他们后台怎么处理转义字符
//限制输入特殊字符
// keyUp(e) {
......@@ -1018,9 +1101,9 @@ export default {
b {
color: #666666;
}
span {
white-space: nowrap;
}
// span {
// white-space: nowrap;
// }
}
.static-image {
width: 335px;
......@@ -1134,7 +1217,7 @@ export default {
.client-tag {
width: 260px;
margin-right: 10px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
margin-top: 10px;
background-color: #fff;
}
......@@ -1148,7 +1231,7 @@ export default {
padding: 16px;
margin-top: 10px;
background-color: #fff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
}
&-title {
font-size: 16px;
......@@ -1207,7 +1290,7 @@ export default {
.pageContent {
overflow-y: auto;
padding: 20px 20px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
margin-top: 10px;
background-color: #fff;
.el-button + .el-button {
......@@ -1218,7 +1301,7 @@ export default {
justify-content: space-between;
align-items: center;
padding-top: 14px;
padding-bottom: 20px;
padding-bottom: 10px;
letter-spacing: 1px;
.clientNum {
// display: flex;
......
......@@ -82,7 +82,7 @@
</div>
</div>
<el-dialog title="选择标签" width="314px" :visible="dialogVisible" class="labelDialog" :before-close="handleDialogClose">
<GLTable title="选择标签" :visible.sync="dialogVisible">
<el-input placeholder="请输入搜索关键字" v-model="searchLabel" clearable>
<i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input>
......@@ -106,10 +106,10 @@
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="resetSearch">重置</el-button>
<el-button type="primary" @click="searchClientData">确定</el-button>
<el-button plain size="small" class="btn-three" @click="resetSearch">重置</el-button>
<el-button type="primary" size="small" @click="searchClientData">确定123</el-button>
</span>
</el-dialog>
</GLTable>
</div>
</template>
......@@ -372,7 +372,7 @@ export default {
'labelByGroupIdReq.labelGroupType': this.groupType
}
getLabelList(params).then(res => {
console.log(this.$common)
this.labelGroupName = res.groupName
this.labelList = res.labelNameIds
this.labelType = res.groupType
......@@ -412,7 +412,7 @@ export default {
this.searchForm = {
...allListParams
}
console.log(this.searchForm)
// this.exportParams = {...allListParams}
this.getCustomersListData()
this.tagLists = []
......@@ -459,7 +459,7 @@ export default {
},
// 输入框匹配label数据
searchIuputLabel() {
console.log('111')
},
handleDialogClose() {
this.dialogVisible = false
......@@ -468,7 +468,7 @@ export default {
this.dialogVisible = true
},
handleNodeClick(data) {
console.log(data)
},
goBack() {
this.$router.go(-1)
......@@ -478,8 +478,8 @@ export default {
this.$refs.viewCustomers.setTableHeightFun()
},
setTableFinishFun(content) {
console.log(content, this.$refs.viewCustomers.data.length, '获取数据')
console.log(this.$refs.viewCustomers.total)
this.customerListsNum = this.$refs.viewCustomers.total
this.$refs.viewCustomers.data.length ? (this.$refs.viewCustomers.tableHeightValues = '') : this.$refs.viewCustomers.setTableHeightFun()
},
......@@ -488,7 +488,7 @@ export default {
const params = {
...JSON.parse(JSON.stringify(this.exportParams))
}
console.log(params)
exportLabelList(params).then(res => {
this.$Utils.exportFn(res)
})
......@@ -498,7 +498,7 @@ export default {
},
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
console.log(params)
return params
},
beforeSearchFn() {
......@@ -691,7 +691,7 @@ export default {
}
}
padding: 6px 20px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// min-width: 1300px;
background-color: #fff;
.el-button + .el-button {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!