Commit ab10d19f by 匡雅琴

精品升级二级页面布局

1 parent 630e6e08
...@@ -9,10 +9,9 @@ const pages = [ ...@@ -9,10 +9,9 @@ const pages = [
children: [] children: []
}, },
{ {
name: 'boutique', name: 'boutiqueDetail',
meta: { meta: {
isTab: true, isTab: true,
keepAlive: true,
backgroundColor: '#F7F7F7' backgroundColor: '#F7F7F7'
} }
}, },
......
...@@ -4,21 +4,21 @@ ...@@ -4,21 +4,21 @@
<div class="rank-box"> <div class="rank-box">
<box-title title="门店产值排名"></box-title> <box-title title="门店产值排名"></box-title>
<div class="content"> <div class="content">
<Ranking :id="'storeOutput'" :rankingsList="storeOutputList" :rankingDataObj="rankingDataObj"></Ranking> <Ranking :id="'storeOutput'" :rankingsList="storeOutputList" :rankingDataObj="rankingDataObj" @goDetailPage="goDetailPage"></Ranking>
</div> </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">
<Ranking :id="'storePercent'" :rankingsList="storePercentList" :rankingDataObj="rankPercentObj"></Ranking> <Ranking :id="'storePercent'" :rankingsList="storePercentList" :rankingDataObj="rankPercentObj" @goDetailPage="goDetailPage"></Ranking>
</div> </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">
<Ranking :id="'storePrice'" :rankingsList="storePriceList" :rankingDataObj="rankingDataObj"></Ranking> <Ranking :id="'storePrice'" :rankingsList="storePriceList" :rankingDataObj="rankingDataObj" @goDetailPage="goDetailPage"></Ranking>
</div> </div>
</div> </div>
</div> </div>
...@@ -170,13 +170,28 @@ export default { ...@@ -170,13 +170,28 @@ export default {
width: '3vw', width: '3vw',
type: 'decimal' type: 'decimal'
} }
], ]
} }
}, },
mounted() {}, mounted() {},
methods: {} methods: {
// 跳转精品升级二级页面
goDetailPage(item) {
console.log(item)
const routeData = this.$router.resolve({
name: 'boutiqueDetail'
// query: {
// merchantid: item.merchantid,
// merchantname: item.merchantname,
// purchaseType: this.purchase.value,
// year: this.$store.state.app.solarYear
// }
})
window.open(routeData.href, '_blank')
}
}
} }
</script> </script>
......
<template>
<div class="detail-left-box">
<StatisticsBox :list="boutiqueDetailList"></StatisticsBox>
</div>
</template>
<script>
export default {
name: 'BoutiqueDetailLeft',
data() {
return {
boutiqueDetailList: [
{
name: '总门店数',
valueName: 'amounttotal',
value: '2708',
bottomLabel: '上月新增门店数:',
bottemName: 'amounttotalThismonth',
bottomValue: '21'
},
{
name: '总门店数',
valueName: 'amounttotal',
value: '2708',
bottomLabel: '上月新增门店数:',
bottemName: 'amounttotalThismonth',
bottomValue: '21'
},
{
name: '总门店数',
valueName: 'amounttotal',
value: '2708',
bottomLabel: '上月新增门店数:',
bottemName: 'amounttotalThismonth',
bottomValue: '21'
},
{
name: '客单价',
valueName: 'amounttotal',
value: '1003',
unit: '¥',
bottomType: 'ratio',
ratioLeftLabel: '月环比',
ratioLeftValue: '12',
ratioRightLabel: '年同比',
ratioRightValue: '-7'
},
{
name: '总转化率',
valueName: 'amounttotal',
value: '58',
unit: '%',
bottomType: 'ratio',
ratioLeftLabel: '月环比',
ratioLeftValue: '12',
ratioRightLabel: '年同比',
ratioRightValue: '-7'
}
]
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.detail-left-box {
width: 64.17vw;
}
</style>
<template>
<div class="detail-right-box">
<!-- 商品供应方占比 -->
<GoodsSupplierPropertion></GoodsSupplierPropertion>
<!-- 订单支付方式占比 -->
<GoodsPayPropertion></GoodsPayPropertion>
<!-- 商品销售排行 -->
<GoodsRanking></GoodsRanking>
</div>
</template>
<script>
import GoodsRanking from './GoodsRanking.vue'
import GoodsSupplierPropertion from './GoodsSupplierPropertion.vue'
import GoodsPayPropertion from './GoodsPayPropertion.vue'
export default {
name: 'BoutiqueDetailRight',
components: {
GoodsRanking,
GoodsSupplierPropertion,
GoodsPayPropertion
},
data() {
return {}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.detail-right-box {
width: 31.39vw;
}
</style>
<template>
<div class="goods-pay-box">
<box-title title="订单支付方式占比"></box-title>
<RightViewContent
v-if="goodsPayData.length"
class="content-box"
:chart="goodsPayChart"
:listData="goodsPayData"
:legentList="goodsPayLegend"
:legendColors="goodsPayChart.colors"
></RightViewContent>
<div v-else class="empty">
<Empty></Empty>
</div>
</div>
</template>
<script>
import RightViewContent from '../solar/RightViewContent.vue'
export default {
name: 'GoodsPayPropertion',
components: {
RightViewContent
},
data() {
return {
goodsPayData: [
{
name: 'POS及',
rate: 36,
value: 80
},
{
name: '微信支付',
rate: 40,
value: 20
},
{
name: '门店收款',
rate: 36,
value: 120
}
],
goodsPayChart: {
id: 'goodsPay',
keys: ['name', 'value'],
height: '15.34vh',
colors: ['#34AFFF', '#16E193', '#FFC200']
},
goodsPayLegend: [
{
name: 'name',
width: '5vw'
},
{
name: 'rate',
type: 'decimal',
width: '1.88vw'
},
{
name: 'value',
type: 'number',
width: '5vw'
}
]
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.goods-pay-box {
width: 100%;
background: #061422;
box-shadow: inset 0 0 20px 0 #3d57ff69;
height: 25vh;
margin-bottom: 1.78vh;
.content-box {
// padding: 2.78vh 1.39vw 2.78vh 0;
height: 21.67vh;
}
.empty {
height: 21.67vh;
display: flex;
align-items: center;
}
}
</style>
<template>
<div class="goods-rank-box">
<box-title title="商品销售排行"></box-title>
<div v-if="goodsRankingList.length">
<Ranking :id="'storePrice'" :rankingsList="goodsRankingList" :rankingDataObj="goodsRankingDataObj"></Ranking>
</div>
<div v-else class="empty">
<Empty></Empty>
</div>
</div>
</template>
<script>
export default {
name: 'GoodsRanking',
data() {
return {
goodsRankingList: [
{
name: '低价只想隔热G70 前挡',
value: 80,
price: 95489
},
{
name: '低价只想隔热G70 前挡',
value: 80,
price: 95489
},
{
name: '低价只想隔热G70 前挡',
value: 80,
price: 95489
},
{
name: '低价只想隔热G70 前挡',
value: 80,
price: 95489
},
{
name: '低价只想隔热G70 前挡',
value: 80,
price: 95489
}
],
goodsRankingDataObj: [
{
name: 'name'
},
{
name: 'value'
},
{
name: 'price',
type: 'number'
}
]
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.goods-rank-box {
width: 100%;
background: #061422;
box-shadow: inset 0 0 20px 0 #3d57ff69;
height: 25.11vh;
.empty {
height: 21.78vh;
display: flex;
align-items: center;
}
}
</style>
<template>
<div class="goods-supply-box">
<box-title title="商品供应方占比"></box-title>
<RightViewContent
v-if="propertionData.length"
class="content-box"
:chart="propertionChart"
:listData="propertionData"
:legentList="propertionLegend"
:legendColors="propertionChart.colors"
></RightViewContent>
<div v-else class="empty">
<Empty></Empty>
</div>
</div>
</template>
<script>
import RightViewContent from '../solar/RightViewContent.vue'
export default {
name: 'GoodsSupplierPropertion',
components: {
RightViewContent
},
data() {
return {
propertionData: [
{
name: '第三方产品',
value: 70,
rate: 70
},
{
name: '广联直营',
value: 30,
rate: 30
}
],
propertionChart: {
id: 'boutiquePropertion',
keys: ['name', 'value'],
height: '15.34vh',
colors: ['#16E193', '#34AFFF']
},
propertionLegend: [
{
name: 'name',
width: '5vw'
},
{
name: 'rate',
type: 'decimal',
width: '1.88vw'
},
{
name: 'value',
type: 'number',
width: '5vw'
}
]
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.goods-supply-box {
width: 100%;
background: #061422;
box-shadow: inset 0 0 20px 0 #3d57ff69;
height: 25vh;
margin-bottom: 1.78vh;
.content-box {
// padding: 2.78vh 1.39vw 2.78vh 0;
height: 21.67vh;
}
.empty {
height: 21.67vh;
display: flex;
align-items: center;
}
}
</style>
<template>
<div class="layout">
<view-container>
<template #title>
<DetailTitle :dataList="merchantList" :dataListObj="merchantListObj" :tabObject="tabObject"></DetailTitle>
</template>
<template #content>
<div class="solar-detail-content">
<view-date :defaultYear="defaultYear" :dataList="yearList" :businessTime="businessTime"></view-date>
<div class="solar-detail-content-bottom">
<BoutiqueDetailLeft></BoutiqueDetailLeft>
<BoutiqueDetailRight></BoutiqueDetailRight>
</div>
</div>
</template>
</view-container>
</div>
</template>
<script>
import BoutiqueDetailLeft from './BoutiqueDetailLeft.vue'
import BoutiqueDetailRight from './BoutiqueDetailRight.vue'
export default {
name: 'BoutiqueDetail',
components: {
BoutiqueDetailLeft,
BoutiqueDetailRight
},
data() {
return {
merchantList: [],
merchantListObj: {
labelName: 'merchantname',
valueName: 'merchantid'
},
tabObject: {},
defaultYear: '',
yearList: [
{
label: '全部',
value: ''
}
],
businessTime: ''
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.solar-detail-content {
padding: 1.78vh 1.67vw 3.56vh;
&-bottom {
display: flex;
justify-content: space-between;
margin-top: 1.78vh;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!