huang
2025-11-17 92a5d16f0474ead87744b4ca5cb04417247a0619
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
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
// PLC字段映射配置
// 不同模块的字段映射关系
 
// 仓储模块字段映射
export const storageModuleFields = {
  'onlineState': { 
    label: '联机状态',
    description: '工作模式:1mes模式 0单机模式'
  },
  'plcRequest': { 
    label: 'PLC请求',
    description: '任务请求 0无情求 1有请求'
  },
  'plcReport': { 
    label: 'PLC汇报',
    description: '任务汇报 0无汇报 1汇报 3未完成'
  },
  'finishA': { 
    label: '完成信号A',
    description: '完成1A'
  },
  'finishB': { 
    label: '完成信号B',
    description: '完成1B'
  },
  'state': { 
    label: '任务状态',
    description: '任务状态 : 0,无;1:吸片完成/上车完成'
  },
  'onePosition': { 
    label: '穿梭车',
    description: '穿梭车位置'
  },
  'twoPosition': { 
    label: '吸盘位置',
    description: '吸盘位置'
  },
  'mesSend': { 
    label: 'MES发送',
    description: '启动字 1启动 完成后 无情求时清0'
  },
  'mesConfirm': { 
    label: 'MES确认',
    description: '确认字'
  },
  'start': { 
    label: '起始位置',
    description: '起始工位'
  },
  'target': { 
    label: '目标位置',
    description: '目标工位'
  },
  'mesGlassCount': { 
    label: '玻璃数量',
    description: '任务数量'
  },
  'rawMargin1': { 
    label: '原片边距1',
    description: '原片信息'
  },
  'mesWidth1': { 
    label: '玻璃长边1',
    description: '原片信息'
  },
  'mesHeight1': { 
    label: '玻璃短边1',
    description: '原片信息'
  },
  'rawThickness1': { 
    label: '玻璃厚度1',
    description: '原片信息'
  },
  'rawMargin2': { 
    label: '原片边距2',
    description: '原片信息'
  },
  'mesWidth2': { 
    label: '玻璃长边2',
    description: '原片信息'
  },
  'mesHeight2': { 
    label: '玻璃短边2',
    description: '原片信息'
  },
  'rawThickness2': { 
    label: '玻璃厚度2',
    description: '原片信息'
  },
  'alarmInfo': { 
    label: '报警信息',
    description: '报警信号'
  }
};
 
// 上片模块字段映射
export const upperModuleFields = {
  'onlineState': { 
    label: '联机状态',
    description: '工作模式:1mes模式 0单机模式'
  },
  'plcRequest': { 
    label: 'PLC请求',
    description: '任务请求 0无情求 1有请求'
  },
  'plcReport': { 
    label: 'PLC汇报',
    description: '任务汇报 0无汇报 1汇报 3未完成'
  },
  'finishA': { 
    label: '完成信号A',
    description: '完成1A'
  },
  'finishB': { 
    label: '完成信号B',
    description: '完成1B'
  },
  'state': { 
    label: '设备状态',
    description: '任务状态 : 0,无;1:吸片完成/上车完成'
  },
  'onePosition': { 
    label: '一号位置',
    description: '穿梭车位置'
  },
  'twoPosition': { 
    label: '二号位置',
    description: '吸盘位置'
  },
  'mesSend': { 
    label: 'MES发送',
    description: '启动字 1启动 完成后 无情求时清0'
  },
  'mesConfirm': { 
    label: 'MES确认',
    description: '确认字'
  },
  'start': { 
    label: '起始位置',
    description: '起始工位'
  },
  'target': { 
    label: '目标位置',
    description: '目标工位'
  },
  'mesGlassCount': { 
    label: '玻璃数量',
    description: '任务数量'
  },
  'rawMargin1': { 
    label: '原片边距1',
    description: '原片信息'
  },
  'mesWidth1': { 
    label: '玻璃宽度1',
    description: '原片信息'
  },
  'mesHeight1': { 
    label: '玻璃高度1',
    description: '原片信息'
  },
  'rawThickness1': { 
    label: '玻璃厚度1',
    description: '原片信息'
  },
  'rawMargin2': { 
    label: '原片边距2',
    description: '原片信息'
  },
  'mesWidth2': { 
    label: '玻璃宽度2',
    description: '原片信息'
  },
  'mesHeight2': { 
    label: '玻璃高度2',
    description: '原片信息'
  },
  'rawThickness2': { 
    label: '玻璃厚度2',
    description: '原片信息'
  },
  'alarmInfo': { 
    label: '报警信息',
    description: '报警信号'
  }
};
 
// 切割模块字段映射
export const cuttingModuleFields = {
  'onlineState': { 
    label: '联机状态',
    description: '工作模式:1mes模式 0单机模式'
  },
  'plcRequest': { 
    label: 'PLC请求',
    description: '任务请求 0无情求 1有请求'
  },
  'plcReport': { 
    label: 'PLC汇报',
    description: '任务汇报 0无汇报 1汇报 3未完成'
  },
  'finishA': { 
    label: '完成信号A',
    description: '完成1A'
  },
  'finishB': { 
    label: '完成信号B',
    description: '完成1B'
  },
  'state': { 
    label: '设备状态',
    description: '任务状态 : 0,无;1:吸片完成/上车完成'
  },
  'mesSend': { 
    label: 'MES发送',
    description: '启动字 1启动 完成后 无情求时清0'
  },
  'mesConfirm': { 
    label: 'MES确认',
    description: '确认字'
  },
  'start': { 
    label: '起始位置',
    description: '起始工位'
  },
  'target': { 
    label: '目标位置',
    description: '目标工位'
  },
  'mesGlassCount': { 
    label: '玻璃数量',
    description: '任务数量'
  },
  'rawMargin1': { 
    label: '原片边距1',
    description: '原片信息'
  },
  'mesWidth1': { 
    label: '玻璃宽度1',
    description: '原片信息'
  },
  'mesHeight1': { 
    label: '玻璃高度1',
    description: '原片信息'
  },
  'rawThickness1': { 
    label: '玻璃厚度1',
    description: '原片信息'
  },
  'rawMargin2': { 
    label: '原片边距2',
    description: '原片信息'
  },
  'mesWidth2': { 
    label: '玻璃宽度2',
    description: '原片信息'
  },
  'mesHeight2': { 
    label: '玻璃高度2',
    description: '原片信息'
  },
  'rawThickness2': { 
    label: '玻璃厚度2',
    description: '原片信息'
  },
  'alarmInfo': { 
    label: '报警信息',
    description: '报警信号'
  }
};
 
// 钢化模块字段映射
export const temperingModuleFields = {
  'onlineState': { 
    label: '联机状态',
    description: '工作模式:1mes模式 0单机模式'
  },
  'plcRequest': { 
    label: 'PLC请求',
    description: '任务请求 0无情求 1有请求'
  },
  'plcReport': { 
    label: 'PLC汇报',
    description: '任务汇报 0无汇报 1汇报 3未完成'
  },
  'finishA': { 
    label: '完成信号A',
    description: '完成1A'
  },
  'finishB': { 
    label: '完成信号B',
    description: '完成1B'
  },
  'state': { 
    label: '设备状态',
    description: '任务状态 : 0,无;1:吸片完成/上车完成'
  },
  'mesSend': { 
    label: 'MES发送',
    description: '启动字 1启动 完成后 无情求时清0'
  },
  'mesConfirm': { 
    label: 'MES确认',
    description: '确认字'
  },
  'start': { 
    label: '起始位置',
    description: '起始工位'
  },
  'target': { 
    label: '目标位置',
    description: '目标工位'
  },
  'mesGlassCount': { 
    label: '玻璃数量',
    description: '任务数量'
  },
  'rawMargin1': { 
    label: '原片边距1',
    description: '原片信息'
  },
  'mesWidth1': { 
    label: '玻璃宽度1',
    description: '原片信息'
  },
  'mesHeight1': { 
    label: '玻璃高度1',
    description: '原片信息'
  },
  'rawThickness1': { 
    label: '玻璃厚度1',
    description: '原片信息'
  },
  'rawMargin2': { 
    label: '原片边距2',
    description: '原片信息'
  },
  'mesWidth2': { 
    label: '玻璃宽度2',
    description: '原片信息'
  },
  'mesHeight2': { 
    label: '玻璃高度2',
    description: '原片信息'
  },
  'rawThickness2': { 
    label: '玻璃厚度2',
    description: '原片信息'
  },
  'alarmInfo': { 
    label: '报警信息',
    description: '报警信号'
  }
};
 
// 大理片笼模块字段映射(立式理片)
export const verticalModuleFields = {
  'onlineState': { 
    label: '联机状态',
    description: 'FALSE:单机;TRUE:联机'
  },
  'plcRequest': { 
    label: 'PLC请求字',
    description: '0:无,1:请求'
  },
  'plcReport': { 
    label: 'PLC汇报字',
    description: '0:无,1:汇报'
  },
  'state1': { 
    label: '01状态',
    description: '0:空闲: 1上车完成 2任务完成 3未完成 8破损'
  },
  'state2': { 
    label: '02状态',
    description: '0:空闲: 1上车完成 2任务完成 3未完成 8破损'
  },
  'state3': { 
    label: '03状态',
    description: '0:空闲: 1上车完成 2任务完成 3未完成 8破损'
  },
  'state4': { 
    label: '04状态',
    description: '0:空闲: 1上车完成 2任务完成 3未完成 8破损'
  },
  'state5': { 
    label: '05状态',
    description: '0:空闲: 1上车完成 2任务完成 3未完成 8破损'
  },
  'state6': { 
    label: '06状态',
    description: '0:空闲: 1上车完成 2任务完成 3未完成 8破损'
  },
  'mesSend': { 
    label: 'MES发送字',
    description: '0:无,1:已发送'
  },
  'mesConfirm': { 
    label: 'MES确认字',
    description: '0:无,1:已确认'
  },
  'trainInfo': { 
    label: '车次信息',
    description: '车次信息'
  },
  'mesGlassId1': { 
    label: '玻璃id01',
    description: '玻璃ID 01'
  },
  'mesGlassId2': { 
    label: '玻璃id02',
    description: '玻璃ID 02'
  },
  'mesGlassId3': { 
    label: '玻璃id03',
    description: '玻璃ID 03'
  },
  'mesGlassId4': { 
    label: '玻璃id04',
    description: '玻璃ID 04'
  },
  'mesGlassId5': { 
    label: '玻璃id05',
    description: '玻璃ID 05'
  },
  'mesGlassId6': { 
    label: '玻璃id06',
    description: '玻璃ID 06'
  },
  'start1': { 
    label: '起始01',
    description: '起始位置 01'
  },
  'start2': { 
    label: '起始02',
    description: '起始位置 02'
  },
  'start3': { 
    label: '起始03',
    description: '起始位置 03'
  },
  'start4': { 
    label: '起始04',
    description: '起始位置 04'
  },
  'start5': { 
    label: '起始05',
    description: '起始位置 05'
  },
  'start6': { 
    label: '起始06',
    description: '起始位置 06'
  },
  'target1': { 
    label: '目标01',
    description: '目标位置 01'
  },
  'target2': { 
    label: '目标02',
    description: '目标位置 02'
  },
  'target3': { 
    label: '目标03',
    description: '目标位置 03'
  },
  'target4': { 
    label: '目标04',
    description: '目标位置 04'
  },
  'target5': { 
    label: '目标05',
    description: '目标位置 05'
  },
  'target6': { 
    label: '目标06',
    description: '目标位置 06'
  },
  'mesWidth1': { 
    label: '长边01',
    description: '玻璃长边01 单位mm*10'
  },
  'mesWidth2': { 
    label: '长边02',
    description: '玻璃长边02 单位mm*10'
  },
  'mesWidth3': { 
    label: '长边03',
    description: '玻璃长边03 单位mm*10'
  },
  'mesWidth4': { 
    label: '长边04',
    description: '玻璃长边04 单位mm*10'
  },
  'mesWidth5': { 
    label: '长边05',
    description: '玻璃长边05 单位mm*10'
  },
  'mesWidth6': { 
    label: '长边06',
    description: '玻璃长边06 单位mm*10'
  },
  'mesHeight1': { 
    label: '短边01',
    description: '玻璃短边01 单位mm*10'
  },
  'mesHeight2': { 
    label: '短边02',
    description: '玻璃短边02 单位mm*10'
  },
  'mesHeight3': { 
    label: '短边03',
    description: '玻璃短边03 单位mm*10'
  },
  'mesHeight4': { 
    label: '短边04',
    description: '玻璃短边04 单位mm*10'
  },
  'mesHeight5': { 
    label: '短边05',
    description: '玻璃短边05 单位mm*10'
  },
  'mesHeight6': { 
    label: '短边06',
    description: '玻璃短边06 单位mm*10'
  },
  'mesThickness1': { 
    label: '厚01',
    description: '玻璃厚度01 单位mm*10'
  },
  'mesThickness2': { 
    label: '厚02',
    description: '玻璃厚度02 单位mm*10'
  },
  'mesThickness3': { 
    label: '厚03',
    description: '玻璃厚度03 单位mm*10'
  },
  'mesThickness4': { 
    label: '厚04',
    description: '玻璃厚度04 单位mm*10'
  },
  'mesThickness5': { 
    label: '厚05',
    description: '玻璃厚度05 单位mm*10'
  },
  'mesThickness6': { 
    label: '厚06',
    description: '玻璃厚度06 单位mm*10'
  },
  'edgeDistance1': { 
    label: '靠边距01',
    description: '靠边距01 单位mm'
  },
  'edgeDistance2': { 
    label: '靠边距02',
    description: '靠边距02 单位mm'
  },
  'edgeDistance3': { 
    label: '靠边距03',
    description: '靠边距03 单位mm'
  },
  'edgeDistance4': { 
    label: '靠边距04',
    description: '靠边距04 单位mm'
  },
  'edgeDistance5': { 
    label: '靠边距05',
    description: '靠边距05 单位mm'
  },
  'edgeDistance6': { 
    label: '靠边距06',
    description: '靠边距06 单位mm'
  },
  'targetEdgeDistance1': { 
    label: '目标靠边距01',
    description: '目标靠边距01 单位mm'
  },
  'targetEdgeDistance2': { 
    label: '目标靠边距02',
    description: '目标靠边距02 单位mm'
  },
  'targetEdgeDistance3': { 
    label: '目标靠边距03',
    description: '目标靠边距03 单位mm'
  },
  'targetEdgeDistance4': { 
    label: '目标靠边距04',
    description: '目标靠边距04 单位mm'
  },
  'targetEdgeDistance5': { 
    label: '目标靠边距05',
    description: '目标靠边距05 单位mm'
  },
  'targetEdgeDistance6': { 
    label: '目标靠边距06',
    description: '目标靠边距06 单位mm'
  },
  'alarmInfo': { 
    label: '报警信号',
    description: '报警信号: 1:当前大车进片玻璃数量与mes读取到的数量不匹配; 2:同一车进片玻璃存在相同; 4:理片笼存在相同的进片玻璃; 8:进片任务数量与系统查询到的玻璃数量不匹配; 16:笼内格子剩余数量不足; 32:笼内格子剩余XX片预警; 64:直通片台存在玻璃,无法继续直通'
  }
};
 
// 获取指定模块的字段映射
export const getModuleFields = (moduleType) => {
  switch (moduleType) {
    case '仓储':
      return storageModuleFields;
    case '上片':
      return upperModuleFields;
    case '切割':
      return cuttingModuleFields;
    case '钢化':
      return temperingModuleFields;
    case '大理片':
      return verticalModuleFields;
    // 可以添加更多模块
    default:
      return storageModuleFields; // 默认返回仓储模块
  }
};
 
// 获取字段的标签
export const getFieldLabel = (moduleType, fieldName) => {
  const moduleFields = getModuleFields(moduleType);
  return moduleFields[fieldName]?.label || fieldName;
};
 
// 获取字段的描述
export const getFieldDescription = (moduleType, fieldName) => {
  const moduleFields = getModuleFields(moduleType);
  return moduleFields[fieldName]?.description || '';
};