Commit 9188fecd by 匡雅琴

添加空数据组件

1 parent 866f93bf
<template>
<div class="empty-box">
<div>
<img src="../assets/images/empty.png" class="empty-img" alt="" />
</div>
<div class="empty-text">暂无数据</div>
</div>
</template>
<script>
export default {
name: 'Empty',
data() {
return {}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.empty-box {
text-align: center;
}
.empty-img {
width: 11.11vw;
height: 5.98vh;
}
.empty-text {
font-weight: 400;
font-size: 12px;
color: #C9C9C9;
}
</style>
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding-bottom: 4px; padding-bottom: 0.89vh;
box-sizing: border-box; box-sizing: border-box;
&-left { &-left {
display: flex; display: flex;
......
<template> <template>
<div class="purchase-progress-box"> <div class="purchase-progress-box">
<box-title title="商城采购进度分析"></box-title> <box-title title="商城采购进度分析"></box-title>
<RightViewContent class="content-box" :chart="progressChart" :listData="progressData" :legentList="progressLegend" :legendColors="progressChart.colors"></RightViewContent> <RightViewContent v-if="progressData.length" class="content-box" :chart="progressChart" :listData="progressData" :legentList="progressLegend" :legendColors="progressChart.colors"></RightViewContent>
<div v-else class="empty">
<Empty></Empty>
</div>
</div> </div>
</template> </template>
...@@ -74,5 +77,10 @@ export default { ...@@ -74,5 +77,10 @@ export default {
.content-box { .content-box {
padding: 2.78vh 1.39vw 2.78vh 0; padding: 2.78vh 1.39vw 2.78vh 0;
} }
.empty {
height: 21.67vh;
display: flex;
align-items: center;
}
} }
</style> </style>
<template> <template>
<div class="purchase-propertion-box"> <div class="purchase-propertion-box">
<box-title title="商城采购额商品占比"></box-title> <box-title title="商城采购额商品占比"></box-title>
<RightViewContent class="content-box" :chart="propertionChart" :listData="propertionData" :legentList="propertionLegend" :legendColors="propertionChart.colors"></RightViewContent> <RightViewContent v-if="propertionData.length" class="content-box" :chart="propertionChart" :listData="propertionData" :legentList="propertionLegend" :legendColors="propertionChart.colors"></RightViewContent>
<div v-else class="empty">
<Empty></Empty>
</div>
</div> </div>
</template> </template>
...@@ -77,5 +80,10 @@ export default { ...@@ -77,5 +80,10 @@ export default {
.content-box { .content-box {
padding: 2.78vh 1.39vw 2.78vh 0; padding: 2.78vh 1.39vw 2.78vh 0;
} }
.empty {
height: 21.67vh;
display: flex;
align-items: center;
}
} }
</style> </style>
<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">
<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>
<div v-else class="empty">
<Empty></Empty>
</div>
</div>
</template> </template>
<script> <script>
...@@ -64,5 +69,10 @@ export default { ...@@ -64,5 +69,10 @@ export default {
.legend { .legend {
padding: 0.96vh 2.78vw 0; padding: 0.96vh 2.78vw 0;
} }
.empty {
height: 28.67vh;
display: flex;
align-items: center;
}
} }
</style> </style>
...@@ -33,11 +33,31 @@ ...@@ -33,11 +33,31 @@
<div class="propotion-box flex"> <div class="propotion-box flex">
<div class="propotion-box-left"> <div class="propotion-box-left">
<box-title title="商城采购商品占比"></box-title> <box-title title="商城采购商品占比"></box-title>
<RightViewContent class="content-box" :chart="shopmallChart" :listData="shopmallData" :legentList="shopmallLegend" :legendColors="shopmallChart.colors"></RightViewContent> <RightViewContent
v-if="shopmallData.length"
class="content-box"
:chart="shopmallChart"
:listData="shopmallData"
:legentList="shopmallLegend"
:legendColors="shopmallChart.colors"
></RightViewContent>
<div v-else class="empty">
<Empty></Empty>
</div>
</div> </div>
<div class="propotion-box-right"> <div class="propotion-box-right">
<box-title title="自采商品占比"></box-title> <box-title title="自采商品占比"></box-title>
<RightViewContent class="content-box" :chart="selfPickChart" :listData="selfPickData" :legentList="selfPickLegend" :legendColors="selfPickChart.colors"></RightViewContent> <RightViewContent
v-if="selfPickData.length"
class="content-box"
:chart="selfPickChart"
:listData="selfPickData"
:legentList="selfPickLegend"
:legendColors="selfPickChart.colors"
></RightViewContent>
<div v-else class="empty">
<Empty></Empty>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -168,7 +188,7 @@ export default { ...@@ -168,7 +188,7 @@ export default {
init() { init() {
console.log(this.$route.query, '999') console.log(this.$route.query, '999')
this.merchantList = this.$store.state.app.merchantRankingList this.merchantList = this.$store.state.app.merchantRankingList
console.log(this.merchantList, 'this.merchantList'); console.log(this.merchantList, 'this.merchantList')
this.businessTime = this.$store.state.app.solarTime this.businessTime = this.$store.state.app.solarTime
this.businessYear = this.$store.state.app.solarYear this.businessYear = this.$store.state.app.solarYear
const { merchantid, merchantname } = this.$route.query const { merchantid, merchantname } = this.$route.query
...@@ -261,6 +281,11 @@ export default { ...@@ -261,6 +281,11 @@ export default {
.content-box { .content-box {
padding: 1.78vh 6.18vw 4.44vh 0; padding: 1.78vh 6.18vw 4.44vh 0;
} }
.empty {
height: 22vh;
display: flex;
align-items: center;
}
} }
} }
.legend { .legend {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!