askbot-dragon 0.6.17 → 0.6.21
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/README.md +27 -27
- package/babel.config.js +5 -5
- package/dragon.iml +7 -7
- package/package.json +54 -52
- package/public/index.html +27 -26
- package/src/App.vue +31 -31
- package/src/api/index.js +1 -1
- package/src/api/mock.http +2 -2
- package/src/api/requestUrl.js +185 -185
- package/src/assets/less/common.css +6760 -6760
- package/src/assets/less/converSationContainer/common.less +4751 -4751
- package/src/assets/less/converSationContainer/converSatonContainer.less +492 -492
- package/src/assets/less/ticketMessage.less +319 -319
- package/src/components/ActionAlertIframe.vue +117 -117
- package/src/components/AskIFrame.vue +15 -15
- package/src/components/ConversationContainer.vue +1388 -1388
- package/src/components/FileType.vue +88 -88
- package/src/components/Message.vue +27 -27
- package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
- package/src/components/ask-components/Msgloading.vue +37 -37
- package/src/components/ask-components/SatisfactionV2.vue +15 -15
- package/src/components/chatContent.vue +512 -512
- package/src/components/feedBack.vue +133 -133
- package/src/components/file/AliyunOssComponents.vue +109 -109
- package/src/components/formTemplate.vue +1898 -2039
- package/src/components/message/ActionAlertIframe.vue +116 -116
- package/src/components/message/ShopMessage.vue +168 -168
- package/src/components/message/TextMessage.vue +895 -895
- package/src/components/message/TicketMessage.vue +173 -173
- package/src/components/message/swiper/index.js +4 -4
- package/src/components/message/swiper/ticketSwiper.vue +530 -530
- package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
- package/src/components/selector/hOption.vue +20 -20
- package/src/components/selector/hSelector.vue +199 -199
- package/src/components/selector/hWrapper.vue +216 -216
- package/src/components/source/BotMessage.vue +24 -24
- package/src/components/source/CustomMessage.vue +24 -24
- package/src/components/test.vue +260 -260
- package/src/components/utils/AliyunIssUtil.js +72 -72
- package/src/components/utils/ckeditor.js +124 -0
- package/src/components/utils/format_date.js +18 -18
- package/src/components/utils/index.js +6 -6
- package/src/components/utils/math_utils.js +15 -15
- package/src/main.js +44 -43
- package/vue.config.js +34 -28
|
@@ -1,2040 +1,1899 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="media-body">
|
|
3
|
-
<div class="formClass" :class="
|
|
4
|
-
<div class="titleName" >
|
|
5
|
-
{{formShow.form.name}}
|
|
6
|
-
</div>
|
|
7
|
-
<div class="pcFormClass" v-if="isCompany===true"
|
|
8
|
-
|
|
9
|
-
:key="item.formField.id"
|
|
10
|
-
:class="{notClick:disableds === true}"
|
|
11
|
-
>
|
|
12
|
-
<div v-if="item.formField.type!=='CHAT_RECORD'&&item.formField.type!=='CHANNEL'&&item.display&&item.fieldId!=='workorder_name'" class="field-item">
|
|
13
|
-
<div v-if="item.display&&item.fieldId!=='workorder_name'&&item.formField.type!=='EXPLANATION'&&item.formField.type!=='EXPLAIN'" class="field-item-name">
|
|
14
|
-
<span style="color: red" v-if="item.required===true">*</span>
|
|
15
|
-
<span v-if="item.fieldId!=='workorder_description'&&item.fieldId!=='workorder_clientId'">{{item.formField.name}}</span>
|
|
16
|
-
<span v-if="item.fieldId==='workorder_description'">问题描述</span>
|
|
17
|
-
<span v-if="item.fieldId==='workorder_clientId'">报单人</span>
|
|
18
|
-
</div>
|
|
19
|
-
<el-input v-model=item.value
|
|
20
|
-
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请输入'"
|
|
21
|
-
:maxlength="item.formField.extInfo&&item.formField.extInfo.maxNum?item.formField.extInfo.maxNum*1:1000"
|
|
22
|
-
v-if="item.formField.type==='INPUT'&&item.fieldId!=='workorder_name'"
|
|
23
|
-
></el-input>
|
|
24
|
-
<div v-if="item.formField.type==='EXPLANATION'">
|
|
25
|
-
<div style="display: flex;padding: 4px 0">
|
|
26
|
-
<p style="color: #4C61E1;font-size: 14px;margin: 10px 4px">
|
|
27
|
-
<span class="el-icon-info"></span>
|
|
28
|
-
{{item.formField.extInfo.descriptionText}}
|
|
29
|
-
</p>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
<div v-if="item.formField.type==='EXPLAIN'">
|
|
33
|
-
<div style="display: flex;padding: 4px 0">
|
|
34
|
-
<p style="color: #4C61E1;font-size: 14px;margin: 10px 4px">
|
|
35
|
-
<span class="el-icon-info"></span>
|
|
36
|
-
<span v-if="item.formField.extInfo.url" class="explain-url"><a :href="item.formField.extInfo.url" target="_blank">{{item.value}}</a></span>
|
|
37
|
-
<span v-else>{{item.value}}</span>
|
|
38
|
-
</p>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
<el-input type="textarea" :rows="2" v-model=item.value
|
|
42
|
-
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请输入'"
|
|
43
|
-
:maxlength="item.formField.extInfo&&item.formField.extInfo.maxNum?item.formField.extInfo.maxNum*1:1000"
|
|
44
|
-
v-if="item.formField.type==='TEXTAREA'&& item.display"
|
|
45
|
-
></el-input>
|
|
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
|
-
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'
|
|
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
|
-
<div
|
|
225
|
-
<div
|
|
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
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
if (this.
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
for (let i
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
{
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
this.
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
{
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
{
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
}
|
|
1816
|
-
}
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
.
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
}
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
}
|
|
1890
|
-
.
|
|
1891
|
-
|
|
1892
|
-
}
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
background-color: #4C61E1!important;
|
|
1900
|
-
border-color: #4C61E1!important;
|
|
1901
|
-
}
|
|
1902
|
-
/deep/.vant-upload--picture-card{
|
|
1903
|
-
background-color: #fbfdff;
|
|
1904
|
-
border: 1px dashed #c0ccda;
|
|
1905
|
-
border-radius: 6px;
|
|
1906
|
-
width: 74px;
|
|
1907
|
-
height: 74px;
|
|
1908
|
-
vertical-align: top;
|
|
1909
|
-
cursor: pointer;
|
|
1910
|
-
text-align: center;
|
|
1911
|
-
font-size:28px;
|
|
1912
|
-
color:#8c939d;
|
|
1913
|
-
display: flex;
|
|
1914
|
-
align-items: center;
|
|
1915
|
-
justify-content: center;
|
|
1916
|
-
}
|
|
1917
|
-
/deep/.van-popup{
|
|
1918
|
-
border-radius: 5px;
|
|
1919
|
-
}
|
|
1920
|
-
.remPhoneClassForm{
|
|
1921
|
-
.titleName{
|
|
1922
|
-
text-align: center;
|
|
1923
|
-
padding-bottom: 4px;
|
|
1924
|
-
}
|
|
1925
|
-
.mobileFormClass{
|
|
1926
|
-
width: 80vw;
|
|
1927
|
-
.fileName{
|
|
1928
|
-
padding-bottom: 6px;
|
|
1929
|
-
}
|
|
1930
|
-
}
|
|
1931
|
-
.mobileFormClass{
|
|
1932
|
-
.upload-phone-demo{
|
|
1933
|
-
/deep/.el-upload--picture-card{
|
|
1934
|
-
background-color: #fbfdff;
|
|
1935
|
-
border: 1px dashed #c0ccda;
|
|
1936
|
-
border-radius: 6px;
|
|
1937
|
-
width: 74px;
|
|
1938
|
-
height: 74px;
|
|
1939
|
-
vertical-align: top;
|
|
1940
|
-
cursor: pointer;
|
|
1941
|
-
text-align: center;
|
|
1942
|
-
font-size:28px;
|
|
1943
|
-
color:#8c939d;
|
|
1944
|
-
display: flex;
|
|
1945
|
-
align-items: center;
|
|
1946
|
-
justify-content: center;
|
|
1947
|
-
}
|
|
1948
|
-
/deep/.el-upload-list--picture-card .el-upload-list__item{
|
|
1949
|
-
height: 76px;
|
|
1950
|
-
width: 76px;
|
|
1951
|
-
}
|
|
1952
|
-
}
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
}
|
|
1956
|
-
.submitClass{
|
|
1957
|
-
width: 120px;
|
|
1958
|
-
background-color: #4C61E1;
|
|
1959
|
-
color: white!important;
|
|
1960
|
-
height: 36px;
|
|
1961
|
-
}
|
|
1962
|
-
/deep/.van-button--info{
|
|
1963
|
-
border:1px solid #4C61E1;
|
|
1964
|
-
}
|
|
1965
|
-
/deep/.van-field__label{
|
|
1966
|
-
width: 5em!important;
|
|
1967
|
-
text-align: left;
|
|
1968
|
-
color: #000000!important;
|
|
1969
|
-
display: flex;
|
|
1970
|
-
align-items: center;
|
|
1971
|
-
line-height: 2;
|
|
1972
|
-
}
|
|
1973
|
-
|
|
1974
|
-
/deep/.van-field__control{
|
|
1975
|
-
min-height: 36px;
|
|
1976
|
-
border-radius: 5px;
|
|
1977
|
-
}
|
|
1978
|
-
/deep/.van-checkbox--horizontal{
|
|
1979
|
-
padding: 0.2rem 0;
|
|
1980
|
-
}
|
|
1981
|
-
/deep/.van-radio--horizontal{
|
|
1982
|
-
padding: 0.2rem 0;
|
|
1983
|
-
}
|
|
1984
|
-
/deep/.van-dropdown-menu__bar{
|
|
1985
|
-
box-shadow: none!important;
|
|
1986
|
-
}
|
|
1987
|
-
|
|
1988
|
-
/deep/.van-overlay{
|
|
1989
|
-
background-color: rgba(0,0,0,.5);
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
/deep/.el-input__inner{
|
|
1994
|
-
background-color: transparent!important;
|
|
1995
|
-
}
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
}
|
|
1999
|
-
|
|
2000
|
-
.remCompanyClassForm{
|
|
2001
|
-
width: 100%;
|
|
2002
|
-
font-size: 1em;
|
|
2003
|
-
.pcFormClass{
|
|
2004
|
-
width: 100%;
|
|
2005
|
-
}
|
|
2006
|
-
.submitClass{
|
|
2007
|
-
width: 120px;
|
|
2008
|
-
color: white!important;
|
|
2009
|
-
background-color:#4C61E1;
|
|
2010
|
-
border-color: #4C61E1;
|
|
2011
|
-
}
|
|
2012
|
-
.el-checkbox{
|
|
2013
|
-
line-height: 2;
|
|
2014
|
-
}
|
|
2015
|
-
.el-radio{
|
|
2016
|
-
padding: 4px 0;
|
|
2017
|
-
}
|
|
2018
|
-
.titleName{
|
|
2019
|
-
font-size: 1em;
|
|
2020
|
-
text-align: center;
|
|
2021
|
-
padding: 8px 0;
|
|
2022
|
-
}
|
|
2023
|
-
/deep/.el-radio__input.is-checked+.el-radio__label{
|
|
2024
|
-
color: #4C61E1!important;
|
|
2025
|
-
}
|
|
2026
|
-
/deep/.el-radio__input.is-checked .el-radio__inner{
|
|
2027
|
-
color: #4C61E1!important;
|
|
2028
|
-
border-color: #4C61E1!important;
|
|
2029
|
-
background: #4C61E1!important;
|
|
2030
|
-
}
|
|
2031
|
-
/deep/.el-checkbox__input.is-checked+.el-checkbox__label{
|
|
2032
|
-
color: #4C61E1!important;
|
|
2033
|
-
}
|
|
2034
|
-
/deep/.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner{
|
|
2035
|
-
background-color: #4C61E1!important;
|
|
2036
|
-
border-color: #4C61E1!important;
|
|
2037
|
-
}
|
|
2038
|
-
}
|
|
2039
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="media-body">
|
|
3
|
+
<div class="formClass" :class="isPhone?'remPhoneClassForm':'remCompanyClassForm'" v-if="formShow.form">
|
|
4
|
+
<div class="titleName" >
|
|
5
|
+
{{formShow.form.name}}
|
|
6
|
+
</div>
|
|
7
|
+
<div class="pcFormClass" v-if="isCompany===true">
|
|
8
|
+
<div v-for="(item) in formShow.form.formFieldRelation"
|
|
9
|
+
:key="item.formField.id"
|
|
10
|
+
:class="{notClick:disableds === true}"
|
|
11
|
+
>
|
|
12
|
+
<div v-if="item.formField.type!=='CHAT_RECORD'&&item.formField.type!=='CHANNEL'&&item.display&&item.fieldId!=='workorder_name'" class="field-item">
|
|
13
|
+
<div v-if="item.display&&item.fieldId!=='workorder_name'&&item.formField.type!=='EXPLANATION'&&item.formField.type!=='EXPLAIN'" class="field-item-name">
|
|
14
|
+
<span style="color: red" v-if="item.required===true">*</span>
|
|
15
|
+
<span v-if="item.fieldId!=='workorder_description'&&item.fieldId!=='workorder_clientId'">{{item.formField.name}}</span>
|
|
16
|
+
<span v-if="item.fieldId==='workorder_description'">问题描述</span>
|
|
17
|
+
<span v-if="item.fieldId==='workorder_clientId'">报单人</span>
|
|
18
|
+
</div>
|
|
19
|
+
<el-input v-model=item.value
|
|
20
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请输入'"
|
|
21
|
+
:maxlength="item.formField.extInfo&&item.formField.extInfo.maxNum?item.formField.extInfo.maxNum*1:1000"
|
|
22
|
+
v-if="item.formField.type==='INPUT'&&item.fieldId!=='workorder_name'"
|
|
23
|
+
></el-input>
|
|
24
|
+
<div v-if="item.formField.type==='EXPLANATION'">
|
|
25
|
+
<div style="display: flex;padding: 4px 0">
|
|
26
|
+
<p style="color: #4C61E1;font-size: 14px;margin: 10px 4px">
|
|
27
|
+
<span class="el-icon-info"></span>
|
|
28
|
+
{{item.formField.extInfo.descriptionText}}
|
|
29
|
+
</p>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div v-if="item.formField.type==='EXPLAIN'">
|
|
33
|
+
<div style="display: flex;padding: 4px 0">
|
|
34
|
+
<p style="color: #4C61E1;font-size: 14px;margin: 10px 4px">
|
|
35
|
+
<span class="el-icon-info"></span>
|
|
36
|
+
<span v-if="item.formField.extInfo.url" class="explain-url"><a :href="item.formField.extInfo.url" target="_blank">{{item.value}}</a></span>
|
|
37
|
+
<span v-else>{{item.value}}</span>
|
|
38
|
+
</p>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
<el-input type="textarea" :rows="2" v-model=item.value
|
|
42
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请输入'"
|
|
43
|
+
:maxlength="item.formField.extInfo&&item.formField.extInfo.maxNum?item.formField.extInfo.maxNum*1:1000"
|
|
44
|
+
v-if="item.formField.type==='TEXTAREA'&& item.display&&item.fieldId!=='workorder_description'"
|
|
45
|
+
></el-input>
|
|
46
|
+
<ckeditor
|
|
47
|
+
:editor="ckeditor.editor"
|
|
48
|
+
v-model="item.value"
|
|
49
|
+
:config="ckeditor.editorConfig"
|
|
50
|
+
v-else-if="item.display&&item.fieldId==='workorder_description'"
|
|
51
|
+
></ckeditor>
|
|
52
|
+
<el-date-picker
|
|
53
|
+
v-model=item.value
|
|
54
|
+
type="date"
|
|
55
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择日期'"
|
|
56
|
+
style="width: 100%"
|
|
57
|
+
v-if="item.formField.type==='DATE_PICKER'"
|
|
58
|
+
>
|
|
59
|
+
</el-date-picker>
|
|
60
|
+
<el-time-picker
|
|
61
|
+
v-model=item.value
|
|
62
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择时间'"
|
|
63
|
+
style="width: 100%"
|
|
64
|
+
v-if="item.formField.type==='TIME_PICKER' && !item.formField.extInfo.mold"
|
|
65
|
+
>
|
|
66
|
+
</el-time-picker>
|
|
67
|
+
<el-date-picker
|
|
68
|
+
v-model=item.value
|
|
69
|
+
type="date"
|
|
70
|
+
style="width: 100%"
|
|
71
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择日期'"
|
|
72
|
+
v-if="item.formField.type==='TIME_PICKER' &&item.formField.extInfo.mold==='DATA'"
|
|
73
|
+
>
|
|
74
|
+
</el-date-picker>
|
|
75
|
+
<el-date-picker
|
|
76
|
+
v-model=item.value
|
|
77
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择日期时间'"
|
|
78
|
+
clearable
|
|
79
|
+
style="width: 100%"
|
|
80
|
+
type="datetime"
|
|
81
|
+
v-if="item.formField.type==='TIME_PICKER' &&item.formField.extInfo.mold==='DATA_TIME'"
|
|
82
|
+
>
|
|
83
|
+
</el-date-picker>
|
|
84
|
+
<div v-if="item.formField.type==='RADIO' &&item.formField.extInfo.options">
|
|
85
|
+
<el-radio-group v-model=item.value style="text-align:left">
|
|
86
|
+
<el-radio v-for="(items,index) in item.formField.extInfo.options" :label=items.value :key="index">{{items.label}}</el-radio>
|
|
87
|
+
</el-radio-group>
|
|
88
|
+
</div>
|
|
89
|
+
<div v-if="item.formField.type==='RADIO' &&item.formField.extInfo.option">
|
|
90
|
+
<el-radio-group v-model=item.value style="text-align:left">
|
|
91
|
+
<el-radio v-for="(items,index) in item.formField.extInfo.option" :label=items.value :key="index">{{items.label}}</el-radio>
|
|
92
|
+
</el-radio-group>
|
|
93
|
+
</div>
|
|
94
|
+
<div v-if="item.formField.type==='CHECKBOX' && item.formField.extInfo.option">
|
|
95
|
+
<el-checkbox-group v-model=item.value style="text-align:left">
|
|
96
|
+
<el-checkbox
|
|
97
|
+
v-for="(items,index) in item.formField.extInfo.option"
|
|
98
|
+
:label=items.value
|
|
99
|
+
:key="index"
|
|
100
|
+
>{{items.label}}</el-checkbox>
|
|
101
|
+
</el-checkbox-group>
|
|
102
|
+
</div>
|
|
103
|
+
<div v-if="item.formField.type==='CHECKBOX' && item.formField.extInfo.options">
|
|
104
|
+
<el-checkbox-group v-model=item.value style="text-align:left">
|
|
105
|
+
<el-checkbox
|
|
106
|
+
v-for="(items,index) in item.formField.extInfo.options"
|
|
107
|
+
:label=items.value
|
|
108
|
+
:key="index"
|
|
109
|
+
>{{items.label}}</el-checkbox>
|
|
110
|
+
</el-checkbox-group>
|
|
111
|
+
</div>
|
|
112
|
+
<div v-if="item.formField.type==='SELECT'">
|
|
113
|
+
<el-select
|
|
114
|
+
v-model=item.value
|
|
115
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'"
|
|
116
|
+
style="width: 100%"
|
|
117
|
+
filterable
|
|
118
|
+
v-if="item.formField.extInfo.option"
|
|
119
|
+
>
|
|
120
|
+
<el-option
|
|
121
|
+
v-for="(items,index) in item.formField.extInfo.option"
|
|
122
|
+
:key="index"
|
|
123
|
+
:label="items.label"
|
|
124
|
+
:value="items.value">
|
|
125
|
+
</el-option>
|
|
126
|
+
</el-select>
|
|
127
|
+
<el-select
|
|
128
|
+
v-model=item.value
|
|
129
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'"
|
|
130
|
+
style="width: 100%"
|
|
131
|
+
filterable
|
|
132
|
+
v-else-if="item.formField.extInfo.options"
|
|
133
|
+
>
|
|
134
|
+
<el-option
|
|
135
|
+
v-for="(items,index) in item.formField.extInfo.options"
|
|
136
|
+
:key="index"
|
|
137
|
+
:label="items.label"
|
|
138
|
+
:value="items.value">
|
|
139
|
+
</el-option>
|
|
140
|
+
</el-select>
|
|
141
|
+
</div>
|
|
142
|
+
<div v-if="item.formField.type==='CASCADER'">
|
|
143
|
+
<el-cascader
|
|
144
|
+
v-model=item.value
|
|
145
|
+
:options=item.formField.extInfo.cascade
|
|
146
|
+
style="width: 100%;"
|
|
147
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择时间'"
|
|
148
|
+
v-if="item.formField.extInfo.cascade"
|
|
149
|
+
></el-cascader>
|
|
150
|
+
<el-cascader
|
|
151
|
+
v-model=item.value
|
|
152
|
+
:options=item.formField.extInfo.cascadeDown[0].options
|
|
153
|
+
style="width: 100%;"
|
|
154
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择时间'"
|
|
155
|
+
v-else-if="item.formField.extInfo.cascadeDown"
|
|
156
|
+
></el-cascader>
|
|
157
|
+
</div>
|
|
158
|
+
<div v-if="item.formField.type==='FILE'">
|
|
159
|
+
<div @click="checkUpload(item.fieldId,item.formField.extInfo.limitNum)" @mouseover="checkUpload(item.fieldId,item.formField.extInfo.limitNum)" style="flex: 0.75;display:flex;align-items: center;">
|
|
160
|
+
<el-upload
|
|
161
|
+
class="upload-demo"
|
|
162
|
+
ref="upload"
|
|
163
|
+
list-type="picture-card"
|
|
164
|
+
accept="image/*"
|
|
165
|
+
name="file"
|
|
166
|
+
action="/open/media/file/upload"
|
|
167
|
+
:multiple="false"
|
|
168
|
+
:file-list="fileListList[item.fieldId]"
|
|
169
|
+
:limit=item.formField.extInfo.limitNum?Number(item.formField.extInfo.limitNum):1
|
|
170
|
+
:before-upload="beforeAvatarUpload"
|
|
171
|
+
:on-exceed="exceedUpload"
|
|
172
|
+
:on-remove="handleRemove"
|
|
173
|
+
:http-request="aliyunOssRequest"
|
|
174
|
+
:on-change="handleEditChange"
|
|
175
|
+
:on-success="successUpload"
|
|
176
|
+
>
|
|
177
|
+
<i class="el-icon-plus"></i>
|
|
178
|
+
</el-upload>
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
<div style="padding: 10px 0;text-align: center">
|
|
184
|
+
<el-button style="border-color: #4C61E1;color: white;background-color: #4C61E1" round class="submitClass" size="small" @click="submitClick" :disabled="disableds">{{submitValue}}</el-button>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
<div class="mobileFormClass" v-else style="padding: 10px 0;" :class="{notClick:disableds === true}">
|
|
188
|
+
<div v-for="(item,index) in formFieldRelation"
|
|
189
|
+
:key="item.formField.id"
|
|
190
|
+
class="form-field-item"
|
|
191
|
+
>
|
|
192
|
+
<div v-if="item.formField.type==='INPUT'" class="form-field-item-value">
|
|
193
|
+
<van-field v-model=item.value
|
|
194
|
+
:label=item.formField.name
|
|
195
|
+
:required="item.required===true"
|
|
196
|
+
:disabled="disableds"
|
|
197
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请输入'"
|
|
198
|
+
:maxlength="item.formField.extInfo&&item.formField.extInfo.maxNum?item.formField.extInfo.maxNum*1:1000"
|
|
199
|
+
/>
|
|
200
|
+
</div>
|
|
201
|
+
<div v-else-if="item.formField.type==='EXPLANATION'||item.formField.type==='EXPLAIN'" class="explan-ation">
|
|
202
|
+
<div class="explan-ation-div">
|
|
203
|
+
<p class="explan-ation-p" v-if="item.formField.type==='EXPLANATION'">
|
|
204
|
+
<span class="el-icon-info"></span>
|
|
205
|
+
{{item.formField.extInfo.descriptionText}}
|
|
206
|
+
</p>
|
|
207
|
+
<p v-else class="explan-ation-p">
|
|
208
|
+
<span class="el-icon-info"></span>
|
|
209
|
+
<span v-if="item.formField.extInfo.url" class="explain-url"><a :href="item.formField.extInfo.url" target="_blank">{{item.value}}</a></span>
|
|
210
|
+
<span v-else>{{item.value}}</span>
|
|
211
|
+
</p>
|
|
212
|
+
</div>
|
|
213
|
+
</div>
|
|
214
|
+
<div v-else-if="item.formField.type==='TEXTAREA'" class="form-field-item-value">
|
|
215
|
+
<van-field v-model=item.value
|
|
216
|
+
:label=item.formField.name
|
|
217
|
+
:required="item.required===true"
|
|
218
|
+
type="textarea"
|
|
219
|
+
:disabled="disableds"
|
|
220
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请输入'"
|
|
221
|
+
:maxlength="item.formField.extInfo&&item.formField.extInfo.maxNum?item.formField.extInfo.maxNum*1:1000"
|
|
222
|
+
v-if="item.fieldId!=='workorder_description'"
|
|
223
|
+
/>
|
|
224
|
+
<div v-if="item.fieldId==='workorder_description'" class="workorder_description">
|
|
225
|
+
<div class="field-name" :class="item.required?'required-name':''">
|
|
226
|
+
<span v-if="item.required" style="color: red">*</span>
|
|
227
|
+
{{item.formField.name}}
|
|
228
|
+
</div>
|
|
229
|
+
<ckeditor
|
|
230
|
+
:editor="ckeditor.editor"
|
|
231
|
+
v-model="item.value"
|
|
232
|
+
:config="ckeditor.editorConfig"
|
|
233
|
+
></ckeditor>
|
|
234
|
+
</div>
|
|
235
|
+
</div>
|
|
236
|
+
<div v-else-if="item.formField.type==='DATE_PICKER'" class="form-field-item-value">
|
|
237
|
+
<van-field
|
|
238
|
+
readonly
|
|
239
|
+
clickable
|
|
240
|
+
name="calendar"
|
|
241
|
+
:value=dateValue[item.fieldId]
|
|
242
|
+
:label=item.formField.name
|
|
243
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择日期'"
|
|
244
|
+
:required="item.required===true"
|
|
245
|
+
@click="dateClick(item.fieldId)"
|
|
246
|
+
:disabled="disableds"
|
|
247
|
+
/>
|
|
248
|
+
<van-calendar
|
|
249
|
+
v-model="showCalendar"
|
|
250
|
+
@confirm="onConfirmCalendar($event,dateId)"
|
|
251
|
+
/>
|
|
252
|
+
</div>
|
|
253
|
+
<div v-else-if="item.formField.type==='TIME_PICKER'&&(!item.formField.extInfo.mold||item.formField.extInfo.mold==='DATA_TIME')" class="form-field-item-value">
|
|
254
|
+
<van-field
|
|
255
|
+
readonly
|
|
256
|
+
clickable
|
|
257
|
+
name="datetimePicker"
|
|
258
|
+
:required="item.required===true"
|
|
259
|
+
:value=timeValue[item.fieldId]
|
|
260
|
+
:label=item.formField.name
|
|
261
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择时间'"
|
|
262
|
+
@click="timeClick(item.fieldId,item)"
|
|
263
|
+
:disabled="disableds"
|
|
264
|
+
|
|
265
|
+
/>
|
|
266
|
+
<van-popup v-model="showTimePicker" position="bottom">
|
|
267
|
+
<van-datetime-picker
|
|
268
|
+
v-model="currentDate"
|
|
269
|
+
type="datetime"
|
|
270
|
+
@confirm="onConfirm($event,timeId,item)"
|
|
271
|
+
@cancel="showTimePicker = false"
|
|
272
|
+
:min-date="minDate"
|
|
273
|
+
:formatter="formatter"
|
|
274
|
+
:max-date="maxDate"
|
|
275
|
+
/>
|
|
276
|
+
</van-popup>
|
|
277
|
+
</div>
|
|
278
|
+
<div v-else-if="item.formField.type==='TIME_PICKER'&&item.formField.extInfo.mold==='DATA'" class="form-field-item-value">
|
|
279
|
+
<van-field
|
|
280
|
+
readonly
|
|
281
|
+
clickable
|
|
282
|
+
name="datetimePicker"
|
|
283
|
+
:required="item.required===true"
|
|
284
|
+
:value=timeValue[item.fieldId]
|
|
285
|
+
:label=item.formField.name
|
|
286
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择日期'"
|
|
287
|
+
@click="timeClick(item.fieldId,item)"
|
|
288
|
+
:disabled="disableds"
|
|
289
|
+
|
|
290
|
+
/>
|
|
291
|
+
<van-calendar v-model="showTimePickerd" :show-confirm="false" @confirm="onConfirm($event,timeId,item)" @cancel="showTimePickerd = false"/>
|
|
292
|
+
</div>
|
|
293
|
+
<div v-else-if="item.formField.type==='RADIO'" class="form-field-item-other">
|
|
294
|
+
<van-field name="radio" :label="item.formField.name" :required="item.required===true" :disabled="disableds" v-if="item.formField.extInfo.option">
|
|
295
|
+
<template #input style="display: flex;align-items: center">
|
|
296
|
+
<van-radio-group v-model=item.value direction="horizontal" :disabled="disableds">
|
|
297
|
+
<van-radio v-for="(items,index) in item.formField.extInfo.option" :name=items.value :key="index">{{items.label}}</van-radio>
|
|
298
|
+
</van-radio-group>
|
|
299
|
+
</template>
|
|
300
|
+
</van-field>
|
|
301
|
+
<van-field name="radio" :label="item.formField.name" :required="item.required===true" :disabled="disableds" v-if="item.formField.extInfo.options">
|
|
302
|
+
<template #input style="display: flex;align-items: center" >
|
|
303
|
+
<van-radio-group v-model=item.value direction="horizontal" :disabled="disableds">
|
|
304
|
+
<van-radio v-for="(items,index) in item.formField.extInfo.options" :name=items.value :key="index">{{items.label}}</van-radio>
|
|
305
|
+
</van-radio-group>
|
|
306
|
+
</template>
|
|
307
|
+
</van-field>
|
|
308
|
+
</div>
|
|
309
|
+
<div v-else-if="item.formField.type==='CHECKBOX'" class="form-field-item-other">
|
|
310
|
+
<van-field name="checkbox" :label=item.formField.name :required="item.required===true" :disabled="disableds" v-if="item.formField.extInfo.option">
|
|
311
|
+
<template #input style="display: flex;align-items: center" >
|
|
312
|
+
<van-checkbox-group v-model=item.value ref="checkboxGroup" direction="horizontal" :disabled="disableds">
|
|
313
|
+
<van-checkbox
|
|
314
|
+
v-for="(items,index) in item.formField.extInfo.option"
|
|
315
|
+
shape="square"
|
|
316
|
+
:key="index"
|
|
317
|
+
:name=items.value>
|
|
318
|
+
{{items.label}}
|
|
319
|
+
</van-checkbox>
|
|
320
|
+
</van-checkbox-group>
|
|
321
|
+
</template>
|
|
322
|
+
</van-field>
|
|
323
|
+
<van-field name="checkbox" :label=item.formField.name :required="item.required===true" :disabled="disableds" v-if="item.formField.extInfo.options">
|
|
324
|
+
<template #input style="display: flex;align-items: center" >
|
|
325
|
+
<van-checkbox-group v-model=item.value ref="checkboxGroup" direction="horizontal" :disabled="disableds">
|
|
326
|
+
<van-checkbox
|
|
327
|
+
v-for="(items,index) in item.formField.extInfo.options"
|
|
328
|
+
shape="square"
|
|
329
|
+
:key="index"
|
|
330
|
+
:name=items.value>
|
|
331
|
+
{{items.label}}
|
|
332
|
+
</van-checkbox>
|
|
333
|
+
</van-checkbox-group>
|
|
334
|
+
</template>
|
|
335
|
+
</van-field>
|
|
336
|
+
</div>
|
|
337
|
+
<div v-else-if="item.formField.type==='SELECT'" class="form-field-item-value">
|
|
338
|
+
<van-field
|
|
339
|
+
readonly
|
|
340
|
+
clickable
|
|
341
|
+
name="picker"
|
|
342
|
+
:value=selectValues[item.fieldId]
|
|
343
|
+
:label=item.formField.name
|
|
344
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'"
|
|
345
|
+
@click="selectClick(item.fieldId)"
|
|
346
|
+
:required="item.required===true"
|
|
347
|
+
:disabled="disableds"
|
|
348
|
+
v-if="item.fieldId!=='workorder_clientId'"
|
|
349
|
+
right-icon="van-icon van-icon-arrow van-cell__right-icon"
|
|
350
|
+
/>
|
|
351
|
+
<van-field
|
|
352
|
+
readonly
|
|
353
|
+
clickable
|
|
354
|
+
name="picker"
|
|
355
|
+
:value=selectValues[item.fieldId]
|
|
356
|
+
label='报单人'
|
|
357
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'"
|
|
358
|
+
@click="selectClick(item.fieldId)"
|
|
359
|
+
:required="item.required===true"
|
|
360
|
+
:disabled="disableds"
|
|
361
|
+
v-if="item.fieldId==='workorder_clientId'"
|
|
362
|
+
right-icon="van-icon van-icon-arrow van-cell__right-icon"
|
|
363
|
+
/>
|
|
364
|
+
<van-popup v-model="showPicker" position="bottom">
|
|
365
|
+
<van-picker
|
|
366
|
+
show-toolbar
|
|
367
|
+
:columns=selectValue
|
|
368
|
+
@confirm="onConfirmSelect($event,selectId)"
|
|
369
|
+
@cancel="showPicker = false"
|
|
370
|
+
:key="selectKey"
|
|
371
|
+
|
|
372
|
+
/>
|
|
373
|
+
</van-popup>
|
|
374
|
+
</div>
|
|
375
|
+
<div v-else-if="item.formField.type==='CASCADER'" class="form-field-item-value">
|
|
376
|
+
<van-field
|
|
377
|
+
readonly
|
|
378
|
+
clickable
|
|
379
|
+
name="area"
|
|
380
|
+
:value=cascadeValue[item.fieldId]
|
|
381
|
+
:label=item.formField.name
|
|
382
|
+
:placeholder="item.formField.extInfo&&item.formField.extInfo.placeholder?item.formField.extInfo.placeholder:'请选择'"
|
|
383
|
+
@click="pickerClick(item.fieldId)"
|
|
384
|
+
:required="item.required===true"
|
|
385
|
+
:disabled="disableds"
|
|
386
|
+
right-icon="van-icon van-icon-arrow van-cell__right-icon"
|
|
387
|
+
/>
|
|
388
|
+
|
|
389
|
+
<van-popup v-model="showArea" position="bottom">
|
|
390
|
+
<van-picker v-if="pageShow"
|
|
391
|
+
show-toolbar
|
|
392
|
+
:columns="column"
|
|
393
|
+
@cancel="onCancel"
|
|
394
|
+
@confirm="onConfirms($event,pickerId,index)"
|
|
395
|
+
@change="onChange"
|
|
396
|
+
:item-height="45"
|
|
397
|
+
:key="keyValue"
|
|
398
|
+
/>
|
|
399
|
+
</van-popup>
|
|
400
|
+
</div>
|
|
401
|
+
<div v-else-if="item.formField.type === 'FILE'" class="form-field-item-value">
|
|
402
|
+
<div @click="checkUpload(item.fieldId,item.formField.extInfo.limitNum)" class="form-field-item-file">
|
|
403
|
+
<div class="fileName"><span style="color: red" v-if="item.required">*</span>{{item.formField.name}}</div>
|
|
404
|
+
<van-uploader
|
|
405
|
+
v-model="fileListList[item.fieldId]"
|
|
406
|
+
:before-read="beforeRead"
|
|
407
|
+
:max-count='item.formField.extInfo.limitNum!==undefined?item.formField.extInfo.limitNum:1'
|
|
408
|
+
:after-read="afterRead"
|
|
409
|
+
accept="image/*"
|
|
410
|
+
:multiple=false
|
|
411
|
+
>
|
|
412
|
+
<div class="vant-upload--picture-card">
|
|
413
|
+
<i class="el-icon-plus"></i>
|
|
414
|
+
</div>
|
|
415
|
+
|
|
416
|
+
</van-uploader>
|
|
417
|
+
</div>
|
|
418
|
+
</div>
|
|
419
|
+
</div>
|
|
420
|
+
<div class="form-submit-btn">
|
|
421
|
+
<van-button round type="info" class="submitClass" @click="submitClick" :disabled="disableds">{{submitValue}}</van-button>
|
|
422
|
+
</div>
|
|
423
|
+
<van-popup v-model="fileUpload" :close-on-click-overlay="false">
|
|
424
|
+
<div style="background-color: black;height: 100px;width: 100px;display: flex;justify-content: center;align-items: center" >
|
|
425
|
+
<van-loading type="spinner"/>
|
|
426
|
+
</div>
|
|
427
|
+
</van-popup>
|
|
428
|
+
</div>
|
|
429
|
+
</div>
|
|
430
|
+
<el-dialog :visible.sync="dialogVisible">
|
|
431
|
+
<img width="100%" :src="dialogImageUrl" alt="">
|
|
432
|
+
</el-dialog>
|
|
433
|
+
|
|
434
|
+
</div>
|
|
435
|
+
</template>
|
|
436
|
+
|
|
437
|
+
<script>
|
|
438
|
+
let that
|
|
439
|
+
import {multipartUpload,ossFileUrl} from "./utils/AliyunIssUtil";
|
|
440
|
+
import {MyCustomUploadAdapterPlugin} from "./utils/ckeditor";
|
|
441
|
+
import CKEDITOR from 'ckeditor'
|
|
442
|
+
export default {
|
|
443
|
+
name: "formTemplate",
|
|
444
|
+
data() {
|
|
445
|
+
return {
|
|
446
|
+
isPhone: false,
|
|
447
|
+
isCompany: false,
|
|
448
|
+
checkboxGroup: [],
|
|
449
|
+
currentDate: new Date(),
|
|
450
|
+
timeValue: [],
|
|
451
|
+
dateValue: [],
|
|
452
|
+
showPicker: false,
|
|
453
|
+
showTimePicker: false,
|
|
454
|
+
showTimePickerd:false,
|
|
455
|
+
showCalendar: false,
|
|
456
|
+
radio: [],
|
|
457
|
+
selectValue: [],
|
|
458
|
+
pickerValue: [],
|
|
459
|
+
showArea: false,
|
|
460
|
+
dateTimeValue: [],
|
|
461
|
+
dateTimeValue1: [],
|
|
462
|
+
showDateTimePicker: false,
|
|
463
|
+
showDateTimePicker1: false,
|
|
464
|
+
pickerId: 0,
|
|
465
|
+
dateId: 0,
|
|
466
|
+
timeId: 0,
|
|
467
|
+
selectId: 0,
|
|
468
|
+
dateTimeId: 0,
|
|
469
|
+
column: [
|
|
470
|
+
{
|
|
471
|
+
values: '', // 设置的页面初始值
|
|
472
|
+
className: "column1"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
values: '',
|
|
476
|
+
className: "column2",
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
values: '',
|
|
480
|
+
className: "column3",
|
|
481
|
+
}
|
|
482
|
+
],
|
|
483
|
+
pageShow: false, //省市区三级联动是否显示(因为是接口返回的数据,等三级数据渲染完毕之后,在显示三级联动)
|
|
484
|
+
cityDates: '', //安联当前选中市的所有区所有数据
|
|
485
|
+
data: [],//接口返回所有级联数据
|
|
486
|
+
dateTimeRange: '',
|
|
487
|
+
selectValues: [],
|
|
488
|
+
cascadeValue: [],
|
|
489
|
+
minDate: new Date(2020, 0, 1),
|
|
490
|
+
maxDate: new Date(2025, 11, 31),
|
|
491
|
+
disableds: false,
|
|
492
|
+
submitValue: '提交',
|
|
493
|
+
clickPicker: '',
|
|
494
|
+
columns: [],
|
|
495
|
+
copyForm: [],
|
|
496
|
+
cascaderId:0,
|
|
497
|
+
formShow:[],
|
|
498
|
+
|
|
499
|
+
uploadAvatarParams: {
|
|
500
|
+
token: "8c98087dfd2d48f856d8c95c09115def",
|
|
501
|
+
},
|
|
502
|
+
fileListList:[],
|
|
503
|
+
keyValue:'',
|
|
504
|
+
selectKey:'shuijiao',
|
|
505
|
+
filedId:'',
|
|
506
|
+
disabled:false,
|
|
507
|
+
dialogVisible:false,
|
|
508
|
+
dialogImageUrl:'',
|
|
509
|
+
fileUpload:false,
|
|
510
|
+
videoFlag:false,
|
|
511
|
+
videoUploadPercent:false,
|
|
512
|
+
fileType:['PICTURE','VIDEO','AUDIO'],
|
|
513
|
+
loading:'',
|
|
514
|
+
ossConfig: {
|
|
515
|
+
region: "oss-cn-zhangjiakou",
|
|
516
|
+
//云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,创建并使用STS方式来进行API访问
|
|
517
|
+
accessKeyId: "LTAI4G3QtdEdwkEbihBngAsK",
|
|
518
|
+
accessKeySecret: "OwgdVfc5PeCkIgqIdug660xmiSPchn",
|
|
519
|
+
// stsToken: '<Your securityToken(STS)>',
|
|
520
|
+
bucket: "guoranopen-zjk",
|
|
521
|
+
},
|
|
522
|
+
hideUploadEdit:false,
|
|
523
|
+
limitNum:1,
|
|
524
|
+
ckeditor: {
|
|
525
|
+
editor: CKEDITOR.ClassicEditor,
|
|
526
|
+
editorConfig: {
|
|
527
|
+
extraPlugins: [MyCustomUploadAdapterPlugin],
|
|
528
|
+
toolbar: [
|
|
529
|
+
'imageUpload'
|
|
530
|
+
]
|
|
531
|
+
},
|
|
532
|
+
},
|
|
533
|
+
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
props: {
|
|
537
|
+
formList: {
|
|
538
|
+
type: Object,
|
|
539
|
+
default() {
|
|
540
|
+
return {}
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
type:String,
|
|
544
|
+
disable:Boolean,
|
|
545
|
+
submit:Boolean,
|
|
546
|
+
usePropStyleType:{
|
|
547
|
+
type:Boolean,
|
|
548
|
+
default() {
|
|
549
|
+
return false;
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
propIsPhone: {
|
|
553
|
+
type:Boolean,
|
|
554
|
+
default() {
|
|
555
|
+
return false;
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
propIsCompany: {
|
|
559
|
+
type:Boolean,
|
|
560
|
+
default() {
|
|
561
|
+
return false;
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
uploadUrl: {
|
|
565
|
+
type:String,
|
|
566
|
+
default(){
|
|
567
|
+
return '/open/media/file/upload'
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
computed:{
|
|
572
|
+
acceptType:function () {
|
|
573
|
+
return '.jpg,.jpeg,.png,.gif,.JPG,.JPEG,.PBG,.GIF'
|
|
574
|
+
},
|
|
575
|
+
formFieldRelation:function (){
|
|
576
|
+
console.log('this.formShow.form.formFieldRelation',this.formShow.form.formFieldRelation)
|
|
577
|
+
let arr = [];
|
|
578
|
+
this.formShow.form.formFieldRelation.forEach(item=> {
|
|
579
|
+
if (item.fieldId!=='workorder_name'&&item.display) {
|
|
580
|
+
arr.push(item);
|
|
581
|
+
}
|
|
582
|
+
})
|
|
583
|
+
return arr;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
},
|
|
587
|
+
mounted() {
|
|
588
|
+
console.log(this.formList)
|
|
589
|
+
console.log(this.disable)
|
|
590
|
+
this.isMobile()
|
|
591
|
+
},
|
|
592
|
+
beforeCreate() {
|
|
593
|
+
// 等待dom渲染完毕之后,再去显示 三级联动。
|
|
594
|
+
that=this
|
|
595
|
+
this.$nextTick(function () {
|
|
596
|
+
this.pageShow = true;
|
|
597
|
+
})
|
|
598
|
+
},
|
|
599
|
+
created() {
|
|
600
|
+
|
|
601
|
+
if(this.disable===true)
|
|
602
|
+
{
|
|
603
|
+
this.disableds=true
|
|
604
|
+
}
|
|
605
|
+
else
|
|
606
|
+
{
|
|
607
|
+
this.disableds=false
|
|
608
|
+
}
|
|
609
|
+
if(this.submit===true)
|
|
610
|
+
{
|
|
611
|
+
this.submitValue='已提交'
|
|
612
|
+
}
|
|
613
|
+
else
|
|
614
|
+
{
|
|
615
|
+
this.submitValue='提交'
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
beforeMount() {
|
|
619
|
+
that.defaultClick()
|
|
620
|
+
},
|
|
621
|
+
methods: {
|
|
622
|
+
beforeRead(file){
|
|
623
|
+
console.log('file',file)
|
|
624
|
+
console.log('fileType',!Array.isArray(file))
|
|
625
|
+
if (!Array.isArray(file)){
|
|
626
|
+
const isLte2M = file.size / 1024 / 1024 <= 8;
|
|
627
|
+
console.log(file.type.indexOf('image')!==-1)
|
|
628
|
+
const isSupportedFormat =file.type.indexOf('image')!==-1
|
|
629
|
+
if (!isSupportedFormat){
|
|
630
|
+
this.$message.error("只能上传图片格式");
|
|
631
|
+
return false
|
|
632
|
+
}
|
|
633
|
+
if (!isLte2M&&isSupportedFormat) {
|
|
634
|
+
this.$message.error("上传图片大小不能超过 8MB!");
|
|
635
|
+
return false
|
|
636
|
+
}
|
|
637
|
+
return true
|
|
638
|
+
}
|
|
639
|
+
else{
|
|
640
|
+
let length = 0
|
|
641
|
+
if (this.fileListList[this.filedId]){
|
|
642
|
+
length = this.fileListList[this.filedId].length
|
|
643
|
+
}
|
|
644
|
+
if (file.length<=this.limitNum-length){
|
|
645
|
+
for (let i=0;i<file.length;i++){
|
|
646
|
+
const isLte2M = file[i].size / 1024 / 1024 <= 8;
|
|
647
|
+
console.log(file[i].type.indexOf('image')!==-1)
|
|
648
|
+
const isSupportedFormat =file[i].type.indexOf('image')!==-1
|
|
649
|
+
if (!isSupportedFormat){
|
|
650
|
+
this.$message.error("只能上传图片格式");
|
|
651
|
+
return false
|
|
652
|
+
}
|
|
653
|
+
if (!isLte2M&&isSupportedFormat) {
|
|
654
|
+
this.$message.error("上传图片大小不能超过 8MB!");
|
|
655
|
+
return false
|
|
656
|
+
}
|
|
657
|
+
return true
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
else {
|
|
661
|
+
let num = 1
|
|
662
|
+
if (this.limitNum){
|
|
663
|
+
num = this.limitNum
|
|
664
|
+
}
|
|
665
|
+
let messageText = '仅支持上传'+num+'张图片'
|
|
666
|
+
this.$message.error(messageText);
|
|
667
|
+
return false
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
},
|
|
673
|
+
//文件上传至服务器
|
|
674
|
+
afterRead(file){
|
|
675
|
+
this.fileUpload=true
|
|
676
|
+
console.log(file)
|
|
677
|
+
console.log(!Array.isArray(file))
|
|
678
|
+
if (!Array.isArray(file)){
|
|
679
|
+
this.uploadImgFun(file.content,file.file.name,file,file.file);
|
|
680
|
+
}
|
|
681
|
+
else {
|
|
682
|
+
console.log(file.length)
|
|
683
|
+
let num = 1
|
|
684
|
+
if (this.limitNum){
|
|
685
|
+
num = this.limitNum
|
|
686
|
+
}
|
|
687
|
+
if (file.length >num){
|
|
688
|
+
this.$message.warning('仅支持上传'+num+'张图片')
|
|
689
|
+
return false
|
|
690
|
+
}
|
|
691
|
+
else {
|
|
692
|
+
for (let i = 0; i < file.length; i++){
|
|
693
|
+
this.uploadImgFun(file[i].content,file[i].file.name,file[i],file[i].file);
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
console.log(file)
|
|
699
|
+
console.log(this.fileListList[this.filedId])
|
|
700
|
+
},
|
|
701
|
+
uploadImgFun(content,name,fileCon,file){
|
|
702
|
+
console.log(fileCon)
|
|
703
|
+
let imageData = {
|
|
704
|
+
urls:[]
|
|
705
|
+
}
|
|
706
|
+
let imageInfo = {
|
|
707
|
+
name:"",
|
|
708
|
+
status:'',
|
|
709
|
+
url:''
|
|
710
|
+
}
|
|
711
|
+
let res = multipartUpload(
|
|
712
|
+
this.ossConfig,
|
|
713
|
+
file,
|
|
714
|
+
null,
|
|
715
|
+
imageInfo
|
|
716
|
+
);
|
|
717
|
+
res.then((res) => {
|
|
718
|
+
console.log("upload result:", res);
|
|
719
|
+
// let filePath = res.name;
|
|
720
|
+
imageData.urls.push({
|
|
721
|
+
name:res.name,
|
|
722
|
+
url:ossFileUrl(this.ossConfig, res.name),
|
|
723
|
+
status:'success'
|
|
724
|
+
})
|
|
725
|
+
imageInfo.url = ossFileUrl(this.ossConfig, res.name)
|
|
726
|
+
imageInfo.status='success'
|
|
727
|
+
imageInfo.name=res.name
|
|
728
|
+
console.log(this.fileListList[this.filedId])
|
|
729
|
+
console.log(imageData)
|
|
730
|
+
for (let j=0;j<this.fileListList[this.filedId].length;j++){
|
|
731
|
+
if (this.fileListList[this.filedId][j].content&&this.fileListList[this.filedId][j].content===content){
|
|
732
|
+
this.fileListList[this.filedId][j].name=res.name
|
|
733
|
+
this.fileListList[this.filedId][j].status='success'
|
|
734
|
+
this.fileListList[this.filedId][j].url=imageInfo.url
|
|
735
|
+
delete this.fileListList[this.filedId][j].content
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
this.fileUpload=false
|
|
739
|
+
}).catch((err) => {
|
|
740
|
+
console.log("upload err", err);
|
|
741
|
+
});
|
|
742
|
+
|
|
743
|
+
},
|
|
744
|
+
dataURLtoFileFun (dataurl, filename) {
|
|
745
|
+
// 将base64转换为文件,dataurl为base64字符串,filename为文件名(必须带后缀名,如.jpg,.png)
|
|
746
|
+
let arr = dataurl.split(",");
|
|
747
|
+
let mime = arr[0].match(/:(.*?);/)[1];
|
|
748
|
+
let bstr = atob(arr[1]);
|
|
749
|
+
let n = bstr.length;
|
|
750
|
+
let u8arr = new Uint8Array(n);
|
|
751
|
+
while (n--) {
|
|
752
|
+
u8arr[n] = bstr.charCodeAt(n);
|
|
753
|
+
}
|
|
754
|
+
return new File([u8arr], filename, { type: mime });
|
|
755
|
+
},
|
|
756
|
+
//初始化默认值
|
|
757
|
+
defaultClick() {
|
|
758
|
+
for (let i = 0; i < this.formList.form.formFieldRelation.length; i++)
|
|
759
|
+
{
|
|
760
|
+
if(this.formList.form.formFieldRelation[i].formField.type ==='SELECT'||this.formList.form.formFieldRelation[i].formField.type ==='CHECKBOX' ||this.formList.form.formFieldRelation[i].formField.type==='RADIO')
|
|
761
|
+
{
|
|
762
|
+
if(!this.formList.form.formFieldRelation[i].formField.extInfo.option)
|
|
763
|
+
{
|
|
764
|
+
if(this.formList.form.formFieldRelation[i].formField.extInfo.exinfo)
|
|
765
|
+
{
|
|
766
|
+
for (let j=0;j<this.formList.form.formFieldRelation[i].formField.extInfo.exinfo.length;j++)
|
|
767
|
+
{
|
|
768
|
+
this.$set(this.formList.form.formFieldRelation[i].formField.extInfo.exinfo[j],'label',this.formList.form.formFieldRelation[i].formField.extInfo.exinfo[j].value)
|
|
769
|
+
}
|
|
770
|
+
this.$set(this.formList.form.formFieldRelation[i].formField.extInfo,'option',this.formList.form.formFieldRelation[i].formField.extInfo.exinfo)
|
|
771
|
+
}
|
|
772
|
+
if (this.formList.form.formFieldRelation[i].formField.extInfo.option){
|
|
773
|
+
if (this.formList.form.formFieldRelation[i].formField.type === 'RADIO') {
|
|
774
|
+
for (let j = 0; j < this.formList.form.formFieldRelation[i].formField.extInfo.option.length; j++) {
|
|
775
|
+
if(!this.formList.form.formFieldRelation[i].formField.extInfo.option[j].value)
|
|
776
|
+
{
|
|
777
|
+
this.formList.form.formFieldRelation[i].formField.extInfo.option[j].value=this.formList.form.formFieldRelation[i].formField.extInfo.option[j].label
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
if(!this.formList.form.formFieldRelation[i].value)
|
|
781
|
+
{
|
|
782
|
+
for (let j = 0; j < this.formList.form.formFieldRelation[i].formField.extInfo.option.length; j++) {
|
|
783
|
+
if (this.formList.form.formFieldRelation[i].formField.extInfo.option[j]._default === 'true') {
|
|
784
|
+
this.formList.form.formFieldRelation[i].value = this.formList.form.formFieldRelation[i].formField.extInfo.option[j].value
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
if (this.formList.form.formFieldRelation[i].formField.type === 'CHECKBOX') {
|
|
790
|
+
for (let j = 0; j < this.formList.form.formFieldRelation[i].formField.extInfo.option.length; j++) {
|
|
791
|
+
if (!this.formList.form.formFieldRelation[i].formField.extInfo.option[j].value) {
|
|
792
|
+
this.formList.form.formFieldRelation[i].formField.extInfo.option[j].value = this.formList.form.formFieldRelation[i].formField.extInfo.option[j].label
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
if (!this.formList.form.formFieldRelation[i].value||this.formList.form.formFieldRelation[i].value.length === 0)
|
|
797
|
+
{
|
|
798
|
+
this.formList.form.formFieldRelation[i].value=[]
|
|
799
|
+
for (let j = 0; j < this.formList.form.formFieldRelation[i].formField.extInfo.option.length; j++) {
|
|
800
|
+
if (this.formList.form.formFieldRelation[i].formField.extInfo.option[j]._default === 'true') {
|
|
801
|
+
this.formList.form.formFieldRelation[i].value[0] = this.formList.form.formFieldRelation[i].formField.extInfo.option[j].value
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
}
|
|
809
|
+
else {
|
|
810
|
+
if (this.formList.form.formFieldRelation[i].formField.extInfo.options){
|
|
811
|
+
if (this.formList.form.formFieldRelation[i].formField.type === 'RADIO') {
|
|
812
|
+
for (let j = 0; j < this.formList.form.formFieldRelation[i].formField.extInfo.options.length; j++) {
|
|
813
|
+
if(!this.formList.form.formFieldRelation[i].formField.extInfo.options[j].value)
|
|
814
|
+
{
|
|
815
|
+
this.formList.form.formFieldRelation[i].formField.extInfo.options[j].value=this.formList.form.formFieldRelation[i].formField.extInfo.options[j].label
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
if(!this.formList.form.formFieldRelation[i].value)
|
|
819
|
+
{
|
|
820
|
+
for (let j = 0; j < this.formList.form.formFieldRelation[i].formField.extInfo.option.length; j++) {
|
|
821
|
+
if (this.formList.form.formFieldRelation[i].formField.extInfo.options[j]._default === 'true') {
|
|
822
|
+
this.formList.form.formFieldRelation[i].value = this.formList.form.formFieldRelation[i].formField.extInfo.options[j].value
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
if (this.formList.form.formFieldRelation[i].formField.type === 'CHECKBOX') {
|
|
828
|
+
for (let j = 0; j < this.formList.form.formFieldRelation[i].formField.extInfo.options.length; j++) {
|
|
829
|
+
if (this.formList.form.formFieldRelation[i].formField.extInfo.options[j].value === '') {
|
|
830
|
+
this.formList.form.formFieldRelation[i].formField.extInfo.options[j].value = this.formList.form.formFieldRelation[i].formField.extInfo.options[j].label
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
if (this.formList.form.formFieldRelation[i].value === null||this.formList.form.formFieldRelation[i].value.length === 0)
|
|
835
|
+
{
|
|
836
|
+
this.formList.form.formFieldRelation[i].value=[]
|
|
837
|
+
for (let j = 0; j < this.formList.form.formFieldRelation[i].formField.extInfo.options.length; j++) {
|
|
838
|
+
if (this.formList.form.formFieldRelation[i].formField.extInfo.options[j]._default === 'true') {
|
|
839
|
+
this.formList.form.formFieldRelation[i].value[0] = this.formList.form.formFieldRelation[i].formField.extInfo.options[j].value
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
}
|
|
848
|
+
if (this.formList.form.formFieldRelation[i].formField.type ==='FILE'){
|
|
849
|
+
if (this.formList.form.formFieldRelation[i].value!==undefined){
|
|
850
|
+
if (this.formList.form.formFieldRelation[i].value===null||this.formList.form.formFieldRelation[i].value===''){
|
|
851
|
+
this.formList.form.formFieldRelation[i].value=[]
|
|
852
|
+
}
|
|
853
|
+
else {
|
|
854
|
+
let valueList=[]
|
|
855
|
+
let bool=false
|
|
856
|
+
if(this.formList.form.formFieldRelation[i].value.length > 0) {
|
|
857
|
+
for (let file=0;file<this.formList.form.formFieldRelation[i].value.length;file++) {
|
|
858
|
+
let type = typeof (this.formList.form.formFieldRelation[i].value[file])
|
|
859
|
+
if (type === "string") {
|
|
860
|
+
bool = true
|
|
861
|
+
valueList[file] = {}
|
|
862
|
+
valueList[file].url = this.formList.form.formFieldRelation[i].value[file]
|
|
863
|
+
}
|
|
864
|
+
if (type === 'object'&&JSON.stringify(this.formList.form.formFieldRelation[i].value[file])!=='{}') {
|
|
865
|
+
this.fileListList[this.formList.form.formFieldRelation[i].fieldId]=this.formList.form.formFieldRelation[i].value
|
|
866
|
+
}
|
|
867
|
+
else {
|
|
868
|
+
this.fileListList[this.formList.form.formFieldRelation[i].fieldId]=[]
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
if (bool){
|
|
872
|
+
this.fileListList[this.formList.form.formFieldRelation[i].fieldId]=valueList
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
console.log(bool)
|
|
876
|
+
console.log(this.fileListList[this.formList.form.formFieldRelation[i].fieldId])
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
}
|
|
886
|
+
console.log(this.formList)
|
|
887
|
+
let test = []
|
|
888
|
+
for (let i = 0; i < this.formList.form.formFieldRelation.length; i++) {
|
|
889
|
+
if (this.formList.form.formFieldRelation[i].formField.type === 'CASCADER') {
|
|
890
|
+
test.push(this.formList.form.formFieldRelation[i])
|
|
891
|
+
let cascader=''
|
|
892
|
+
console.log(this.formList.form.formFieldRelation[i])
|
|
893
|
+
if(this.formList.form.formFieldRelation[i].value)
|
|
894
|
+
{
|
|
895
|
+
if(this.formList.form.formFieldRelation[i].value.length > 0)
|
|
896
|
+
{
|
|
897
|
+
for (let j = 0; j < this.formList.form.formFieldRelation[i].value.length; j++) {
|
|
898
|
+
if (this.formList.form.formFieldRelation[i].value[j]) {
|
|
899
|
+
cascader += this.formList.form.formFieldRelation[i].value[j] + '/'
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
cascader = cascader.substr(0, cascader.length - 1)
|
|
903
|
+
|
|
904
|
+
}
|
|
905
|
+
this.cascadeValue[this.formList.form.formFieldRelation[i].fieldId]=cascader
|
|
906
|
+
}
|
|
907
|
+
else
|
|
908
|
+
{
|
|
909
|
+
this.formList.form.formFieldRelation[i].value=[]
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
if (this.formList.form.formFieldRelation[i].formField.type === 'DATE_PICKER')
|
|
913
|
+
{
|
|
914
|
+
if(this.formList.form.formFieldRelation[i].value!==null && this.formList.form.formFieldRelation[i].value!=='' )
|
|
915
|
+
{
|
|
916
|
+
|
|
917
|
+
this.dateValue[this.formList.form.formFieldRelation[i].fieldId]=this.formatDate(this.formList.form.formFieldRelation[i].value)
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
if (this.formList.form.formFieldRelation[i].formField.type === 'TIME_PICKER')
|
|
921
|
+
{
|
|
922
|
+
if(this.formList.form.formFieldRelation[i].value!==''&& this.formList.form.formFieldRelation[i].value!==null)
|
|
923
|
+
{
|
|
924
|
+
const dateTime = new Date(this.formList.form.formFieldRelation[i].value)
|
|
925
|
+
this.timeValue[this.formList.form.formFieldRelation[i].fieldId]=this.addZero(dateTime.getHours()) + ':' + this.addZero(dateTime.getMinutes())
|
|
926
|
+
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
if (this.formList.form.formFieldRelation[i].formField.type === 'SELECT') {
|
|
930
|
+
if ( this.formList.form.formFieldRelation[i].formField.extInfo.option){
|
|
931
|
+
for (let j = 0; j < this.formList.form.formFieldRelation[i].formField.extInfo.option.length; j++) {
|
|
932
|
+
if (this.formList.form.formFieldRelation[i].formField.extInfo.option[j].value === '') {
|
|
933
|
+
this.formList.form.formFieldRelation[i].formField.extInfo.option[j].value = this.formList.form.formFieldRelation[i].formField.extInfo.option[j].label
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
if(this.formList.form.formFieldRelation[i].value)
|
|
937
|
+
{
|
|
938
|
+
console.log(this.formList.form.formFieldRelation[i].formField.extInfo.option)
|
|
939
|
+
for (let j=0;j<this.formList.form.formFieldRelation[i].formField.extInfo.option.length;j++)
|
|
940
|
+
{
|
|
941
|
+
if (this.formList.form.formFieldRelation[i].value === this.formList.form.formFieldRelation[i].formField.extInfo.option[j].value)
|
|
942
|
+
{
|
|
943
|
+
this.selectValues[this.formList.form.formFieldRelation[i].fieldId] =this.formList.form.formFieldRelation[i].formField.extInfo.option[j].label
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
/*this.selectValues[this.formList.form.formFieldRelation[i].fieldId] = this.formList.form.formFieldRelation[i].value*/
|
|
947
|
+
|
|
948
|
+
}
|
|
949
|
+
else
|
|
950
|
+
{
|
|
951
|
+
for (let j = 0; j < this.formList.form.formFieldRelation[i].formField.extInfo.option.length; j++) {
|
|
952
|
+
if (this.formList.form.formFieldRelation[i].formField.extInfo.option[j]._default === 'true') {
|
|
953
|
+
this.selectValues[this.formList.form.formFieldRelation[i].fieldId] = this.formList.form.formFieldRelation[i].formField.extInfo.option[j].label
|
|
954
|
+
this.formList.form.formFieldRelation[i].value=this.formList.form.formFieldRelation[i].formField.extInfo.option[j].value
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
else {
|
|
960
|
+
for (let j = 0; j < this.formList.form.formFieldRelation[i].formField.extInfo.options.length; j++) {
|
|
961
|
+
if (this.formList.form.formFieldRelation[i].formField.extInfo.options[j].value === '') {
|
|
962
|
+
this.formList.form.formFieldRelation[i].formField.extInfo.options[j].value = this.formList.form.formFieldRelation[i].formField.extInfo.options[j].label
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
if(this.formList.form.formFieldRelation[i].value)
|
|
966
|
+
{
|
|
967
|
+
for (let j=0;j<this.formList.form.formFieldRelation[i].formField.extInfo.options.length;j++)
|
|
968
|
+
{
|
|
969
|
+
if (this.formList.form.formFieldRelation[i].value === this.formList.form.formFieldRelation[i].formField.extInfo.options[j].value)
|
|
970
|
+
{
|
|
971
|
+
this.selectValues[this.formList.form.formFieldRelation[i].fieldId] =this.formList.form.formFieldRelation[i].formField.extInfo.options[j].label
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
/*this.selectValues[this.formList.form.formFieldRelation[i].fieldId] = this.formList.form.formFieldRelation[i].value*/
|
|
975
|
+
|
|
976
|
+
}
|
|
977
|
+
else
|
|
978
|
+
{
|
|
979
|
+
for (let j = 0; j < this.formList.form.formFieldRelation[i].formField.extInfo.options.length; j++) {
|
|
980
|
+
if (this.formList.form.formFieldRelation[i].formField.extInfo.options[j]._default === 'true') {
|
|
981
|
+
this.selectValues[this.formList.form.formFieldRelation[i].fieldId] = this.formList.form.formFieldRelation[i].formField.extInfo.options[j].label
|
|
982
|
+
this.formList.form.formFieldRelation[i].value=this.formList.form.formFieldRelation[i].formField.extInfo.options[j].value
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
this.formShow=this.formList
|
|
991
|
+
console.log(this.formList.form.formFieldRelation)
|
|
992
|
+
},
|
|
993
|
+
addZero(i) {
|
|
994
|
+
if (i < 10) {
|
|
995
|
+
i = "0" + i;
|
|
996
|
+
}
|
|
997
|
+
return i;
|
|
998
|
+
},
|
|
999
|
+
formatter(type, value) {
|
|
1000
|
+
// 格式化选择器日期
|
|
1001
|
+
if (type === "year") {
|
|
1002
|
+
return `${value}年`;
|
|
1003
|
+
} else if (type === "month") {
|
|
1004
|
+
return `${value}月`;
|
|
1005
|
+
} else if (type === "day") {
|
|
1006
|
+
return `${value}日`;
|
|
1007
|
+
} else if (type === "hour") {
|
|
1008
|
+
return `${value}时`;
|
|
1009
|
+
} else if (type === "minute") {
|
|
1010
|
+
return `${value}分`;
|
|
1011
|
+
}
|
|
1012
|
+
return value;
|
|
1013
|
+
},
|
|
1014
|
+
|
|
1015
|
+
isMobile() {
|
|
1016
|
+
if (this.usePropStyleType === false){
|
|
1017
|
+
let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
|
|
1018
|
+
if (flag) {
|
|
1019
|
+
this.isPhone=true
|
|
1020
|
+
}
|
|
1021
|
+
else {
|
|
1022
|
+
this.isCompany=true
|
|
1023
|
+
}
|
|
1024
|
+
}else {
|
|
1025
|
+
this.isPhone=this.propIsPhone;
|
|
1026
|
+
this.isCompany=this.propIsCompany;
|
|
1027
|
+
}
|
|
1028
|
+
},
|
|
1029
|
+
//时间的选择器
|
|
1030
|
+
onConfirm(value, id,item) {
|
|
1031
|
+
for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
|
|
1032
|
+
if (this.formShow.form.formFieldRelation[i].fieldId=== id) {
|
|
1033
|
+
this.formShow.form.formFieldRelation[i].value = value
|
|
1034
|
+
if (!item.formField.extInfo.mold||item.formField.extInfo.mold==='DATA_TIME'){
|
|
1035
|
+
this.timeValue[id] =this.formatDate(value) +" "+ this.addZero(value.getHours()) + ':' + this.addZero(value.getMinutes())
|
|
1036
|
+
this.showTimePicker = false;
|
|
1037
|
+
}
|
|
1038
|
+
else {
|
|
1039
|
+
this.timeValue[id] =this.formatDate(value)
|
|
1040
|
+
this.showTimePickerd = false;
|
|
1041
|
+
}
|
|
1042
|
+
break
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
1046
|
+
//转换日期的函数
|
|
1047
|
+
formatDate(date) {
|
|
1048
|
+
const dateTime = new Date(date)
|
|
1049
|
+
return `${dateTime.getFullYear()}-${dateTime.getMonth() + 1}-${dateTime.getDate()}`;
|
|
1050
|
+
},
|
|
1051
|
+
//日期的选择器
|
|
1052
|
+
onConfirmCalendar(date, id) {
|
|
1053
|
+
for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
|
|
1054
|
+
if (this.formShow.form.formFieldRelation[i].fieldId === id) {
|
|
1055
|
+
this.dateValue[id] = this.formatDate(date)
|
|
1056
|
+
this.formShow.form.formFieldRelation[i].value = date
|
|
1057
|
+
this.showCalendar = false;
|
|
1058
|
+
break
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
},
|
|
1062
|
+
//下拉的选择器
|
|
1063
|
+
onConfirmSelect(value, id) {
|
|
1064
|
+
console.log(value)
|
|
1065
|
+
for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
|
|
1066
|
+
if (this.formShow.form.formFieldRelation[i].fieldId === id) {
|
|
1067
|
+
this.selectValues[this.formShow.form.formFieldRelation[i].fieldId] = value
|
|
1068
|
+
if (this.formShow.form.formFieldRelation[i].formField.extInfo.option){
|
|
1069
|
+
for (let j = 0; j < this.formShow.form.formFieldRelation[i].formField.extInfo.option.length; j++) {
|
|
1070
|
+
if(value ===this.formShow.form.formFieldRelation[i].formField.extInfo.option[j].label)
|
|
1071
|
+
{
|
|
1072
|
+
this.formShow.form.formFieldRelation[i].value = this.formShow.form.formFieldRelation[i].formField.extInfo.option[j].value
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
else {
|
|
1077
|
+
for (let j = 0; j < this.formShow.form.formFieldRelation[i].formField.extInfo.options.length; j++) {
|
|
1078
|
+
if(value ===this.formShow.form.formFieldRelation[i].formField.extInfo.options[j].label)
|
|
1079
|
+
{
|
|
1080
|
+
this.formShow.form.formFieldRelation[i].value = this.formShow.form.formFieldRelation[i].formField.extInfo.options[j].value
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
this.showPicker = false;
|
|
1086
|
+
break
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
},
|
|
1090
|
+
//时间日期的选择器
|
|
1091
|
+
/* onConfirmDateTime(date,id){
|
|
1092
|
+
for (let i=0;i<this.formList.form.formFieldRelation.length;i++)
|
|
1093
|
+
{
|
|
1094
|
+
|
|
1095
|
+
if(this.formList.form.formFieldRelation[i].formField.id===id)
|
|
1096
|
+
{
|
|
1097
|
+
this.dateTimeValue[id]=this.addZero(date.getFullYear())+'-'+this.addZero(date.getMonth())+'-'+this.addZero(date.getDate())+' '+this.addZero(date.getHours())+':'+this.addZero(date.getMinutes())
|
|
1098
|
+
this.formList.form.formFieldRelation[i].value[0]=date
|
|
1099
|
+
this.showDateTimePicker = false;
|
|
1100
|
+
break
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
},
|
|
1105
|
+
onConfirmDateTime1(date,id){
|
|
1106
|
+
for (let i=0;i<this.formList.form.formFieldRelation.length;i++)
|
|
1107
|
+
{
|
|
1108
|
+
if(this.formList.form.formFieldRelation[i].formField.id===id)
|
|
1109
|
+
{
|
|
1110
|
+
|
|
1111
|
+
this.dateTimeValue1[id]=this.addZero(date.getFullYear())+'-'+this.addZero(date.getMonth())+'-'+this.addZero(date.getDate())+' '+this.addZero(date.getHours())+':'+this.addZero(date.getMinutes())
|
|
1112
|
+
this.formList.form.formFieldRelation[i].value[1]=date
|
|
1113
|
+
this.showDateTimePicker1 = false;
|
|
1114
|
+
break
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
},*/
|
|
1118
|
+
//提交按钮事件
|
|
1119
|
+
submitClick() {
|
|
1120
|
+
|
|
1121
|
+
for (let i=0;i<this.formShow.form.formFieldRelation.length;i++)
|
|
1122
|
+
{
|
|
1123
|
+
if(this.formShow.form.formFieldRelation[i].formField.type==='CASCADER')
|
|
1124
|
+
{
|
|
1125
|
+
let cascader = this.formShow.form.formFieldRelation[i].formField.extInfo.cascade?this.formShow.form.formFieldRelation[i].formField.extInfo.cascade:this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown[0].options?this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown[0].options:[]
|
|
1126
|
+
cascader.forEach(item=>{
|
|
1127
|
+
if(item.children!==undefined)
|
|
1128
|
+
{
|
|
1129
|
+
if(item.children.length===0)
|
|
1130
|
+
delete item.children
|
|
1131
|
+
else {
|
|
1132
|
+
item.children.forEach(items=>{
|
|
1133
|
+
if(items.children)
|
|
1134
|
+
{
|
|
1135
|
+
if(items.children.length===0)
|
|
1136
|
+
delete items.children
|
|
1137
|
+
}
|
|
1138
|
+
})
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
})
|
|
1142
|
+
|
|
1143
|
+
let test=[]
|
|
1144
|
+
console.log(typeof test)
|
|
1145
|
+
}
|
|
1146
|
+
if (this.fileListList[this.formShow.form.formFieldRelation[i].fieldId]!==undefined){
|
|
1147
|
+
let value=[]
|
|
1148
|
+
|
|
1149
|
+
this.fileListList[this.formShow.form.formFieldRelation[i].fieldId].forEach(item=>{
|
|
1150
|
+
let file={}
|
|
1151
|
+
file.name=item.name
|
|
1152
|
+
file.url=item.url
|
|
1153
|
+
value.push(file)
|
|
1154
|
+
})
|
|
1155
|
+
console.log(value)
|
|
1156
|
+
this.formShow.form.formFieldRelation[i].value=value
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
if(this.formShow.form.formFieldRelation[i].display===true && this.formShow.form.formFieldRelation[i].required === true&&this.formShow.form.formFieldRelation[i].fieldId!=='workorder_name')
|
|
1160
|
+
{
|
|
1161
|
+
|
|
1162
|
+
if(!this.formShow.form.formFieldRelation[i].value || (this.formShow.form.formFieldRelation[i].value&&this.formShow.form.formFieldRelation[i].value.length===0))
|
|
1163
|
+
{
|
|
1164
|
+
this.$message.error('请完善'+ this.formShow.form.formFieldRelation[i].formField.name)
|
|
1165
|
+
return
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
console.log( this.fileListList)
|
|
1170
|
+
}
|
|
1171
|
+
console.log(this.formShow)
|
|
1172
|
+
this.$emit('submitClick',this.formShow)
|
|
1173
|
+
this.disableds = true
|
|
1174
|
+
this.submitValue = '已提交'
|
|
1175
|
+
|
|
1176
|
+
|
|
1177
|
+
},
|
|
1178
|
+
//日期的点击事件
|
|
1179
|
+
dateClick(id) {
|
|
1180
|
+
if(this.disableds === false)
|
|
1181
|
+
{
|
|
1182
|
+
for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
|
|
1183
|
+
if (this.formShow.form.formFieldRelation[i].fieldId === id) {
|
|
1184
|
+
this.dateId = id
|
|
1185
|
+
this.showCalendar = true
|
|
1186
|
+
break
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
},
|
|
1192
|
+
//时间的点击事件
|
|
1193
|
+
timeClick(id,item) {
|
|
1194
|
+
if(this.disableds === false){
|
|
1195
|
+
for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
|
|
1196
|
+
if (this.formShow.form.formFieldRelation[i].fieldId === id) {
|
|
1197
|
+
this.timeId = id
|
|
1198
|
+
if (!item.formField.extInfo.mold||item.formField.extInfo.mold==='DATA_TIME'){
|
|
1199
|
+
this.showTimePicker = true
|
|
1200
|
+
}
|
|
1201
|
+
else {
|
|
1202
|
+
this.showTimePickerd= true
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
break
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
},
|
|
1212
|
+
//下拉的点击事件
|
|
1213
|
+
selectClick(id) {
|
|
1214
|
+
console.log(id)
|
|
1215
|
+
if(this.disableds === false){
|
|
1216
|
+
let selectOption
|
|
1217
|
+
this.selectValue=[]
|
|
1218
|
+
for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
|
|
1219
|
+
if(this.formShow.form.formFieldRelation[i].formField.type==='SELECT')
|
|
1220
|
+
{
|
|
1221
|
+
if (this.formShow.form.formFieldRelation[i].fieldId === id) {
|
|
1222
|
+
selectOption = this.formShow.form.formFieldRelation[i].formField.extInfo.option?this.formShow.form.formFieldRelation[i].formField.extInfo.option:this.formShow.form.formFieldRelation[i].formField.extInfo.options?this.formShow.form.formFieldRelation[i].formField.extInfo.options:[]
|
|
1223
|
+
for (let j = 0; j < selectOption.length; j++) {
|
|
1224
|
+
this.selectValue[j] = selectOption[j].label
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
console.log(this.selectValue)
|
|
1231
|
+
this.selectId = id
|
|
1232
|
+
this.showPicker = true
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
},
|
|
1236
|
+
//级联的点击的事件
|
|
1237
|
+
pickerClick(id) {
|
|
1238
|
+
if(this.disableds === false)
|
|
1239
|
+
{
|
|
1240
|
+
if(this.pickerId!==id)
|
|
1241
|
+
{
|
|
1242
|
+
for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
|
|
1243
|
+
if (this.formShow.form.formFieldRelation[i].fieldId === id) {
|
|
1244
|
+
console.log(this.formShow.form.formFieldRelation[i].value)
|
|
1245
|
+
this.keyValue=''
|
|
1246
|
+
if(this.formShow.form.formFieldRelation[i].value.length!==undefined)
|
|
1247
|
+
{
|
|
1248
|
+
for (let m=0;m<this.formShow.form.formFieldRelation[i].value.length;m++)
|
|
1249
|
+
{
|
|
1250
|
+
this.keyValue+=this.formShow.form.formFieldRelation[i].value[m]
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
this.data = this.formShow.form.formFieldRelation[i].formField.extInfo.cascade?this.formShow.form.formFieldRelation[i].formField.extInfo.cascade:this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown?this.formShow.form.formFieldRelation[i].formField.extInfo.cascadeDown[0].options:[]
|
|
1255
|
+
this.column[0].values = Object.values(this.data).map(function (e) {
|
|
1256
|
+
return {text: e.value, code: e.value}
|
|
1257
|
+
})
|
|
1258
|
+
if (this.data[0].children !== undefined) {
|
|
1259
|
+
this.column[1].values = Object.values(this.data[0].children).map(function (e) {
|
|
1260
|
+
return {text: e.value, code: e.value}
|
|
1261
|
+
})
|
|
1262
|
+
if (this.data[0].children[0].children !== undefined) {
|
|
1263
|
+
this.column[2].values = Object.values(this.data[0].children[0].children).map(function (e) {
|
|
1264
|
+
return {text: e.value, code: e.value}
|
|
1265
|
+
})
|
|
1266
|
+
}
|
|
1267
|
+
else {
|
|
1268
|
+
this.$set(this.data[0].children[0], 'children', [])
|
|
1269
|
+
this.column[2].values=Object.values(this.data[0].children[0].children).map(function (res) {
|
|
1270
|
+
return {text: res.value, code: res.value};
|
|
1271
|
+
})
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
this.pickerId = id
|
|
1279
|
+
this.showArea = true
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
|
|
1283
|
+
},
|
|
1284
|
+
|
|
1285
|
+
onChange(picker, values,index) {
|
|
1286
|
+
// 这里我有可能渲染的有问题,导致回调每次都修改了当前列,其他值没有修改,当前列??(当前列什么鬼呀,什么垃圾啊???) 解释一下 ↓↓
|
|
1287
|
+
// 因为vant的 van-picker 回调只会返回你修改的那一列,比如现在为 [北京,北京,东城区],你修改了省为[天津市,天津市,和平区],但是vant的change回调会得到[天津市,北京,东城区],后面两个在回调中没有修改,不知道我的渲染方法有问题还是什么问题。
|
|
1288
|
+
// 所以我在这里判断change事件触发后,如果你修改了省份的话,回调里面省份会改变,但是市和区还是上一个省份的 市和区,这时我们执行回调修改省,市,区的时候,因为回调只有省改变了,市和区DOM改变了,但是回调里面没改变的问题(不晓得什么问题),这时我们去找省下面的 市,我们取回调的市名称,如果在省下面没有找到这个市,默认展示第一个市,区也默认展示第一个市下面的区,如果遍历市能查到,就去展示对应的市。
|
|
1289
|
+
// 回调时修改第2列数据
|
|
1290
|
+
console.log(index)
|
|
1291
|
+
if (index == 0){
|
|
1292
|
+
picker.setColumnValues(2, []); // 防止突然选中第一个,第二个是更新的,但第三个联级不更新,我暂时强制清空
|
|
1293
|
+
}
|
|
1294
|
+
let ColumnIndexss=picker.getIndexes()
|
|
1295
|
+
let getValues=picker.getValues()
|
|
1296
|
+
console.log(getValues)
|
|
1297
|
+
console.log(ColumnIndexss)
|
|
1298
|
+
|
|
1299
|
+
console.log(this.data)
|
|
1300
|
+
let testValue=''
|
|
1301
|
+
this.$nextTick(()=>{
|
|
1302
|
+
if(index == 0)
|
|
1303
|
+
{
|
|
1304
|
+
if(this.data[ColumnIndexss[0]].children.length > 0)
|
|
1305
|
+
{
|
|
1306
|
+
if(this.data[ColumnIndexss[0]].children[0]!==undefined)
|
|
1307
|
+
{
|
|
1308
|
+
testValue=this.data[ColumnIndexss[0]].children[0].value
|
|
1309
|
+
picker.setColumnValues(2, this.county(this.data, testValue));
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
else
|
|
1313
|
+
picker.setColumnValues(2, []);
|
|
1314
|
+
}
|
|
1315
|
+
if(index == 1)
|
|
1316
|
+
{
|
|
1317
|
+
if(this.data[ColumnIndexss[0]].children.length > 0)
|
|
1318
|
+
{
|
|
1319
|
+
if(this.data[ColumnIndexss[0]].children[ColumnIndexss[1]]!==undefined)
|
|
1320
|
+
{
|
|
1321
|
+
testValue=this.data[ColumnIndexss[0]].children[ColumnIndexss[1]].value
|
|
1322
|
+
picker.setColumnValues(2, this.county(this.data, testValue));
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
else
|
|
1326
|
+
picker.setColumnValues(2, []);
|
|
1327
|
+
}
|
|
1328
|
+
})
|
|
1329
|
+
|
|
1330
|
+
picker.setColumnValues(1, this.cityDate(this.data, values[0].text));
|
|
1331
|
+
// 回调时修改第3列数据
|
|
1332
|
+
|
|
1333
|
+
|
|
1334
|
+
},
|
|
1335
|
+
// 修改级联第二级 这里不再多说什么了根据自己的数据格式来
|
|
1336
|
+
cityDate(data, province) {
|
|
1337
|
+
var that = this;
|
|
1338
|
+
data.forEach(function (res) {
|
|
1339
|
+
if (res.value == province) {
|
|
1340
|
+
that.cityDates = res;
|
|
1341
|
+
}
|
|
1342
|
+
});
|
|
1343
|
+
console.log(that.cityDates.children)
|
|
1344
|
+
if (that.cityDates.children !== undefined&&that.cityDates.children.length > 0) {
|
|
1345
|
+
return that.cityDates.children.map(function (res) {
|
|
1346
|
+
return {text: res.value, code: res.value};
|
|
1347
|
+
})
|
|
1348
|
+
} else {
|
|
1349
|
+
this.$set(that.cityDates, 'children', [])
|
|
1350
|
+
return that.cityDates.children.map(function (res) {
|
|
1351
|
+
return {text: res.value, code: res.value};
|
|
1352
|
+
})
|
|
1353
|
+
}
|
|
1354
|
+
// return 返回数据格式,因为我需要省市区code,所以我return的格式是对象,例:[{text:'北京市',code:'1'},{text:'河南省',code:'2'},...],如果你不需要code直接这样就可以 例['北京市','河南省',.....]
|
|
1355
|
+
},
|
|
1356
|
+
// 修改级联第三级 这里不再多说什么了根据自己的数据格式来
|
|
1357
|
+
county(data, county) {
|
|
1358
|
+
var that = this;
|
|
1359
|
+
var countyDate = '';
|
|
1360
|
+
// 因为vant的 van-picker 回调只会返回你修改的那一列,比如现在为 [北京,北京,东城区],你修改了省为[天津市,天津市,和平区],但是vant的change回调会得到[天津市,北京,东城区],后面两个在回调中没有修改,不知道我的渲染方法有问题还是什么问题。
|
|
1361
|
+
// 所以我在这里判断change事件触发后,如果你修改了省份的话,回调里面省份会改变,但是市和区还是上一个省份的 市和区,这时我们执行回调修改省,市,区的时候,因为回调只有省改变了,市和区DOM改变了,但是回调里面没改变的问题(不晓得什么问题),这时我们去找省下面的 市,我们取回调的市名称,如果在省下面没有找到这个市,默认展示第一个市,区也默认展示第一个市下面的区,如果遍历市能查到,就去展示对应的市。
|
|
1362
|
+
that.cityDates.children.forEach(function (res) {
|
|
1363
|
+
if (res.value == county) {
|
|
1364
|
+
countyDate = res;
|
|
1365
|
+
}
|
|
1366
|
+
});
|
|
1367
|
+
// 这里如果没有找到对应的县
|
|
1368
|
+
if (countyDate == '') {
|
|
1369
|
+
console.log(that.cityDates.children.length)
|
|
1370
|
+
if(that.cityDates.children.length > 0)
|
|
1371
|
+
{
|
|
1372
|
+
countyDate = that.cityDates.children[0];
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
}
|
|
1376
|
+
console.log(countyDate.children)
|
|
1377
|
+
// return 县
|
|
1378
|
+
if (countyDate.children === undefined) {
|
|
1379
|
+
this.$set(countyDate, 'children', [])
|
|
1380
|
+
return countyDate.children.map(function (res) {
|
|
1381
|
+
return {text: res.value, code: res.value};
|
|
1382
|
+
})
|
|
1383
|
+
} else {
|
|
1384
|
+
return countyDate.children.map(function (res) {
|
|
1385
|
+
return {text: res.value, code: res.value};
|
|
1386
|
+
})
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
// return 返回数据格式,因为我需要省市区code,所以我return的格式是对象,例:[{text:'北京市',code:'1'},{text:'河南省',code:'2'},...],如果你不需要code直接这样就可以 例['北京市','河南省',.....]
|
|
1390
|
+
},
|
|
1391
|
+
//点击级联弹出框的确认按钮
|
|
1392
|
+
onConfirms(val, id) {
|
|
1393
|
+
let test = ''
|
|
1394
|
+
for (let i = 0; i < val.length; i++) {
|
|
1395
|
+
if (val[i] !== undefined) {
|
|
1396
|
+
test += val[i].text + '/'
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
test = test.substr(0, test.length - 1)
|
|
1400
|
+
for (let i = 0; i < this.formShow.form.formFieldRelation.length; i++) {
|
|
1401
|
+
if (this.formShow.form.formFieldRelation[i].fieldId=== id) {
|
|
1402
|
+
this.cascadeValue[id] = test
|
|
1403
|
+
for (let j = 0; j < val.length; j++) {
|
|
1404
|
+
if (val[j] !== undefined) {
|
|
1405
|
+
this.formShow.form.formFieldRelation[i].value[j] = val[j].text
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
break
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
this.showArea = false;
|
|
1412
|
+
sessionStorage.setItem('cascader',test)
|
|
1413
|
+
},
|
|
1414
|
+
onCancel() {
|
|
1415
|
+
this.showArea = false;
|
|
1416
|
+
},
|
|
1417
|
+
aliyunOssRequest(data){
|
|
1418
|
+
console.log("upload request data", data);
|
|
1419
|
+
console.log(this.fileListList)
|
|
1420
|
+
|
|
1421
|
+
this.loading = this.$loading({
|
|
1422
|
+
lock: true,
|
|
1423
|
+
text: 'Loading',
|
|
1424
|
+
spinner: 'el-icon-loading',
|
|
1425
|
+
background: 'rgba(0, 0, 0, 0.8)'
|
|
1426
|
+
});
|
|
1427
|
+
let file = data.file;
|
|
1428
|
+
console.log("upload file:", file);
|
|
1429
|
+
let imgInfo = {
|
|
1430
|
+
status:'',
|
|
1431
|
+
url:'',
|
|
1432
|
+
name:''
|
|
1433
|
+
}
|
|
1434
|
+
/* let imageData = {
|
|
1435
|
+
id:cid,
|
|
1436
|
+
cid:cid,
|
|
1437
|
+
type: "IMAGE",
|
|
1438
|
+
content: {
|
|
1439
|
+
urls: [],
|
|
1440
|
+
progress: 0,
|
|
1441
|
+
},
|
|
1442
|
+
};*/
|
|
1443
|
+
let res = multipartUpload(
|
|
1444
|
+
this.ossConfig,
|
|
1445
|
+
file,
|
|
1446
|
+
null,
|
|
1447
|
+
imgInfo
|
|
1448
|
+
);
|
|
1449
|
+
res.then((res) => {
|
|
1450
|
+
console.log("upload result:", res);
|
|
1451
|
+
// let filePath = res.name;
|
|
1452
|
+
/* imageData.content.progress = 1;
|
|
1453
|
+
imageData.content.urls.push(
|
|
1454
|
+
ossFileUrl(this.ossConfig, res.name)
|
|
1455
|
+
);
|
|
1456
|
+
console.log('imageData',imageData)*/
|
|
1457
|
+
imgInfo.url = ossFileUrl(this.ossConfig, res.name)
|
|
1458
|
+
imgInfo.status='success'
|
|
1459
|
+
if (data.file){
|
|
1460
|
+
imgInfo.name = data.file.name
|
|
1461
|
+
imgInfo.uid = data.file.uid
|
|
1462
|
+
}
|
|
1463
|
+
if (!this.fileListList[this.filedId])
|
|
1464
|
+
{
|
|
1465
|
+
this.fileListList[this.filedId] = []
|
|
1466
|
+
}
|
|
1467
|
+
this.fileListList[this.filedId].push(imgInfo)
|
|
1468
|
+
this.loading.close()
|
|
1469
|
+
}).catch((err) => {
|
|
1470
|
+
console.log("upload err", err);
|
|
1471
|
+
});
|
|
1472
|
+
console.log('fileListList',this.fileListList[this.filedId])
|
|
1473
|
+
console.log('imgInfo',imgInfo)
|
|
1474
|
+
},
|
|
1475
|
+
successUpload(response,file,fileList){
|
|
1476
|
+
console.log('fileList',fileList)
|
|
1477
|
+
if (!this.fileListList[this.filedId]){
|
|
1478
|
+
this.fileListList[this.filedId] = []
|
|
1479
|
+
}
|
|
1480
|
+
for (let i=0;i<fileList.length;i++){
|
|
1481
|
+
if (!this.fileListList[this.filedId][i]){
|
|
1482
|
+
this.fileListList[this.filedId][i]={}
|
|
1483
|
+
}
|
|
1484
|
+
this.fileListList[this.filedId][i].url=fileList[i].url
|
|
1485
|
+
this.fileListList[this.filedId][i].name=fileList[i].name
|
|
1486
|
+
this.fileListList[this.filedId][i].status=fileList[i].status
|
|
1487
|
+
}
|
|
1488
|
+
console.log('successUpload',this.fileListList)
|
|
1489
|
+
},
|
|
1490
|
+
uploadProgress(e,res,response){
|
|
1491
|
+
console.log(e,res,response)
|
|
1492
|
+
this.loading = this.$loading({
|
|
1493
|
+
lock: true,
|
|
1494
|
+
text: 'Loading',
|
|
1495
|
+
spinner: 'el-icon-loading',
|
|
1496
|
+
background: 'rgba(0, 0, 0, 0.7)'
|
|
1497
|
+
});
|
|
1498
|
+
},
|
|
1499
|
+
handleRemove(file,fileList) {
|
|
1500
|
+
console.log(file);
|
|
1501
|
+
console.log(fileList)
|
|
1502
|
+
console.log(this.fileListList)
|
|
1503
|
+
if (this.fileListList[this.filedId]){
|
|
1504
|
+
for (let i=0;i<this.fileListList[this.filedId].length;i++)
|
|
1505
|
+
{
|
|
1506
|
+
if (this.fileListList[this.filedId][i].uid){
|
|
1507
|
+
if (this.fileListList[this.filedId][i].uid===file.uid){
|
|
1508
|
+
this.fileListList[this.filedId].splice(i,1)
|
|
1509
|
+
return
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
else if (this.fileListList[this.filedId][i].url===file.url){
|
|
1513
|
+
this.fileListList[this.filedId].splice(i,1)
|
|
1514
|
+
return
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
}
|
|
1519
|
+
/*let value=[]
|
|
1520
|
+
for (let i=0;i<fileList.length;i++){
|
|
1521
|
+
value[i]={}
|
|
1522
|
+
value[i].name=fileList[i].name
|
|
1523
|
+
if(fileList[i].response){
|
|
1524
|
+
value[i].url=fileList[i].response.data
|
|
1525
|
+
}
|
|
1526
|
+
else {
|
|
1527
|
+
value[i].url=fileList[i].url
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
for (let i=0;i<this.formShow.form.formFieldRelation.length;i++){
|
|
1531
|
+
if (this.formShow.form.formFieldRelation[i].fieldId===this.filedId){
|
|
1532
|
+
this.fileListList[this.filedId]=value
|
|
1533
|
+
}
|
|
1534
|
+
}*/
|
|
1535
|
+
/*this.fileListList = [...this.fileListList]*/
|
|
1536
|
+
},
|
|
1537
|
+
handleEditChange(file,fileList){
|
|
1538
|
+
console.log(file)
|
|
1539
|
+
this.hideUploadEdit=fileList.length >= this.limitNum
|
|
1540
|
+
console.log(this.hideUploadEdit)
|
|
1541
|
+
console.log(fileList)
|
|
1542
|
+
},
|
|
1543
|
+
|
|
1544
|
+
onUploadProgress: function (progress, point, file, videoData) {
|
|
1545
|
+
console.debug("upload video progress", progress, point);
|
|
1546
|
+
if (progress === 1) {
|
|
1547
|
+
// this.loadingIns.close();
|
|
1548
|
+
videoData.content.url = ossFileUrl(this.ossConfig, point.name);
|
|
1549
|
+
// this.chooseVideo({data:url},file);
|
|
1550
|
+
|
|
1551
|
+
} else {
|
|
1552
|
+
videoData.content.progress = progress;
|
|
1553
|
+
|
|
1554
|
+
}
|
|
1555
|
+
console.log('1234',videoData)
|
|
1556
|
+
},
|
|
1557
|
+
checkUpload(id,limitNum){
|
|
1558
|
+
this.filedId=id
|
|
1559
|
+
console.log(this.filedId)
|
|
1560
|
+
console.log(limitNum)
|
|
1561
|
+
this.limitNum = limitNum
|
|
1562
|
+
|
|
1563
|
+
},
|
|
1564
|
+
beforeAvatarUpload(file){
|
|
1565
|
+
const isLte2M = file.size / 1024 / 1024 <= 8;
|
|
1566
|
+
const isSupportedFormat =file.type.indexOf('image')!==-1
|
|
1567
|
+
if (!isSupportedFormat){
|
|
1568
|
+
this.$message.error("只能上传图片格式");
|
|
1569
|
+
return false
|
|
1570
|
+
}
|
|
1571
|
+
if (!isLte2M) {
|
|
1572
|
+
this.$message.error("上传图片大小不能超过 8MB!");
|
|
1573
|
+
return false
|
|
1574
|
+
}
|
|
1575
|
+
return true
|
|
1576
|
+
},
|
|
1577
|
+
exceedUpload(){
|
|
1578
|
+
this.$message.warning('上传文件数量达到上限')
|
|
1579
|
+
},
|
|
1580
|
+
|
|
1581
|
+
handlePictureCardPreview(file) {
|
|
1582
|
+
console.log(file)
|
|
1583
|
+
this.videoFlag = true;
|
|
1584
|
+
this.videoUploadPercent = file.percentage.toFixed(0);
|
|
1585
|
+
},
|
|
1586
|
+
},
|
|
1587
|
+
//时间日期范围的点击事件
|
|
1588
|
+
/* dateTimeClick(id){
|
|
1589
|
+
for (let i=0;i<this.formList.form.formFieldRelation.length;i++)
|
|
1590
|
+
{
|
|
1591
|
+
if(this.formList.form.formFieldRelation[i].formField.id===id)
|
|
1592
|
+
{
|
|
1593
|
+
this.dateTimeId=id
|
|
1594
|
+
this.showDateTimePicker = true
|
|
1595
|
+
break
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
},
|
|
1599
|
+
dateTimeClick1(id){
|
|
1600
|
+
if(this.dateTimeValue.length === 0)
|
|
1601
|
+
{
|
|
1602
|
+
this.$message.error('请先选择开始日期时间')
|
|
1603
|
+
}
|
|
1604
|
+
else
|
|
1605
|
+
{
|
|
1606
|
+
for (let i=0;i<this.formList.form.formFieldRelation.length;i++)
|
|
1607
|
+
{
|
|
1608
|
+
if(this.formList.form.formFieldRelation[i].formField.id===id)
|
|
1609
|
+
{
|
|
1610
|
+
this.dateTimeId=id
|
|
1611
|
+
this.showDateTimePicker1 = true
|
|
1612
|
+
break
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
},*/
|
|
1618
|
+
|
|
1619
|
+
|
|
1620
|
+
|
|
1621
|
+
}
|
|
1622
|
+
</script>
|
|
1623
|
+
|
|
1624
|
+
<style lang="less" scoped>
|
|
1625
|
+
.notClick {
|
|
1626
|
+
pointer-events: none;
|
|
1627
|
+
}
|
|
1628
|
+
.formClass{
|
|
1629
|
+
/* border: 1px solid #ebebeb;*/
|
|
1630
|
+
font-family: "Avenir", Helvetica, Arial, sans-serif;
|
|
1631
|
+
border-radius: 15px;
|
|
1632
|
+
.explain-url{
|
|
1633
|
+
a{
|
|
1634
|
+
color:#4C61E1 ;
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
.titleName{
|
|
1638
|
+
font-size: 1em;
|
|
1639
|
+
text-align: center;
|
|
1640
|
+
padding: 10px 0;
|
|
1641
|
+
display: flex;
|
|
1642
|
+
align-items: center;
|
|
1643
|
+
justify-content: center;
|
|
1644
|
+
border-bottom: 1px solid #EEEEEE;
|
|
1645
|
+
}
|
|
1646
|
+
.form-submit-btn{
|
|
1647
|
+
padding: 14px 16px 0 16px;
|
|
1648
|
+
text-align: center;
|
|
1649
|
+
border-top: 1px solid #EEEEEE;
|
|
1650
|
+
}
|
|
1651
|
+
/deep/.ck.ck-toolbar{
|
|
1652
|
+
border-color:#E0E6F7;
|
|
1653
|
+
border-top-left-radius: 5px!important;
|
|
1654
|
+
border-top-right-radius: 5px!important;
|
|
1655
|
+
}
|
|
1656
|
+
/deep/.ck.ck-editor__editable_inline{
|
|
1657
|
+
border-color:#E0E6F7;
|
|
1658
|
+
min-height: 130px!important;
|
|
1659
|
+
border-bottom-left-radius: 5px!important;
|
|
1660
|
+
border-bottom-right-radius: 5px!important;
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
.pcFormClass{
|
|
1664
|
+
width: 300px;
|
|
1665
|
+
margin: 0 auto;
|
|
1666
|
+
.field-item{
|
|
1667
|
+
padding: 8px 0;
|
|
1668
|
+
.field-item-name{
|
|
1669
|
+
padding-bottom: 8px;
|
|
1670
|
+
/*color: #A9B3C6;*/
|
|
1671
|
+
color: #000000;
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
/deep/.el-upload--picture-card{
|
|
1675
|
+
background-color: #fbfdff;
|
|
1676
|
+
border: 1px dashed #c0ccda;
|
|
1677
|
+
border-radius: 6px;
|
|
1678
|
+
width: 74px;
|
|
1679
|
+
height: 74px;
|
|
1680
|
+
vertical-align: top;
|
|
1681
|
+
cursor: pointer;
|
|
1682
|
+
text-align: center;
|
|
1683
|
+
font-size:28px;
|
|
1684
|
+
color:#8c939d;
|
|
1685
|
+
display: flex;
|
|
1686
|
+
align-items: center;
|
|
1687
|
+
justify-content: center;
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
/deep/.el-upload-list--picture-card{
|
|
1691
|
+
.el-upload-list__item{
|
|
1692
|
+
width: 74px;
|
|
1693
|
+
height: 74px;
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
/deep/.el-upload-list__item-name{
|
|
1697
|
+
max-width: 180px;
|
|
1698
|
+
}
|
|
1699
|
+
.hide .el-upload--picture-card {
|
|
1700
|
+
display: none!important;
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
/deep/.van-radio__icon--checked .van-icon{
|
|
1704
|
+
background-color: #4C61E1!important;
|
|
1705
|
+
border-color: #4C61E1!important;
|
|
1706
|
+
}
|
|
1707
|
+
/deep/.van-checkbox__icon--checked .van-icon{
|
|
1708
|
+
background-color: #4C61E1!important;
|
|
1709
|
+
border-color: #4C61E1!important;
|
|
1710
|
+
}
|
|
1711
|
+
/deep/.vant-upload--picture-card{
|
|
1712
|
+
background-color: #fbfdff;
|
|
1713
|
+
border: 1px dashed #c0ccda;
|
|
1714
|
+
border-radius: 10px;
|
|
1715
|
+
width: 74px;
|
|
1716
|
+
height: 74px;
|
|
1717
|
+
vertical-align: top;
|
|
1718
|
+
cursor: pointer;
|
|
1719
|
+
text-align: center;
|
|
1720
|
+
font-size:28px;
|
|
1721
|
+
color:#8c939d;
|
|
1722
|
+
display: flex;
|
|
1723
|
+
align-items: center;
|
|
1724
|
+
justify-content: center;
|
|
1725
|
+
}
|
|
1726
|
+
/deep/.van-popup{
|
|
1727
|
+
border-radius: 5px;
|
|
1728
|
+
}
|
|
1729
|
+
.remPhoneClassForm{
|
|
1730
|
+
.mobileFormClass{
|
|
1731
|
+
width: 80vw;
|
|
1732
|
+
.form-field-item{
|
|
1733
|
+
/* border-bottom: 1px solid #ebebeb;*/
|
|
1734
|
+
.form-field-item-value{
|
|
1735
|
+
/deep/.van-cell{
|
|
1736
|
+
flex-direction: column;
|
|
1737
|
+
padding: 8px 16px;
|
|
1738
|
+
}
|
|
1739
|
+
/deep/.van-cell__value{
|
|
1740
|
+
border: 1px solid #E0E6F7;
|
|
1741
|
+
border-radius: 9px;
|
|
1742
|
+
min-height: 40px;
|
|
1743
|
+
padding: 0 10px;
|
|
1744
|
+
}
|
|
1745
|
+
/deep/.van-cell__right-icon{
|
|
1746
|
+
color: #999999!important;
|
|
1747
|
+
}
|
|
1748
|
+
.form-field-item-file{
|
|
1749
|
+
padding: 8px 16px;
|
|
1750
|
+
.fileName{
|
|
1751
|
+
padding-bottom: 8px;
|
|
1752
|
+
/* color: #A9B3C6;*/
|
|
1753
|
+
color: #000000;
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
.workorder_description{
|
|
1757
|
+
/* padding: 8px 16px;*/
|
|
1758
|
+
padding: 8px 0;
|
|
1759
|
+
/*font-size: 14px;*/
|
|
1760
|
+
.field-name{
|
|
1761
|
+
width: 100%;
|
|
1762
|
+
text-align: left;
|
|
1763
|
+
/* color: #A9B3C6;*/
|
|
1764
|
+
color: #000000;
|
|
1765
|
+
line-height: 1;
|
|
1766
|
+
padding-bottom: 8px;
|
|
1767
|
+
}
|
|
1768
|
+
/*.required-name{
|
|
1769
|
+
margin-left: -6px;
|
|
1770
|
+
}*/
|
|
1771
|
+
|
|
1772
|
+
/* /deep/.ck-content .image img{
|
|
1773
|
+
max-width: 200px!important;
|
|
1774
|
+
}*/
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
.form-field-item-other{
|
|
1778
|
+
/deep/.van-cell{
|
|
1779
|
+
flex-direction: column;
|
|
1780
|
+
}
|
|
1781
|
+
/deep/.van-cell__value{
|
|
1782
|
+
min-height: 40px;
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
.explan-ation{
|
|
1786
|
+
.explan-ation-div{
|
|
1787
|
+
display: flex;
|
|
1788
|
+
/* padding: 4px 16px;*/
|
|
1789
|
+
padding: 4px 0;
|
|
1790
|
+
}
|
|
1791
|
+
.explan-ation-p{
|
|
1792
|
+
color: #4C61E1;font-size: 14px;margin: 16px 4px;
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
.upload-phone-demo{
|
|
1797
|
+
/deep/.el-upload--picture-card{
|
|
1798
|
+
background-color: #fbfdff;
|
|
1799
|
+
border: 1px dashed #c0ccda;
|
|
1800
|
+
border-radius: 6px;
|
|
1801
|
+
width: 74px;
|
|
1802
|
+
height: 74px;
|
|
1803
|
+
vertical-align: top;
|
|
1804
|
+
cursor: pointer;
|
|
1805
|
+
text-align: center;
|
|
1806
|
+
font-size:28px;
|
|
1807
|
+
color:#8c939d;
|
|
1808
|
+
display: flex;
|
|
1809
|
+
align-items: center;
|
|
1810
|
+
justify-content: center;
|
|
1811
|
+
}
|
|
1812
|
+
/deep/.el-upload-list--picture-card .el-upload-list__item{
|
|
1813
|
+
height: 76px;
|
|
1814
|
+
width: 76px;
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
/deep/.van-image__img{
|
|
1818
|
+
border-radius: 10px;
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
.submitClass{
|
|
1822
|
+
width: 120px;
|
|
1823
|
+
background-color: #4C61E1;
|
|
1824
|
+
color: white!important;
|
|
1825
|
+
height: 36px;
|
|
1826
|
+
}
|
|
1827
|
+
/deep/.van-button--info{
|
|
1828
|
+
border:1px solid #4C61E1;
|
|
1829
|
+
}
|
|
1830
|
+
/deep/.van-field__label{
|
|
1831
|
+
width: 100%;
|
|
1832
|
+
text-align: left;
|
|
1833
|
+
/*color: #A9B3C6!important;*/
|
|
1834
|
+
color: #000000!important;
|
|
1835
|
+
display: flex;
|
|
1836
|
+
align-items: center;
|
|
1837
|
+
line-height: 1;
|
|
1838
|
+
padding-bottom: 8px;
|
|
1839
|
+
font-size: 1em;
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
/deep/.van-field__control{
|
|
1843
|
+
min-height: 40px;
|
|
1844
|
+
}
|
|
1845
|
+
/deep/.van-checkbox--horizontal{
|
|
1846
|
+
padding: 0.2rem 0;
|
|
1847
|
+
}
|
|
1848
|
+
/deep/.van-radio--horizontal{
|
|
1849
|
+
padding: 0.2rem 0;
|
|
1850
|
+
}
|
|
1851
|
+
/deep/.van-dropdown-menu__bar{
|
|
1852
|
+
box-shadow: none!important;
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1855
|
+
/deep/.van-overlay{
|
|
1856
|
+
background-color: rgba(0,0,0,.4);
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
|
|
1860
|
+
/deep/.el-input__inner{
|
|
1861
|
+
background-color: transparent!important;
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
.remCompanyClassForm{
|
|
1868
|
+
width: 100%;
|
|
1869
|
+
font-size: 1em;
|
|
1870
|
+
.submitClass{
|
|
1871
|
+
width: 120px;
|
|
1872
|
+
color: white!important;
|
|
1873
|
+
background-color:#4C61E1;
|
|
1874
|
+
border-color: #4C61E1;
|
|
1875
|
+
}
|
|
1876
|
+
.el-checkbox{
|
|
1877
|
+
line-height: 2;
|
|
1878
|
+
}
|
|
1879
|
+
.el-radio{
|
|
1880
|
+
padding: 4px 0;
|
|
1881
|
+
}
|
|
1882
|
+
/deep/.el-radio__input.is-checked+.el-radio__label{
|
|
1883
|
+
color: #4C61E1!important;
|
|
1884
|
+
}
|
|
1885
|
+
/deep/.el-radio__input.is-checked .el-radio__inner{
|
|
1886
|
+
color: #4C61E1!important;
|
|
1887
|
+
border-color: #4C61E1!important;
|
|
1888
|
+
background: #4C61E1!important;
|
|
1889
|
+
}
|
|
1890
|
+
/deep/.el-checkbox__input.is-checked+.el-checkbox__label{
|
|
1891
|
+
color: #4C61E1!important;
|
|
1892
|
+
}
|
|
1893
|
+
/deep/.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner{
|
|
1894
|
+
background-color: #4C61E1!important;
|
|
1895
|
+
border-color: #4C61E1!important;
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
|
|
2040
1899
|
</style>
|