Commit 30eb43d0 by 匡雅琴

排名组件调整

1 parent d02c8c62
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
<template v-if="inx === 0"> <template v-if="inx === 0">
<div class="ranking-box-item-left" @click="goDetailPage(item)"> <div class="ranking-box-item-left" @click="goDetailPage(item)">
<div class="circle" :style="{ 'background-image': index < 3 ? RankColor[index] : '' }">{{ index + 1 }}</div> <div class="circle" :style="{ 'background-image': index < 3 ? RankColor[index] : '' }">{{ index + 1 }}</div>
<div class="text" :style="{ width: itm.width }">{{ item[itm.name] }}</div> <div class="text" :class="itm.action ? 'action-text' : ''" :style="{ width: itm.width }">{{ item[itm.name] }}</div>
</div> </div>
</template> </template>
<template v-else> <template v-else>
<div class="ranking-box-item-right" :style="{ width: itm.width, color: itm.color, 'text-align': inx + 1 == rankingDataObj.length ? 'right' : '' }"> <div class="ranking-box-item-right" :style="{ width: itm.width, color: itm.color, 'text-align': inx + 1 == rankingDataObj.length ? 'right' : '' }">
{{ itm.type == 'number' ? numAddSymbol(item[itm.name]) : itm.type == 'decimal' ? toPercent(item[itm.name]) : item[itm.name] }} {{ itm.preunit }}{{ itm.type == 'number' ? numAddSymbol(item[itm.name]) : itm.type == 'decimal' ? toPercent(item[itm.name]) : item[itm.name] }}{{ itm.sufunit }}
</div> </div>
</template> </template>
</div> </div>
...@@ -91,7 +91,7 @@ export default { ...@@ -91,7 +91,7 @@ export default {
width: 17vw; width: 17vw;
height: 20px; height: 20px;
} }
.text:hover { .action-text:hover {
box-sizing: border-box; box-sizing: border-box;
// padding-bottom: 1px; // padding-bottom: 1px;
// border-bottom: 1px solid #fff; // border-bottom: 1px solid #fff;
...@@ -105,10 +105,6 @@ export default { ...@@ -105,10 +105,6 @@ export default {
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
color: #95acd9; color: #95acd9;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
// text-align: right;
} }
} }
</style> </style>
<template> <template>
<div class="tab-box"> <div class="tab-box">
<div class="tab-item-box" :style="{ width: width + 'vw' }"> <div class="tab-item-box" :style="{ width: width + 'vw' }">
<div :class="['tab-item', tabActive == index ? 'tab-item-active' : '']" v-for="(item, index) in list" :key="index" @click="changeTab(index)"> <div :class="['tab-item', tabActive == index ? 'tab-item-active' : '']" :style="{ width: itemWidth + 'vw' }" v-for="(item, index) in list" :key="index" @click="changeTab(index)">
{{ item }} {{ item }}
</div> </div>
</div> </div>
...@@ -16,7 +16,8 @@ export default { ...@@ -16,7 +16,8 @@ export default {
type: Array, type: Array,
default: () => [] default: () => []
}, },
width: Number width: Number,
itemWidth: Number
}, },
data() { data() {
return { return {
...@@ -47,7 +48,8 @@ export default { ...@@ -47,7 +48,8 @@ export default {
background-image: linear-gradient(180deg, #001948 0%, #00223c 99%); background-image: linear-gradient(180deg, #001948 0%, #00223c 99%);
cursor: pointer; cursor: pointer;
.tab-item { .tab-item {
padding: 0.56vh 0.9vw; padding: 0.56vh 0;
text-align: center;
box-sizing: border-box; box-sizing: border-box;
font-weight: 400; font-weight: 400;
font-size: 16px; font-size: 16px;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<BoutiqueDate :defaultYear="defaultYear" :yearList="yearList" :channelList="channelList" :businessTime="businessTime"></BoutiqueDate> <BoutiqueDate :defaultYear="defaultYear" :yearList="yearList" :channelList="channelList" :businessTime="businessTime"></BoutiqueDate>
<StatisticsBox :list="boutiqueList.slice(0,4)"></StatisticsBox> <StatisticsBox :list="boutiqueList.slice(0,4)"></StatisticsBox>
<StatisticsBox class="sencod-box" :list="boutiqueList.slice(4,9)"></StatisticsBox> <StatisticsBox class="sencod-box" :list="boutiqueList.slice(4,9)"></StatisticsBox>
<Tab class="tab-box" :list="tabList" :width="19.17" @changeTab="changeTab"></Tab> <Tab class="tab-box" :list="tabList" :width="19.17" :itemWidth="10" @changeTab="changeTab"></Tab>
<components class="tab-content" :is="tabName"></components> <components class="tab-content" :is="tabName"></components>
</div> </div>
</template> </template>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
--> -->
<template> <template>
<div class="right"> <div class="right">
<Tab class="tab-box" :list="tabList" :width="14.83" @changeTab="changeTab"></Tab> <Tab class="tab-box" :list="tabList" :width="14.83" :itemWidth="7.78" @changeTab="changeTab"></Tab>
<components :is="tabName"></components> <components :is="tabName"></components>
</div> </div>
</template> </template>
......
...@@ -3,23 +3,32 @@ ...@@ -3,23 +3,32 @@
<!-- 第一个盒子 --> <!-- 第一个盒子 -->
<div class="rank-box"> <div class="rank-box">
<box-title title="门店产值排名"></box-title> <box-title title="门店产值排名"></box-title>
<div class="content"> <div class="content" v-if="storeOutputList.length">
<Ranking :id="'storeOutput'" :rankingsList="storeOutputList" :rankingDataObj="rankingDataObj" @goDetailPage="goDetailPage"></Ranking> <Ranking :id="'storeOutput'" :rankingsList="storeOutputList" :rankingDataObj="rankingDataObj" @goDetailPage="goDetailPage"></Ranking>
</div> </div>
<div v-else class="empty">
<Empty></Empty>
</div>
</div> </div>
<!-- 第二个盒子 --> <!-- 第二个盒子 -->
<div class="rank-box"> <div class="rank-box">
<box-title title="门店转化率排行"></box-title> <box-title title="门店转化率排行"></box-title>
<div class="content"> <div class="content" v-if="storePercentList.length">
<Ranking :id="'storePercent'" :rankingsList="storePercentList" :rankingDataObj="rankPercentObj" @goDetailPage="goDetailPage"></Ranking> <Ranking :id="'storePercent'" :rankingsList="storePercentList" :rankingDataObj="rankPercentObj" @goDetailPage="goDetailPage"></Ranking>
</div> </div>
<div v-else class="empty">
<Empty></Empty>
</div>
</div> </div>
<!-- 第三个盒子 --> <!-- 第三个盒子 -->
<div class="rank-box"> <div class="rank-box">
<box-title title="门店客单价排行"></box-title> <box-title title="门店客单价排行"></box-title>
<div class="content"> <div class="content" v-if="storePriceList.length">
<Ranking :id="'storePrice'" :rankingsList="storePriceList" :rankingDataObj="rankingDataObj" @goDetailPage="goDetailPage"></Ranking> <Ranking :id="'storePrice'" :rankingsList="storePriceList" :rankingDataObj="rankingDataObj" @goDetailPage="goDetailPage"></Ranking>
</div> </div>
<div v-else class="empty">
<Empty></Empty>
</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -132,7 +141,8 @@ export default { ...@@ -132,7 +141,8 @@ export default {
rankingDataObj: [ rankingDataObj: [
{ {
name: 'name', name: 'name',
width: '9.72vw' width: '9.72vw',
action: true
}, },
{ {
name: 'province', name: 'province',
...@@ -153,7 +163,8 @@ export default { ...@@ -153,7 +163,8 @@ export default {
rankPercentObj: [ rankPercentObj: [
{ {
name: 'name', name: 'name',
width: '9.72vw' width: '9.72vw',
action: true
}, },
{ {
name: 'province', name: 'province',
...@@ -206,5 +217,10 @@ export default { ...@@ -206,5 +217,10 @@ export default {
.content { .content {
padding: 1.67vh 1.39vw; padding: 1.67vh 1.39vw;
} }
.empty {
height: 21.78vh;
display: flex;
align-items: center;
}
} }
</style> </style>
<template> <template>
<div class="goods-rank-box"> <div class="goods-rank-box">
<box-title title="商品销售排行"></box-title> <box-title title="商品销售排行"></box-title>
<div v-if="goodsRankingList.length"> <div v-if="goodsRankingList.length" class="content">
<Ranking :id="'storePrice'" :rankingsList="goodsRankingList" :rankingDataObj="goodsRankingDataObj"></Ranking> <Ranking :id="'storePrice'" :rankingsList="goodsRankingList" :rankingDataObj="goodsRankingDataObj"></Ranking>
</div> </div>
<div v-else class="empty"> <div v-else class="empty">
...@@ -38,21 +38,27 @@ export default { ...@@ -38,21 +38,27 @@ export default {
price: 95489 price: 95489
}, },
{ {
name: '低价只想隔热G70 前挡', name: '低价只想隔热低价只想隔热G70 前挡',
value: 80, value: 80,
price: 95489 price: 95489
} }
], ],
goodsRankingDataObj: [ goodsRankingDataObj: [
{ {
name: 'name' name: 'name',
width: '14.58vw'
}, },
{ {
name: 'value' name: 'value',
color: '#C0C0C0',
width: '3vw',
sufunit: '单'
}, },
{ {
name: 'price', name: 'price',
type: 'number' type: 'number',
width: '5vw',
preunit: '¥'
} }
] ]
} }
...@@ -70,6 +76,9 @@ export default { ...@@ -70,6 +76,9 @@ export default {
background: #061422; background: #061422;
box-shadow: inset 0 0 20px 0 #3d57ff69; box-shadow: inset 0 0 20px 0 #3d57ff69;
height: 25.11vh; height: 25.11vh;
.content {
padding: 1.67vh 1.39vw;
}
.empty { .empty {
height: 21.78vh; height: 21.78vh;
display: flex; display: flex;
......
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
}, },
data() { data() {
return { return {
activeName: '1' activeName: '2'
} }
}, },
mounted() { mounted() {
......
...@@ -62,7 +62,8 @@ export default { ...@@ -62,7 +62,8 @@ export default {
merchantsDataObj: [ merchantsDataObj: [
{ {
name: 'merchantname', name: 'merchantname',
width: '20.3vw' width: '20.3vw',
action: true
}, },
{ {
name: 'num', name: 'num',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!