ke_junjie
2025-06-04 bb6e2230bb8ded3c5546bc4e4c282ee343754475
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<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>