Commit 2bc732cc by 匡雅琴

结构调整

1 parent a95ecb1e
...@@ -8,207 +8,29 @@ ...@@ -8,207 +8,29 @@
<template> <template>
<div class="right"> <div class="right">
<!-- 右侧第一个盒子 --> <!-- 右侧第一个盒子 -->
<div class="right-box1"> <purchaseRank></purchaseRank>
<box-title title="采购额排名"></box-title> <!-- 右侧第二个盒子 -->
<div class="content-box"> <purchaseProgress></purchaseProgress>
<!-- 采购选项下拉 --> <!-- 右侧第三个盒子 -->
<div class="purchase-plugin"> <PurchasePropertion></PurchasePropertion>
<div class="purchase" @click="switchPurchase">
{{ purchase }}
<img class="arrow-down" src="@/assets/images/arrow-down.png" alt="" />
</div>
<div v-show="isShow" class="select-purchase">
<div class="purchase-item" :class="purchase == item ? 'active' : ''" v-for="(item, index) in purchaseList" :key="index" @click.s="selectPurchase(item)">{{ item }}</div>
</div>
</div>
<!-- 门店排行 -->
<div class="merchant-box">
<!-- <div v-for="(item, index) in merchantsList" :key="index" class="merchant-box-item">
<div class="merchant-box-item-left">
<div class="circle" :style="{ 'background-image': index < 3 ? perchaseColorList[index] : '' }">{{ index + 1 }}</div>
<div class="text">{{ item.name }}</div>
</div>
<div class="merchant-box-item-right">{{ item.value }}</div>
</div> -->
<ranking :rankingsList="merchantsList" :rankingDataObj="merchantsDataObj"></ranking>
</div>
</div>
</div>
<!-- 右侧第一个盒子 -->
<div class="right-box2">
<box-title title="商城采购进度分析"></box-title>
<RightViewContent class="content-box" :chart="progressChart" :listData="progressData" :legentList="progressLegend" :legendColors="progressLegendColors"></RightViewContent>
<!-- 内容 -->
</div>
<!-- 右侧第一个盒子 -->
<div class="right-box3">
<box-title title="商城采购额商品占比"></box-title>
<RightViewContent class="content-box" :chart="propertionChart" :listData="propertionData" :legentList="propertionLegend" :legendColors="propertionLegendColors"></RightViewContent>
<!-- 内容 -->
</div>
</div> </div>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import RightViewContent from './RightViewContent.vue' import purchaseRank from './purchaseRank.vue'
import purchaseProgress from './purchaseProgress.vue'
import PurchasePropertion from './purchasePropertion.vue'
export default { export default {
name: 'ContentRight', name: 'ContentRight',
components: { components: {
RightViewContent purchaseRank,
purchaseProgress,
PurchasePropertion
}, },
data() { data() {
return { return {}
// 采购额排名下拉框显示
isShow: false,
// 采购额排名下拉框数据
purchaseList: ['商城采购', '商城采购商城采购商城采购商城采购商城采购城采购商', '自采', '商城采购商城采购商城采购商城'],
// 采购额排名当前选中值
purchase: '商城采购',
// 采购额排名前三图标颜色
// perchaseColorList: ['linear-gradient(180deg, #FFDA0B 0%, #FFBC24 100%)', 'linear-gradient(180deg, #EBE5D6 0%, #BDB4A6 100%)', 'linear-gradient(180deg, #EEC08E 0%, #B86E3A 100%)'],
// 采购额排名门店数据
merchantsList: [
{
name: '公转一号店',
merchant: '云南宏胜瑞达汽车销售',
value: '345489'
},
{
name: '公转一号店',
merchant: '云南宏胜瑞达汽车销售',
value: '345489'
},
{
name: '公转一号店',
merchant: '云南宏胜瑞达汽车销售',
value: '345489'
},
{
name: '公转一号店',
merchant: '云南宏胜瑞达汽车销售',
value: '345489'
},
{
name: '公转一号店',
merchant: '云南宏胜瑞达汽车销售',
value: '345489'
}
],
merchantsDataObj: [
{
name: 'name'
},
{
name: 'merchant'
},
{
name: 'value',
type: 'number'
}
],
// 采购进度饼图结构
progressChart: {
id: 'progress',
keys: ['isDelivery', 'per'],
height: '15.34vh',
colors: ['#34AFFF', '#FFC200', '#16E193']
},
// 采购进度数据
progressData: [
{
isDelivery: '已发货',
per: 0.36,
price: 4568
},
{
isDelivery: '未发货',
per: 0.25,
price: 4568
},
{
isDelivery: '已发货',
per: 0.44,
price: 4568
}
],
progressLegend: [{
name: 'isDelivery'
}, {
name: 'per'
}, {
name: 'price',
hasIcon: '¥'
}],
progressLegendColors: ['#34AFFF', '#FFC200', '#16E193'],
// 采购占比饼图结构
propertionChart: {
id: 'propertion',
keys: ['name', 'per'],
height: '15.34vh',
colors: ['#16E193', '#747DFF', '#E588FF', '#34AFFF', '#FFC200', '#EB6001']
},
// 采购占比数据
propertionData: [
{
name: '商品1',
per: 0.36,
price: 4568,
averagePrice: 668
},
{
name: '商品1',
per: 0.20,
price: 4568,
averagePrice: 668
},
{
name: '商品1',
per: 0.16,
price: 4568,
averagePrice: 668
},
{
name: '品1发货',
per: 0.10,
price: 4568,
averagePrice: 668
},
{
name: '商品1',
per: 0.09,
price: 4568,
averagePrice: 668
},
{
name: '商品1',
per: 0.09,
price: 4568,
averagePrice: 668
}
],
propertionLegend: [{
name: 'name'
}, {
name: 'per'
}, {
name: 'price',
hasIcon: '¥'
}, {
name: 'averagePrice',
hasIcon: '均价¥'
}],
propertionLegendColors: ['#16E193', '#747DFF', '#E588FF', '#34AFFF', '#FFC200', '#EB6001']
}
}, },
methods: { methods: {
switchPurchase() {
this.isShow = !this.isShow
},
selectPurchase(item) {
console.log(item)
this.purchase = item
this.switchPurchase()
}
} }
} }
</script> </script>
...@@ -227,67 +49,6 @@ export default { ...@@ -227,67 +49,6 @@ export default {
box-shadow: inset 0 0 20px 0 #3d57ff69; box-shadow: inset 0 0 20px 0 #3d57ff69;
} }
&-box1 {
height: 27.33vh;
.content-box {
padding: 1.11vh 1.39vw 0 1.39vw;
}
.purchase-plugin {
position: relative;
}
.select-purchase {
position: absolute;
top: 2.86vh;
width: 28.61vw;
background-color: #051526;
padding: 16px 20px;
box-sizing: border-box;
border: 2px solid;
border-image: linear-gradient(90deg, #074989, #30dcff, #074989) 1;
.purchase-item {
margin-bottom: 8px;
color: #c9c9c9;
max-width: 25.83vw;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
&:hover {
color: #ffffff;
}
&:last-child {
margin-bottom: 0;
}
&.active {
color: #ffffff;
}
}
}
.purchase {
display: flex;
align-items: center;
justify-content: space-between;
width: 28.61vw;
// height: 5.7vh;
padding: 0 0.56vw;
box-sizing: border-box;
background-image: linear-gradient(270deg, #6578ff 0%, #079ff1 100%);
font-weight: 400;
font-size: 14px;
margin-right: 0.56vw;
color: #ffffff;
.arrow-down {
width: 0.69vw;
height: 0.67vh;
}
}
.merchant-box {
margin-top: 2.06vh;
}
}
&-box2 { &-box2 {
.content-box { .content-box {
padding: 3.78vh 1.39vw 1.39vh; padding: 3.78vh 1.39vw 1.39vh;
......
<template>
<div class="purchase-progress-box">
<box-title title="商城采购进度分析"></box-title>
<RightViewContent class="content-box" :chart="progressChart" :listData="progressData" :legentList="progressLegend" :legendColors="progressLegendColors"></RightViewContent>
</div>
</template>
<script>
import RightViewContent from './RightViewContent.vue'
export default {
name: 'PurchaseProgress',
components: {
RightViewContent
},
data() {
return {
// 采购进度饼图结构
progressChart: {
id: 'progress',
keys: ['isDelivery', 'per'],
height: '15.34vh',
colors: ['#34AFFF', '#FFC200', '#16E193']
},
// 采购进度数据
progressData: [
{
isDelivery: '已发货',
per: 0.36,
price: 4568
},
{
isDelivery: '未发货',
per: 0.25,
price: 4568
},
{
isDelivery: '已发货',
per: 0.44,
price: 4568
}
],
progressLegend: [
{
name: 'isDelivery'
},
{
name: 'per'
},
{
name: 'price',
hasIcon: '¥'
}
],
progressLegendColors: ['#34AFFF', '#FFC200', '#16E193']
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.purchase-progress-box {
width: 100%;
background: #061422;
box-shadow: inset 0 0 20px 0 #3d57ff69;
height: 25vh;
margin-bottom: 1.78vh;
.content-box {
padding: 3.78vh 1.39vw 1.39vh;
}
}
</style>
<template>
<div class="purchase-propertion-box">
<box-title title="商城采购额商品占比"></box-title>
<RightViewContent class="content-box" :chart="propertionChart" :listData="propertionData" :legentList="propertionLegend" :legendColors="propertionLegendColors"></RightViewContent>
</div>
</template>
<script>
import RightViewContent from './RightViewContent.vue'
export default {
name: 'PurchasePropertion',
components: {
RightViewContent
},
data() {
return {
// 采购占比饼图结构
propertionChart: {
id: 'propertion',
keys: ['name', 'per'],
height: '15.34vh',
colors: ['#16E193', '#747DFF', '#E588FF', '#34AFFF', '#FFC200', '#EB6001']
},
// 采购占比数据
propertionData: [
{
name: '商品1',
per: 0.36,
price: 4568,
averagePrice: 668
},
{
name: '商品1',
per: 0.2,
price: 4568,
averagePrice: 668
},
{
name: '商品1',
per: 0.16,
price: 4568,
averagePrice: 668
},
{
name: '品1发货',
per: 0.1,
price: 4568,
averagePrice: 668
},
{
name: '商品1',
per: 0.09,
price: 4568,
averagePrice: 668
},
{
name: '商品1',
per: 0.09,
price: 4568,
averagePrice: 668
}
],
propertionLegend: [
{
name: 'name'
},
{
name: 'per'
},
{
name: 'price',
hasIcon: '¥'
},
{
name: 'averagePrice',
hasIcon: '均价¥'
}
],
propertionLegendColors: ['#16E193', '#747DFF', '#E588FF', '#34AFFF', '#FFC200', '#EB6001']
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.purchase-propertion-box {
width: 100%;
background: #061422;
box-shadow: inset 0 0 20px 0 #3d57ff69;
height: 25vh;
}
</style>
<!-- 采购额排名 -->
<template>
<div class="purchase-rank-box">
<box-title title="采购额排名"></box-title>
<div class="content-box">
<!-- 采购选项下拉 -->
<div class="purchase-plugin">
<div class="purchase" @click="switchPurchase">
{{ purchase }}
<img class="arrow-down" src="@/assets/images/arrow-down.png" alt="" />
</div>
<div v-show="isShow" class="select-purchase">
<div class="purchase-item" :class="purchase == item ? 'active' : ''" v-for="(item, index) in purchaseList" :key="index" @click.s="selectPurchase(item)">{{ item }}</div>
</div>
</div>
<!-- 门店排行 -->
<div class="merchant-box">
<ranking :rankingsList="merchantsList" :rankingDataObj="merchantsDataObj"></ranking>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'PurchaseRank',
data() {
return {
// 采购额排名下拉框显示
isShow: false,
// 采购额排名下拉框数据
purchaseList: ['商城采购', '商城采购商城采购商城采购商城采购商城采购城采购商', '自采', '商城采购商城采购商城采购商城'],
// 采购额排名当前选中值
purchase: '商城采购',
// 采购额排名门店数据
merchantsList: [
{
name: '公转一号店',
merchant: '云南宏胜瑞达汽车销售',
value: '345489'
},
{
name: '公转一号店',
merchant: '云南宏胜瑞达汽车销售',
value: '345489'
},
{
name: '公转一号店',
merchant: '云南宏胜瑞达汽车销售',
value: '345489'
},
{
name: '公转一号店',
merchant: '云南宏胜瑞达汽车销售',
value: '345489'
},
{
name: '公转一号店',
merchant: '云南宏胜瑞达汽车销售',
value: '345489'
}
],
merchantsDataObj: [
{
name: 'name'
},
{
name: 'merchant'
},
{
name: 'value',
type: 'number'
}
]
}
},
mounted() {},
methods: {
switchPurchase() {
this.isShow = !this.isShow
},
selectPurchase(item) {
console.log(item)
this.purchase = item
this.switchPurchase()
}
}
}
</script>
<style lang="scss" scoped>
.purchase-rank-box {
width: 100%;
background: #061422;
box-shadow: inset 0 0 20px 0 #3d57ff69;
height: 27.33vh;
margin-bottom: 1.78vh;
.content-box {
padding: 1.11vh 1.39vw 0 1.39vw;
}
.purchase-plugin {
position: relative;
}
.select-purchase {
position: absolute;
top: 2.86vh;
width: 28.61vw;
background-color: #051526;
padding: 16px 20px;
box-sizing: border-box;
border: 2px solid;
border-image: linear-gradient(90deg, #074989, #30dcff, #074989) 1;
.purchase-item {
margin-bottom: 8px;
color: #c9c9c9;
max-width: 25.83vw;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
&:hover {
color: #ffffff;
}
&:last-child {
margin-bottom: 0;
}
&.active {
color: #ffffff;
}
}
}
.purchase {
display: flex;
align-items: center;
justify-content: space-between;
width: 28.61vw;
// height: 5.7vh;
padding: 0 0.56vw;
box-sizing: border-box;
background-image: linear-gradient(270deg, #6578ff 0%, #079ff1 100%);
font-weight: 400;
font-size: 14px;
margin-right: 0.56vw;
color: #ffffff;
.arrow-down {
width: 0.69vw;
height: 0.67vh;
}
}
.merchant-box {
margin-top: 2.06vh;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!