Commit f0a3e022 by 匡雅琴

精品升级排行榜

1 parent c8fc3c80
...@@ -5,18 +5,13 @@ ...@@ -5,18 +5,13 @@
<template v-if="inx === 0"> <template v-if="inx === 0">
<div class="ranking-box-item-left"> <div class="ranking-box-item-left">
<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">{{ item[itm.name] }}</div> <div class="text" :style="{ width: itm.width }">{{ item[itm.name] }}</div>
<!-- 证书超过滚动显示 -->
<!-- <template v-if="!isMultiple">
<marquee class="marquee text" :direction="directionTimer" :delay="delayTimer" :text="item[itm.name]" />
</template>
<template v-else>
<div class="text">{{ item[itm.name] }}</div>
</template> -->
</div> </div>
</template> </template>
<template v-else> <template v-else>
<div class="ranking-box-item-right">{{ itm.type == 'number' ? numAddSymbol(item[itm.name]) : item[itm.name] }}</div> <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] }}
</div>
</template> </template>
</div> </div>
</div> </div>
...@@ -68,7 +63,7 @@ export default { ...@@ -68,7 +63,7 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding-bottom: 0.69vh; padding-bottom: 0.89vh;
box-sizing: border-box; box-sizing: border-box;
&-left { &-left {
display: flex; display: flex;
...@@ -87,7 +82,7 @@ export default { ...@@ -87,7 +82,7 @@ export default {
color: #ffffff; color: #ffffff;
margin-left: 1.11vw; margin-left: 1.11vw;
cursor: default; cursor: default;
max-width: 20.3vw; // max-width: 20.3vw;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -100,8 +95,8 @@ export default { ...@@ -100,8 +95,8 @@ export default {
box-sizing: border-box; box-sizing: border-box;
// padding-bottom: 1px; // padding-bottom: 1px;
// border-bottom: 1px solid #fff; // border-bottom: 1px solid #fff;
color: #5894FF; color: #5894ff;
background-image: -webkit-linear-gradient(left, #24D8FF, #7787FF); background-image: -webkit-linear-gradient(left, #24d8ff, #7787ff);
-webkit-background-clip: text; -webkit-background-clip: text;
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
} }
...@@ -110,7 +105,10 @@ export default { ...@@ -110,7 +105,10 @@ export default {
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
color: #95acd9; color: #95acd9;
text-align: right; overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
// text-align: right;
} }
} }
</style> </style>
...@@ -7,20 +7,41 @@ ...@@ -7,20 +7,41 @@
--> -->
<template> <template>
<div class="right"> <div class="right">
<Tab :list="tabList" :width="14.83"></Tab> <Tab class="tab-box" :list="tabList" :width="14.83" @changeTab="changeTab"></Tab>
<components :is="tabName"></components>
</div> </div>
</template> </template>
<script> <script>
import './rightCompoments'
export default { export default {
name: 'ContentRight', name: 'ContentRight',
data() { data() {
return { return {
tabList: ['门店排行榜', '员工排行榜'] tabList: ['门店排行榜', '员工排行榜'],
activeName: 0
}
},
computed: {
tabName() {
let sname
switch (this.activeName) {
case 0:
sname = 'MerchantsRanking'
break
case 1:
sname = 'StaffRanking'
break
}
return sname
} }
}, },
mounted() { }, mounted() { },
methods: { methods: {
changeTab(data) {
console.log(data);
this.activeName = data
}
} }
} }
</script> </script>
...@@ -30,7 +51,10 @@ export default { ...@@ -30,7 +51,10 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 31.39vw; width: 31.39vw;
background: #091C40; // background: #091C40;
.tab-box {
margin: 2.22vh auto;
}
} }
</style> </style>
<template>
<div>
<!-- 第一个盒子 -->
<div class="rank-box">
<box-title title="门店产值排名"></box-title>
<div class="content">
<Ranking :id="'storeOutput'" :rankingsList="storeOutputList" :rankingDataObj="rankingDataObj"></Ranking>
</div>
</div>
<!-- 第二个盒子 -->
<div class="rank-box">
<box-title title="门店转化率排行"></box-title>
<div class="content">
<Ranking :id="'storePercent'" :rankingsList="storePercentList" :rankingDataObj="rankPercentObj"></Ranking>
</div>
</div>
<!-- 第三个盒子 -->
<div class="rank-box">
<box-title title="门店客单价排行"></box-title>
<div class="content">
<Ranking :id="'storePrice'" :rankingsList="storePriceList" :rankingDataObj="rankingDataObj"></Ranking>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'MerchantsRanking',
data() {
return {
// 门店产值排名数据
storeOutputList: [
{
name: '云南红绳瑞达汽车汽车汽车销售',
province: '广东省',
carName: '一汽大众',
value: '345489'
},
{
name: '云南红绳瑞达汽车销售',
province: '广东省',
carName: '一汽大众',
value: '345489'
},
{
name: '云南红绳瑞达汽车销售',
province: '广东省',
carName: '一汽大众',
value: '345489'
},
{
name: '云南红绳瑞达汽车销售',
province: '广东省',
carName: '奔驰',
value: '345489'
},
{
name: '云南红绳瑞达汽车销售',
province: '广东省',
carName: '保时捷',
value: '345489'
}
],
// 门店转化率排名数据
storePercentList: [
{
name: '云南红绳瑞达汽车销售',
province: '广东省',
carName: '一汽大众',
per: '43'
},
{
name: '云南红绳瑞达汽车销售',
province: '广东省',
carName: '一汽大众',
per: '11'
},
{
name: '云南红绳瑞达汽车销售',
province: '广东省',
carName: '一汽大众',
per: '1'
},
{
name: '云南红绳瑞达汽车销售',
province: '广东省',
carName: '一汽大众',
per: '24'
},
{
name: '云南红绳瑞达汽车销售',
province: '广东省',
carName: '一汽大众',
per: '44'
}
],
// 门店客单价排名数据
storePriceList: [
{
name: '云南红绳瑞达汽车销售',
province: '广东省',
carName: '一汽大众',
value: '345489'
},
{
name: '云南红绳瑞达汽车销售',
province: '广东省',
carName: '一汽大众',
value: '345489'
},
{
name: '云南红绳瑞达汽车销售',
province: '广东省',
carName: '一汽大众',
value: '345489'
},
{
name: '云南红绳瑞达汽车销售',
province: '广东省',
carName: '一汽大众',
value: '345489'
},
{
name: '云南红绳瑞达汽车销售',
province: '广东省',
carName: '一汽大众',
value: '345489'
}
],
// rankingDataObj
rankingDataObj: [
{
name: 'name',
width: '9.72vw'
},
{
name: 'province',
color: '#C0C0C0',
width: '2.92vw'
},
{
name: 'carName',
color: '#C0C0C0',
width: '3.89vw'
},
{
name: 'value',
width: '3.88vw',
type: 'number'
}
],
rankPercentObj: [
{
name: 'name',
width: '9.72vw'
},
{
name: 'province',
color: '#C0C0C0',
width: '2.92vw'
},
{
name: 'carName',
color: '#C0C0C0',
width: '3.89vw'
},
{
name: 'per',
width: '3vw',
type: 'decimal'
}
],
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.rank-box {
width: 31.39vw;
height: 25.11vh;
box-shadow: inset 0 0 20px 0 #3d57ff69;
&:nth-child(-n + 2) {
margin-bottom: 1.78vh;
}
.content {
padding: 1.67vh 1.39vw;
}
}
</style>
<template>
<div>
<!-- 第一个盒子 -->
<div class="rank-box">
<box-title title="员工业绩排名"></box-title>
<div class="content">
<Ranking :id="'staffOutput'" :rankingsList="staffOutputList" :rankingDataObj="rankingDataObj"></Ranking>
</div>
</div>
<!-- 第二个盒子 -->
<div class="rank-box">
<box-title title="员工转化率排行"></box-title>
<div class="content">
<Ranking :id="'staffPercent'" :rankingsList="staffPercentList" :rankingDataObj="rankPercentObj"></Ranking>
</div>
</div>
<!-- 第三个盒子 -->
<div class="rank-box">
<box-title title="员工客单价排行"></box-title>
<div class="content">
<Ranking :id="'staffPrice'" :rankingsList="staffPriceList" :rankingDataObj="rankingDataObj"></Ranking>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'StaffRanking',
data() {
return {
// 员工产值排名数据
staffOutputList: [
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽绳瑞达汽绳瑞达汽车销售',
value: '345489'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
}
],
// 员工转化率排名数据
staffPercentList: [
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
per: '43'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
per: '11'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
per: '1'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
per: '24'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
per: '44'
}
],
// 员工客单价排名数据
staffPriceList: [
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
},
{
name: '王二虎',
merchants: '云南红绳瑞达汽车销售',
value: '345489'
}
],
// rankingDataObj
rankingDataObj: [
{
name: 'name',
width: '2.92vw'
},
{
name: 'merchants',
color: '#C0C0C0',
width: '9.72vw'
},
{
name: 'value',
width: '3.88vw',
type: 'number'
}
],
rankPercentObj: [
{
name: 'name',
width: '2.92vw'
},
{
name: 'merchants',
color: '#C0C0C0',
width: '9.72vw'
},
{
name: 'per',
width: '3vw',
type: 'decimal'
}
]
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.rank-box {
width: 31.39vw;
height: 25.11vh;
box-shadow: inset 0 0 20px 0 #3d57ff69;
&:nth-child(-n + 2) {
margin-bottom: 1.78vh;
}
.content {
padding: 1.67vh 1.39vw;
}
}
</style>
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
<template> <template>
<div class="purchase-progress-box"> <div class="purchase-progress-box">
<box-title title="商城采购进度分析"></box-title> <box-title title="商城采购进度分析"></box-title>
<RightViewContent v-if="progressData.length" class="content-box" :chart="progressChart" :listData="progressData" :legentList="progressLegend" :legendColors="progressChart.colors"></RightViewContent> <RightViewContent v-if="progressData.length" class="content-box" :chart="progressChart" :listData="progressData" :legentList="progressLegend" :legendColors="progressChart.colors"></RightViewContent>
<div v-else class="empty"> <div v-else class="empty">
<Empty></Empty> <Empty></Empty>
</div> </div>
</div> </div>
</template> </template>
......
...@@ -61,7 +61,8 @@ export default { ...@@ -61,7 +61,8 @@ export default {
merchantsList: [], merchantsList: [],
merchantsDataObj: [ merchantsDataObj: [
{ {
name: 'merchantname' name: 'merchantname',
width: '20.3vw'
}, },
{ {
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!