Commit 716e683f authored by 陈明豪's avatar 陈明豪

bug修改

parent e89cf548
...@@ -39,7 +39,8 @@ export default { ...@@ -39,7 +39,8 @@ export default {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
type: 'shadow' type: 'shadow'
} },
valueFormatter: (value) => value + _this.unit
}, },
legend: { legend: {
left: 'right' left: 'right'
......
...@@ -33,7 +33,7 @@ export default { ...@@ -33,7 +33,7 @@ export default {
}, },
tooltip: { tooltip: {
show: true, show: true,
valueFormatter: (value) => value + '人' valueFormatter: (value) => (value || 0) + '人'
}, },
legend: { legend: {
data: ['绑定宠物数量', '就诊宠物数量'], data: ['绑定宠物数量', '就诊宠物数量'],
......
...@@ -34,7 +34,8 @@ export default { ...@@ -34,7 +34,8 @@ export default {
} }
}, },
tooltip: { tooltip: {
show: true show: true,
valueFormatter: (value) => value + '人'
}, },
legend: { legend: {
data: ['年消费额', '年充值额'], data: ['年消费额', '年充值额'],
......
...@@ -104,20 +104,22 @@ export default { ...@@ -104,20 +104,22 @@ export default {
const label1 = _this.yData1.label const label1 = _this.yData1.label
const unit1 = _this.yData1.unit const unit1 = _this.yData1.unit
const color1 = _this.yData1.line_color const color1 = _this.yData1.line_color
const fixNum1 = this.yData1.fixNum
const label2 = _this.yData2.label const label2 = _this.yData2.label
const unit2 = _this.yData2.unit const unit2 = _this.yData2.unit
const color2 = _this.yData2.line_color const color2 = _this.yData2.line_color
const fixNum2 = this.yData2.fixNum
return `<div> return `<div>
<div>${axis[0].name}</div> <div>${axis[0].name}</div>
<div style="display: flex"> <div style="display: flex">
<div style="background-color: ${color1};width: 10px;height: 10px;margin-top: 7px;margin-right:5px;border-radius: 10px"></div> <div style="background-color: ${color1};width: 10px;height: 10px;margin-top: 7px;margin-right:5px;border-radius: 10px"></div>
<span>${label1}</span> <span>${label1}</span>
<span style="margin-left: 5px;color: ${color1}">${Number(axis[0].value).toFixed(2)}${unit1}</span> <span style="margin-left: 5px;color: ${color1}">${Number(axis[0].value).toFixed(fixNum1)}${unit1}</span>
</div> </div>
<div style="display: flex"> <div style="display: flex">
<div style="background-color: ${color2};width: 10px;height: 10px;margin-top: 7px;margin-right:5px;border-radius: 10px"></div> <div style="background-color: ${color2};width: 10px;height: 10px;margin-top: 7px;margin-right:5px;border-radius: 10px"></div>
<span>${label2}</span> <span>${label2}</span>
<span style="margin-left: 5px;color: ${color2}">${Number(axis[1].value).toFixed(2)}${unit2}</span> <span style="margin-left: 5px;color: ${color2}">${Number(axis[1].value).toFixed(fixNum2)}${unit2}</span>
</div> </div>
</div>` </div>`
} }
......
...@@ -358,14 +358,16 @@ export default { ...@@ -358,14 +358,16 @@ export default {
data: [], data: [],
line_color: '#3490CE', line_color: '#3490CE',
area_color: 'rgba(52,144,206,0.3)', area_color: 'rgba(52,144,206,0.3)',
unit: '万元' unit: '万元',
fixNum: 2
}, },
yData2: { yData2: {
label: '预储值余额总额', label: '预储值余额总额',
data: [], data: [],
line_color: '#5FB54B', line_color: '#5FB54B',
area_color: 'rgba(95,181,75,0.3)', area_color: 'rgba(95,181,75,0.3)',
unit: '万元' unit: '万元',
fixNum: 2
}, },
hospitalPrestoredRank: [], hospitalPrestoredRank: [],
hospitalTimeRank: [], hospitalTimeRank: [],
......
...@@ -638,28 +638,32 @@ export default { ...@@ -638,28 +638,32 @@ export default {
data: [], data: [],
line_color: '#3490CE', line_color: '#3490CE',
area_color: 'rgba(52,144,206,0.3)', area_color: 'rgba(52,144,206,0.3)',
unit: '人' unit: '人',
fixNum: 0
}, },
yData2: { yData2: {
label: '活跃用户量', label: '活跃用户量',
data: [], data: [],
line_color: '#5FB54B', line_color: '#5FB54B',
area_color: 'rgba(95,181,75,0.3)', area_color: 'rgba(95,181,75,0.3)',
unit: '人' unit: '人',
fixNum: 0
}, },
yData1_2: { yData1_2: {
label: '新增会员卡余额', label: '新增会员卡余额',
data: [], data: [],
line_color: '#3490CE', line_color: '#3490CE',
area_color: 'rgba(52,144,206,0.3)', area_color: 'rgba(52,144,206,0.3)',
unit: '万元' unit: '万元',
fixNum: 2
}, },
yData2_2: { yData2_2: {
label: '会员卡余额总额', label: '会员卡余额总额',
data: [], data: [],
line_color: '#5FB54B', line_color: '#5FB54B',
area_color: 'rgba(95,181,75,0.3)', area_color: 'rgba(95,181,75,0.3)',
unit: '万元' unit: '万元',
fixNum: 2
}, },
petOwnerConsumeRank: [], petOwnerConsumeRank: [],
vipTopUpRank: [], vipTopUpRank: [],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment