Commit 7cb58a07 by chenwq

折线图

1 parent 96695fd9
...@@ -11,7 +11,9 @@ ...@@ -11,7 +11,9 @@
<div class="line-item"> <div class="line-item">
<marquee :direction="directionTimer" :delay="delayTimer" :text="item.label"></marquee> <marquee :direction="directionTimer" :delay="delayTimer" :text="item.label"></marquee>
</div> </div>
<p class="line-item txt-orange">{{ item.value }}</p> <div class="line-item">
<marquee class="txt-orange" :direction="directionTimer" :delay="delayTimer" :text="item.value"></marquee>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -213,14 +215,14 @@ p { ...@@ -213,14 +215,14 @@ p {
font-size: 10px; font-size: 10px;
padding-bottom: 0.6vh; padding-bottom: 0.6vh;
} }
.line-item:last-of-type{ .line-item:last-of-type {
padding-bottom: 0; padding-bottom: 0;
} }
} }
.rank-line:first-of-type{ .rank-line:first-of-type {
border-width: 0; border-width: 0;
} }
} }
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -101,13 +101,13 @@ export default { ...@@ -101,13 +101,13 @@ export default {
Object.keys(topTempList).forEach(item => { Object.keys(topTempList).forEach(item => {
topList.push({ topList.push({
label: item, label: item,
value: topTempList[item].num ? this.numAddSymbol(topTempList[item].num) : '- -' value: topTempList[item].rate ? topTempList[item].rate + '%' : '- -'
}) })
}) })
Object.keys(lastTempList).forEach(item => { Object.keys(lastTempList).forEach(item => {
lastList.push({ lastList.push({
label: item, label: item,
value: lastTempList[item].num ? this.numAddSymbol(lastTempList[item].num) : '- -' value: lastTempList[item].rate ? lastTempList[item].rate + '%' : '- -'
}) })
}) })
this.dataList.push({ this.dataList.push({
......
...@@ -101,13 +101,13 @@ export default { ...@@ -101,13 +101,13 @@ export default {
Object.keys(topTempList).forEach(item => { Object.keys(topTempList).forEach(item => {
topList.push({ topList.push({
label: item, label: item,
value: topTempList[item].num ? this.numAddSymbol(topTempList[item].num) : '- -' value: topTempList[item].rate ? topTempList[item].rate + '%' : '- -'
}) })
}) })
Object.keys(lastTempList).forEach(item => { Object.keys(lastTempList).forEach(item => {
lastList.push({ lastList.push({
label: item, label: item,
value: lastTempList[item].num ? this.numAddSymbol(lastTempList[item].num) : '- -' value: lastTempList[item].rate ? lastTempList[item].rate + '%' : '- -'
}) })
}) })
this.dataList.push({ this.dataList.push({
......
...@@ -102,13 +102,13 @@ export default { ...@@ -102,13 +102,13 @@ export default {
Object.keys(topTempList).forEach(item => { Object.keys(topTempList).forEach(item => {
topList.push({ topList.push({
label: item, label: item,
value: topTempList[item].num ? this.numAddSymbol(topTempList[item].num) : '- -' value: topTempList[item].rate ? topTempList[item].rate + '%' : '- -'
}) })
}) })
Object.keys(lastTempList).forEach(item => { Object.keys(lastTempList).forEach(item => {
lastList.push({ lastList.push({
label: item, label: item,
value: lastTempList[item].num ? this.numAddSymbol(lastTempList[item].num) : '- -' value: lastTempList[item].rate ? lastTempList[item].rate + '%' : '- -'
}) })
}) })
this.dataList.push({ this.dataList.push({
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div v-if="isEmpty" class="empty"> <div v-if="isEmpty" class="empty">
<img src="../../assets/images/empty.png" alt="" /> <img src="../../assets/images/empty.png" alt="" />
</div> </div>
<LineChart v-else ref="lineChartRef" domId="sadayasuChart" :dataList.sync="dataList" :storeOrBrandTxt="storeOrBrandTxt" :queryType="queryType"></LineChart> <LineChart v-else ref="lineChartRef" domId="sadayasuChart" :dataList.sync="dataList" :storeOrBrandTxt="storeOrBrandTxt" :tooltipFormatterObj="tooltipFormatterObj" :queryType="queryType"></LineChart>
</div> </div>
</div> </div>
</template> </template>
...@@ -36,6 +36,23 @@ export default { ...@@ -36,6 +36,23 @@ export default {
isEmpty: true, isEmpty: true,
storeOrBrandTxt: '品牌', storeOrBrandTxt: '品牌',
queryType: 0, queryType: 0,
tooltipFormatterObj: [
{
label: '回店率',
attrName: 'rate',
addSymbol: '%'
},
{
label: '环比',
attrName: 'hrate',
addSymbol: '%'
},
{
label: '同比',
attrName: 'trate',
addSymbol: '%'
}
],
dataList: [] dataList: []
} }
}, },
...@@ -84,13 +101,13 @@ export default { ...@@ -84,13 +101,13 @@ export default {
Object.keys(topTempList).forEach(item => { Object.keys(topTempList).forEach(item => {
topList.push({ topList.push({
label: item, label: item,
value: topTempList[item].num ? this.numAddSymbol(topTempList[item].num) : '- -' value: topTempList[item].rate ? topTempList[item].rate + '%' : '- -'
}) })
}) })
Object.keys(lastTempList).forEach(item => { Object.keys(lastTempList).forEach(item => {
lastList.push({ lastList.push({
label: item, label: item,
value: lastTempList[item].num ? this.numAddSymbol(lastTempList[item].num) : '- -' value: lastTempList[item].rate ? lastTempList[item].rate + '%' : '- -'
}) })
}) })
this.dataList.push({ this.dataList.push({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!