Commit e90e897d by 杨明

fixed

2 parents d5c88a07 47e1faf7
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
"glsx-table": "^1.1.0", "glsx-table": "^1.1.0",
"jquery": "^3.6.0", "jquery": "^3.6.0",
"sha1": "^1.1.1", "sha1": "^1.1.1",
"swiper": "^4.0.0",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-animate-number": "^0.4.2", "vue-animate-number": "^0.4.2",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</div> </div>
<img src="./assets/logo.png" alt="" srcset="" /> <img src="./assets/logo.png" alt="" srcset="" />
</div> --> </div> -->
<keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd,guestGroupDetail,group,viewCustomers,crowdDetail,crowdAdd,crowdManage,leadBasicInfo,leadAllocation,leadManage,clientManage"> <keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd,guestGroupDetail,group,viewCustomers,crowdDetail,crowdAdd,crowdManage,leadBasicInfo,leadAllocation,leadManage,marketingPeople">
<router-view></router-view> <router-view></router-view>
</keep-alive> </keep-alive>
</div> </div>
......
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http3 } from '@/main' import {
http3
} from '@/main'
// const url = 'http://192.168.3.193:8395/rop-scrm-entmicro/router' // const url = 'http://192.168.3.193:8395/rop-scrm-entmicro/router'
//获取数据概览上方的数据 /rop-scrm-datahub //获取数据概览上方的数据 /rop-scrm-datahub
...@@ -36,7 +38,7 @@ export function getDataOverviewBarMap(params) { ...@@ -36,7 +38,7 @@ export function getDataOverviewBarMap(params) {
export function getCustomerList(params) { export function getCustomerList(params) {
params.method = 'entmicro.api.customer.cluster.page' params.method = 'entmicro.api.customer.cluster.page'
return http3({ return http3({
url:'/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
...@@ -46,7 +48,7 @@ export function getCustomerList(params) { ...@@ -46,7 +48,7 @@ export function getCustomerList(params) {
export function getcrowdManageList(params) { export function getcrowdManageList(params) {
params.method = 'entmicro.api.customer.crowd.page' params.method = 'entmicro.api.customer.crowd.page'
return http3({ return http3({
url:'/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
// url:'http://192.168.3.193:8395/rop-scrm-entmicro/router', // url:'http://192.168.3.193:8395/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
...@@ -58,10 +60,46 @@ export function getcrowdManageList(params) { ...@@ -58,10 +60,46 @@ export function getcrowdManageList(params) {
export function customerClusterListExport(params) { export function customerClusterListExport(params) {
params.method = 'entmicro.api.customer.customerClusterListExport' params.method = 'entmicro.api.customer.customerClusterListExport'
return http3({ return http3({
url:'/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
//获取客户分群展示
export function customerClusterListShow(params) {
params.method = 'scrm.api.datahub.crowdgroup.queryCrowdGroupList'
return http3({
// https://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.datahub.crowdgroup.queryCrowdListByCrowdGroupId'
return http3({
// http://192.168.3.226:9636
url: '/rop-scrm-datahub/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
})
}
\ No newline at end of file \ No newline at end of file
...@@ -80,61 +80,6 @@ const getLabelTreeList = params => { ...@@ -80,61 +80,6 @@ const getLabelTreeList = params => {
returnAll: true 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
})
}
export default { export default {
getCrowdList, getCrowdList,
...@@ -142,10 +87,5 @@ export default { ...@@ -142,10 +87,5 @@ export default {
addCrowd, addCrowd,
getCrowdCount, getCrowdCount,
getSearchBox, getSearchBox,
getLabelTreeList, getLabelTreeList
queryCrowdGroupTree,
addCrowdGroup,
editCrowdGroup,
deleteCrowdGroup,
queryCrowdGroupDetailsByCrowdGroupId
} }
@import '@/styles/variables.scss'; @import '@/styles/variables.scss';
.glsx-table .emptyBg .noDataImg {
margin-top: 0px !important;
}
.el-tag { .el-tag {
color: #666 !important; color: #666 !important;
font-size: 14px !important; font-size: 14px !important;
...@@ -114,6 +118,10 @@ ...@@ -114,6 +118,10 @@
margin-top: 10px; margin-top: 10px;
} }
.wid50 {
width: 50%;
}
.circleStatusRed { .circleStatusRed {
width: 6px; width: 6px;
height: 6px; height: 6px;
...@@ -163,3 +171,20 @@ ...@@ -163,3 +171,20 @@
vertical-align: middle; vertical-align: middle;
margin-right: 8px; 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;
}
\ No newline at end of file \ No newline at end of file
...@@ -4,8 +4,7 @@ export const Constants = { ...@@ -4,8 +4,7 @@ export const Constants = {
'1': '删除好友, red-text' '1': '删除好友, red-text'
}, },
//性别选项 //性别选项
GENDER_OPTION: [ GENDER_OPTION: [{
{
label: '全部', label: '全部',
value: null value: null
}, },
...@@ -22,8 +21,7 @@ export const Constants = { ...@@ -22,8 +21,7 @@ export const Constants = {
value: 0 value: 0
} }
], ],
SOURCE_OPTION: [ SOURCE_OPTION: [{
{
label: '全部', label: '全部',
value: 0 value: 0
}, },
...@@ -81,8 +79,7 @@ export const Constants = { ...@@ -81,8 +79,7 @@ export const Constants = {
} }
], ],
//标签类型 //标签类型
LABEL_OPTION: [ LABEL_OPTION: [{
{
label: '企业标签', label: '企业标签',
value: '企业标签' value: '企业标签'
}, },
...@@ -153,50 +150,70 @@ export const Constants = { ...@@ -153,50 +150,70 @@ export const Constants = {
1: '已激活', 1: '已激活',
2: '已过期' 2: '已过期'
}, },
DESCRIBEDATA: [ DESCRIBEDATA: [{
{
name: '潜在意向客户', name: '潜在意向客户',
info: '无购车且无其他交易行为的所有客户' info: '无购车且无其他交易行为的所有客户',
id: 1
}, },
{ {
name: '潜在意向客户已加微', name: '潜在意向已加企微客户',
info: '在潜在意向客户中,已加企微的客户' info: '在潜在意向客户中,已加企微的客户',
id: 2
}, },
{ {
name: '潜在意向客户未加微', name: '潜在意向未加企微客户',
info: '在潜在意向客户中,未加企微的客户' info: '在潜在意向客户中,未加企微的客户',
id: 3
}, },
{ {
name: '基盘客户', name: '基盘客户',
info: '有购车或其他交易行为的所有客户' info: '有购车或其他交易行为的所有客户',
id: 4
}, },
{ {
name: '基盘客户已加微', name: '基盘已加企微客户',
info: '在基盘客户中,已加企微的客户' info: '在基盘客户中,已加企微的客户',
id: 5
}, },
{ {
name: '基盘客户未加微', name: '基盘未加企微客户',
info: '在基盘客户中,未加企微的客户' info: '在基盘客户中,未加企微的客户',
id: 6
}, },
{ {
name: '新车客户', name: '新车客户',
info: '购车时间3个月的客户' info: '购车时间3个月的客户',
id: 7
}, },
{ {
name: '车险待续保客户', name: '车险待续保客户',
info: '近一个月内车险即将到期的客户' info: '近一个月内车险即将到期的客户',
id: 8
}, },
{ {
name: '新车待首保客户', name: '新车待首保客户',
info: '购车时间5~7个月内,且无保养记录的客户' info: '购车时间5~7个月内,且无保养记录的客户',
id: 9
}, },
{ {
name: '沉默客户', name: '沉默客户',
info: '超过180天未到店的客户' info: '超过180天未到店的客户',
id: 10
}, },
{ {
name: '已加企微,待匹配客户', name: '已加企微,待匹配客户',
info: '已加企微,且未匹配到潜在意向和基盘客户的客户' info: '已加企微,且未匹配到潜在意向或基盘客户的客户',
id: 11
},
{
name: '已加企微,待匹配客户(已绑定手机号)',
info: '已加企微,且未匹配到潜在意向或基盘客户的客户(已绑定手机号)',
id: 20
},
{
name: '未加企微,未匹配客户',
info: '未添加企微或添加企微后删除好友,且未匹配到意向和基盘客户的客户',
id: 21
} }
] ]
} }
\ No newline at end of file \ No newline at end of file
...@@ -15,9 +15,9 @@ export default { ...@@ -15,9 +15,9 @@ export default {
type: String, type: String,
default: '' default: ''
}, },
isCloseShowNumTag:{ isCloseShowNumTag: {
type:Boolean, type: Boolean,
default:false default: false
}, },
totalData: { totalData: {
type: Array, type: Array,
...@@ -80,12 +80,29 @@ export default { ...@@ -80,12 +80,29 @@ export default {
} }
}, },
formatter: function(datas) { 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++) { for (var i = 0, length = datas.length; i < length; i++) {
if (datas[i].seriesName == '新增客户' || datas[i].seriesName == '新增企微客户') { // if (datas[i].seriesName == '新增客户' || datas[i].seriesName == '新增企微客户') {
res += datas[i].seriesName + ':' + datas[i].data + '人' + '<br/>' // res += datas[i].seriesName + ':' + datas[i].data + '人' + '<br/>'
} else { // } else {
res += datas[i].seriesName + ':' + datas[i].data + '%' + '<br/>' // 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 return res
...@@ -116,7 +133,8 @@ export default { ...@@ -116,7 +133,8 @@ export default {
// }, // },
itemGap: 20, //图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。 itemGap: 20, //图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。
// data: ['全部客户', '全部客户环比', '企微客户', '企微客户环比'], //图例的数据数组。 // data: ['全部客户', '全部客户环比', '企微客户', '企微客户环比'], //图例的数据数组。
data: ['新增客户', '新增客户环比', '新增企微客户', '新增企微客户环比'], //图例的数据数组。 // data: ['新增客户', '新增客户环比', '新增企微客户', '新增企微客户环比'], //图例的数据数组。
data: ['全部客户', '全部客户环比', '企微客户', '企微客户环比'], //图例的数据数组。
inactiveColor: '#ccc' //图例关闭时的颜色。 inactiveColor: '#ccc' //图例关闭时的颜色。
}, },
grid: { grid: {
...@@ -210,7 +228,7 @@ export default { ...@@ -210,7 +228,7 @@ export default {
], ],
series: [ series: [
{ {
name: '新增客户', name: '全部客户',
type: 'bar', type: 'bar',
data: this.customerCount, //[33600, 18000, 17500, 20000, 17000, 480, 1000, 800, 520, 650, 920, 600], data: this.customerCount, //[33600, 18000, 17500, 20000, 17000, 480, 1000, 800, 520, 650, 920, 600],
label: { label: {
...@@ -220,11 +238,11 @@ export default { ...@@ -220,11 +238,11 @@ export default {
position: 'top' position: 'top'
}, },
itemStyle: { itemStyle: {
color: '#5850ff' color: '#928DFF'
} }
}, },
{ {
name: '新增客户环比', name: '全部客户环比',
type: 'line', type: 'line',
yAxisIndex: 1, 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], 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 { ...@@ -233,11 +251,11 @@ export default {
} }
}, },
{ {
name: '新增企微客户', name: '企微客户',
type: 'bar', type: 'bar',
data: this.entmicroCount, //[22000, 10000, 10000, 13000, 11500, 4000, 7000, 6500, 4500, 5500, 7000, 6000], data: this.entmicroCount, //[22000, 10000, 10000, 13000, 11500, 4000, 7000, 6500, 4500, 5500, 7000, 6000],
itemStyle: { itemStyle: {
color: '#FE9C1C' color: '#FEBE6B'
}, },
label: { label: {
show: this.isCloseShowNumTag ? false : true, show: this.isCloseShowNumTag ? false : true,
...@@ -246,7 +264,7 @@ export default { ...@@ -246,7 +264,7 @@ export default {
} }
}, },
{ {
name: '新增企微客户环比', name: '企微客户环比',
type: 'line', type: 'line',
yAxisIndex: 1, 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], 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],
......
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
trigger: 'item', //模板变量有 {a}、{b}、{c}、{d},分别表示系列名,数据名,数据值,百分比。{d}数据会根据value值计算百分比 trigger: 'item', //模板变量有 {a}、{b}、{c}、{d},分别表示系列名,数据名,数据值,百分比。{d}数据会根据value值计算百分比
formatter: '{b} : {c}人 ({d}%)' formatter: '{b} : {c}人 ({d}%)'
}, },
color: ['#FE9C1C ', '#716AFF'], color: ['#5850FF', '#FFB21F'],
// legend: { // legend: {
// orient: "vertical", // orient: "vertical",
// bottom: "bottom", // bottom: "bottom",
...@@ -72,8 +72,9 @@ export default { ...@@ -72,8 +72,9 @@ export default {
{ {
name: '客户总数', name: '客户总数',
type: 'pie', type: 'pie',
radius: '118px', // radius: '118px',
center: ['50%', '65%'], center: ['50%', '36%'],
radius: ['32%', '48%'],
stillShowZeroSum: false, stillShowZeroSum: false,
data: this.pieData, data: this.pieData,
// data: [ // data: [
...@@ -98,13 +99,20 @@ export default { ...@@ -98,13 +99,20 @@ export default {
// }, // },
label: { label: {
position: 'inner', // position: 'inner',
formatter: '{d}%', // formatter: '{d}%',
show: true, // show: true,
color: '#fff' // color: '#fff'
// formatter: "{b}:\n{c}人({d}%)", // formatter: "{b}:\n{c}人({d}%)",
formatter: '{b}\n{d}%',
// fontWeight: "bold", // fontWeight: "bold",
// color:'red' color: '#666666',
textStyle: {
fontWeight: 'normal',
fontSize: 14,
lineHeight: 21
}
// color: ["#1296db", "#d42378"], // color: ["#1296db", "#d42378"],
}, },
labelLine: { show: true } 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(() => {
console.log(this.topDataObj, '饼图')
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>
...@@ -127,6 +127,9 @@ export default { ...@@ -127,6 +127,9 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <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 { /deep/ .el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
box-shadow: none; box-shadow: none;
} }
......
...@@ -30,16 +30,17 @@ Vue.prototype.$apis = apis ...@@ -30,16 +30,17 @@ Vue.prototype.$apis = apis
Vue.use(glsxTable) Vue.use(glsxTable)
Vue.prototype.$message = message Vue.prototype.$message = message
Vue.prototype.size = 'small' Vue.prototype.size = 'small'
// Vue.prototype.btn_size = 'mini' // Vue.prototype.btn_size = 'mini'
Vue.prototype.$Constants = Constants Vue.prototype.$Constants = Constants
Vue.prototype.$Utils = Util Vue.prototype.$Utils = Util
Vue.prototype.$Commons = common Vue.prototype.$Commons = common
Vue.prototype.$echarts = echarts Vue.prototype.$echarts = echarts
//过滤器统一处理预加载 //过滤器统一处理预加载
Object.keys(filters).forEach(key => { Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key]) Vue.filter(key, filters[key])
}) })
export { bootstrap, mount, unmount } from '@/setup' export { bootstrap, mount, unmount }
from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
export const http2 = params => Vue.prototype.$http2(params) export const http2 = params => Vue.prototype.$http2(params)
export const http3 = params => Vue.prototype.$http3(params) export const http3 = params => Vue.prototype.$http3(params)
......
...@@ -18,15 +18,21 @@ const staticRoutes = Object.freeze([ ...@@ -18,15 +18,21 @@ const staticRoutes = Object.freeze([
meta: {} meta: {}
}, },
{ {
name: 'grouping',
path: '/clientDataOverview/grouping',
component: resolve => require([`@/views/clientDataOverview/grouping.vue`], resolve),
meta: {}
},
{
name: 'clientDataOverview', name: 'clientDataOverview',
path: '/clientDataOverview/group/:id', path: '/clientDataOverview/group/:id',
component: resolve => require([`@/views/clientDataOverview/group.vue`], resolve), component: resolve => require([`@/views/clientDataOverview/group.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'grouping', name: 'marketingPeople',
path: '/clientDataOverview/grouping/:id', path: '/clientDataOverview/marketingPeople',
component: resolve => require([`@/views/clientDataOverview/grouping.vue`], resolve), component: resolve => require([`@/views/clientDataOverview/marketingPeople`], resolve),
meta: {} meta: {}
}, },
{ {
......
import { Message } from "element-ui"; import { Message } from 'element-ui'
import { debounce } from "./index.js"; import { debounce } from './index.js'
// const error = debounce((msg, getToken) => { // const error = debounce((msg, getToken) => {
// if(window.__POWERED_BY_QIANKUN__) { // if(window.__POWERED_BY_QIANKUN__) {
// let stateRes = { // let stateRes = {
...@@ -20,11 +20,11 @@ import { debounce } from "./index.js"; ...@@ -20,11 +20,11 @@ import { debounce } from "./index.js";
// } // }
// } // }
// }, 1000, true); // }, 1000, true);
const error=msg=>{ const error = msg => {
if(msg){ if (msg) {
Message({ Message({
message:msg, message: msg,
type:'error' type: 'error'
}) })
} }
} }
...@@ -32,58 +32,56 @@ const error=msg=>{ ...@@ -32,58 +32,56 @@ const error=msg=>{
const checkStatus = (status, msg) => { const checkStatus = (status, msg) => {
switch (status) { switch (status) {
case 400: case 400:
error(`Bad Request 错误的请求`); error(`Bad Request 错误的请求`)
break; break
case 401: case 401:
error('用户没有权限(令牌、用户名、密码错误)!'); error('用户没有权限(令牌、用户名、密码错误)!')
break; break
case 403: case 403:
error('用户得到授权,但是访问是被禁止的。!'); error('用户得到授权,但是访问是被禁止的。!')
break; break
// 404请求不存在 // 404请求不存在
case 404: case 404:
error('网络请求错误,未找到该资源!'); error('网络请求错误,未找到该资源!')
break; break
case 405: case 405:
error('网络请求错误,请求方法未允许!'); error('网络请求错误,请求方法未允许!')
break; break
case 408: case 408:
error('网络请求超时!'); error('网络请求超时!')
break; break
case 500: case 500:
error('服务器错误,请联系管理员!'); error('服务器错误,请联系管理员!')
break; break
case 501: case 501:
error('网络未实现!'); error('网络未实现!')
break; break
case 502: case 502:
error('网络错误!'); error('网络错误!')
break; break
case 503: case 503:
error('服务不可用,服务器暂时过载或维护!'); error('服务不可用,服务器暂时过载或维护!')
break; break
case 504: case 504:
error('网络超时!'); error('网络超时!')
break; break
case 505: case 505:
error('http版本不支持该请求!'); error('http版本不支持该请求!')
break; break
case 603: case 603:
error('尚未登录或登录已过期,请重新登录', 'removeToken'); error('尚未登录或登录已过期,请重新登录', 'removeToken')
break; break
case 505: case 505:
error('http版本不支持该请求!'); error('http版本不支持该请求!')
break; break
case 'fail': case 'fail':
error('网络连接错误'); error('网络连接错误')
break; break
case 'custom': case 'custom':
error(`${msg}`); error(`${msg}`)
break; break
default: default:
} }
}
export {
checkStatus
} }
export { checkStatus }
\ No newline at end of file \ No newline at end of file
<template>
<div class="scrm-sub-client-container">
<div class="pageContent">
<GLCombiForm :formObj="searchForm" :formData="searchFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<GLTable v-loading="loading" :hasNum="true" @setTableHeightEvent="setTableHeightEvent" @setTableFinishFun="setTableFinishFun" ref="marketingPlan" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams">
<template slot="options" slot-scope="scope">
<el-button class="blue-text" type="text" @click="goSOPAnalysis(scope.scope.id)">SOP分析</el-button>
<el-button class="blue-text" type="text" @click="goSOPEdit(scope.scope.id)">编辑</el-button>
<el-button class="blue-text" type="text" @click="confirm('delete')">删除</el-button>
<el-button class="blue-text" type="text" @click="confirm(scope.scope)">结束</el-button>
</template>
</GLTable>
</div>
</div>
</template>
<script>
import { getTableList } from '@/api/modules/clientManage'
import util from '@/utils/util'
export default {
data() {
return {
searchForm: {},
searchFormList: [
{
type: 'input',
inputType: 'text',
// name: 'keyword',
label: '人群名称'
},
{
type: 'select',
// name: 'type',
label: '营销状态',
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: ''
}
],
placeholder: '请选择'
}
],
getListApi: getTableList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'data',
tableColumns: [
{
label: '人群名称',
prop: 'orderNo'
},
{
label: 'SOP名称',
prop: 'name'
},
{
label: '营销时间',
prop: 'phone'
},
{
label: '完成度',
prop: 'dsdasd'
},
{
label: '营销状态',
prop: 'dsdasds'
},
{
label: '操作',
prop: 'options',
addHtml: 'options'
}
]
}
}
},
mounted() {
//没数据的时候要算高度
setTimeout(() => {
if (!this.$refs.marketingPlan.data.length) {
this.loading = true
this.$refs.marketingPlan.setTableHeightFun()
this.loading = false
}
}, 200)
},
methods: {
// 跳转SOP分析
goSOPAnalysis(){
this.$history.push(`/marketing/sop/sopAnalysisList?fromPage=${encodeURI('/custom/clientDataOverview/marketingPeople?selectTab=2')}&id=183`)
},
// 跳转SOP编辑页面
goSOPEdit(id) {
this.$history.push(`/marketing/sop/editSop?$title=${encodeURI('编辑SOP')}&fromPage=${encodeURI('/custom/clientDataOverview/marketingPeople?selectTab=2')}&addOrEdit=edit&id=183`)
},
// 确认删除或结束
confirm(type) {
this.$confirm(`是否确认${type == 'delete' ? '删除' : '结束'}?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$message({
type: 'success',
message: '操作成功!'
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
setTableFinishFun() {
this.$refs.marketingPlan.data.length ? (this.$refs.marketingPlan.tableHeightValues = '') : this.$refs.marketingPlan.setTableHeightFun()
},
setTableHeightEvent() {
this.$refs.marketingPlan.setTableHeightFun()
},
// 搜索表格
searchTable() {
console.log(this.searchForm)
this.$refs.marketingPlan.refreshTable()
},
//重置表格
resetTable() {
this.searchForm = {
status: '',
type: ''
}
this.$refs.marketingPlan.refreshTable()
}
}
}
</script>
<style lang="scss" scoped>
.pageContent {
padding: 20px 20px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
background-color: #fff;
}
</style>
<template>
<div class="scrm-sub-client-container">
<div class="pageContent">
<GLCombiForm :formObj="searchForm" :formData="searchFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<GLTable v-loading="loading" :hasNum="true" @setTableHeightEvent="setTableHeightEvent" @setTableFinishFun="setTableFinishFun" ref="marketingPlan" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams">
<template slot="options" slot-scope="scope">
<el-button class="blue-text" type="text" @click="goSOPAnalysis(scope.scope.id)">SOP分析</el-button>
<el-button class="blue-text" type="text" @click="goSOPEdit(scope.scope.id)">编辑</el-button>
<el-button class="blue-text" type="text" @click="confirm('delete')">删除</el-button>
<el-button class="blue-text" type="text" @click="confirm(scope.scope)">结束</el-button>
</template>
</GLTable>
</div>
</div>
</template>
<script>
import { getTableList } from '@/api/modules/clientManage'
import util from '@/utils/util'
export default {
data() {
return {
searchForm: {},
searchFormList: [
{
type: 'input',
inputType: 'text',
// name: 'keyword',
label: '人群名称'
},
{
type: 'select',
// name: 'type',
label: '营销状态',
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: ''
}
],
placeholder: '请选择'
}
],
getListApi: getTableList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'data',
tableColumns: [
{
label: '人群名称',
prop: 'orderNo'
},
{
label: 'SOP名称',
prop: 'name'
},
{
label: '营销时间',
prop: 'phone'
},
{
label: '完成度',
prop: 'dsdasd'
},
{
label: '营销状态',
prop: 'dsdasds'
},
{
label: '操作',
prop: 'options',
addHtml: 'options'
}
]
}
}
},
mounted() {
//没数据的时候要算高度
setTimeout(() => {
if (!this.$refs.marketingPlan.data.length) {
this.loading = true
this.$refs.marketingPlan.setTableHeightFun()
this.loading = false
}
}, 200)
},
methods: {
// 跳转SOP分析
goSOPAnalysis(){
this.$history.push(`/marketing/sop/sopAnalysisList?fromPage=${encodeURI('/custom/clientDataOverview/marketingPeople?selectTab=2')}&id=183`)
},
// 跳转SOP编辑页面
goSOPEdit(id) {
// this.$history.push(`/marketing/sop/editSop?$title=${encodeURI('编辑SOP')}&fromPage=${encodeURI('/custom/clientDataOverview/marketingPeople?selectTab=2')}&addOrEdit=edit&id=183`)
var params = {
addOrEdit: 'edit',
fromPage: '/custom/clientDataOverview/marketingPeople?selectTab=2',
$title: encodeURI('编辑SOP')
}
// addOrEdit != 'add' && (params.id = row.id)
this.$router.push({
path: '/sop/editSop',
query: params
})
},
// 确认删除或结束
confirm(type) {
this.$confirm(`是否确认${type == 'delete' ? '删除' : '结束'}?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$message({
type: 'success',
message: '操作成功!'
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
setTableFinishFun() {
this.$refs.marketingPlan.data.length ? (this.$refs.marketingPlan.tableHeightValues = '') : this.$refs.marketingPlan.setTableHeightFun()
},
setTableHeightEvent() {
this.$refs.marketingPlan.setTableHeightFun()
},
// 搜索表格
searchTable() {
console.log(this.searchForm)
this.$refs.marketingPlan.refreshTable()
},
//重置表格
resetTable() {
this.searchForm = {
status: '',
type: ''
}
this.$refs.marketingPlan.refreshTable()
}
}
}
</script>
<style lang="scss" scoped>
.pageContent {
padding: 20px 20px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
background-color: #fff;
}
</style>
<template> <template>
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<div class="head-container"> <div class="head-container">
<template v-if="crowdType == ''"> <template v-if="crowdType == '3'">
<div class="head-container-title color-3 font-20">{{ $Constants.DESCRIBEDATA[id - 1].name }}</div> <div class="head-container-title color-3 font-20">{{ groupCorwdTitle }}</div>
<div class="head-container-content color-6 font-14">{{ $Constants.DESCRIBEDATA[id - 1].info }}</div> <div class="head-container-content color-6 font-14">{{ groupCorwdDesc }}</div>
</template> </template>
<template v-else> <template v-else>
<div class="head-container-title color-3 font-20">{{ crowdForm.crowdName }}</div> <div class="head-container-title color-3 font-20">{{ crowdForm.crowdName }}</div>
...@@ -19,10 +19,16 @@ ...@@ -19,10 +19,16 @@
全部客户 全部客户
<span class="main-container-head-number font-14">{{ totalCount }}个</span> <span class="main-container-head-number font-14">{{ totalCount }}个</span>
</div> </div>
<div>
<el-button size="small" @click="handleExport" class="export">导出</el-button> <el-button size="small" @click="handleExport" class="export">导出</el-button>
<el-button plain size="small" @click="createMarketSOP()">
营销SOP
</el-button>
</div>
</div> </div>
<GLTable ref="groupRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :noDataImg="url" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <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"> <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 }}</span>
</el-tooltip> </el-tooltip>
...@@ -54,14 +60,18 @@ ...@@ -54,14 +60,18 @@
</template> </template>
<script> <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 { getStaffList } from '@/api/modules/clientManage'
// import Constants from '@common/constants.js'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
export default { export default {
name: 'group', name: 'group',
data() { data() {
return { 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' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableSearchForm: { tableSearchForm: {
customerPhone: '', customerPhone: '',
...@@ -84,18 +94,19 @@ export default { ...@@ -84,18 +94,19 @@ export default {
{ {
type: 'input', type: 'input',
name: 'customerPhone', name: 'customerPhone',
label: '联系电话' label: '联系电话',
width: 170
}, },
{ {
type: 'input', type: 'input',
name: 'nickName', name: 'nickName',
label: '企微名称' label: '企微名称'
}, },
{ // {
type: 'input', // type: 'input',
name: 'customerName', // name: 'customerName',
label: '客户名称' // label: '客户名称'
}, // },
{ {
type: 'select', type: 'select',
name: 'isJoin', name: 'isJoin',
...@@ -131,40 +142,41 @@ export default { ...@@ -131,40 +142,41 @@ export default {
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
addHtml: 'customerName', addHtml: 'customerName',
minWidth: 150 width: 150
}, },
{ {
label: '企微名称', label: '企微名称',
prop: 'nickNameList', prop: 'nickNameList',
addHtml: 'nickNameList', addHtml: 'nickNameList',
minWidth: 220 width: 220
}, },
{ {
label: '联系电话', label: '联系电话',
prop: 'customerPhone', prop: 'customerPhone',
minWidth: 130 width: 130
}, },
{ {
label: '车牌号', label: '车牌号',
prop: 'carNumber', prop: 'carNumber',
minWidth: 120 width: 120
}, },
{ {
label: '车架号', label: '车架号',
prop: 'carVin', prop: 'carVin',
minWidth: 140, width: 140,
line: 1 line: 1
}, },
{ {
label: '车系', label: '车系',
prop: 'audi', prop: 'audi',
minWidth: 170 width: 170
}, },
{ {
label: '跟进员工', label: '跟进员工',
prop: 'followStaff', prop: 'followStaff',
// addHtml: 'followStaff', // addHtml: 'followStaff',
minWidth: 170 width: 170,
line: 1
}, },
{ {
label: '是否加企微', //1. 加入,0.未加入 label: '是否加企微', //1. 加入,0.未加入
...@@ -190,18 +202,88 @@ export default { ...@@ -190,18 +202,88 @@ export default {
} }
] ]
}, },
url: url url: url
} }
}, },
created() { created() {
let { id } = this let { id } = this
this.init(id) 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 == 1 || this.id == 2 || this.id == 3) && location.host.includes('cgacar')) {
this.tableParams.tableColumns.splice(
3,
3,
{
label: '线索时间',
prop: 'clueTime',
width: 170,
line: 1
},
{
label: '意向车型',
prop: 'intentModel',
width: 170,
line: 1
},
{
label: '线索来源',
prop: 'clueSource',
width: 150,
line: 1
}
)
}
}, },
mounted() { mounted() {
this.getStaffList() this.getStaffList()
}, },
methods: { methods: {
// 跳转到营销SOP
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.merchantId
'req.merchantId': 44209846
}
searchCrowdIdByCrowdname(params).then(res => {
this.corwdId = res.data
})
marketQuery = {
crowdDesc: this.groupCorwdDesc,
crowdId: this.corwdId,
crowdName: this.groupCorwdTitle,
total: this.totalCount
}
}
var params = {
addOrEdit: 'add',
fromPage: '/custom/clientDataOverview/group',
$title: encodeURI('新建SOP'),
info: {
// 人群
customerOptType: 2,
crowdList: []
}
}
params.info.crowdList.push(marketQuery)
console.log(params)
this.$common.utils.storage.set('sopInfo', params)
// this.$history.push({
// path: 'marketing/sop/editSop'
// })
},
//获取跟进员工 //获取跟进员工
getStaffList() { getStaffList() {
getStaffList({}).then(res => { getStaffList({}).then(res => {
...@@ -265,7 +347,7 @@ export default { ...@@ -265,7 +347,7 @@ export default {
pageSize: 10, pageSize: 10,
pageNum: 1 pageNum: 1
} }
if (this.crowdType) params.customCrowd = true if (this.crowdType == 1 || this.crowdType == 2) params.customCrowd = true
customerClusterListExport(params).then(res => { customerClusterListExport(params).then(res => {
this.$Utils.exportFn(res) this.$Utils.exportFn(res)
}) })
...@@ -275,7 +357,23 @@ export default { ...@@ -275,7 +357,23 @@ export default {
this.$refs.groupRef.data.length ? (this.$refs.groupRef.tableHeightValues = '') : this.$refs.groupRef.setTableHeightFun() this.$refs.groupRef.data.length ? (this.$refs.groupRef.tableHeightValues = '') : this.$refs.groupRef.setTableHeightFun()
}, },
goBack() { goBack() {
this.$router.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')
}
} }
} }
} }
...@@ -348,7 +446,7 @@ export default { ...@@ -348,7 +446,7 @@ export default {
padding: 20px; padding: 20px;
box-sizing: border-box; box-sizing: border-box;
.main-container-head { .main-container-head {
margin-bottom: 20px; margin-bottom: 10px;
&-title { &-title {
font-weight: 500; font-weight: 500;
line-height: 20px; line-height: 20px;
......
...@@ -101,39 +101,44 @@ export default { ...@@ -101,39 +101,44 @@ export default {
{ {
label: '本群昵称', label: '本群昵称',
prop: 'groupNickName', prop: 'groupNickName',
minWidth: 120 width: 170,
line: 1
}, },
{ {
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
addHtml: 'customerName', addHtml: 'customerName',
minWidth: 150 width: 170,
line: 1
}, },
{ {
label: '手机号码', label: '手机号码',
prop: 'customerPhone', prop: 'customerPhone',
minWidth: 120 line: 1,
width:200
}, },
{ {
label: '性别', label: '性别',
prop: 'customerSex', prop: 'customerSex',
addHtml: 'customerSex' addHtml: 'customerSex',
}, },
{ {
label: '入群方式', label: '入群方式',
prop: 'joinScene', prop: 'joinScene',
addHtml: 'joinScene', addHtml: 'joinScene',
minWidth: 150 width: 190,
line: 1
}, },
{ {
label: '邀请人', label: '邀请人',
prop: 'invitorName', prop: 'invitorName',
minWidth: 120 width: 120,
line: 1
}, },
{ {
label: '入群时间', label: '入群时间',
prop: 'joinTime', prop: 'joinTime',
width: 170 width: 170,
} }
], ],
tableOption: { tableOption: {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</span> </span>
<span slot="delFlag" slot-scope="scope"> <span slot="delFlag" slot-scope="scope">
<span :class="{ circleStatusGreen: scope.scope.delFlag == 0, circleStatusGray: scope.scope.delFlag == -1 }"></span> <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> </span>
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <auth-button :data="scope.scope"></auth-button> --> <!-- <auth-button :data="scope.scope"></auth-button> -->
...@@ -133,7 +133,7 @@ export default { ...@@ -133,7 +133,7 @@ export default {
label: '群聊名称', label: '群聊名称',
prop: 'custGroupName', prop: 'custGroupName',
line: 1, line: 1,
minWidth: 160 width: 160
}, },
{ {
label: '当前成员总数', label: '当前成员总数',
......
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
<div v-if="!followList(scope.scope.followStaff).length">--</div> <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"> <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-tooltip effect="dark" :content="tag" placement="top">
<el-tag type="info" class="ellipsis-1" v-if="idx < 2" :disable-transitions="false"> <el-tag type="info" class="ellipsis-1" v-if="idx < 3" :disable-transitions="false">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ tag }} {{ tag }}
</el-tag> </el-tag>
</el-tooltip> </el-tooltip>
<el-tag type="info" v-if="followList(scope.scope.followStaff).length > 2 && idx == 2"> <el-tag type="info" v-if="followList(scope.scope.followStaff).length > 3 && idx == 3">
<el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"> <el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<div slot="reference">...({{ followList(scope.scope.followStaff).length }})</div> <div slot="reference">...({{ followList(scope.scope.followStaff).length }})</div>
<div class="entmicro-hover"> <div class="entmicro-hover">
...@@ -222,6 +222,29 @@ export default { ...@@ -222,6 +222,29 @@ export default {
optionId: 'value', optionId: 'value',
placeholder: '请选择性别', placeholder: '请选择性别',
optionList: this.$Constants.GENDER_OPTION 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 +252,34 @@ export default { ...@@ -229,29 +252,34 @@ export default {
tableParams: { tableParams: {
listName: 'data', listName: 'data',
tableOption: false, tableOption: false,
// mutiSelectName: 'employeeList',
// mutiSelectUniqueKey: 'id',
tableColumns: [ tableColumns: [
{ {
label: '客户ID', label: '客户ID',
prop: 'oneId', prop: 'oneId',
minWidth: 170 width: 140,
line: 1
}, },
{ {
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
addHtml: 'customerName', addHtml: 'customerName',
width: 120 width: 120,
line: 1
}, },
{ {
label: '企微名称', label: '企微名称',
prop: 'nickNameList', prop: 'nickNameList',
addHtml: 'nickNameList', addHtml: 'nickNameList',
minWidth: 190 width: 190,
}, },
{ {
label: '联系电话', label: '联系电话',
prop: 'customerPhone', prop: 'customerPhone',
addHtml: 'customerPhone', addHtml: 'customerPhone',
minWidth: 130 width: 130
}, },
{ {
label: '性别', label: '性别',
...@@ -262,7 +290,7 @@ export default { ...@@ -262,7 +290,7 @@ export default {
label: '跟进员工', label: '跟进员工',
prop: 'followStaff', prop: 'followStaff',
addHtml: 'followStaff', addHtml: 'followStaff',
minWidth: 280 width: 320
}, },
{ {
label: '是否加企微', //1. 加入,0.未加入 label: '是否加企微', //1. 加入,0.未加入
...@@ -274,17 +302,18 @@ export default { ...@@ -274,17 +302,18 @@ export default {
label: '当前状态', label: '当前状态',
prop: 'status', prop: 'status',
addHtml: 'status', addHtml: 'status',
minWidth: 130 width: 120
}, },
{ {
label: '所属渠道', label: '所属渠道',
prop: 'sourceChannel', prop: 'sourceChannel',
minWidth: 100 width: 140,
line: 1
}, },
{ {
label: '添加来源', label: '添加来源',
prop: 'addWayName', prop: 'addWayName',
minWidth: 120 width: 120
}, },
{ {
label: '添加时间', label: '添加时间',
...@@ -292,9 +321,33 @@ export default { ...@@ -292,9 +321,33 @@ export default {
width: 170 width: 170
}, },
{ {
label: '车系',
prop: 'audi',
width: 120,
line: 1
},
{
label: '车架号',
prop: 'carVin',
width: 180,
line: 1
},
{
label: '车牌号',
prop: 'carNumber',
width: 140,
line: 1
},
{
label: '购车时间',
prop: 'buyDate',
width: 170,
line: 1
},
{
label: '操作', label: '操作',
prop: 'optionBtns', prop: 'optionBtns',
width: '65px', width: '66px',
addHtml: 'optionBtns', addHtml: 'optionBtns',
fixed: 'right' fixed: 'right'
} }
...@@ -364,7 +417,14 @@ export default { ...@@ -364,7 +417,14 @@ export default {
} else { } else {
if (params.beginTime) delete params.beginTime && delete params.endTime 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.daterange
delete params.purchaseCar
return params return params
}, },
beforeSearchFn() { beforeSearchFn() {
...@@ -389,7 +449,6 @@ export default { ...@@ -389,7 +449,6 @@ export default {
let addWayVal = addWayObj.value let addWayVal = addWayObj.value
this.searchForm.addWay = addWayVal this.searchForm.addWay = addWayVal
this.searchForm.isJoin = isJoinVal === null ? null : Number(isJoinVal) this.searchForm.isJoin = isJoinVal === null ? null : Number(isJoinVal)
window.history.pushState(null, null, location.origin + location.pathname)
setTimeout(() => { setTimeout(() => {
this.$refs.combiForm.expandFn() this.$refs.combiForm.expandFn()
}, 100) }, 100)
......
...@@ -107,6 +107,7 @@ export default { ...@@ -107,6 +107,7 @@ export default {
crowdDesc: '' crowdDesc: ''
}, },
crowdId: this.$route.params.id ? this.$route.params.id : '', crowdId: this.$route.params.id ? this.$route.params.id : '',
crowdPage: this.$route.query.crowdType ? this.$route.query.crowdType : '',
tableTotal: '', tableTotal: '',
isShowCloseBtn: true, isShowCloseBtn: true,
dialogRuleVisible: false, dialogRuleVisible: false,
...@@ -147,17 +148,18 @@ export default { ...@@ -147,17 +148,18 @@ export default {
} }
}, },
created() { created() {
console.log('this.$route.params.id', this.$route.params.id)
// 通过人群Id查询人群详情 // 通过人群Id查询人群详情
this.getCrowdDetails() this.getCrowdDetails()
}, },
mounted() {}, mounted() {
console.log(this.$route.query.crowdPage)
},
methods: { methods: {
goBack() { goBack() {
this.$router.push({ this.$router.push({
path: '/crowdManage/index', path: '/crowdManage/index',
query: { query: {
selectTab: 1 selectTab: this.crowdPage
} }
}) })
}, },
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
<GLButton type="text" @click="btnClick('detail', scope.scope)" class="blue-text" fn="查看详情">查看详情</GLButton> <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> --> <!-- <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> <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> </template>
</GLTable> </GLTable>
</div> </div>
...@@ -65,31 +66,26 @@ export default { ...@@ -65,31 +66,26 @@ export default {
{ {
label: '人群名称', label: '人群名称',
prop: 'crowdName', prop: 'crowdName',
addHtml: 'crowdName', addHtml: 'crowdName'
align: 'left', // width: 160
minWidth: 160
// width: 431 // width: 431
}, },
{ {
label: '人群描述', label: '人群描述',
prop: 'crowdDesc', prop: 'crowdDesc',
addHtml: 'crowdDesc', addHtml: 'crowdDesc'
align: 'left', // width: 160
minWidth: 160
}, },
{ {
label: '人数', label: '人数',
prop: 'total', prop: 'total'
// addHtml: 'total',
align: 'left'
}, },
{ {
label: '操作', label: '操作',
prop: 'xxx', prop: 'xxx',
fixed: 'right', fixed: 'right',
addHtml: 'xxx', addHtml: 'xxx',
align: 'left', width: 250
width: 180
} }
] ]
}, },
...@@ -108,20 +104,42 @@ export default { ...@@ -108,20 +104,42 @@ export default {
} }
this.searchForm = { 'req.merchantId': this.merchantId, 'req.crowdType': this.crowdType } 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)
// }
// console.log(this.$route.query)
if (this.$route.query.selectTab) { if (this.$route.query.selectTab) {
this.activeName = 'second' this.$route.query.selectTab == 1 ? (this.activeName = 'first') : (this.activeName = 'second')
// window.history.pushState(null, null, location.origin + location.pathname)
} }
}, },
mounted() {}, mounted() {},
methods: { methods: {
createMarketSOP(crowd) {
var params = {
addOrEdit: 'add',
fromPage: '/custom/crowdManage/index',
$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) { btnClick(type, data) {
const crowdType = this.activeName == 'first' ? 1 : 2
const transData = JSON.stringify(data)
if (type == 'detail') { if (type == 'detail') {
this.$router.push(`/crowdManage/crowdDetail/${data.crowdId}`) this.$router.push(`/crowdManage/crowdDetail/${data.crowdId}?crowdType=${crowdType}`)
} }
if (type == 'view') { if (type == 'view') {
const crowdType = this.activeName == 'first' ? 1 : 2 this.$router.push(`/clientDataOverview/group/${data.crowdId}/${crowdType}?crowdInfo=${transData}`)
this.$router.push(`/clientDataOverview/group/${data.crowdId}/${crowdType}`)
} }
}, },
addClick() { addClick() {
...@@ -134,6 +152,9 @@ export default { ...@@ -134,6 +152,9 @@ export default {
this.$refs.crowdManage.tableHeightValues = '' this.$refs.crowdManage.tableHeightValues = ''
} }
}, },
setTableHeightEvent() {
this.$refs.crowdManage.setTableHeightFun()
},
handleClick() { handleClick() {
this.searchForm = { 'req.keyword': '' } this.searchForm = { 'req.keyword': '' }
this.searchTable() this.searchTable()
...@@ -158,7 +179,6 @@ export default { ...@@ -158,7 +179,6 @@ export default {
}, },
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
next(vm => { next(vm => {
console.log(to, 'to')
if (from.params.crowdType) { if (from.params.crowdType) {
vm.activeName = from.params.crowdType == 2 ? 'second' : 'first' vm.activeName = from.params.crowdType == 2 ? 'second' : 'first'
vm.crowdType = from.params.crowdType vm.crowdType = from.params.crowdType
...@@ -185,7 +205,7 @@ export default { ...@@ -185,7 +205,7 @@ export default {
} }
} }
/deep/ .el-tabs__header { /deep/ .el-tabs__header {
margin: 0 0 20px; margin: 0 0 10px;
} }
/deep/ .el-tabs__nav-wrap::after { /deep/ .el-tabs__nav-wrap::after {
content: none; content: none;
...@@ -247,7 +267,7 @@ export default { ...@@ -247,7 +267,7 @@ export default {
} }
} }
.crowdTable { .crowdTable {
padding: 0 20px; // padding: 0 20px;
/deep/ .line-ellipsis { /deep/ .line-ellipsis {
white-space: nowrap; white-space: nowrap;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</div> </div>
<div class="container"> <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"> <span class="inline-b" style="float: right" slot="form-slot">
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
</span> </span>
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
<GLTable ref="gueastGroup" @setTableFinishFun="setTableFinishFun" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf"> <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 slot="entmicro-name" class="entmicro" slot-scope="scope">
<div class="entmicro-tag" v-for="(tag, idx) in scope.scope.userList" :key="idx"> <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"> <el-tag type="info" v-if="idx < 3" :disable-transitions="false">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ tag.staffName }}{{ tag.departmentName ? `(${tag.departmentName})` : '' }} {{ tag.staffName }}{{ tag.departmentName ? `(${tag.departmentName})` : '' }}
</el-tag> </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="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"> <el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<span slot="reference">...({{ scope.scope.userList.length }})</span> <span slot="reference">...({{ scope.scope.userList.length }})</span>
<div class="entmicro-hover"> <div class="entmicro-hover">
...@@ -69,7 +69,7 @@ export default { ...@@ -69,7 +69,7 @@ export default {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'groupName', prop: 'groupName',
label: '群聊名称', label: '群聊名称:',
placeholder: '请输入群聊名称搜索', placeholder: '请输入群聊名称搜索',
clearable: true clearable: true
} }
...@@ -92,19 +92,19 @@ export default { ...@@ -92,19 +92,19 @@ export default {
{ {
label: '默认成员', label: '默认成员',
prop: 'entmicroName', prop: 'entmicroName',
minWidth: 250, minWidth: 320,
addHtml: 'entmicro-name' addHtml: 'entmicro-name'
}, },
{ {
label: '创建时间', label: '创建时间',
prop: 'createdTime', prop: 'createdTime',
line: 1, line: 1,
minWidth: 110 // minWidth: 110
}, },
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
minWidth: 130, // minWidth: 130,
addHtml: 'status' addHtml: 'status'
}, },
{ {
...@@ -342,7 +342,7 @@ export default { ...@@ -342,7 +342,7 @@ export default {
} }
} }
.btn-header { .btn-header {
margin-bottom: 20px; margin-bottom: 10px;
} }
.container { .container {
margin-bottom: 20px; margin-bottom: 20px;
......
...@@ -19,9 +19,7 @@ ...@@ -19,9 +19,7 @@
<!-- 线索状态 --> <!-- 线索状态 -->
<template slot="status" slot-scope="scope"> <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 :class="{ circleStatusYellow: scope.scope.status == 0, circleStatusPurple: scope.scope.status == 1, circleStatusGreen: scope.scope.status == 2 }"></span>
<span> <span>{{ scope.scope.status == 0 ? '待跟进' : scope.scope.status == 1 ? '跟进中' : scope.scope.status == 2 ? '已完成' : '' }}</span>
{{ scope.scope.status == 0 ? '待跟进' : scope.scope.status == 1 ? '跟进中' : scope.scope.status == 2 ? '已完成' : '' }}
</span>
</template> </template>
<!-- 跟进员工 --> <!-- 跟进员工 -->
<template slot="userName" slot-scope="scope"> <template slot="userName" slot-scope="scope">
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<yl-descriptions v-if="leadType == 5 || leadType == 6" ref="ylDeacriptions" :tableModel="orderDescriModel" :showData="leadBaseList" /> <yl-descriptions v-if="leadType == 5 || leadType == 6" ref="ylDeacriptions" :tableModel="orderDescriModel" :showData="leadBaseList" />
</div> </div>
<!-- 跟进记录 --> <!-- 跟进记录 -->
<div class="baseTitle" > <div class="baseTitle">
<p class="title">跟进记录</p> <p class="title">跟进记录</p>
<hr /> <hr />
<div class="timestamp" v-if="this.leadFollowRecord.length > 0"> <div class="timestamp" v-if="this.leadFollowRecord.length > 0">
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</el-timeline-item> </el-timeline-item>
</el-timeline> </el-timeline>
</div> </div>
<div :style="{ 'height': clientHeight- 450 + 'px' }" class="noRecord" v-else> <div :style="{ height: clientHeight - 450 + 'px' }" class="noRecord" v-else>
<img src="@/assets/leadManage/noRecord.png" alt="" /> <img src="@/assets/leadManage/noRecord.png" alt="" />
</div> </div>
</div> </div>
...@@ -53,6 +53,7 @@ export default { ...@@ -53,6 +53,7 @@ export default {
leadType: '', //线索类型 leadType: '', //线索类型
leadBaseList: {}, //线索详情基本信息 leadBaseList: {}, //线索详情基本信息
leadFollowRecord: [], //线索详情跟进记录 leadFollowRecord: [], //线索详情跟进记录
copySameDescri: [],
theSameDescri: [ theSameDescri: [
{ {
colList: [ colList: [
...@@ -103,10 +104,7 @@ export default { ...@@ -103,10 +104,7 @@ export default {
// 维保预约 // 维保预约
orderDescri: [ orderDescri: [
{ {
colList: [ colList: [{ thColspan: 1, tdColspan: 5, label: '试驾车辆', name: 'carName' }]
{ thColspan: 1, tdColspan: 2, label: '车牌号', name: 'plateNum' },
{ thColspan: 1, tdColspan: 2, label: '里程数(km)', name: 'mileage' }
]
}, },
{ {
colList: [{ thColspan: 1, tdColspan: 5, label: '门店', name: 'merchantName' }] colList: [{ thColspan: 1, tdColspan: 5, label: '门店', name: 'merchantName' }]
...@@ -118,6 +116,7 @@ export default { ...@@ -118,6 +116,7 @@ export default {
this.leadId = this.$route.params.id ? this.$route.params.id : '' this.leadId = this.$route.params.id ? this.$route.params.id : ''
this.leadType = this.$route.params.type ? this.$route.params.type : '' this.leadType = this.$route.params.type ? this.$route.params.type : ''
this.getBaseDetail() this.getBaseDetail()
this.addCol()
}, },
mounted() { mounted() {
this.clientHeight = document.documentElement.clientHeight - 140 this.clientHeight = document.documentElement.clientHeight - 140
...@@ -133,10 +132,20 @@ export default { ...@@ -133,10 +132,20 @@ export default {
}, },
// 维保预约 // 维保预约
orderDescriModel() { orderDescriModel() {
return this.theSameDescri.concat(this.orderDescri) return this.copySameDescri.concat(this.orderDescri)
} }
}, },
methods: { methods: {
addCol() {
let addcolList = {
colList: [
{ thColspan: 1, tdColspan: 2, label: '预约时间', name: 'appointDate' },
{ thColspan: 1, tdColspan: 2, label: '到店时间', name: 'appointTime' }
]
}
this.copySameDescri = JSON.parse(JSON.stringify(this.theSameDescri))
this.copySameDescri.splice(3, 0, addcolList)
},
goback() { goback() {
this.$router.push('/leadManage/index') this.$router.push('/leadManage/index')
}, },
...@@ -269,7 +278,7 @@ export default { ...@@ -269,7 +278,7 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
overflow: hidden;//img如果超出这个div会隐藏超出部分 overflow: hidden; //img如果超出这个div会隐藏超出部分
} }
} }
} }
......
...@@ -95,6 +95,9 @@ ...@@ -95,6 +95,9 @@
> >
保存为人群 保存为人群
</el-button> </el-button>
<el-button plain size="small" @click="createMarketSOP()">
营销SOP
</el-button>
</div> </div>
</div> </div>
<!-- noDataText="你当前还没有添加的标签" --> <!-- noDataText="你当前还没有添加的标签" -->
...@@ -274,7 +277,7 @@ import { getLoginCount } from '@/api/modules/loginCount' ...@@ -274,7 +277,7 @@ import { getLoginCount } from '@/api/modules/loginCount'
import tagGroup from './components/tagGroup.vue' import tagGroup from './components/tagGroup.vue'
import url from '@/assets/clientDataOverview/nodata.png' import url from '@/assets/clientDataOverview/nodata.png'
import tag from '@/mixins/tag' import tag from '@/mixins/tag'
import util from '@/utils/util' import { utils } from 'glsx-common'
export default { export default {
mixins: [tag], mixins: [tag],
name: 'tagsManage', name: 'tagsManage',
...@@ -576,6 +579,31 @@ export default { ...@@ -576,6 +579,31 @@ export default {
// toViewCustomer(info) { // toViewCustomer(info) {
// this.$router.push('/tagsManage/viewCustomers') // this.$router.push('/tagsManage/viewCustomers')
// }, // },
// 跳转到营销SOP
createMarketSOP() {
let getDatas = JSON.parse(
JSON.stringify(this.allListParams)
.replace(/groupId/g, 'labelGroupId')
.replace(/groupName/g, 'labelGroupName')
.replace(/groupType/g, 'labelGroupType')
)
console.log(getDatas)
var params = {
addOrEdit: 'add',
fromPage: '/custom/tagsManage/index',
$title: encodeURI('新建SOP'),
info: {
// 标签
customerOptType: 3,
labelList: [...getDatas]
}
}
console.log(params)
this.$common.utils.storage.set('sopInfo', params)
this.$history.push({
path: 'marketing/sop/editSop'
})
},
toViewCustomer(info) { toViewCustomer(info) {
console.log(info) console.log(info)
const id = info.labelGroup.id const id = info.labelGroup.id
...@@ -702,7 +730,7 @@ export default { ...@@ -702,7 +730,7 @@ export default {
this.tagForm.tagsName = rowData.labelGroup.name //标签组名 this.tagForm.tagsName = rowData.labelGroup.name //标签组名
this.tagForm.initTagsGroup = rowData.labelType == '企业标签' || rowData.labelType == '集团标签' ? 1 : rowData.labelType == '自店标签' ? 2 : '' //标签组类型 this.tagForm.initTagsGroup = rowData.labelType == '企业标签' || rowData.labelType == '集团标签' ? 1 : rowData.labelType == '自店标签' ? 2 : '' //标签组类型
}, },
handleConfirm() { handleConfirm: utils.debounce(function() {
this.$refs.tagForm.$children[0].validate(valid => { this.$refs.tagForm.$children[0].validate(valid => {
if (!valid) { if (!valid) {
if (this.tagForm.tagsList.length <= 0 && this.tagDialogTitle == '添加标签组') { if (this.tagForm.tagsList.length <= 0 && this.tagDialogTitle == '添加标签组') {
...@@ -758,12 +786,75 @@ export default { ...@@ -758,12 +786,75 @@ export default {
return return
} }
} }
console.log('点击了几次')
this.updateTagFun() this.updateTagFun()
this.newAddTagFun() this.newAddTagFun()
// this.handleClose() // this.handleClose()
} }
}) })
}, }, 300),
// handleConfirm() {
// this.$refs.tagForm.$children[0].validate(valid => {
// if (!valid) {
// if (this.tagForm.tagsList.length <= 0 && this.tagDialogTitle == '添加标签组') {
// this.tagNameRules = true
// this.$message.error('至少要添加一个标签')
// // return
// }
// return
// }
// if (this.tagForm.tagsList.length <= 0 && this.tagDialogTitle == '添加标签组') {
// this.tagNameRules = true
// this.$message.error('至少要添加一个标签')
// return
// }
// if (this.tagDialogTitle == '添加标签组') {
// //过滤掉没有输入值得标签输入框
// this.tagForm.tagsList = this.tagForm.tagsList.filter(item => item.name != '')
// if (this.tagForm.tagsList.length <= 0) {
// this.$message.error('不能提交空标签')
// return
// }
// //如果存在添加标签的输入框的内容的标签相同则不提交
// let isSameTagFlag = false
// var tempArr = this.tagForm.tagsList.map(item => item.name)
// isSameTagFlag = this.isHasSome(tempArr)
// if (isSameTagFlag) {
// this.$message.error('不能提交相同的标签,请修改')
// return
// }
// this.newAddTagFun(1)
// //this.handleClose() //这里不管
// } else {
// //修改标签(允许同时增加标签)
// let isHasEmpty = this.editTagList.some(ele => ele.name == '')
// if (isHasEmpty) {
// this.$message.error('不能提交空的编辑标签')
// return
// }
// if (this.tagForm.tagsList.length > 0) {
// //过滤掉没有输入值得标签输入框
// this.tagForm.tagsList = this.tagForm.tagsList.filter(item => item.name != '')
// //如果存在添加标签的输入框的内容和可编辑的标签相同则不提交
// let ishasSameTagFlag = false
// this.editTagList.forEach(item => {
// for (let i = 0; i < this.tagForm.tagsList.length; i++) {
// if (this.tagForm.tagsList[i].name == item.name) {
// ishasSameTagFlag = true
// }
// }
// })
// if (ishasSameTagFlag) {
// this.$message.error('不能提交已存在的标签,请修改')
// return
// }
// }
// this.updateTagFun()
// this.newAddTagFun()
// // this.handleClose()
// }
// })
// },
handleRuleClose() { handleRuleClose() {
this.dialogRuleVisible = false this.dialogRuleVisible = false
}, },
...@@ -801,6 +892,7 @@ export default { ...@@ -801,6 +892,7 @@ export default {
} }
if (res.data.code == 0) { if (res.data.code == 0) {
if (this.tagForm.tagsList.length > 0) { if (this.tagForm.tagsList.length > 0) {
// this.$message.success('添加成功')
status && this.$message.success('添加成功') status && this.$message.success('添加成功')
} }
if (this.tagDialogTitle == '编辑标签组') { if (this.tagDialogTitle == '编辑标签组') {
...@@ -847,7 +939,7 @@ export default { ...@@ -847,7 +939,7 @@ export default {
// this.tagForm.tagsName = '' // this.tagForm.tagsName = ''
// this.tagForm.initTagsGroup = '' // this.tagForm.initTagsGroup = ''
// this.tagForm.tagsList = [] // this.tagForm.tagsList = []
this.$refs.tagTree.getTableList(true) //刷新下表格 // this.$refs.tagTree.getTableList(true) //刷新下表格 //重复请求了
}) })
}, },
//删除一行标签 //删除一行标签
...@@ -1218,7 +1310,7 @@ export default { ...@@ -1218,7 +1310,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding-top: 14px; padding-top: 14px;
padding-bottom: 20px; padding-bottom: 10px;
letter-spacing: 1px; letter-spacing: 1px;
.clientNum { .clientNum {
// display: flex; // display: flex;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!