Commit ab14d4ba by 匡雅琴

根据真实数据调整样式

1 parent 9bf8fe6b
...@@ -10,10 +10,11 @@ ...@@ -10,10 +10,11 @@
</template> </template>
<template v-else> <template v-else>
<div class="flex item-content" :style="{ width: itm.width,'max-width': itm.width }"> <div class="flex item-content" :style="{ width: itm.width,'max-width': itm.width }">
<div v-show="itm.hasIcon">{{ itm.hasIcon }}</div> <!-- <div v-show="itm.hasIcon">{{ itm.hasIcon }}</div>
<div v-if="itm.type == 'number'">{{numAddSymbol(item[itm.name])}}</div> <div v-if="itm.type == 'number'">{{numAddSymbol(item[itm.name])}}</div>
<div v-else-if="itm.type == 'decimal'">{{toPercent(item[itm.name])}}</div> <div v-else-if="itm.type == 'decimal'">{{toPercent(item[itm.name])}}</div>
<div v-else>{{ item[itm.name] }}</div> <div v-else>{{ item[itm.name] }}</div> -->
{{ itm.hasIcon ? itm.hasIcon : '' }}{{ itm.type == 'number' ? numAddSymbol(item[itm.name]) : itm.type == 'decimal' ? toPercent(item[itm.name]) : item[itm.name] }}
</div> </div>
</template> </template>
</div> </div>
......
...@@ -85,7 +85,8 @@ export default { ...@@ -85,7 +85,8 @@ export default {
height: 25vh; height: 25vh;
margin-bottom: 1.78vh; margin-bottom: 1.78vh;
.content-box { .content-box {
padding: 2.78vh 1.39vw 2.78vh 0; // padding: 2.78vh 1.39vw 2.78vh 0;
height: 21.67vh;
} }
.empty { .empty {
height: 21.67vh; height: 21.67vh;
......
...@@ -43,13 +43,13 @@ export default { ...@@ -43,13 +43,13 @@ export default {
name: 'purchaseamount', name: 'purchaseamount',
hasIcon: '¥', hasIcon: '¥',
type: 'number', type: 'number',
width: '3.06vw' width: '4.06vw'
}, },
{ {
name: 'averprice', name: 'averprice',
hasIcon: '均价¥', hasIcon: '均价¥',
type: 'number', type: 'number',
width: '4.24vw' width: '6.24vw'
} }
] ]
} }
...@@ -69,7 +69,7 @@ export default { ...@@ -69,7 +69,7 @@ export default {
this.openMessage('获取商品采购占比失败') this.openMessage('获取商品采购占比失败')
return return
} }
this.propertionData = res.data.dataList[0].shopgoodsRatioList || [] this.propertionData = res.data.dataList[0].shopgoodsRatioList.slice(0, 6) || []
}) })
} }
} }
...@@ -83,7 +83,8 @@ export default { ...@@ -83,7 +83,8 @@ export default {
box-shadow: inset 0 0 20px 0 #3d57ff69; box-shadow: inset 0 0 20px 0 #3d57ff69;
height: 25vh; height: 25vh;
.content-box { .content-box {
padding: 2.78vh 1.39vw 2.78vh 0; // padding: 2.78vh 1.39vw 2.78vh 0;
height: 21.67vh;
} }
.empty { .empty {
height: 21.67vh; height: 21.67vh;
......
...@@ -48,6 +48,7 @@ export default { ...@@ -48,6 +48,7 @@ export default {
.pie-chart { .pie-chart {
// width: 138px; // width: 138px;
// height: 138px; // height: 138px;
margin-top: 2.44vh;
width: 20%; width: 20%;
} }
.legend { .legend {
......
<template> <template>
<div class="storage-box"> <div class="storage-box">
<box-title title="入库使用情况"></box-title> <box-title title="入库使用情况"></box-title>
<div v-if="listData.length"> <div class="content-box" v-if="listData.length">
<pie-chart :id="chart.id" :keys="chart.keys" :list="listData" :height="chart.height" :colors="chart.colors"></pie-chart> <pie-chart :id="chart.id" :keys="chart.keys" :list="listData" :height="chart.height" :colors="chart.colors"></pie-chart>
<Legend class="legend" :list="listData" :legentList="legentList" :colors="chart.colors"></Legend> <Legend class="legend" :list="listData" :legentList="legentList" :colors="chart.colors"></Legend>
</div> </div>
...@@ -27,14 +27,17 @@ export default { ...@@ -27,14 +27,17 @@ export default {
listData: [], listData: [],
legentList: [ legentList: [
{ {
name: 'isused' name: 'isused',
width: '4vw'
}, },
{ {
name: 'rate', name: 'rate',
type: 'decimal' type: 'decimal',
width: '2vw'
}, },
{ {
name: 'num' name: 'num',
width: '1.88vw'
} }
] ]
} }
...@@ -66,6 +69,9 @@ export default { ...@@ -66,6 +69,9 @@ export default {
width: 19.72vw; width: 19.72vw;
height: 32vh; height: 32vh;
box-shadow: inset 0 0 20px 0 #3d57ff69; box-shadow: inset 0 0 20px 0 #3d57ff69;
.content-box {
margin-top: 2.44vh;
}
.legend { .legend {
padding: 0.96vh 2.78vw 0; padding: 0.96vh 2.78vw 0;
} }
......
...@@ -131,8 +131,8 @@ export default { ...@@ -131,8 +131,8 @@ export default {
this.openMessage('获取门店商品采购占比失败') this.openMessage('获取门店商品采购占比失败')
return return
} }
this.shopmallData = res.data.dataList[0].selfgoodsRatioList || [] this.shopmallData = res.data.dataList[0].selfgoodsRatioList.slice(0, 6) || []
this.selfPickData = res.data.dataList[0].shopgoodsRatioList || [] this.selfPickData = res.data.dataList[0].shopgoodsRatioList.slice(0, 6) || []
}) })
}, },
// 获取每个门店的 总采购额(总计、本月) 、商城采购额(总计、本月) 、自采采购额(总计、本月) // 获取每个门店的 总采购额(总计、本月) 、商城采购额(总计、本月) 、自采采购额(总计、本月)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!