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 { ...@@ -221,11 +221,43 @@ export default {
padding: 12px; padding: 12px;
border-top: 1px solid #c3c3c3; border-top: 1px solid #c3c3c3;
border-bottom: 1px solid #c3c3c3; border-bottom: 1px solid #c3c3c3;
} &-left,
&-right {
.customer-info-left, width: 50%;
.customer-info-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 { .customer-marketing {
...@@ -234,40 +266,6 @@ export default { ...@@ -234,40 +266,6 @@ export default {
padding: 11px 0; 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 { .customer-info-qiwechat {
vertical-align: bottom; vertical-align: bottom;
color: #2cca74; color: #2cca74;
......
...@@ -28,6 +28,10 @@ export default { ...@@ -28,6 +28,10 @@ export default {
id: { id: {
type: String, type: String,
default: () => '' default: () => ''
},
tickCount: {
type: Number,
default: () => 5
} }
}, },
mounted() { mounted() {
...@@ -42,6 +46,17 @@ export default { ...@@ -42,6 +46,17 @@ export default {
initCanvas() { initCanvas() {
let id = this.refId let id = this.refId
let { barList, color } = this 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 let textLength = 2
this.list.forEach(item => { this.list.forEach(item => {
textLength = item.text.length > textLength ? item.text.length : textLength textLength = item.text.length > textLength ? item.text.length : textLength
...@@ -52,11 +67,12 @@ export default { ...@@ -52,11 +67,12 @@ export default {
id, id,
pixelRatio: window.devicePixelRatio, pixelRatio: window.devicePixelRatio,
padding: [16, 24, 24, textLength * 10 + 20], 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, { this.chart.source(barList, {
sales: { value: {
tickCount: 7 tickCount: this.tickCount,
tickInterval: Math.ceil(tickIntervalNum / this.tickCount)
} }
}) })
this.chart.coord({ this.chart.coord({
...@@ -80,7 +96,6 @@ export default { ...@@ -80,7 +96,6 @@ export default {
fontSize: 10 fontSize: 10
} }
}) })
shapes[obj.text] = text // 缓存该 shape, 便于后续查找 shapes[obj.text] = text // 缓存该 shape, 便于后续查找
}) })
} }
......
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
data() { data() {
return { return {
chart: null, chart: null,
tickInterval: 5, // tickInterval: 5,
chartColor: this.color, chartColor: this.color,
refId: this.id refId: this.id
} }
...@@ -51,6 +51,17 @@ export default { ...@@ -51,6 +51,17 @@ export default {
// offsetY = document.getElementById(id).height * 0.4 // offsetY = document.getElementById(id).height * 0.4
// await this.dynamicTick() //动态生成各个标度点的间距 // await this.dynamicTick() //动态生成各个标度点的间距
const data = this.lineData 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 && this.chart.clear()
this.chart = null this.chart = null
this.chart = new F2.Chart({ this.chart = new F2.Chart({
...@@ -63,12 +74,13 @@ export default { ...@@ -63,12 +74,13 @@ export default {
type: 'timeCat', type: 'timeCat',
mask: 'MM/DD', mask: 'MM/DD',
range: [0, 1], range: [0, 1],
tickCount: 7 tickCount: 5
}, },
value: { value: {
type: 'linear', type: 'linear',
nice: true, nice: true,
tickInterval: this.tickInterval tickCount: 4,
tickInterval: Math.ceil(tickIntervalNum / 3)
} }
}) })
this.chart.axis('date', { this.chart.axis('date', {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div class="title-info">客户分群</div> <div class="title-info">客户分群</div>
<div class="overview-group"> <div class="overview-group">
<template v-if="chart.barData.length > 0"> <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>
<template v-else> <template v-else>
<empty></empty> <empty></empty>
......
...@@ -126,8 +126,9 @@ export default { ...@@ -126,8 +126,9 @@ export default {
const { activityId, staffId } = this.$store.state.solicit const { activityId, staffId } = this.$store.state.solicit
var params = { var params = {
activityId, activityId,
followFlag: this.customeStatus == 1 ? '' : 0, customerFollowStatus: this.customeStatus == 1 ? 1 : 0,
retFacFlag: this.customeStatus == 1 ? 1 : 0, // followFlag: this.customeStatus == 1 ? '' : 0,
// retFacFlag: this.customeStatus == 1 ? 1 : 0,
staffId staffId
} }
solicitApi.getFollowResult(params).then(res => { 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!