Commit e8dcd340 by 前端

Merge branch 'xuyl_dev_v2.3.0' into 'v2.3.0'

Xuyl dev v2.3.0

See merge request !71
2 parents ef6f2986 875e9ee5
......@@ -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],
......
......@@ -63,7 +63,7 @@ export default {
trigger: 'item', //模板变量有 {a}、{b}、{c}、{d},分别表示系列名,数据名,数据值,百分比。{d}数据会根据value值计算百分比
formatter: '{b} : {c}人 ({d}%)'
},
color: ['#FFB21F', '#5850FF'],
color: ['#5850FF', '#FFB21F'],
// legend: {
// orient: "vertical",
// bottom: "bottom",
......@@ -74,7 +74,7 @@ export default {
type: 'pie',
// radius: '118px',
center: ['50%', '25%'],
radius: ['27%', '42%'],
radius: ['24%', '38%'],
stillShowZeroSum: false,
data: this.pieData,
// data: [
......@@ -99,13 +99,13 @@ export default {
// },
label: {
position: 'inner',
formatter: '{d}%',
show: true,
color: '#fff'
// position: 'inner',
// formatter: '{d}%',
// show: true,
// color: '#fff'
// formatter: "{b}:\n{c}人({d}%)",
// fontWeight: "bold",
// color:'red'
color: '#666666'
// 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(() => {
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%', '25%'],
radius: ['24%', '38%'],
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>
......@@ -19,7 +19,7 @@
全部客户
<span class="main-container-head-number font-14">{{ totalCount }}个</span>
</div>
<GLButton size="small" @click="handleExport" class="export" fn="导出">导出</GLButton>
<el-button size="small" @click="handleExport" class="export">导出</el-button>
</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">
......
......@@ -18,7 +18,7 @@
</span>
<span slot="delFlag" slot-scope="scope">
<span :class="{ circleStatusGreen: scope.scope.delFlag == 0, circleStatusGray: scope.scope.delFlag == -1 }"></span>
<span>{{ scope.scope.delFlag == -1 ? '已解散' : scope.scope.delFlag == 0 ? '正常' : '' }}</span>
<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: '当前成员总数',
......
......@@ -22,13 +22,13 @@
<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">
<el-tag type="info" class="ellipsis-1" v-if="idx < 3" :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-tag type="info" v-if="followList(scope.scope.followStaff).length > 3 && idx == 3">
<el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<div slot="reference">...({{ followList(scope.scope.followStaff).length }})</div>
<div class="entmicro-hover">
......@@ -222,6 +222,32 @@ export default {
optionId: 'value',
placeholder: '请选择性别',
optionList: this.$Constants.GENDER_OPTION
},
{
type: 'datePicker',
// prop: 'daterange',
name: 'daterange',
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',
// prop: 'nickName',
name: 'nickName',
label: '车架号'
},
{
type: 'input',
inputType: 'text',
// prop: 'nickName',
name: 'nickName',
label: '车牌号'
}
],
......@@ -229,11 +255,13 @@ export default {
tableParams: {
listName: 'data',
tableOption: false,
// mutiSelectName: 'employeeList',
// mutiSelectUniqueKey: 'id',
tableColumns: [
{
label: '客户ID',
prop: 'oneId',
minWidth: 170,
width: 170,
line: 1
},
{
......@@ -246,13 +274,13 @@ export default {
label: '企微名称',
prop: 'nickNameList',
addHtml: 'nickNameList',
minWidth: 190
width: 190
},
{
label: '联系电话',
prop: 'customerPhone',
addHtml: 'customerPhone',
minWidth: 130
width: 130
},
{
label: '性别',
......@@ -263,7 +291,7 @@ export default {
label: '跟进员工',
prop: 'followStaff',
addHtml: 'followStaff',
minWidth: 280
width: 280
},
{
label: '是否加企微', //1. 加入,0.未加入
......@@ -275,17 +303,18 @@ export default {
label: '当前状态',
prop: 'status',
addHtml: 'status',
minWidth: 130
width: 130
},
{
label: '所属渠道',
prop: 'sourceChannel',
minWidth: 100
width: 140,
line:1
},
{
label: '添加来源',
prop: 'addWayName',
minWidth: 120
width: 120
},
{
label: '添加时间',
......@@ -293,6 +322,26 @@ export default {
width: 170
},
{
label: '车系',
prop: 'addTime',
width: 110
},
{
label: '车架号',
prop: 'addTime',
width: 110
},
{
label: '车牌号',
prop: 'addTime',
width: 170
},
{
label: '购车时间',
prop: 'addTime',
width: 170
},
{
label: '操作',
prop: 'optionBtns',
width: '65px',
......
......@@ -65,30 +65,25 @@ 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
}
]
......@@ -107,6 +102,11 @@ export default {
this.userType = this.$globalState.session.userType
}
this.searchForm = { 'req.merchantId': this.merchantId, 'req.crowdType': this.crowdType }
//标签管理保存初始化保存自定义人群状态
if (this.$route.query.selectTab) {
this.activeName = 'second'
// window.history.pushState(null, null, location.origin + location.pathname)
}
},
mounted() {},
methods: {
......@@ -123,22 +123,20 @@ export default {
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 +182,7 @@ export default {
}
}
/deep/ .el-tabs__header {
margin: 0 0 20px;
margin: 0 0 10px;
}
/deep/ .el-tabs__nav-wrap::after {
content: none;
......
......@@ -18,11 +18,11 @@
<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">
<el-tag type="info" v-if="idx < 3" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ 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">
......@@ -92,19 +92,19 @@ export default {
{
label: '默认成员',
prop: 'entmicroName',
minWidth: 250,
minWidth: 320,
addHtml: 'entmicro-name'
},
{
label: '创建时间',
prop: 'createdTime',
line: 1,
minWidth: 110
// minWidth: 110
},
{
label: '状态',
prop: 'status',
minWidth: 130,
// minWidth: 130,
addHtml: 'status'
},
{
......@@ -342,7 +342,7 @@ export default {
}
}
.btn-header {
margin-bottom: 20px;
margin-bottom: 10px;
}
.container {
margin-bottom: 20px;
......
......@@ -4,7 +4,6 @@
<el-input placeholder="请输入标签组或标签关键字" v-model="filterText" size="small"><i slot="suffix" class="el-input__icon el-icon-search"></i></el-input>
<span @click="resetTree">重置</span>
</div>
<el-tree @node-expand="nodeExpand" accordion @check="checkChange" class="tag-tree" ref="tagTree" :data="labelTree" :props="defaultProps" @node-click="nodeClick" show-checkbox node-key="id" :default-expanded-keys="expandId" :expand-on-click-node="false" :filter-node-method="filterNode">
<div class="custom-tree-node" slot-scope="{ node, data }">
<el-tooltip placement="top" v-if="hoverId == data.id && hoverStatus">
......@@ -25,7 +24,6 @@
</el-tree>
</div>
</template>
<script>
import { getTableList } from '@/api/modules/tagsManage'
export default {
......@@ -53,7 +51,6 @@ export default {
this.$refs.tagTree.filter(val)
}
},
methods: {
hoverFun(data) {
this.hoverId = data.id
......@@ -162,18 +159,22 @@ export default {
this.expandId.push(item.id)
})
}
this.$nextTick(() => {
status && this.updateTreeNode()
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.maxHeight = this.$parent.heightBox - 205 + 'px'
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.overflow = 'auto'
this.setTreeHeight()
})
this.loading = false
})
},
nodeExpand() {
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.maxHeight = this.$parent.heightBox - 205 + 'px'
setTreeHeight() {
const nodeHeight = document.querySelectorAll('.el-tree>.el-tree-node').length * 30
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.maxHeight = this.$parent.heightBox - 80 - nodeHeight + 'px'
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.overflow = 'auto'
},
nodeExpand() {
this.$nextTick(() => {
this.setTreeHeight()
})
}
},
mounted() {
......@@ -181,10 +182,9 @@ export default {
}
}
</script>
<style lang="scss" scoped>
.content-wrap {
padding: 16px 3px 16px 16px;
padding: 16px 3px 0px 16px;
box-sizing: border-box;
height: 100%;
.tree-input {
......@@ -201,7 +201,6 @@ export default {
}
.tag-tree {
margin-top: 20px;
height: calc(100% - 80px);
overflow-y: auto;
/deep/ {
.el-tree-node {
......@@ -212,7 +211,6 @@ export default {
}
}
}
.el-tree-node__children {
.el-tree-node__content {
.el-checkbox {
......@@ -253,4 +251,4 @@ export default {
}
}
}
</style>
</style>
\ No newline at end of file
......@@ -30,7 +30,7 @@
<i class="el-icon-close" @click="closeInitPanel"></i>
</div>
<div class="client-main-box">
<div class="client-tag" :style="{ height: heightBox + 'px' }">
<div class="client-tag">
<tag-group @getCheckItem="getCheckItem" ref="tagTree" @editTag="btnClick"></tag-group>
</div>
<div class="client-tabel">
......@@ -732,7 +732,7 @@ export default {
this.$message.error('不能提交相同的标签,请修改')
return
}
this.newAddTagFun()
this.newAddTagFun(1)
//this.handleClose() //这里不管
} else {
//修改标签(允许同时增加标签)
......@@ -783,7 +783,7 @@ export default {
this.tagForm.tagsList = [] //取消时清空新增标签
this.tagVisible = !this.tagVisible
},
newAddTagFun() {
newAddTagFun(status) {
//满足条件进行提交
let params = {}
params['labelDTO.dataFrom'] = 'cs'
......@@ -801,7 +801,8 @@ export default {
}
if (res.data.code == 0) {
if (this.tagForm.tagsList.length > 0) {
this.$message.success('添加成功')
// this.$message.success('添加成功')
status && this.$message.success('添加成功')
}
if (this.tagDialogTitle == '编辑标签组') {
this.tagForm.tagsName = ''
......@@ -1218,7 +1219,7 @@ export default {
justify-content: space-between;
align-items: center;
padding-top: 14px;
padding-bottom: 20px;
padding-bottom: 10px;
letter-spacing: 1px;
.clientNum {
// display: flex;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!