Commit ab3bb999 by 胡悦

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

2 parents dfd6049a f0a3e022
...@@ -134,7 +134,6 @@ export default { ...@@ -134,7 +134,6 @@ export default {
const _dataIndex = params.dataIndex const _dataIndex = params.dataIndex
const _purchaseamount = utils.numAddSymbol(_this.list[_dataIndex].purchaseamount) const _purchaseamount = utils.numAddSymbol(_this.list[_dataIndex].purchaseamount)
const _avarage = utils.numAddSymbol(_this.list[_dataIndex].averprice) const _avarage = utils.numAddSymbol(_this.list[_dataIndex].averprice)
console.log(_purchaseamount, _avarage)
if (_this.formatter) return `{a|¥ ${_purchaseamount}}\n{b|均价¥ ${_avarage}}` if (_this.formatter) return `{a|¥ ${_purchaseamount}}\n{b|均价¥ ${_avarage}}`
return `${params.name}` return `${params.name}`
}, },
......
...@@ -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>
...@@ -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>
<template>
<div class="tab-box">
<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)">
{{ item }}
</div>
</div>
</div>
</template>
<script>
export default {
name: 'Tab',
props: {
list: {
type: Array,
default: () => []
},
width: Number
},
data() {
return {
tabActive: 0
}
},
mounted() {},
methods: {
// 切换tab
changeTab(index) {
this.tabActive = index
this.$emit('changeTab', index)
}
}
}
</script>
<style lang="scss" scoped>
.tab-box {
margin: 0 auto;
.tab-item-box {
display: flex;
padding: 0.44vh 0.28vw;
border: 2px solid;
border-image: linear-gradient(90deg, #074989, #30dcff, #074989) 1;
background-image: linear-gradient(180deg, #001948 0%, #00223c 99%);
cursor: pointer;
.tab-item {
padding: 0.56vh 0.9vw;
box-sizing: border-box;
font-weight: 400;
font-size: 16px;
color: #ffffffbf;
&-active {
background-image: linear-gradient(270deg, #6578ff 0%, #079ff1 100%);
color: #ffffff;
}
}
}
}
</style>
...@@ -6,17 +6,42 @@ ...@@ -6,17 +6,42 @@
* @LastEditTime: 2023-07-19 14:23:51 * @LastEditTime: 2023-07-19 14:23:51
--> -->
<template> <template>
<div class="right">aaaaaa</div> <div class="right">
<Tab class="tab-box" :list="tabList" :width="14.83" @changeTab="changeTab"></Tab>
<components :is="tabName"></components>
</div>
</template> </template>
<script> <script>
import './rightCompoments'
export default { export default {
name: 'BoutiqueRight', name: 'BoutiqueRight',
data() { data() {
return {} return {
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>
...@@ -26,7 +51,10 @@ export default { ...@@ -26,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>
import Vue from 'vue'
const componentsFiles = require.context(`./`, true, /.vue$/)
componentsFiles.keys().forEach(path => {
const component = componentsFiles(path).default
Vue.component(component.name, component)
})
\ No newline at end of file \ No newline at end of file
<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>
...@@ -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',
......
...@@ -113,10 +113,10 @@ export default { ...@@ -113,10 +113,10 @@ export default {
async init() { async init() {
this.tabObject = this.$route.query this.tabObject = this.$route.query
const { merchantid, purchaseType, year } = this.$route.query const { merchantid, purchaseType, year } = this.$route.query
this.defaultYear = year
const _merchantList = await this.getAllRanking(purchaseType) const _merchantList = await this.getAllRanking(purchaseType)
this.merchantList = _merchantList this.merchantList = _merchantList
this.purchaseType = purchaseType this.purchaseType = purchaseType
this.defaultYear = year
this.getMerchantGoodsRatio(merchantid) this.getMerchantGoodsRatio(merchantid)
this.getMerchantPurchase(merchantid) this.getMerchantPurchase(merchantid)
this.getMerchantPurchaseTrend(merchantid) this.getMerchantPurchaseTrend(merchantid)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!