wuyouming666
2023-09-01 0520aa93fff308bba5b2727cf4c13493895fb351
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
<style>
*{
    margin:0;
    padding:0;
  
}
.occupy{
    height:100%;
    width:10%;
    background-color:white;
    margin: 0px 8px 0px 8px;
    border:1px black solid;
    text-align:center;
    padding: 5px;
}
.el-col{
    margin-top:7px;
}
.biao{
    font-size:12px;
}
.zhi{
    font-size:18px;
    font-weight: bold;
}
.el-main{
    --el-main-padding: 0px;
}
.green{
    background-color:green;
}
.blue{
    background-color:blue;
}
.red{
    background-color:red;
}
.yellow{
    background-color:yellow;
}
.gezi{
    height:25px;
    width: 2.02px;
}
.gezi:nth-child(22) {
    margin-left:4px;
}
.gezi:nth-child(43) {
    margin-left:4px;
}
.gezi:nth-child(64) {
    margin-left:4px;
}
.gezi:nth-child(85) {
    margin-left:4px;
}
</style>
<template>
  <el-container   style="  height:90%;
    width:100%;">
  <!-- <el-header style="padding: 10px;"></el-header> -->
  <el-main>
  <div style="display:flex;justify-content: space-around;width: 75%;margin: 0 auto;">
  <el-input style="width:15%;" placeholder="Enter the glass lD"></el-input>
  <el-button type="primary">Manually feed the glass</el-button>
  <el-input style="width:15%;" placeholder="Enter the order number"></el-input>
  <el-button type="warning">Exit the glass by order number</el-button>
  </div>
  <div>
  <el-table :data="tableData" border style="width: 100%">
  <el-table-column prop="date" label="Coming out glass ID"></el-table-column>
  <el-table-column prop="name" label="The Grille number being used"></el-table-column>
  <el-table-column prop="address" label="Order number"></el-table-column>
  <el-table-column prop="address" label="Length and width"></el-table-column>
  <el-table-column prop="address" label="coating"></el-table-column>
  </el-table>
  <el-table :data="tableData" border style="width: 100%">
  <el-table-column prop="date" label="Incoming glass ID"></el-table-column>
  <el-table-column prop="name" label="The Grille number being used"></el-table-column>
  <el-table-column prop="address" label="Order number"></el-table-column>
  <el-table-column prop="address" label="Length and width"></el-table-column>
  <el-table-column prop="address" label="coating"></el-table-column>
  </el-table>
  </div>
  <div style="padding: 10px;display: flex;height:120px;">
  <div v-for="item in tableData" :key="item['cageno']" class="occupy">
  <el-col style="text-align:left;font-weight: bold;">#{{ item['cageno'] }}</el-col>
  <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;">
  <span class="biao">Usage</span><span class="zhi">{{ item['cell'] }}%</span>
  </el-col>
  <hr style="width:80%;margin: 0 auto;"/>
  <el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;">
  <span class="biao">Space (Pieces)</span><span class="zhi">{{ item['falg'] }}</span>
  </el-col>
  </div>
  </div>
  </el-main>
  <el-footer>
  <div class="demo-image__placeholder" style="text-align: center;">
  <div class="block">
    <el-image :src="require('@/img/xmjc.png')" style="height: 400px;"></el-image>
  </div>
  </div>
  <div style="display:flex;position: absolute;float:left;z-index: 999;top:435px;left:531px;">
  <div :class="getStatusClass(item.state)" v-for="item in cagelist1" :key="item['date']"></div>
  </div>
  <div style="display:flex;position: absolute;float:left;z-index: 999;top:435px;left: 794.2px;">
  <div :class="getStatusClass(item.state)" v-for="item in cagelist2" :key="item['date']"></div>
  </div>
  <div style="display:flex;position: absolute;float:left;z-index: 999;top:462px;left:531px;">
  <div :class="getStatusClass(item.state)" v-for="item in cagelist3" :key="item['date']"></div>
  </div>
  <div style="display:flex;position: absolute;float:left;z-index: 999;top:462px;left: 794.2px;">
  <div :class="getStatusClass(item.state)" v-for="item in cagelist4" :key="item['date']"></div>
  </div>
  </el-footer>
  </el-container>
  </template>
  
  <script>
 
  import {home,home2} from "../../api/home";
 
  
  export default {
  data() {
  return {
  tableData: [],
  cagelist1: [],
  cagelist2: [],
  cagelist3: [],
  cagelist4: [],
  form: {},
  src: "./img/xmjc.png"
  };
  },
  created() {
  this.load();
  },
  methods: {
  load() {
//   request.get("api/storageRack/load").then((res) => {
//   this.tableData = res.data.list;
//   });
//   request.get("/storageRack/loads").then((res) => {
//   this.cagelist1 = res.data.list1;
//   this.cagelist2 = res.data.list2;
//   this.cagelist3 = res.data.list3;
//   this.cagelist4 = res.data.list4;
//   });
 
home().then(res => {
    console.log(res.data.list);
    this.tableData = res.data.list;
      });
      home2().then(res => {
        this.cagelist1 = res.data.list1;
 this.cagelist2 = res.data.list2;
   this.cagelist3 = res.data.list3;
  this.cagelist4 = res.data.list4;
      });
  },
  getStatusClass(state) {
  if (state === 0) {
  return "green gezi";
  } else if (state === 1) {
  return "blue gezi";
  } else if (state === 2) {
  return "red gezi";
  } else {
  return "yellow gezi";
  }
  }
  }
  };
  </script>