Commit e48dbd15 by 匡雅琴

详情页样式调整

1 parent 620387f8
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
.legend-item { .legend-item {
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
line-height: 24px; line-height: 18px;
color: #c9c9c9ff; color: #c9c9c9ff;
justify-content: space-between; justify-content: space-between;
&-right { &-right {
......
...@@ -51,7 +51,8 @@ export default { ...@@ -51,7 +51,8 @@ export default {
width: 20%; width: 20%;
} }
.legend { .legend {
flex: 1; // flex: 1;
width: 65%;
} }
} }
</style> </style>
...@@ -19,9 +19,10 @@ export default { ...@@ -19,9 +19,10 @@ export default {
// 采购进度饼图结构 // 采购进度饼图结构
progressChart: { progressChart: {
id: 'progress', id: 'progress',
keys: ['isDelivery', 'per'], keys: ['isDelivery', 'price'],
height: '15.34vh', height: '15.34vh',
colors: ['#34AFFF', '#FFC200', '#16E193'] // colors: ['#34AFFF', '#FFC200', '#16E193']
colors: ['#4FA0FF', '#7CFFB2', '#FDF006']
}, },
// 采购进度数据 // 采购进度数据
progressData: [ progressData: [
...@@ -36,7 +37,7 @@ export default { ...@@ -36,7 +37,7 @@ export default {
price: 4568 price: 4568
}, },
{ {
isDelivery: '已发货', isDelivery: '已入库',
per: 0.44, per: 0.44,
price: 4568 price: 4568
} }
...@@ -71,7 +72,7 @@ export default { ...@@ -71,7 +72,7 @@ export default {
height: 25vh; height: 25vh;
margin-bottom: 1.78vh; margin-bottom: 1.78vh;
.content-box { .content-box {
padding: 3.78vh 1.39vw 1.39vh; padding: 3.78vh 1.39vw 1.39vh 0;
} }
} }
</style> </style>
...@@ -32,13 +32,13 @@ export default { ...@@ -32,13 +32,13 @@ export default {
averagePrice: 668 averagePrice: 668
}, },
{ {
name: '商品1', name: '商品2',
per: 0.2, per: 0.2,
price: 4568, price: 4568,
averagePrice: 668 averagePrice: 668
}, },
{ {
name: '商品1', name: '商品3',
per: 0.16, per: 0.16,
price: 4568, price: 4568,
averagePrice: 668 averagePrice: 668
...@@ -50,13 +50,13 @@ export default { ...@@ -50,13 +50,13 @@ export default {
averagePrice: 668 averagePrice: 668
}, },
{ {
name: '商品1', name: '商品5',
per: 0.09, per: 0.09,
price: 4568, price: 4568,
averagePrice: 668 averagePrice: 668
}, },
{ {
name: '商品1', name: '商品6',
per: 0.09, per: 0.09,
price: 4568, price: 4568,
averagePrice: 668 averagePrice: 668
...@@ -94,5 +94,8 @@ export default { ...@@ -94,5 +94,8 @@ export default {
background: #061422; background: #061422;
box-shadow: inset 0 0 20px 0 #3d57ff69; box-shadow: inset 0 0 20px 0 #3d57ff69;
height: 25vh; height: 25vh;
.content-box {
padding: 3.78vh 1.39vw 1.39vh 0;
}
} }
</style> </style>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<!-- 采购趋势 --> <!-- 采购趋势 -->
<div class="tendency-box"> <div class="tendency-box">
<box-title title="近一年采购额趋势"></box-title> <box-title title="近一年采购额趋势"></box-title>
<Charts></Charts> <BarLineChart ref="purchaseTrend" height="31.78vh" domId="purchaseTrend" :dataList.sync="dataList" :tooltipFormatterObj="tooltipFormatterObj"></BarLineChart>
</div> </div>
<!-- 商品占比 --> <!-- 商品占比 -->
<div class="propotion-box flex"> <div class="propotion-box flex">
...@@ -31,14 +31,32 @@ ...@@ -31,14 +31,32 @@
</template> </template>
<script> <script>
import { changeMixin } from '@/mixins'
import RightViewContent from '../home/solar/RightViewContent.vue' import RightViewContent from '../home/solar/RightViewContent.vue'
export default { export default {
name: 'SolarDetail', name: 'SolarDetail',
mixins: [changeMixin],
components: { components: {
RightViewContent RightViewContent
}, },
data() { data() {
return { return {
tooltipFormatterObj: [
{
label: '商城',
attrName: 'data1'
},
{
label: '自采',
attrName: 'data2'
},
{
label: '占比',
attrName: 'data3',
addSymbol: '%'
}
],
dataList: [],
solarDetailList: [ solarDetailList: [
{ {
name: '总采购额', name: '总采购额',
...@@ -87,13 +105,13 @@ export default { ...@@ -87,13 +105,13 @@ export default {
averagePrice: 668 averagePrice: 668
}, },
{ {
goodsName: '商品1', goodsName: '商品2',
per: 0.2, per: 0.2,
price: 4568, price: 4568,
averagePrice: 668 averagePrice: 668
}, },
{ {
goodsName: '商品1', goodsName: '商品3',
per: 0.16, per: 0.16,
price: 4568, price: 4568,
averagePrice: 668 averagePrice: 668
...@@ -105,13 +123,13 @@ export default { ...@@ -105,13 +123,13 @@ export default {
averagePrice: 668 averagePrice: 668
}, },
{ {
goodsName: '商品1', goodsName: '商品4',
per: 0.09, per: 0.09,
price: 4568, price: 4568,
averagePrice: 668 averagePrice: 668
}, },
{ {
goodsName: '商品1', goodsName: '商品5',
per: 0.09, per: 0.09,
price: 4568, price: 4568,
averagePrice: 668 averagePrice: 668
...@@ -150,13 +168,13 @@ export default { ...@@ -150,13 +168,13 @@ export default {
averagePrice: 668 averagePrice: 668
}, },
{ {
goodsName: '商品1', goodsName: '商品5',
per: 0.2, per: 0.2,
price: 4568, price: 4568,
averagePrice: 668 averagePrice: 668
}, },
{ {
goodsName: '商品1', goodsName: '商品6',
per: 0.16, per: 0.16,
price: 4568, price: 4568,
averagePrice: 668 averagePrice: 668
...@@ -168,13 +186,13 @@ export default { ...@@ -168,13 +186,13 @@ export default {
averagePrice: 668 averagePrice: 668
}, },
{ {
goodsName: '商品1', goodsName: '商品7',
per: 0.09, per: 0.09,
price: 4568, price: 4568,
averagePrice: 668 averagePrice: 668
}, },
{ {
goodsName: '商品1', goodsName: '商品8',
per: 0.09, per: 0.09,
price: 4568, price: 4568,
averagePrice: 668 averagePrice: 668
...@@ -200,7 +218,24 @@ export default { ...@@ -200,7 +218,24 @@ export default {
} }
}, },
mounted() {}, 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> </script>
...@@ -229,6 +264,9 @@ export default { ...@@ -229,6 +264,9 @@ export default {
height: 25.33vh; height: 25.33vh;
box-shadow: inset 0 0 20px 0 #3d57ff69; box-shadow: inset 0 0 20px 0 #3d57ff69;
} }
.content-box {
padding: 1.78vh 6.18vw 4.44vh 0;
}
} }
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!