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="rateequipment" class="global-content">
    <div class="width 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 type="primary" size="mini" @click="inquer">查询</el-button>
      <el-button type="primary" size="mini" @click="linkto">跳转</el-button>
    </div>
    <div class="heightclacimport overflowy-auto">
      <div class="width height48 overflow margin-top10px">
        <rateequipment-echart class="width height" echarttitle="堆垛机" :chartData="chartData" :colorList="colorList" />
      </div>
      <div class="width height48 overflow margin-top10px">
        <rateequipment-echart class="width height" echarttitle="RGV" :chartData="rgvdata" :colorList="colorList" />
      </div>
    </div>
  </div>
</template>
 
<script>
import { GetDevAvailability } from '@/api/reportforms';
import { GetDateStr } from '@/utils/date';
import resize from '@/mixins/resize';
import RateequipmentEchart from '@/views/Home/components/rateequipment.vue';
const echarts = require('echarts');
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'
      ]
    };
  },
  mixins: [resize],
  components: { RateequipmentEchart },
  computed: {},
  mounted() {
    this.GetDevAvailability();
    this.GetRGVDevMovable();
  },
  methods: {
    inquer() {
      this.GetDevAvailability();
      this.GetRGVDevMovable();
    },
    //跳转
    linkto() {
      const { href } = this.$router.resolve({
        path: '/rateequipment'
      });
      window.open(href, '_blank');
    },
    //堆垛机
    GetDevAvailability() {
      let objtimes = {
        startTime: this.pickertime ? this.pickertime[0] : '',
        endTime: this.pickertime ? this.pickertime[1] : '',
        type: 1
      };
      GetDevAvailability(objtimes).then(res => {
        this.chartData = res;
      });
    },
    //RGV
    GetRGVDevMovable() {
      let objtimes = {
        startTime: this.pickertime ? this.pickertime[0] : '',
        endTime: this.pickertime ? this.pickertime[1] : '',
        type: 2
      };
      GetDevAvailability(objtimes).then(res => {
        this.rgvdata = res;
      });
    }
  }
};
</script>
 
<style lang="scss" scoped>
#rateequipment {
}
</style>