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 2063 additions and 1239 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
<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
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 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;
......
......@@ -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;
......
......@@ -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;
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!