Commit c87524d7 by 胡悦

Merge branch 'v1.3.0' of http://192.168.3.233:8090/h5/glsk-data-view-pd into v1.3.0

2 parents 199030a3 27c23e89
<template>
<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>
<slot name="right"></slot>
</div>
</div>
</template>
<script>
export default {
name: 'TopTab',
props: {
tabList: {
type: Array,
default: () => []
}
},
data() {
return {
tabActive: 0
}
},
mounted() {},
methods: {
// tab切换
changeTab(index) {
this.tabActive = index
this.$emit('tabChange', index)
}
}
}
</script>
<style lang="scss" scoped>
.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>
...@@ -3,23 +3,26 @@ ...@@ -3,23 +3,26 @@
<!-- 第一个盒子 --> <!-- 第一个盒子 -->
<div class="rank-box"> <div class="rank-box">
<box-title title="员工业绩排名"></box-title> <box-title title="员工业绩排名"></box-title>
<div class="content"> <div v-if="staffOutputList.length" class="content">
<Ranking :id="'staffOutput'" :rankingsList="staffOutputList" :rankingDataObj="rankingDataObj"></Ranking> <Ranking :id="'staffOutput'" :rankingsList="staffOutputList" :rankingDataObj="rankingDataObj"></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 v-if="staffPercentList.length" class="content">
<Ranking :id="'staffPercent'" :rankingsList="staffPercentList" :rankingDataObj="rankPercentObj"></Ranking> <Ranking :id="'staffPercent'" :rankingsList="staffPercentList" :rankingDataObj="rankPercentObj"></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="staffPriceList.length">
<Ranking :id="'staffPrice'" :rankingsList="staffPriceList" :rankingDataObj="rankingDataObj"></Ranking> <Ranking :id="'staffPrice'" :rankingsList="staffPriceList" :rankingDataObj="rankingDataObj"></Ranking>
</div> </div>
<div v-else class="empty"><Empty></Empty></div>
</div> </div>
</div> </div>
</template> </template>
...@@ -106,5 +109,12 @@ export default { ...@@ -106,5 +109,12 @@ export default {
.content { .content {
padding: 1.67vh 1.39vw; padding: 1.67vh 1.39vw;
} }
.empty {
height: 19.44vh;
display: flex;
// justify-content: center;
text-align: center;
align-items: center;
}
} }
</style> </style>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2023-07-19 17:18:33 * @Date: 2023-07-19 17:18:33
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2023-07-31 10:40:36 * @LastEditTime: 2023-08-02 17:47:33
--> -->
<template> <template>
<div class="trends-box"> <div class="trends-box">
...@@ -69,13 +69,13 @@ export default { ...@@ -69,13 +69,13 @@ export default {
mounted() {}, mounted() {},
methods: { methods: {
init() { init() {
this.getDataList() this.getDataList(this.merchantid)
}, },
getDataList() { getDataList(value) {
this.dataList = [] this.dataList = []
this.isFlag = false this.isFlag = false
if (!this.isFlag) { if (!this.isFlag) {
this.api.boutique.getMerchantTrend({ year: this.year, MerchantId: this.merchantid }).then(res => { this.api.boutique.getMerchantTrend({ year: this.year, MerchantId: value }).then(res => {
const _dataList = res.data.dataList const _dataList = res.data.dataList
if (!_dataList.length) { if (!_dataList.length) {
this.isEmpty = true this.isEmpty = true
......
...@@ -7,84 +7,39 @@ ...@@ -7,84 +7,39 @@
--> -->
<template> <template>
<div class="right"> <div class="right">
<StatisticsBox class="statistic-box" :list="crowdfundList"></StatisticsBox> <MainTab class="main-tab" :tabList="tabList" @tabChange="tabChange"></MainTab>
<div class="card-box"> <template v-if="currentTab == 0">
<!-- 收款方式占比 --> <GlDemension></GlDemension>
<PaymentProprtion></PaymentProprtion> </template>
<!-- 门店排名 --> <template v-else>
<MerchantsRank></MerchantsRank> <BrandDimension></BrandDimension>
</div> </template>
<div class="card-box">
<!-- 近一年活动场次趋势图 -->
<ActivityTrends></ActivityTrends>
<!-- 近一年门店活动排名 -->
<NearMerchantsRank></NearMerchantsRank>
</div>
</div> </div>
</template> </template>
<script> <script>
import PaymentProprtion from './components/PaymentPropertion' import MainTab from './components/MainTab.vue'
import MerchantsRank from './components/MerchantsRank.vue' import GlDemension from './components/GlDemension'
import ActivityTrends from './components/ActivityTrends.vue' import BrandDimension from './components/BrandDimension'
import NearMerchantsRank from './components/NearMerchantsRank.vue'
export default { export default {
name: 'CrowdfundLeft', name: 'CrowdfundLeft',
components: { components: {
PaymentProprtion, MainTab,
MerchantsRank, GlDemension,
ActivityTrends, BrandDimension
NearMerchantsRank
}, },
data() { data() {
return { return {
crowdfundList: [ tabList: ['广联维度', '品牌品类维度'],
{ 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'
}, },
{ mounted() {},
name: '退单率', methods: {
value: '20', tabChange(val) {
unit: '%', this.currentTab = val
unitType: 'right'
} }
]
} }
},
mounted() {}
} }
</script> </script>
...@@ -94,18 +49,10 @@ export default { ...@@ -94,18 +49,10 @@ export default {
// height: 50vh; // height: 50vh;
// background: #061422; // background: #061422;
// box-shadow: inset 0 0 20px 0 #3d57ff69; // box-shadow: inset 0 0 20px 0 #3d57ff69;
.card-box { .main-tab {
display: flex; margin-bottom: 1.78vh;
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>
<div class="tab-box flex">
<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 class="flex">
<span class="month-text">统计月份:</span>
<div class="month-plugin">
<div class="month" @click.stop="switchMonth">
{{ month || '全部' }}
<img class="arrow-down" src="@/assets/images/arrow-down.png" alt="" />
</div>
<SelectBox :isShow="isShow" isObject :defaultValue="defaultMonth" @clickOutside="clickOutside" :dataList="dataList" :boxWidth="'8.61vw'" @selectVal="selectVal"></SelectBox>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'MainTab',
props: {
tabList: {
type: Array,
default: () => []
}
},
data() {
return {
tabActive: 0,
isShow: false,
defaultMonth: '',
month: ''
}
},
mounted() {},
methods: {
// tab切换
changeTab(index) {
this.tabActive = index
this.$emit('tabChange', index)
},
switchMonth() {
this.isShow = !this.isShow
},
selectVal(val) {
// this.setSolarYear(val.value)
this.switchMonth()
},
clickOutside() {
this.isShow = false
}
}
}
</script>
<style lang="scss" scoped>
.tab-box {
height: 6.22vh;
justify-content: space-between;
padding: 1.11vh 0.83vw;
box-sizing: border-box;
background: #091c40;
.tab-item {
height: 4vh;
line-height: 4vh;
font-weight: 400;
font-size: 14px;
color: #c9c9c9;
padding: 0 1.39vw;
cursor: pointer;
}
.tab-item-active {
font-weight: 500;
font-size: 16px;
color: #ffffff;
background-image: linear-gradient(270deg, #6578ff 0%, #079ff1 100%);
}
.month-text {
font-weight: 400;
font-size: 14px;
color: #c9c9c9;
}
.month-plugin {
position: relative;
}
.month {
display: flex;
align-items: center;
justify-content: space-between;
width: 8.61vw;
height: 4vh;
padding: 0 0.56vw;
box-sizing: border-box;
background-image: linear-gradient(270deg, #6578ff 0%, #079ff1 100%);
margin-right: 0.56vw;
color: #ffffff;
.arrow-down {
width: 0.69vw;
height: 0.67vh;
}
}
}
.flex {
display: flex;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!