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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<template>
  <div id="Homes" class="global-content">
    <div class="box-top flex justify-between overflow">
      <div class="top-left">
        <left-top :navobj="topleftobj" />
        <div class="width flex align-center applyheight margin2">
          <class-echart titleechart="零件来源分布" colors="#fff" :chartData="chartData" class="width height" />
          <class-echart titleechart="器具来源分布" colors="#fff" :chartData="applianceData" class="width height" />
        </div>
      </div>
      <div class="top-centent">
        <p class="colorfff padding10 fontsize2rem text-center pointer" @click="clickFullscreen">
          智能化冲压立体库数据中心
        </p>
      </div>
      <div class="top-right">
        <div class="width height48 overflow margin-top10px">
          <movablerate-echart
            colors="#fff"
            class="width height"
            echarttitle="堆垛机"
            :chartData="movalData"
            :colorList="colorList"
          />
        </div>
        <div class="width height48 overflow margin-top10px">
          <movablerate-echart
            colors="#fff"
            class="width height"
            echarttitle="RGV"
            :chartData="rgvdata"
            :colorList="colorList"
          />
        </div>
      </div>
    </div>
    <div class="box-bottom flex justify-between overflow">
      <div class="height width25">
        <tasktime-echart class="width height" colors="#fff" :chartData="tasktimeData" :colorList="colorList" />
      </div>
      <div class="height width25">
        <task-echart class="width height" colors="#fff" :chartData="taskData" :colorList="taskcolorList" />
      </div>
      <div class="height width25">
        <warehouse-echart class="width height" colors="#fff" :chartData="wareData" :colorList="taskcolorList" />
      </div>
      <div class="height width25">
        <turnover-echart class="width height" colors="#fff" :chartData="turnoverData" :colorList="taskcolorList" />
      </div>
    </div>
  </div>
</template>
 
<script>
import screenfull from 'screenfull';
import { GetDateStr } from '@/utils/date';
import LeftTop from './components/lefttop.vue';
import ClassEchart from './components/sourceEchart.vue'; //制件分类
import TaskEchart from './components/meterEchart.vue'; //任务节拍分析
import MovablerateEchart from './components/movablerateechart.vue'; //设备可动
import TasktimeEchart from './components/tasktimeecharts.vue'; //平均时长
import WarehouseEchart from './components/warehouseechart.vue'; //货格利用率
import TurnoverEchart from './components/turnoverEchart.vue'; //制件周转
import {
  GetStockClassificationData,
  GetInOutAverageTime,
  GetTaskBeatAnalysis,
  GetPartTurnover,
  GetStorageVailability,
  GetDevMovable
} from '@/api/reportforms';
 
export default {
  data() {
    return {
      topleftobj: {
        titel: '立库总览',
        list: [
          {
            titel: '库位总数',
            value: 0
          },
          {
            titel: '有货库位',
            value: 0
          },
          {
            titel: '带件器具',
            value: 0
          },
          {
            titel: '空器具数',
            value: 0
          },
          {
            titel: '制件总数',
            value: 0
          }
        ]
      },
      toprightobj: {
        titel: '制件总览',
        list: [
          {
            titel: '制件总数',
            value: 100
          },
          {
            titel: '制件种类',
            value: 100
          },
          {
            titel: '今日入库',
            value: 100
          },
          {
            titel: '今日出库',
            value: 100
          }
        ]
      },
      pickertime: [GetDateStr(-15), GetDateStr(0)],
      chartData: {},
      applianceData: {},
      tasktimeData: {},
      taskData: {},
      turnoverData: {},
      wareData: {},
      movalData: {},
      rgvdata: {},
      taskcolorList: ['#0090FF', '#36CE9E', '#FFC005', '#FF515A', '#8B5CFF', '#00CA69'],
      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: { LeftTop, ClassEchart, MovablerateEchart, TasktimeEchart, TaskEchart, TurnoverEchart, WarehouseEchart },
  mounted() {
    this.$nextTick(() => {
      this.clickFullscreen();
    });
    this.GetStockClassificationData();
    this.applianceDataficationData();
    this.GetInOutAverageTime();
    this.GetTaskBeatAnalysis();
    this.GetPartTurnover();
    this.GetStorageVailability();
    this.GetDevMovable();
    this.GetRGVDevMovable();
  },
  methods: {
    clickFullscreen() {
      screenfull.toggle();
    },
    //零件来源
    GetStockClassificationData() {
      GetStockClassificationData({ type: 1 }).then(res => {
        this.chartData = res;
      });
    },
    //器具来源
    applianceDataficationData() {
      GetStockClassificationData({ type: 2 }).then(res => {
        this.applianceData = res;
      });
    },
    //平均时长
    GetInOutAverageTime() {
      let startTime = this.pickertime ? this.pickertime[0] : '';
      let endTime = this.pickertime ? this.pickertime[1] : '';
      GetInOutAverageTime({ startTime: startTime, endTime: endTime }).then(res => {
        this.tasktimeData = res;
      });
    },
    //任务节拍
    GetTaskBeatAnalysis() {
      GetTaskBeatAnalysis({ startTime: this.pickertime }).then(res => {
        this.taskData = res;
      });
    },
    //货格利用率
    GetStorageVailability() {
      let objtimes = {
        startTime: this.pickertime ? this.pickertime[0] : '',
        endTime: this.pickertime ? this.pickertime[1] : ''
      };
      GetStorageVailability(objtimes).then(res => {
        this.wareData = res;
      });
    },
    //制件周转·1
    GetPartTurnover() {
      let intimers = {
        year: '',
        month: '',
        stWeek: '',
        edWeek: ''
      };
      GetPartTurnover(intimers).then(res => {
        this.turnoverData = res;
      });
    },
    //堆垛机
    GetDevMovable() {
      let objtimes = {
        startTime: this.pickertime ? this.pickertime[0] : '',
        endTime: this.pickertime ? this.pickertime[1] : '',
        type: 1
      };
      GetDevMovable(objtimes).then(res => {
        this.movalData = 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>
#Homes {
  background-color: #1c456b;
  // background: url('../../assets/home/homebg1.jpg') no-repeat;
  // background-size: 100% 100%;
  overflow: hidden;
  .box-top {
    width: 100%;
    height: 64%;
    .top-left {
      width: 28%;
      height: 100%;
    }
    .top-centent {
      width: 42%;
      height: 100%;
    }
    .top-right {
      width: 28%;
      height: 100%;
    }
  }
  .box-bottom {
    width: 100%;
    height: 34%;
    margin-top: 10px;
  }
}
</style>