Commit d9c4b429 by 王志慧

commit

1 parent 6509b9a4
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</template> </template>
</div> </div>
<div class="table user-select pointer"> <div class="table user-select pointer">
<div class="tabs-title-info table-position">({{tabTitle}})</div> <div class="tabs-title-info table-position">({{ tabTitle }})</div>
<div class="table-head"> <div class="table-head">
<template v-for="(i, index) in tabHead"> <template v-for="(i, index) in tabHead">
<div :class="['table-head-item flex', { active: index == tabIndex }]" :key="index" @click="tabIndex = index"> <div :class="['table-head-item flex', { active: index == tabIndex }]" :key="index" @click="tabIndex = index">
...@@ -234,7 +234,9 @@ export default { ...@@ -234,7 +234,9 @@ export default {
}) })
}, },
draw (lineData, queryType) { draw (lineData, queryType) {
console.log(lineData)
let data = [], let data = [],
Min=0,
xData = [], xData = [],
title = { title = {
'total': '客户总数', 'total': '客户总数',
...@@ -249,6 +251,7 @@ export default { ...@@ -249,6 +251,7 @@ export default {
xData.push(queryType == 0 ? `${month == 0 ? '1月' : `${Number(month) + 1}月`}` : new Date(e.statDate).format('MM-dd')) xData.push(queryType == 0 ? `${month == 0 ? '1月' : `${Number(month) + 1}月`}` : new Date(e.statDate).format('MM-dd'))
data.push(e.totalNum) data.push(e.totalNum)
}) })
Min = Math.min(...data)
let options = { let options = {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
...@@ -287,6 +290,7 @@ export default { ...@@ -287,6 +290,7 @@ export default {
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
min: Min,
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: 'rgba(96,98,102,0.2)' color: 'rgba(96,98,102,0.2)'
...@@ -480,11 +484,11 @@ export default { ...@@ -480,11 +484,11 @@ export default {
.table { .table {
flex: 3; flex: 3;
background: #262525; background: #262525;
position:relative; position: relative;
.table-position{ .table-position {
position:absolute; position: absolute;
top:-20px; top: -20px;
left:50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
} }
&-head { &-head {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!