Commit ef9828cf by 王志慧

Merge branch 'v2.3.3' of http://192.168.3.233:8090/glsx/dj-scrm-wx-work-attachme…

…nt-customer into wangzh_dev_2.3.3
2 parents 78175430 7643010e
......@@ -221,11 +221,43 @@ export default {
padding: 12px;
border-top: 1px solid #c3c3c3;
border-bottom: 1px solid #c3c3c3;
}
.customer-info-left,
.customer-info-right {
width: 50%;
&-left,
&-right {
width: 50%;
}
&-label {
display: flex;
}
&-name {
font-size: 12px;
width: 40%;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 18px;
}
&-message {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 18px;
}
&-wechatnick {
display: inline-block;
max-width: 58px;
}
&-car {
max-width: 80px;
}
&-wechat {
vertical-align: bottom;
color: #3975c6;
}
&-qiwechat {
vertical-align: bottom;
color: #2cca74;
}
}
.customer-marketing {
......@@ -234,40 +266,6 @@ export default {
padding: 11px 0;
}
.customer-info-label {
display: flex;
}
.customer-info-name {
font-size: 12px;
width: 40%;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 18px;
}
.customer-info-message {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 18px;
}
.customer-info-wechatnick {
display: inline-block;
max-width: 58px;
}
.customer-info-car {
max-width: 80px;
}
.customer-info-wechat {
vertical-align: bottom;
color: #3975c6;
}
.customer-info-qiwechat {
vertical-align: bottom;
color: #2cca74;
......
......@@ -28,6 +28,10 @@ export default {
id: {
type: String,
default: () => ''
},
tickCount: {
type: Number,
default: () => 5
}
},
mounted() {
......@@ -42,6 +46,17 @@ export default {
initCanvas() {
let id = this.refId
let { barList, color } = this
let tickIntervalNum = 0
// 判断barList是否有值,根据barList中最大值计算tickInterval
if (barList.length) {
let s = barList[0].value
for (var i = 1; i < barList.length; i++) {
if (s < barList[i].value) {
s = barList[i].value
}
}
tickIntervalNum = s
}
let textLength = 2
this.list.forEach(item => {
textLength = item.text.length > textLength ? item.text.length : textLength
......@@ -52,11 +67,12 @@ export default {
id,
pixelRatio: window.devicePixelRatio,
padding: [16, 24, 24, textLength * 10 + 20],
height: barList.length<2?80: barList.length*45
height: barList.length < 2 ? 80 : barList.length * 45
})
this.chart.source(barList, {
sales: {
tickCount: 7
value: {
tickCount: this.tickCount,
tickInterval: Math.ceil(tickIntervalNum / this.tickCount)
}
})
this.chart.coord({
......@@ -80,7 +96,6 @@ export default {
fontSize: 10
}
})
shapes[obj.text] = text // 缓存该 shape, 便于后续查找
})
}
......
......@@ -11,7 +11,7 @@ export default {
data() {
return {
chart: null,
tickInterval: 5,
// tickInterval: 5,
chartColor: this.color,
refId: this.id
}
......@@ -51,6 +51,17 @@ export default {
// offsetY = document.getElementById(id).height * 0.4
// await this.dynamicTick() //动态生成各个标度点的间距
const data = this.lineData
let tickIntervalNum = 0
// 判断lineData是否有值,根据barList中最大值计算tickInterval
if (data.length) {
let s = data[0].value
for (var i = 1; i < data.length; i++) {
if (s < data[i].value) {
s = data[i].value
}
}
tickIntervalNum = s
}
this.chart && this.chart.clear()
this.chart = null
this.chart = new F2.Chart({
......@@ -63,12 +74,13 @@ export default {
type: 'timeCat',
mask: 'MM/DD',
range: [0, 1],
tickCount: 7
tickCount: 5
},
value: {
type: 'linear',
nice: true,
tickInterval: this.tickInterval
tickCount: 4,
tickInterval: Math.ceil(tickIntervalNum / 3)
}
})
this.chart.axis('date', {
......
......@@ -15,7 +15,7 @@
<div class="title-info">客户分群</div>
<div class="overview-group">
<template v-if="chart.barData.length > 0">
<barChart :color="chart.barColor" id="groupingRef" :list="chart.barData"></barChart>
<barChart :color="chart.barColor" :tickCount="7" id="groupingRef" :list="chart.barData"></barChart>
</template>
<template v-else>
<empty></empty>
......
......@@ -126,8 +126,9 @@ export default {
const { activityId, staffId } = this.$store.state.solicit
var params = {
activityId,
followFlag: this.customeStatus == 1 ? '' : 0,
retFacFlag: this.customeStatus == 1 ? 1 : 0,
customerFollowStatus: this.customeStatus == 1 ? 1 : 0,
// followFlag: this.customeStatus == 1 ? '' : 0,
// retFacFlag: this.customeStatus == 1 ? 1 : 0,
staffId
}
solicitApi.getFollowResult(params).then(res => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!