<template>
|
<!-- 分类统计 -->
|
<div id="classified" class="global-content backgroundrgb">
|
<div class="width80 height margin-auto overflow flex">
|
<div class="width50 height overflow">
|
<classified-echart titleechart="零件来源分布" colors="#fff" :chartData="chartData" class="width height" />
|
</div>
|
<div class="width50 height overflow">
|
<classified-echart titleechart="器具来源分布" colors="#fff" :chartData="applianceData" class="width height" />
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import { GetStockClassificationData } from '@/api/reportforms';
|
import classifiedEchart from '@/views/Home/components/sourceEchart.vue';
|
export default {
|
data() {
|
return {
|
chartData: {},
|
applianceData: {}
|
};
|
},
|
components: { classifiedEchart },
|
computed: {},
|
mounted() {
|
this.GetStockClassificationData();
|
this.applianceDataficationData();
|
},
|
methods: {
|
//零件来源
|
GetStockClassificationData() {
|
GetStockClassificationData({ type: 1 }).then(res => {
|
this.chartData = res;
|
});
|
},
|
//器具来源
|
applianceDataficationData() {
|
GetStockClassificationData({ type: 2 }).then(res => {
|
this.applianceData = res;
|
});
|
}
|
}
|
};
|
</script>
|
|
<style lang="scss" scoped></style>
|