ol-base-components 2.8.19 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/deploy.yml +81 -0
- package/package.json +1 -1
- package/src/App.vue +603 -583
- package/src/api/init.js +1 -1
- package/src/api/run.js +0 -2
- package/src/bin/initTemplate.js +1 -1
- package/src/package/form/src/index.vue +11 -0
- package/src/package/formSearch/src/index.vue +10 -0
- package/src/package/index.js +16 -16
- package/src/package/numberRange/index.js +7 -0
- package/src/package/numberRange/src/index.vue +351 -0
- package/src/api/swagger.js +0 -477
package/src/App.vue
CHANGED
|
@@ -1,583 +1,603 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="app">
|
|
3
|
-
<div>table组件案例</div>
|
|
4
|
-
<ol-search
|
|
5
|
-
:form-search-data="formSearchData"
|
|
6
|
-
@handleSearch="handleSearch"
|
|
7
|
-
@handleReset="handleReset"
|
|
8
|
-
url="/api/app/admission-info/paged-result"
|
|
9
|
-
/>
|
|
10
|
-
<!-- url="/api/app/admission-info/paged-result" -->
|
|
11
|
-
|
|
12
|
-
<ol-table
|
|
13
|
-
:paginations="paginations"
|
|
14
|
-
:empty-img="tableData.emptyImg"
|
|
15
|
-
:btnlist="[]"
|
|
16
|
-
url="/api/app/bind-record/bind-record-detail-pages"
|
|
17
|
-
:table-data="tableData"
|
|
18
|
-
:multiple-selection="multipleSelection"
|
|
19
|
-
@SelectionChange="SelectionChange"
|
|
20
|
-
@handleSizeChange="handleSizeChange"
|
|
21
|
-
@handleindexChange="handleindexChange"
|
|
22
|
-
></ol-table>
|
|
23
|
-
<el-button @click="handlePrint">接口</el-button>
|
|
24
|
-
<el-button @click="onAdd">新建</el-button>
|
|
25
|
-
<el-button @click="onEdit">编辑</el-button>
|
|
26
|
-
|
|
27
|
-
<!-- 编辑,查看弹窗 -->
|
|
28
|
-
<el-dialog :title="`${this.form.title}`" :visible.sync="dialogVisible" width="80%">
|
|
29
|
-
<ol-form
|
|
30
|
-
v-if="dialogVisible"
|
|
31
|
-
url="/api/app/admission-info/admission-info"
|
|
32
|
-
:form="form"
|
|
33
|
-
@onCancel="dialogVisible = false"
|
|
34
|
-
@onSubmit="onSubmit"
|
|
35
|
-
/>
|
|
36
|
-
</el-dialog>
|
|
37
|
-
|
|
38
|
-
<!-- <el-button @click="handlePrint">接口</el-button>
|
|
39
|
-
|
|
40
|
-
<div
|
|
41
|
-
class="ellipsis-container"
|
|
42
|
-
id="ellipsis-container"
|
|
43
|
-
v-for="item in 5"
|
|
44
|
-
:key="item"
|
|
45
|
-
>如何处理文本溢出如何实现单行文本溢出显示省略号</div>
|
|
46
|
-
|
|
47
|
-
<div class="triangle-up"></div>
|
|
48
|
-
<div class="grid-content">
|
|
49
|
-
<div>11</div>
|
|
50
|
-
<div>11</div>
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
<div class="container">
|
|
54
|
-
<div class="item">1</div>
|
|
55
|
-
<div class="item item2">2</div>
|
|
56
|
-
<div class="item">3</div>
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
<div class="square-container">
|
|
60
|
-
<div class="square"></div>
|
|
61
|
-
</div> -->
|
|
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
|
-
// value: "
|
|
181
|
-
// inputType: "select",
|
|
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
|
-
// value: "
|
|
260
|
-
//
|
|
261
|
-
//
|
|
262
|
-
//
|
|
263
|
-
//
|
|
264
|
-
//
|
|
265
|
-
//
|
|
266
|
-
//
|
|
267
|
-
//
|
|
268
|
-
//
|
|
269
|
-
// },
|
|
270
|
-
// {
|
|
271
|
-
// label: "
|
|
272
|
-
// value: "
|
|
273
|
-
// inputType: "
|
|
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
|
-
this
|
|
429
|
-
this.
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
this.
|
|
447
|
-
this.
|
|
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
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div id="app">
|
|
3
|
+
<div>table组件案例</div>
|
|
4
|
+
<ol-search
|
|
5
|
+
:form-search-data="formSearchData"
|
|
6
|
+
@handleSearch="handleSearch"
|
|
7
|
+
@handleReset="handleReset"
|
|
8
|
+
url="/api/app/admission-info/paged-result"
|
|
9
|
+
/>
|
|
10
|
+
<!-- url="/api/app/admission-info/paged-result" -->
|
|
11
|
+
|
|
12
|
+
<ol-table
|
|
13
|
+
:paginations="paginations"
|
|
14
|
+
:empty-img="tableData.emptyImg"
|
|
15
|
+
:btnlist="[]"
|
|
16
|
+
url="/api/app/bind-record/bind-record-detail-pages"
|
|
17
|
+
:table-data="tableData"
|
|
18
|
+
:multiple-selection="multipleSelection"
|
|
19
|
+
@SelectionChange="SelectionChange"
|
|
20
|
+
@handleSizeChange="handleSizeChange"
|
|
21
|
+
@handleindexChange="handleindexChange"
|
|
22
|
+
></ol-table>
|
|
23
|
+
<el-button @click="handlePrint">接口</el-button>
|
|
24
|
+
<el-button @click="onAdd">新建</el-button>
|
|
25
|
+
<el-button @click="onEdit">编辑</el-button>
|
|
26
|
+
|
|
27
|
+
<!-- 编辑,查看弹窗 -->
|
|
28
|
+
<el-dialog :title="`${this.form.title}`" :visible.sync="dialogVisible" width="80%">
|
|
29
|
+
<ol-form
|
|
30
|
+
v-if="dialogVisible"
|
|
31
|
+
url="/api/app/admission-info/admission-info"
|
|
32
|
+
:form="form"
|
|
33
|
+
@onCancel="dialogVisible = false"
|
|
34
|
+
@onSubmit="onSubmit"
|
|
35
|
+
/>
|
|
36
|
+
</el-dialog>
|
|
37
|
+
|
|
38
|
+
<!-- <el-button @click="handlePrint">接口</el-button>
|
|
39
|
+
|
|
40
|
+
<div
|
|
41
|
+
class="ellipsis-container"
|
|
42
|
+
id="ellipsis-container"
|
|
43
|
+
v-for="item in 5"
|
|
44
|
+
:key="item"
|
|
45
|
+
>如何处理文本溢出如何实现单行文本溢出显示省略号</div>
|
|
46
|
+
|
|
47
|
+
<div class="triangle-up"></div>
|
|
48
|
+
<div class="grid-content">
|
|
49
|
+
<div>11</div>
|
|
50
|
+
<div>11</div>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<div class="container">
|
|
54
|
+
<div class="item">1</div>
|
|
55
|
+
<div class="item item2">2</div>
|
|
56
|
+
<div class="item">3</div>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<div class="square-container">
|
|
60
|
+
<div class="square"></div>
|
|
61
|
+
</div> -->
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<script>
|
|
66
|
+
export default {
|
|
67
|
+
name: "App",
|
|
68
|
+
data() {
|
|
69
|
+
return {
|
|
70
|
+
quantity: 0,
|
|
71
|
+
multipleSelection: [],
|
|
72
|
+
tableData: {
|
|
73
|
+
loading: false,
|
|
74
|
+
emptyImg: true,
|
|
75
|
+
options: {
|
|
76
|
+
selection: true, // 多选框
|
|
77
|
+
index: false, // 序号EmployeeInfoCode
|
|
78
|
+
headTool: true, // 开启头部工具栏
|
|
79
|
+
refreshBtn: true, // 开启表格头部刷新按钮
|
|
80
|
+
downloadBtn: true, // 开启表格头部下载按钮
|
|
81
|
+
}, // 序号和复选框
|
|
82
|
+
rows: [
|
|
83
|
+
{
|
|
84
|
+
bindStateEnum: "11",
|
|
85
|
+
tagNumber: "22",
|
|
86
|
+
},
|
|
87
|
+
], // 表数据
|
|
88
|
+
columns: [
|
|
89
|
+
{
|
|
90
|
+
prop: "unit",
|
|
91
|
+
show: false,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
label: "一级表头",
|
|
95
|
+
beforeProp: "qty", // 位置
|
|
96
|
+
show: true,
|
|
97
|
+
children: [
|
|
98
|
+
{
|
|
99
|
+
label: "二级表头",
|
|
100
|
+
children: [
|
|
101
|
+
{
|
|
102
|
+
prop: "creationTime",
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
prop: "orginalBillNo",
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
prop: "roadWayCode",
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
prop: "batch",
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
label: "一级表头-1",
|
|
119
|
+
beforeProp: "containerType", // 位置
|
|
120
|
+
children: [
|
|
121
|
+
{
|
|
122
|
+
prop: "regionCode",
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
prop: "taskNo",
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
operates: [], // 表格里面的操作按钮
|
|
131
|
+
tableHeightDiff: 300,
|
|
132
|
+
},
|
|
133
|
+
paginations: {
|
|
134
|
+
page: 1, // 当前位于那页面
|
|
135
|
+
total: 10, // 总数
|
|
136
|
+
limit: 30, // 一页显示多少条
|
|
137
|
+
pagetionShow: true,
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
formSearchData: {
|
|
141
|
+
reset: true, // 重置
|
|
142
|
+
expendShow: true, // 展开
|
|
143
|
+
tableSearchSlice: 5,
|
|
144
|
+
value: {
|
|
145
|
+
DocNo: null, // 对应输入框的value字段
|
|
146
|
+
QualityCheckStateType: null,
|
|
147
|
+
QualityCheckState: null,
|
|
148
|
+
timer: [],
|
|
149
|
+
range: [10, 200],
|
|
150
|
+
},
|
|
151
|
+
tableSearch: [
|
|
152
|
+
{
|
|
153
|
+
label: "数字区间",
|
|
154
|
+
value: "range",
|
|
155
|
+
inputType: "numberRange",
|
|
156
|
+
originalFields: {
|
|
157
|
+
begin: "begin123",
|
|
158
|
+
end: "end123",
|
|
159
|
+
},
|
|
160
|
+
listeners: {
|
|
161
|
+
change: e => {
|
|
162
|
+
const {
|
|
163
|
+
val: [start, end],
|
|
164
|
+
} = e;
|
|
165
|
+
this.formSearchData.value.rang1 = start;
|
|
166
|
+
this.formSearchData.value.rang2 = end;
|
|
167
|
+
console.log(this.formSearchData, e);
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
// {
|
|
172
|
+
// label: "标签号",
|
|
173
|
+
// value: "carBodyTagNumber",
|
|
174
|
+
// inputType: "text"
|
|
175
|
+
// },
|
|
176
|
+
// {
|
|
177
|
+
// label: "车架号",
|
|
178
|
+
// value: "frameNumber",
|
|
179
|
+
// inputType: "text"
|
|
180
|
+
// // value: "QualityCheckStateType",
|
|
181
|
+
// // inputType: "select",
|
|
182
|
+
// // children: this.SET_enumsSelect({
|
|
183
|
+
// // keyword: "qualityCheckTypeEnum",
|
|
184
|
+
// // }),
|
|
185
|
+
// },
|
|
186
|
+
// {
|
|
187
|
+
// label: "项目号",
|
|
188
|
+
// value: "projectCode",
|
|
189
|
+
// inputType: "text"
|
|
190
|
+
// },
|
|
191
|
+
// {
|
|
192
|
+
// label: "状态描述",
|
|
193
|
+
// value: "statusDescription",
|
|
194
|
+
// inputType: "select",
|
|
195
|
+
// // 0整车/1白车身/2碰撞加固车身/3爆破切割车身/4侧面切割下车身
|
|
196
|
+
// children: [
|
|
197
|
+
// {
|
|
198
|
+
// key: 0,
|
|
199
|
+
// value: "整车"
|
|
200
|
+
// },
|
|
201
|
+
// {
|
|
202
|
+
// key: 1,
|
|
203
|
+
// value: "白车身"
|
|
204
|
+
// },
|
|
205
|
+
// {
|
|
206
|
+
// key: 2,
|
|
207
|
+
// value: "碰撞加固车身"
|
|
208
|
+
// },
|
|
209
|
+
// {
|
|
210
|
+
// key: 3,
|
|
211
|
+
// value: "爆破切割车身"
|
|
212
|
+
// },
|
|
213
|
+
// {
|
|
214
|
+
// key: 4,
|
|
215
|
+
// value: "侧面切割下车身"
|
|
216
|
+
// }
|
|
217
|
+
// ]
|
|
218
|
+
// },
|
|
219
|
+
// {
|
|
220
|
+
// label: "实验状态",
|
|
221
|
+
// value: "experimentStatus",
|
|
222
|
+
// inputType: "select",
|
|
223
|
+
// // 0实验前 1实验中 2实验后
|
|
224
|
+
// children: [
|
|
225
|
+
// {
|
|
226
|
+
// key: 0,
|
|
227
|
+
// value: "实验前"
|
|
228
|
+
// },
|
|
229
|
+
// {
|
|
230
|
+
// key: 1,
|
|
231
|
+
// value: "实验中"
|
|
232
|
+
// },
|
|
233
|
+
// {
|
|
234
|
+
// key: 2,
|
|
235
|
+
// value: "实验后"
|
|
236
|
+
// }
|
|
237
|
+
// ]
|
|
238
|
+
// },
|
|
239
|
+
// {
|
|
240
|
+
// label: "状态",
|
|
241
|
+
// value: "tagStatus",
|
|
242
|
+
// inputType: "select",
|
|
243
|
+
// children: []
|
|
244
|
+
// },
|
|
245
|
+
// {
|
|
246
|
+
// label: "车身类型",
|
|
247
|
+
// value: "bodyWorkType",
|
|
248
|
+
// inputType: "select",
|
|
249
|
+
// children: []
|
|
250
|
+
// },
|
|
251
|
+
// {
|
|
252
|
+
// label: "项目名称",
|
|
253
|
+
// value: "projectName",
|
|
254
|
+
// inputType: "text"
|
|
255
|
+
// },
|
|
256
|
+
// {
|
|
257
|
+
// label: "入场日期",
|
|
258
|
+
// inputType: "picker",
|
|
259
|
+
// value: "admissionDate",
|
|
260
|
+
// props: {
|
|
261
|
+
// valueFormat: "yyyy-MM-dd",
|
|
262
|
+
// format: "yyyy/MM/dd"
|
|
263
|
+
// }
|
|
264
|
+
// },
|
|
265
|
+
// {
|
|
266
|
+
// label: "打印次数",
|
|
267
|
+
// value: "tagPrintNumber",
|
|
268
|
+
// inputType: "number"
|
|
269
|
+
// },
|
|
270
|
+
// {
|
|
271
|
+
// label: "创建时间",
|
|
272
|
+
// value: "createdTime",
|
|
273
|
+
// inputType: "picker",
|
|
274
|
+
// props: {
|
|
275
|
+
// type: "datetimerange",
|
|
276
|
+
// startPlaceholder: "开始时间",
|
|
277
|
+
// endPlaceholder: "结束时间",
|
|
278
|
+
// placeholder: "选择时间范围",
|
|
279
|
+
// valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
280
|
+
// format: "yyyy/MM/dd HH:mm:ss"
|
|
281
|
+
// }
|
|
282
|
+
// },
|
|
283
|
+
// {
|
|
284
|
+
// label: "虚拟项目",
|
|
285
|
+
// value: "tempProject",
|
|
286
|
+
// inputType: "text"
|
|
287
|
+
// }
|
|
288
|
+
],
|
|
289
|
+
},
|
|
290
|
+
|
|
291
|
+
form: {
|
|
292
|
+
type: 0, // 0详情,1新增, 2编辑
|
|
293
|
+
title: "",
|
|
294
|
+
// 默认值
|
|
295
|
+
defaultValue: {},
|
|
296
|
+
value: {},
|
|
297
|
+
model: [
|
|
298
|
+
// {
|
|
299
|
+
// prop: "warehouseCode",
|
|
300
|
+
// },
|
|
301
|
+
{
|
|
302
|
+
label: "数量范围",
|
|
303
|
+
type: "numberRange",
|
|
304
|
+
prop: "range",
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
label: "项目名称",
|
|
308
|
+
type: "input",
|
|
309
|
+
prop: "projectName",
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
label: "项目状态",
|
|
313
|
+
type: "select",
|
|
314
|
+
prop: "projectStatus",
|
|
315
|
+
child: [
|
|
316
|
+
{
|
|
317
|
+
value: "正常",
|
|
318
|
+
key: 0,
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
value: "保密一级",
|
|
322
|
+
key: 1,
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
value: "保密二级",
|
|
326
|
+
key: 2,
|
|
327
|
+
},
|
|
328
|
+
],
|
|
329
|
+
},
|
|
330
|
+
],
|
|
331
|
+
rules: {
|
|
332
|
+
// employeePhoneNumber: [
|
|
333
|
+
// {
|
|
334
|
+
// required: true,
|
|
335
|
+
// message: "手机号不能为空",
|
|
336
|
+
// trigger: "blur",
|
|
337
|
+
// },
|
|
338
|
+
// {
|
|
339
|
+
// pattern: /^1[3-9]\d{9}$/,
|
|
340
|
+
// message: "请输入有效的手机号",
|
|
341
|
+
// trigger: "blur",
|
|
342
|
+
// },
|
|
343
|
+
// ],
|
|
344
|
+
projectCode: [
|
|
345
|
+
{
|
|
346
|
+
required: true,
|
|
347
|
+
message: "项目号不能为空",
|
|
348
|
+
trigger: "blur",
|
|
349
|
+
},
|
|
350
|
+
],
|
|
351
|
+
projectName: [
|
|
352
|
+
{
|
|
353
|
+
required: true,
|
|
354
|
+
message: "项目名称不能为空",
|
|
355
|
+
trigger: "blur",
|
|
356
|
+
},
|
|
357
|
+
],
|
|
358
|
+
projectStatus: [
|
|
359
|
+
{
|
|
360
|
+
required: true,
|
|
361
|
+
message: "项目状态不能为空",
|
|
362
|
+
trigger: "blur",
|
|
363
|
+
},
|
|
364
|
+
],
|
|
365
|
+
// productCode: [
|
|
366
|
+
// {
|
|
367
|
+
// required: true,
|
|
368
|
+
// message: "ALV零件号不能为空",
|
|
369
|
+
// trigger: "blur",
|
|
370
|
+
// },
|
|
371
|
+
// ],
|
|
372
|
+
productName: [
|
|
373
|
+
{
|
|
374
|
+
required: true,
|
|
375
|
+
message: "零件名称不能为空",
|
|
376
|
+
trigger: "blur",
|
|
377
|
+
},
|
|
378
|
+
],
|
|
379
|
+
qty: [
|
|
380
|
+
{
|
|
381
|
+
required: true,
|
|
382
|
+
message: "收货数量不能为空",
|
|
383
|
+
trigger: "blur",
|
|
384
|
+
},
|
|
385
|
+
],
|
|
386
|
+
receivedBatch: [
|
|
387
|
+
{
|
|
388
|
+
required: true,
|
|
389
|
+
message: "收货批次不能为空",
|
|
390
|
+
trigger: "blur",
|
|
391
|
+
},
|
|
392
|
+
],
|
|
393
|
+
employeeInfoId: [
|
|
394
|
+
{
|
|
395
|
+
required: true,
|
|
396
|
+
message: "接收人不能为空",
|
|
397
|
+
trigger: "blur",
|
|
398
|
+
},
|
|
399
|
+
],
|
|
400
|
+
// storageLocation: [
|
|
401
|
+
// {
|
|
402
|
+
// required: true,
|
|
403
|
+
// message: "外仓编码不能为空",
|
|
404
|
+
// trigger: "blur"
|
|
405
|
+
// }
|
|
406
|
+
// ]
|
|
407
|
+
},
|
|
408
|
+
attrs: {
|
|
409
|
+
labelWidth: "100px",
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
dialogVisible: false,
|
|
413
|
+
};
|
|
414
|
+
},
|
|
415
|
+
// onMounted() {
|
|
416
|
+
|
|
417
|
+
// },
|
|
418
|
+
mounted() {
|
|
419
|
+
// const el = document.getElementById("ellipsis-container");
|
|
420
|
+
// this.truncateMiddleByWidth(el)
|
|
421
|
+
},
|
|
422
|
+
methods: {
|
|
423
|
+
SelectionChange(row) {
|
|
424
|
+
this.multipleSelection = row;
|
|
425
|
+
},
|
|
426
|
+
handleSearch(from) {
|
|
427
|
+
this.formSearchData.value = { ...from };
|
|
428
|
+
this.paginations.page = 1;
|
|
429
|
+
this.getTable();
|
|
430
|
+
},
|
|
431
|
+
handleReset() {},
|
|
432
|
+
handleSizeChange(val) {
|
|
433
|
+
this.paginations.page = 1;
|
|
434
|
+
this.paginations.limit = val;
|
|
435
|
+
this.getTable();
|
|
436
|
+
},
|
|
437
|
+
handleindexChange(val) {
|
|
438
|
+
this.paginations.page = val;
|
|
439
|
+
this.getTable();
|
|
440
|
+
},
|
|
441
|
+
async handlePrint() {
|
|
442
|
+
const newColumns = JSON.parse(JSON.stringify(this.tableData.columns));
|
|
443
|
+
const temp = newColumns.find(e => e.label == "多级表头");
|
|
444
|
+
// temp.children[0].label = "3333";
|
|
445
|
+
// temp.children[0].show = false
|
|
446
|
+
this.$set(temp.children[0], "show", false);
|
|
447
|
+
this.tableData.columns = newColumns;
|
|
448
|
+
// this.$set(temp.children[0], 'show', false)
|
|
449
|
+
// temp.children.push({
|
|
450
|
+
// prop: 'containerType',
|
|
451
|
+
// label: '容器类型',
|
|
452
|
+
// show: true
|
|
453
|
+
// })
|
|
454
|
+
// this.tableData.columns.push({
|
|
455
|
+
// prop: 'aaaa',
|
|
456
|
+
// label: 'aaaa',
|
|
457
|
+
// show: true
|
|
458
|
+
// })
|
|
459
|
+
},
|
|
460
|
+
// ================
|
|
461
|
+
getTable() {
|
|
462
|
+
console.log("getTable参数", this.formSearchData.value);
|
|
463
|
+
},
|
|
464
|
+
handleSearch(from) {
|
|
465
|
+
this.formSearchData.value = { ...from };
|
|
466
|
+
this.paginations.page = 1;
|
|
467
|
+
this.getTable();
|
|
468
|
+
},
|
|
469
|
+
handleReset() {
|
|
470
|
+
for (let key in this.formSearchData.value) {
|
|
471
|
+
this.formSearchData.value[key] = null;
|
|
472
|
+
}
|
|
473
|
+
this.paginations.page = 1;
|
|
474
|
+
},
|
|
475
|
+
truncateMiddleByWidth(el) {
|
|
476
|
+
let text = el.textContent;
|
|
477
|
+
if (el.scrollWidth <= el.clientWidth) return;
|
|
478
|
+
const suffix = text.slice(-3);
|
|
479
|
+
let left = 0;
|
|
480
|
+
let right = text.length - 3;
|
|
481
|
+
let result = "";
|
|
482
|
+
while (left <= right) {
|
|
483
|
+
let mid = Math.floor((left + right) / 2);
|
|
484
|
+
const temp = text.slice(0, mid) + "..." + suffix;
|
|
485
|
+
el.textContent = temp;
|
|
486
|
+
if (el.scrollWidth <= el.clientWidth) {
|
|
487
|
+
result = temp;
|
|
488
|
+
left = mid + 1;
|
|
489
|
+
} else {
|
|
490
|
+
right = mid - 1;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
el.textContent = result;
|
|
494
|
+
},
|
|
495
|
+
onAdd() {
|
|
496
|
+
this.form.type = 1;
|
|
497
|
+
this.dialogVisible = true;
|
|
498
|
+
},
|
|
499
|
+
onEdit() {
|
|
500
|
+
this.form.type = 2;
|
|
501
|
+
this.dialogVisible = true;
|
|
502
|
+
},
|
|
503
|
+
async onSubmit(form) {
|
|
504
|
+
const { type } = this.form;
|
|
505
|
+
if (type === 1) {
|
|
506
|
+
// putAdmissioninfoByAdmissionId
|
|
507
|
+
// 新增
|
|
508
|
+
this.post({
|
|
509
|
+
url: StockIn.addStockIn,
|
|
510
|
+
data: this.form.value,
|
|
511
|
+
isLoading: true,
|
|
512
|
+
}).then(res => {
|
|
513
|
+
this.$message({ type: "success", message: "操作成功!" });
|
|
514
|
+
this.dialogVisible = false;
|
|
515
|
+
this.init();
|
|
516
|
+
});
|
|
517
|
+
} else if (type === 2) {
|
|
518
|
+
// 编辑
|
|
519
|
+
this.put({
|
|
520
|
+
url: `${StockIn.editStockIn}/${this.form.value.id}`,
|
|
521
|
+
data: this.form.value,
|
|
522
|
+
isLoading: true,
|
|
523
|
+
}).then(res => {
|
|
524
|
+
this.init();
|
|
525
|
+
this.dialogVisible = false;
|
|
526
|
+
this.message({ type: "success", message: "操作成功!" });
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
},
|
|
531
|
+
};
|
|
532
|
+
</script>
|
|
533
|
+
|
|
534
|
+
<style lang="scss" scoped>
|
|
535
|
+
/* #app {
|
|
536
|
+
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
537
|
+
-webkit-font-smoothing: antialiased;
|
|
538
|
+
-moz-osx-font-smoothing: grayscale;
|
|
539
|
+
text-align: center;
|
|
540
|
+
color: #2c3e50;
|
|
541
|
+
margin-top: 60px;
|
|
542
|
+
} */
|
|
543
|
+
.grid-content {
|
|
544
|
+
display: grid;
|
|
545
|
+
// grid-template-columns: repeat(2, 1fr);
|
|
546
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
547
|
+
// align-items: center;
|
|
548
|
+
// justify-items: center;
|
|
549
|
+
// justify-content: center;
|
|
550
|
+
align-content: center;
|
|
551
|
+
height: 300px; /* 你想要的高度 */
|
|
552
|
+
gap: 10px;
|
|
553
|
+
div {
|
|
554
|
+
background-color: aqua;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.container {
|
|
559
|
+
display: flex;
|
|
560
|
+
align-items: center; /* 默认让所有子项在垂直方向居中 */
|
|
561
|
+
height: 200px;
|
|
562
|
+
background: #eee;
|
|
563
|
+
}
|
|
564
|
+
.item {
|
|
565
|
+
width: 60px;
|
|
566
|
+
height: 60px;
|
|
567
|
+
background: orange;
|
|
568
|
+
margin: 5px;
|
|
569
|
+
}
|
|
570
|
+
.item2 {
|
|
571
|
+
align-self: flex-start; /* 只让这个item到底部对齐 */
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.triangle-up {
|
|
575
|
+
margin-left: 400px;
|
|
576
|
+
width: 100px;
|
|
577
|
+
height: 100px;
|
|
578
|
+
background-color: purple;
|
|
579
|
+
clip-path: polygon(50% 0%, 0% 0%, 0% 100%, 100% 100%);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.square-container {
|
|
583
|
+
width: 100px; /* 控制容器宽度 */
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.square {
|
|
587
|
+
width: 100%;
|
|
588
|
+
aspect-ratio: 1 / 1;
|
|
589
|
+
background-color: red;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.ellipsis-container {
|
|
593
|
+
width: 200px;
|
|
594
|
+
// height: 100px;
|
|
595
|
+
border: 1px solid #ccc;
|
|
596
|
+
overflow: hidden;
|
|
597
|
+
white-space: nowrap;
|
|
598
|
+
// text-overflow: ellipsis;
|
|
599
|
+
// display: -webkit-box;
|
|
600
|
+
// -webkit-line-clamp: 4; /* 设置行数,例如3行 */
|
|
601
|
+
// -webkit-box-orient: vertical;
|
|
602
|
+
}
|
|
603
|
+
</style>
|