Commit e48dbd15 by 匡雅琴

详情页样式调整

1 parent 620387f8
......@@ -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 {
......
......@@ -51,7 +51,8 @@ export default {
width: 20%;
}
.legend {
flex: 1;
// flex: 1;
width: 65%;
}
}
</style>
......@@ -19,9 +19,10 @@ export default {
// 采购进度饼图结构
progressChart: {
id: 'progress',
keys: ['isDelivery', 'per'],
keys: ['isDelivery', 'price'],
height: '15.34vh',
colors: ['#34AFFF', '#FFC200', '#16E193']
// colors: ['#34AFFF', '#FFC200', '#16E193']
colors: ['#4FA0FF', '#7CFFB2', '#FDF006']
},
// 采购进度数据
progressData: [
......@@ -36,7 +37,7 @@ export default {
price: 4568
},
{
isDelivery: '已发货',
isDelivery: '已入库',
per: 0.44,
price: 4568
}
......@@ -71,7 +72,7 @@ export default {
height: 25vh;
margin-bottom: 1.78vh;
.content-box {
padding: 3.78vh 1.39vw 1.39vh;
padding: 3.78vh 1.39vw 1.39vh 0;
}
}
</style>
......@@ -32,13 +32,13 @@ export default {
averagePrice: 668
},
{
name: '商品1',
name: '商品2',
per: 0.2,
price: 4568,
averagePrice: 668
},
{
name: '商品1',
name: '商品3',
per: 0.16,
price: 4568,
averagePrice: 668
......@@ -50,13 +50,13 @@ export default {
averagePrice: 668
},
{
name: '商品1',
name: '商品5',
per: 0.09,
price: 4568,
averagePrice: 668
},
{
name: '商品1',
name: '商品6',
per: 0.09,
price: 4568,
averagePrice: 668
......@@ -94,5 +94,8 @@ export default {
background: #061422;
box-shadow: inset 0 0 20px 0 #3d57ff69;
height: 25vh;
.content-box {
padding: 3.78vh 1.39vw 1.39vh 0;
}
}
</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!