Commit ab14d4ba by 匡雅琴

根据真实数据调整样式

1 parent 9bf8fe6b
......@@ -10,10 +10,11 @@
</template>
<template v-else>
<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-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>
</template>
</div>
......
......@@ -85,7 +85,8 @@ export default {
height: 25vh;
margin-bottom: 1.78vh;
.content-box {
padding: 2.78vh 1.39vw 2.78vh 0;
// padding: 2.78vh 1.39vw 2.78vh 0;
height: 21.67vh;
}
.empty {
height: 21.67vh;
......
......@@ -43,13 +43,13 @@ export default {
name: 'purchaseamount',
hasIcon: '¥',
type: 'number',
width: '3.06vw'
width: '4.06vw'
},
{
name: 'averprice',
hasIcon: '均价¥',
type: 'number',
width: '4.24vw'
width: '6.24vw'
}
]
}
......@@ -69,7 +69,7 @@ export default {
this.openMessage('获取商品采购占比失败')
return
}
this.propertionData = res.data.dataList[0].shopgoodsRatioList || []
this.propertionData = res.data.dataList[0].shopgoodsRatioList.slice(0, 6) || []
})
}
}
......@@ -83,7 +83,8 @@ export default {
box-shadow: inset 0 0 20px 0 #3d57ff69;
height: 25vh;
.content-box {
padding: 2.78vh 1.39vw 2.78vh 0;
// padding: 2.78vh 1.39vw 2.78vh 0;
height: 21.67vh;
}
.empty {
height: 21.67vh;
......
......@@ -48,6 +48,7 @@ export default {
.pie-chart {
// width: 138px;
// height: 138px;
margin-top: 2.44vh;
width: 20%;
}
.legend {
......
<template>
<div class="storage-box">
<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>
<Legend class="legend" :list="listData" :legentList="legentList" :colors="chart.colors"></Legend>
</div>
......@@ -27,14 +27,17 @@ export default {
listData: [],
legentList: [
{
name: 'isused'
name: 'isused',
width: '4vw'
},
{
name: 'rate',
type: 'decimal'
type: 'decimal',
width: '2vw'
},
{
name: 'num'
name: 'num',
width: '1.88vw'
}
]
}
......@@ -66,6 +69,9 @@ export default {
width: 19.72vw;
height: 32vh;
box-shadow: inset 0 0 20px 0 #3d57ff69;
.content-box {
margin-top: 2.44vh;
}
.legend {
padding: 0.96vh 2.78vw 0;
}
......
......@@ -131,8 +131,8 @@ export default {
this.openMessage('获取门店商品采购占比失败')
return
}
this.shopmallData = res.data.dataList[0].selfgoodsRatioList || []
this.selfPickData = res.data.dataList[0].shopgoodsRatioList || []
this.shopmallData = res.data.dataList[0].selfgoodsRatioList.slice(0, 6) || []
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!