Commit 9882df18 by 胡悦

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

2 parents 1a8aed13 e48dbd15
......@@ -60,7 +60,7 @@ export default {
.legend-item {
font-size: 12px;
font-weight: 400;
line-height: 24px;
line-height: 18px;
color: #c9c9c9ff;
justify-content: space-between;
&-right {
......
......@@ -8,207 +8,29 @@
<template>
<div class="right">
<!-- 右侧第一个盒子 -->
<div class="right-box1">
<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">
<!-- <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>
<purchaseRank></purchaseRank>
<!-- 右侧第二个盒子 -->
<purchaseProgress></purchaseProgress>
<!-- 右侧第三个盒子 -->
<PurchasePropertion></PurchasePropertion>
</div>
</template>
<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 {
name: 'ContentRight',
components: {
RightViewContent
purchaseRank,
purchaseProgress,
PurchasePropertion
},
data() {
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']
}
return {}
},
methods: {
switchPurchase() {
this.isShow = !this.isShow
},
selectPurchase(item) {
console.log(item)
this.purchase = item
this.switchPurchase()
}
}
}
</script>
......@@ -227,67 +49,6 @@ export default {
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 {
.content-box {
padding: 3.78vh 1.39vw 1.39vh;
......
......@@ -51,7 +51,8 @@ export default {
width: 20%;
}
.legend {
flex: 1;
// flex: 1;
width: 65%;
}
}
</style>
<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', 'price'],
height: '15.34vh',
// colors: ['#34AFFF', '#FFC200', '#16E193']
colors: ['#4FA0FF', '#7CFFB2', '#FDF006']
},
// 采购进度数据
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 0;
}
}
</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: '商品2',
per: 0.2,
price: 4568,
averagePrice: 668
},
{
name: '商品3',
per: 0.16,
price: 4568,
averagePrice: 668
},
{
name: '品1发货',
per: 0.1,
price: 4568,
averagePrice: 668
},
{
name: '商品5',
per: 0.09,
price: 4568,
averagePrice: 668
},
{
name: '商品6',
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;
.content-box {
padding: 3.78vh 1.39vw 1.39vh 0;
}
}
</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>
......@@ -11,7 +11,7 @@
<!-- 采购趋势 -->
<div class="tendency-box">
<box-title title="近一年采购额趋势"></box-title>
<Charts></Charts>
<BarLineChart ref="purchaseTrend" height="31.78vh" domId="purchaseTrend" :dataList.sync="dataList" :tooltipFormatterObj="tooltipFormatterObj"></BarLineChart>
</div>
<!-- 商品占比 -->
<div class="propotion-box flex">
......@@ -31,14 +31,32 @@
</template>
<script>
import { changeMixin } from '@/mixins'
import RightViewContent from '../home/solar/RightViewContent.vue'
export default {
name: 'SolarDetail',
mixins: [changeMixin],
components: {
RightViewContent
},
data() {
return {
tooltipFormatterObj: [
{
label: '商城',
attrName: 'data1'
},
{
label: '自采',
attrName: 'data2'
},
{
label: '占比',
attrName: 'data3',
addSymbol: '%'
}
],
dataList: [],
solarDetailList: [
{
name: '总采购额',
......@@ -87,13 +105,13 @@ export default {
averagePrice: 668
},
{
goodsName: '商品1',
goodsName: '商品2',
per: 0.2,
price: 4568,
averagePrice: 668
},
{
goodsName: '商品1',
goodsName: '商品3',
per: 0.16,
price: 4568,
averagePrice: 668
......@@ -105,13 +123,13 @@ export default {
averagePrice: 668
},
{
goodsName: '商品1',
goodsName: '商品4',
per: 0.09,
price: 4568,
averagePrice: 668
},
{
goodsName: '商品1',
goodsName: '商品5',
per: 0.09,
price: 4568,
averagePrice: 668
......@@ -150,13 +168,13 @@ export default {
averagePrice: 668
},
{
goodsName: '商品1',
goodsName: '商品5',
per: 0.2,
price: 4568,
averagePrice: 668
},
{
goodsName: '商品1',
goodsName: '商品6',
per: 0.16,
price: 4568,
averagePrice: 668
......@@ -168,13 +186,13 @@ export default {
averagePrice: 668
},
{
goodsName: '商品1',
goodsName: '商品7',
per: 0.09,
price: 4568,
averagePrice: 668
},
{
goodsName: '商品1',
goodsName: '商品8',
per: 0.09,
price: 4568,
averagePrice: 668
......@@ -200,7 +218,24 @@ export default {
}
},
mounted() {},
methods: {}
methods: {
init() {
const p = new Promise((resolve) => {
for (let i = 0; i < 12; i++) {
this.dataList.push({
month: i + 1 + '月',
data1: +(Math.random() * 2000).toFixed(2),
data2: +(Math.random() * 5000).toFixed(2),
data3: +(Math.random() * 50).toFixed(2)
})
}
resolve()
})
p.then(() => {
this.$refs.purchaseTrend.drawBarLine()
})
}
}
}
</script>
......@@ -229,6 +264,9 @@ export default {
height: 25.33vh;
box-shadow: inset 0 0 20px 0 #3d57ff69;
}
.content-box {
padding: 1.78vh 6.18vw 4.44vh 0;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!