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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<template>
  <!-- 设备可动率 -->
  <div id="movablerate" class="global-content backgroundrgb">
    <div class="width80 height margin-auto overflow">
      <div class="width margintopbot flex align-center justify-end">
        <label class="color909399 fontsiez1rem">查询日期:</label>
        <el-date-picker
          class="margin-right"
          v-model="pickertime"
          size="mini"
          type="daterange"
          value-format="yyyy-MM-dd"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        >
        </el-date-picker>
        <el-button class="margin-right" type="primary" size="mini" @click="inquer">查询</el-button>
      </div>
      <div class="height-calc overflowy-auto">
        <div class="width height48 overflow margin-top10px">
          <movablerate-echart
            class="width height"
            colors="#fff"
            echarttitle="堆垛机-设备可动率"
            :chartData="chartData"
            :colorList="colorList"
          />
        </div>
        <div class="width height48 overflow margin-top10px">
          <movablerate-echart
            class="width height"
            colors="#fff"
            echarttitle="RGV-设备可动率"
            :chartData="rgvdata"
            :colorList="colorList"
          />
        </div>
      </div>
    </div>
  </div>
</template>
 
<script>
import { GetDevMovable } from '@/api/reportforms';
import { GetDateStr } from '@/utils/date';
import MovablerateEchart from '@/views/Home/components/movablerateechart.vue';
export default {
  data() {
    return {
      pickertime: [GetDateStr(-15), GetDateStr(0)],
      chartData: {},
      rgvdata: {},
      colorList: [
        '#0090FF',
        '#36CE9E',
        '#FFC005',
        '#FF515A',
        '#8B5CFF',
        '#00CA69',
        '#F3A43B',
        '#D7504B',
        '#C6E579',
        '#F0805A',
        '#26C0C0',
        '#660077',
        '#FFCCCC',
        '#550088',
        '#FFFFBB',
        '#99FFFF',
        '#CC00CC',
        '#CC00CC',
        '#C63300',
        '#9955FF',
        '#66FF66',
        '#B5C334',
        '#FCCE10',
        '#27727B',
        '#FE8463',
        '#FAD860',
        '#F3A43B',
        '#D7504B',
        '#C6E579',
        '#F0805A',
        '#26C0C0',
        '#660077',
        '#FFCCCC',
        '#550088',
        '#FFAA33',
        '#CC00CC',
        '#FF77FF',
        '#C63300',
        '#F4E001',
        '#66FF66'
      ]
    };
  },
  components: { MovablerateEchart },
  computed: {},
  mounted() {
    this.GetDevMovable();
    this.GetRGVDevMovable();
  },
  methods: {
    inquer() {
      this.GetDevMovable();
      this.GetRGVDevMovable();
    },
    //堆垛机
    GetDevMovable() {
      let objtimes = {
        startTime: this.pickertime ? this.pickertime[0] : '',
        endTime: this.pickertime ? this.pickertime[1] : '',
        type: 1
      };
      GetDevMovable(objtimes).then(res => {
        this.chartData = res;
      });
    },
    //RGV
    GetRGVDevMovable() {
      let objtimes = {
        startTime: this.pickertime ? this.pickertime[0] : '',
        endTime: this.pickertime ? this.pickertime[1] : '',
        type: 2
      };
      GetDevMovable(objtimes).then(res => {
        this.rgvdata = res;
      });
    }
  }
};
</script>
 
<style lang="scss" scoped></style>