Commit 27c23e89 by 匡雅琴

售后众筹一级页面开发

1 parent c9797f2a
<template> <template>
<div class="tab-box"> <div class="tab-box">
<div class="flex">
<div v-for="(item, index) in tabList" :key="index" class="tab-item" :class="tabActive == index ? 'tab-item-active' : ''" @click="changeTab(index)">{{ item }}</div>
</div> </div>
<div>
<slot name="right"></slot>
</div>
</div>
</template> </template>
<script> <script>
export default { export default {
name: 'TopTab', name: 'TopTab',
props: { props: {
tabList: { tabList: {
type: Array, type: Array,
default: () => [] default: () => []
} }
}, },
data() { data() {
return { return {
tabActive: 0
}; }
}, },
mounted() { mounted() {},
},
methods: { methods: {
// tab切换
}, changeTab(index) {
}; this.tabActive = index
this.$emit('tabChange', index)
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style>
\ No newline at end of file \ No newline at end of file
.tab-box {
height: 4.44vh;
justify-content: space-between;
padding: 0.2vh 0.2vw;
box-sizing: border-box;
border: 2px solid;
border-image: linear-gradient(90deg, #074989, #30dcff, #074989) 1;
.tab-item {
height: 3.56vh;
line-height: 3.56vh;
font-weight: 400;
font-size: 16px;
color: #ffffffbf;
padding: 0 1.11vw;
cursor: pointer;
}
.tab-item-active {
font-weight: 500;
font-size: 16px;
color: #ffffff;
background-image: linear-gradient(270deg, #6578ff 0%, #079ff1 100%);
}
}
.flex {
display: flex;
}
</style>
...@@ -7,88 +7,39 @@ ...@@ -7,88 +7,39 @@
--> -->
<template> <template>
<div class="right"> <div class="right">
<MainTab class="main-tab" :tabList="tabList"></MainTab> <MainTab class="main-tab" :tabList="tabList" @tabChange="tabChange"></MainTab>
<StatisticsBox class="statistic-box" :list="crowdfundList"></StatisticsBox> <template v-if="currentTab == 0">
<div class="card-box"> <GlDemension></GlDemension>
<!-- 收款方式占比 --> </template>
<PaymentProprtion></PaymentProprtion> <template v-else>
<!-- 门店排名 --> <BrandDimension></BrandDimension>
<MerchantsRank></MerchantsRank> </template>
</div>
<div class="card-box">
<!-- 近一年活动场次趋势图 -->
<ActivityTrends></ActivityTrends>
<!-- 近一年门店活动排名 -->
<NearMerchantsRank></NearMerchantsRank>
</div>
</div> </div>
</template> </template>
<script> <script>
import PaymentProprtion from './components/PaymentPropertion'
import MerchantsRank from './components/MerchantsRank.vue'
import ActivityTrends from './components/ActivityTrends.vue'
import NearMerchantsRank from './components/NearMerchantsRank.vue'
import MainTab from './components/MainTab.vue' import MainTab from './components/MainTab.vue'
import GlDemension from './components/GlDemension'
import BrandDimension from './components/BrandDimension'
export default { export default {
name: 'CrowdfundLeft', name: 'CrowdfundLeft',
components: { components: {
PaymentProprtion, MainTab,
MerchantsRank, GlDemension,
ActivityTrends, BrandDimension
NearMerchantsRank,
MainTab
}, },
data() { data() {
return { return {
tabList: ['广联维度', '品牌品类维度'], tabList: ['广联维度', '品牌品类维度'],
crowdfundList: [ currentTab: 0
{
name: '总场次',
value: '1700',
unit: '场',
unitType: 'right'
},
{
name: '进行中场次',
value: '1700',
unit: '场',
unitType: 'right'
},
{
name: '已完成场次',
value: '1700',
unit: '场',
unitType: 'right'
},
{
name: '产值',
value: '1700',
unit: '¥',
unitType: 'left'
},
{
name: '订单数',
value: '550',
unit: '单',
unitType: 'right'
},
{
name: '转化率',
value: '80',
unit: '%',
unitType: 'right'
},
{
name: '退单率',
value: '20',
unit: '%',
unitType: 'right'
}
]
} }
}, },
mounted() {} mounted() {},
methods: {
tabChange(val) {
this.currentTab = val
}
}
} }
</script> </script>
...@@ -101,18 +52,7 @@ export default { ...@@ -101,18 +52,7 @@ export default {
.main-tab { .main-tab {
margin-bottom: 1.78vh; margin-bottom: 1.78vh;
} }
.card-box {
display: flex;
justify-content: space-between;
margin-top: 1.78vh;
}
}
.statistic-box {
&.statistics {
height: 9.78vh;
/deep/ .statistics-top {
padding-top: 1.2vh;
}
}
} }
</style> </style>
<template>
<div>
<TopTab :tabList="tabList"></TopTab>
<div class="rank-box">
<!-- 场次排名 -->
<div class="rank-item">
<box-title title="场次排名"></box-title>
<div v-if="sessionRankList.length" class="content">
<Ranking class="brand-rank" :id="'sessionRank'" :rankingsList="sessionRankList" :rankingDataObj="sessionRankListObj"></Ranking>
</div>
<div v-else class="empty"><Empty></Empty></div>
</div>
<!-- 产值排名 -->
<div class="rank-item">
<box-title title="产值排名"></box-title>
<div v-if="productionRankList.length" class="content">
<Ranking :id="'productionRank'" :rankingsList="productionRankList" :rankingDataObj="productionRankListObj"></Ranking>
</div>
<div v-else class="empty"><Empty></Empty></div>
</div>
<!-- 平均转化率排名 -->
<div class="rank-item">
<box-title title="平均转化率排名"></box-title>
<div v-if="percentRankList.length" class="content">
<Ranking :id="'percentRank'" :rankingsList="percentRankList" :rankingDataObj="percentRankListObj"></Ranking>
</div>
<div v-else class="empty"><Empty></Empty></div>
</div>
<!-- 平均退单率排名 -->
<div class="rank-item">
<box-title title="平均退单率排名"></box-title>
<div v-if="rejectRankList.length" class="content">
<Ranking :id="'rejectRank'" :rankingsList="rejectRankList" :rankingDataObj="rejectRankListObj"></Ranking>
</div>
<div v-else class="empty"><Empty></Empty></div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'BrandDimension',
data() {
return {
tabList: ['AR导航', '360全景导航', '座椅通风', '氛围灯'],
sessionRankList: [
{
brand: '泵吃',
value: 500
},
{
brand: '泵吃',
value: 500
},
{
brand: '泵吃',
value: 500
},
{
brand: '泵吃',
value: 500
},
{
brand: '泵吃',
value: 500
},
{
brand: '泵吃',
value: 500
},
{
brand: '泵吃',
value: 500
},
{
brand: '泵吃',
value: 500
},
{
brand: '泵吃',
value: 500
},
{
brand: '泵吃',
value: 500
},
{
brand: '泵吃',
value: 500
},
{
brand: '泵吃',
value: 500
},
{
brand: '泵吃',
value: 500
},
{
brand: '泵吃',
value: 500
},
{
brand: '泵吃',
value: 500
},
{
brand: '泵吃',
value: 500
},
{
brand: '泵吃',
value: 500
},
{
brand: '泵吃',
value: 500
}
],
productionRankList: [],
percentRankList: [],
rejectRankList: [],
sessionRankListObj: [
{
name: 'brand',
width: '2vw'
},
{
name: 'value',
width: '3vw'
}
],
productionRankListObj: [
{
name: 'brand',
width: '2vw'
},
{
name: 'value',
width: '3vw',
type: 'number'
}
],
percentRankListObj: [
{
name: 'brand',
width: '2vw'
},
{
name: 'value',
width: '3vw',
type: 'decimal'
}
],
rejectRankListObj: [
{
name: 'brand',
width: '2vw'
},
{
name: 'value',
width: '3vw',
type: 'decimal'
}
]
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.rank-box {
display: flex;
justify-content: space-between;
margin-top: 1.78vh;
.rank-item {
width: 17.92vw;
height: 75.11vh;
box-shadow: inset 0 0 20px 0 #3d57ff69;
.content {
padding: 2.22vh 1.39vw;
height: 71vh;
box-sizing: border-box;
overflow: hidden;
.brand-rank {
/deep/.ranking-box-item {
height: 4.3vh;
}
}
}
.empty {
height: 71.78vh;
display: flex;
text-align: center;
align-items: center;
}
}
}
</style>
<template>
<div>
<StatisticsBox class="statistic-box" :list="crowdfundList"></StatisticsBox>
<div class="card-box">
<!-- 收款方式占比 -->
<PaymentProprtion></PaymentProprtion>
<!-- 门店排名 -->
<MerchantsRank></MerchantsRank>
</div>
<div class="card-box">
<!-- 近一年活动场次趋势图 -->
<ActivityTrends></ActivityTrends>
<!-- 近一年门店活动排名 -->
<NearMerchantsRank></NearMerchantsRank>
</div>
</div>
</template>
<script>
import PaymentProprtion from './PaymentPropertion'
import MerchantsRank from './MerchantsRank.vue'
import ActivityTrends from './ActivityTrends.vue'
import NearMerchantsRank from './NearMerchantsRank.vue'
export default {
name: 'GlDemension',
components: {
PaymentProprtion,
MerchantsRank,
ActivityTrends,
NearMerchantsRank
},
data() {
return {
crowdfundList: [
{
name: '总场次',
value: '1700',
unit: '场',
unitType: 'right'
},
{
name: '进行中场次',
value: '1700',
unit: '场',
unitType: 'right'
},
{
name: '已完成场次',
value: '1700',
unit: '场',
unitType: 'right'
},
{
name: '产值',
value: '1700',
unit: '¥',
unitType: 'left'
},
{
name: '订单数',
value: '550',
unit: '单',
unitType: 'right'
},
{
name: '转化率',
value: '80',
unit: '%',
unitType: 'right'
},
{
name: '退单率',
value: '20',
unit: '%',
unitType: 'right'
}
]
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.card-box {
display: flex;
justify-content: space-between;
margin-top: 1.78vh;
}
.statistic-box {
&.statistics {
height: 9.78vh;
/deep/ .statistics-top {
padding-top: 1.2vh;
}
}
}
</style>
<template> <template>
<div class="tab-box flex"> <div class="tab-box flex">
<div class="flex"> <div class="flex">
<div v-for="(item, index) in tabList" :key="index" class="tab-item" :class="tabActive == index ? 'tab-item-active' : ''">{{ item }}</div> <div v-for="(item, index) in tabList" :key="index" class="tab-item" :class="tabActive == index ? 'tab-item-active' : ''" @click="changeTab(index)">{{ item }}</div>
</div> </div>
<div> <div class="flex">
<span>统计月份:</span> <span class="month-text">统计月份:</span>
<div class="month-plugin"> <div class="month-plugin">
<div class="month" @click.stop="switchMonth"> <div class="month" @click.stop="switchMonth">
{{ month || '全部' }} {{ month || '全部' }}
...@@ -37,6 +37,11 @@ export default { ...@@ -37,6 +37,11 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
// tab切换
changeTab(index) {
this.tabActive = index
this.$emit('tabChange', index)
},
switchMonth() { switchMonth() {
this.isShow = !this.isShow this.isShow = !this.isShow
}, },
...@@ -54,14 +59,17 @@ export default { ...@@ -54,14 +59,17 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.tab-box { .tab-box {
height: 6.22vh; height: 6.22vh;
justify-content: space-between;
padding: 1.11vh 0.83vw; padding: 1.11vh 0.83vw;
box-sizing: border-box; box-sizing: border-box;
background: #091c40; background: #091c40;
.tab-item { .tab-item {
height: 4vh;
line-height: 4vh;
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
color: #c9c9c9; color: #c9c9c9;
padding: 0.89vh 1.39vw; padding: 0 1.39vw;
cursor: pointer; cursor: pointer;
} }
.tab-item-active { .tab-item-active {
...@@ -70,6 +78,11 @@ export default { ...@@ -70,6 +78,11 @@ export default {
color: #ffffff; color: #ffffff;
background-image: linear-gradient(270deg, #6578ff 0%, #079ff1 100%); background-image: linear-gradient(270deg, #6578ff 0%, #079ff1 100%);
} }
.month-text {
font-weight: 400;
font-size: 14px;
color: #c9c9c9;
}
.month-plugin { .month-plugin {
position: relative; position: relative;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!