ai-error-assistant-mobile 0.0.7 → 0.0.9
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/components/demo/src/chat-tools.vue +223 -242
- package/components/demo/src/chat.vue +21 -5
- package/components/demo/src/error-chat.vue +14 -2
- package/components/demo/src/feedback.vue +20 -4
- package/components/demo/src/main.vue +21 -6
- package/dist/ai-error-assistant-mobile.common.js +133 -72
- package/dist/ai-error-assistant-mobile.common.js.map +1 -1
- package/dist/ai-error-assistant-mobile.css +1 -1
- package/dist/ai-error-assistant-mobile.umd.js +133 -72
- package/dist/ai-error-assistant-mobile.umd.js.map +1 -1
- package/dist/ai-error-assistant-mobile.umd.min.js +4 -4
- package/dist/ai-error-assistant-mobile.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -21,46 +21,45 @@
|
|
|
21
21
|
<img alt="" src="../static/zan-active.png" v-else/>
|
|
22
22
|
</div>
|
|
23
23
|
</el-tooltip>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
</el-drawer>
|
|
24
|
+
<el-drawer
|
|
25
|
+
:visible.sync="drawer"
|
|
26
|
+
direction="btt"
|
|
27
|
+
size="80%"
|
|
28
|
+
:wrapperClosable="false"
|
|
29
|
+
:modal="false"
|
|
30
|
+
custom-class="feedback-drawer"
|
|
31
|
+
get-container="body"
|
|
32
|
+
@close="cancelDrawer"
|
|
33
|
+
>
|
|
34
|
+
<div class="drawer-content">
|
|
35
|
+
<div class="drawer-header">
|
|
36
|
+
<div class="drawer-title">
|
|
37
|
+
你的反馈将 <br/>
|
|
38
|
+
帮助职教一问优化进步
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="error-list">
|
|
42
|
+
<el-checkbox-group v-model="errors">
|
|
43
|
+
<el-checkbox v-for="item in errorList"
|
|
44
|
+
:key="item.code"
|
|
45
|
+
:label="item.code"
|
|
46
|
+
border
|
|
47
|
+
class="check">
|
|
48
|
+
{{ item.name }}
|
|
49
|
+
</el-checkbox>
|
|
50
|
+
</el-checkbox-group>
|
|
51
|
+
<el-input v-model="input" :rows="4"
|
|
52
|
+
maxlength="30"
|
|
53
|
+
placeholder="其他"
|
|
54
|
+
resize="none"
|
|
55
|
+
type="textarea" />
|
|
56
|
+
<div class="sumit-button">
|
|
57
|
+
<el-button :disabled="canSubmit" @click="doCai(listData)">提交</el-button>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
</div>
|
|
62
|
+
</el-drawer>
|
|
64
63
|
<el-tooltip :disabled="true" content="踩" effect="light" placement="bottom">
|
|
65
64
|
<div class="tools-icon" @click="openDrawer" v-if="!listData.cai">
|
|
66
65
|
<img alt="" src="../static/cai.png">
|
|
@@ -99,6 +98,10 @@ export default {
|
|
|
99
98
|
isLast: {
|
|
100
99
|
type: Boolean,
|
|
101
100
|
default: false
|
|
101
|
+
},
|
|
102
|
+
navTopHeight: {
|
|
103
|
+
type: Number,
|
|
104
|
+
default: 0
|
|
102
105
|
}
|
|
103
106
|
},
|
|
104
107
|
data() {
|
|
@@ -120,6 +123,8 @@ export default {
|
|
|
120
123
|
methods: {
|
|
121
124
|
cancelDrawer() {
|
|
122
125
|
this.drawer = false;
|
|
126
|
+
this.input = '';
|
|
127
|
+
this.errors = [];
|
|
123
128
|
},
|
|
124
129
|
openDrawer() {
|
|
125
130
|
this.drawer = true;
|
|
@@ -161,7 +166,11 @@ export default {
|
|
|
161
166
|
list.cai = !list.cai;
|
|
162
167
|
list.zan = false;
|
|
163
168
|
if (list.cai) {
|
|
164
|
-
this.$message
|
|
169
|
+
this.$message({
|
|
170
|
+
message: '感谢您的反馈',
|
|
171
|
+
type: 'success',
|
|
172
|
+
offset: this.navTopHeight
|
|
173
|
+
});
|
|
165
174
|
}
|
|
166
175
|
this.drawer = false;
|
|
167
176
|
this.input = '';
|
|
@@ -244,235 +253,207 @@ export default {
|
|
|
244
253
|
}
|
|
245
254
|
}
|
|
246
255
|
|
|
256
|
+
/* 抽屉样式 */
|
|
247
257
|
.feedback-drawer {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
text-align: center;
|
|
261
|
-
|
|
262
|
-
.drawer-title {
|
|
263
|
-
font-weight: 600;
|
|
264
|
-
font-size: 1.5rem;
|
|
265
|
-
color: #333;
|
|
266
|
-
line-height: 1.875rem;
|
|
258
|
+
// 确保抽屉在最顶层
|
|
259
|
+
z-index: 9999 !important;
|
|
260
|
+
|
|
261
|
+
.drawer-content {
|
|
262
|
+
padding: 1.5rem;
|
|
263
|
+
box-sizing: border-box;
|
|
264
|
+
display: flex;
|
|
265
|
+
flex-direction: column;
|
|
266
|
+
background: #fff;
|
|
267
|
+
border-radius: 1rem 1rem 0 0;
|
|
268
|
+
// 添加底部内边距为安全区域留出空间
|
|
269
|
+
padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
|
|
267
270
|
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.error-list {
|
|
271
|
-
flex: 1;
|
|
272
|
-
display: flex;
|
|
273
|
-
flex-direction: column;
|
|
274
|
-
gap: 1.5rem;
|
|
275
271
|
|
|
276
|
-
.
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
272
|
+
.drawer-header {
|
|
273
|
+
margin-bottom: 2rem;
|
|
274
|
+
text-align: center;
|
|
275
|
+
position: relative;
|
|
276
|
+
|
|
277
|
+
.drawer-title {
|
|
278
|
+
font-weight: 600;
|
|
279
|
+
font-size: 1.5rem;
|
|
280
|
+
color: #333;
|
|
281
|
+
line-height: 1.875rem;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.el-icon-close {
|
|
285
|
+
position: absolute;
|
|
286
|
+
right: 0;
|
|
287
|
+
top: 0;
|
|
288
|
+
font-size: 1.5rem;
|
|
289
|
+
cursor: pointer;
|
|
290
|
+
transition: all 0.3s;
|
|
291
|
+
}
|
|
280
292
|
}
|
|
281
293
|
|
|
282
|
-
.
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
294
|
+
.error-list {
|
|
295
|
+
flex: 1;
|
|
296
|
+
display: flex;
|
|
297
|
+
flex-direction: column;
|
|
298
|
+
gap: 1.5rem;
|
|
299
|
+
|
|
300
|
+
.el-checkbox-group {
|
|
301
|
+
display: flex;
|
|
302
|
+
flex-wrap: wrap;
|
|
303
|
+
gap: 0.75rem;
|
|
304
|
+
justify-content: center;
|
|
305
|
+
|
|
306
|
+
.el-checkbox {
|
|
307
|
+
margin: 0;
|
|
308
|
+
padding: 0.75rem 1rem;
|
|
309
|
+
border-radius: 0.5rem;
|
|
310
|
+
transition: all 0.3s;
|
|
311
|
+
|
|
312
|
+
&:hover {
|
|
313
|
+
background: #f5f7fa;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
&.is-checked {
|
|
317
|
+
background: #ecf5ff;
|
|
318
|
+
border-color: #409EFF;
|
|
319
|
+
|
|
320
|
+
.el-checkbox__label {
|
|
321
|
+
color: #409EFF;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
296
325
|
}
|
|
297
326
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
327
|
+
.el-input {
|
|
328
|
+
width: 100%;
|
|
329
|
+
|
|
330
|
+
.el-textarea__inner {
|
|
331
|
+
border-radius: 0.75rem;
|
|
332
|
+
padding: 1rem;
|
|
333
|
+
font-size: 0.875rem;
|
|
334
|
+
line-height: 1.5;
|
|
335
|
+
resize: none;
|
|
336
|
+
border-color: #dcdfe6;
|
|
337
|
+
transition: all 0.3s;
|
|
338
|
+
|
|
339
|
+
&:focus {
|
|
340
|
+
border-color: #409EFF;
|
|
341
|
+
box-shadow: 0 0 0 2px rgba(64, 158, 255, .2);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
305
344
|
}
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
345
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
346
|
+
.sumit-button {
|
|
347
|
+
margin-top: auto;
|
|
348
|
+
text-align: center;
|
|
349
|
+
padding-top: 1rem;
|
|
350
|
+
|
|
351
|
+
.el-button {
|
|
352
|
+
width: 100%;
|
|
353
|
+
padding: 0.875rem;
|
|
354
|
+
font-size: 1rem;
|
|
355
|
+
border-radius: 0.75rem;
|
|
356
|
+
font-weight: 500;
|
|
357
|
+
// 动态背景色,默认白色
|
|
358
|
+
background: #f5f7fa;
|
|
359
|
+
border: 1px solid #dcdfe6;
|
|
360
|
+
// 选中时有蓝色背景
|
|
361
|
+
&:not(:disabled) {
|
|
362
|
+
background: linear-gradient(180deg, #5fa5ff 0%, #316cff 100%);
|
|
363
|
+
color: #fff;
|
|
364
|
+
border: none;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
324
367
|
}
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.sumit-button {
|
|
329
|
-
margin-top: auto;
|
|
330
|
-
text-align: center;
|
|
331
|
-
padding-top: 1rem;
|
|
332
|
-
|
|
333
|
-
.el-button {
|
|
334
|
-
width: 100%;
|
|
335
|
-
padding: 0.875rem;
|
|
336
|
-
font-size: 1rem;
|
|
337
|
-
border-radius: 0.75rem;
|
|
338
|
-
font-weight: 500;
|
|
339
|
-
}
|
|
340
368
|
}
|
|
341
|
-
}
|
|
342
369
|
}
|
|
343
370
|
|
|
344
|
-
|
|
371
|
+
/* 移动端适配 */
|
|
345
372
|
@media screen and (max-width: 768px) {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
font-size: 0.75rem;
|
|
351
|
-
|
|
352
|
-
i {
|
|
353
|
-
font-size: 1rem;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.tools-icon {
|
|
358
|
-
width: 2.25rem;
|
|
359
|
-
height: 1.75rem;
|
|
360
|
-
|
|
361
|
-
img {
|
|
362
|
-
width: 1.125rem;
|
|
363
|
-
height: 1.125rem;
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
.feedback-drawer {
|
|
369
|
-
.drawer-content {
|
|
370
|
-
padding: 1.25rem;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
.drawer-header {
|
|
374
|
-
margin-bottom: 1.5rem;
|
|
375
|
-
|
|
376
|
-
.drawer-title {
|
|
377
|
-
font-size: 1.25rem;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
.error-list {
|
|
382
|
-
gap: 1.25rem;
|
|
383
|
-
|
|
384
|
-
.section-title {
|
|
385
|
-
font-size: 0.9375rem;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
.checkbox-group {
|
|
389
|
-
gap: 0.5rem;
|
|
390
|
-
|
|
391
|
-
.el-checkbox {
|
|
392
|
-
padding: 0.625rem 0.875rem;
|
|
393
|
-
font-size: 0.875rem;
|
|
373
|
+
.feedback-drawer {
|
|
374
|
+
.drawer-content {
|
|
375
|
+
padding: 1.25rem;
|
|
376
|
+
padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
|
|
394
377
|
}
|
|
395
|
-
}
|
|
396
378
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
379
|
+
.drawer-header {
|
|
380
|
+
margin-bottom: 1.5rem;
|
|
381
|
+
|
|
382
|
+
.drawer-title {
|
|
383
|
+
font-size: 1.25rem;
|
|
384
|
+
}
|
|
401
385
|
}
|
|
402
|
-
}
|
|
403
386
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
387
|
+
.error-list {
|
|
388
|
+
gap: 1.25rem;
|
|
389
|
+
|
|
390
|
+
.el-checkbox-group {
|
|
391
|
+
gap: 0.5rem;
|
|
392
|
+
|
|
393
|
+
.el-checkbox {
|
|
394
|
+
padding: 0.625rem 0.875rem;
|
|
395
|
+
font-size: 0.875rem;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.el-input {
|
|
400
|
+
.el-textarea__inner {
|
|
401
|
+
font-size: 0.8125rem;
|
|
402
|
+
padding: 0.875rem;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.sumit-button {
|
|
407
|
+
.el-button {
|
|
408
|
+
padding: 0.75rem;
|
|
409
|
+
font-size: 0.9375rem;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
408
412
|
}
|
|
409
|
-
}
|
|
410
413
|
}
|
|
411
|
-
}
|
|
412
414
|
}
|
|
413
415
|
|
|
414
416
|
@media screen and (max-width: 480px) {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
font-size: 0.75rem;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
.tools-icon {
|
|
423
|
-
width: 2rem;
|
|
424
|
-
height: 2rem;
|
|
425
|
-
|
|
426
|
-
img {
|
|
427
|
-
width: 1rem;
|
|
428
|
-
height: 1rem;
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
.feedback-drawer {
|
|
434
|
-
.drawer-content {
|
|
435
|
-
padding: 1rem;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
.drawer-header {
|
|
439
|
-
margin-bottom: 1.25rem;
|
|
440
|
-
|
|
441
|
-
.drawer-title {
|
|
442
|
-
font-size: 1.125rem;
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
.error-list {
|
|
447
|
-
gap: 1rem;
|
|
448
|
-
|
|
449
|
-
.section-title {
|
|
450
|
-
font-size: 0.875rem;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
.checkbox-group {
|
|
454
|
-
gap: 0.375rem;
|
|
455
|
-
|
|
456
|
-
.el-checkbox {
|
|
457
|
-
padding: 0.5rem 0.75rem;
|
|
458
|
-
font-size: 0.8125rem;
|
|
417
|
+
.feedback-drawer {
|
|
418
|
+
.drawer-content {
|
|
419
|
+
padding: 1rem;
|
|
420
|
+
padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
|
|
459
421
|
}
|
|
460
|
-
}
|
|
461
422
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
423
|
+
.drawer-header {
|
|
424
|
+
margin-bottom: 1.25rem;
|
|
425
|
+
|
|
426
|
+
.drawer-title {
|
|
427
|
+
font-size: 1.125rem;
|
|
428
|
+
}
|
|
466
429
|
}
|
|
467
|
-
}
|
|
468
430
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
431
|
+
.error-list {
|
|
432
|
+
gap: 1rem;
|
|
433
|
+
|
|
434
|
+
.el-checkbox-group {
|
|
435
|
+
gap: 0.375rem;
|
|
436
|
+
|
|
437
|
+
.el-checkbox {
|
|
438
|
+
padding: 0.5rem 2.75rem;
|
|
439
|
+
font-size: 0.8125rem;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.el-input {
|
|
444
|
+
.el-textarea__inner {
|
|
445
|
+
font-size: 0.75rem;
|
|
446
|
+
padding: 0.75rem;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.sumit-button {
|
|
451
|
+
.el-button {
|
|
452
|
+
padding: 0.625rem;
|
|
453
|
+
font-size: 0.875rem;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
473
456
|
}
|
|
474
|
-
}
|
|
475
457
|
}
|
|
476
|
-
}
|
|
477
458
|
}
|
|
478
459
|
</style>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="chat-contain" ref="chatContainer">
|
|
3
|
-
<error-chat :question-stem="analyExercise" :businessSource="businessSource" @on-init="errorChatInit"/>
|
|
3
|
+
<error-chat :question-stem="analyExercise" :businessSource="businessSource" :navTopHeight="navTopHeight" @on-init="errorChatInit"/>
|
|
4
4
|
<div v-for="(list, index) in messageData" :key="index"
|
|
5
5
|
:class="{'user-list': list.type === 'user'}"
|
|
6
6
|
class="message">
|
|
7
7
|
<div v-if="list.type === 'user' && avatarUrl" class="robot">
|
|
8
8
|
<img :src="avatarUrl" alt="" style="width: 48px; height: 48px; border-radius: 50%;">
|
|
9
9
|
</div>
|
|
10
|
-
<div v-if="list.type === 'user'
|
|
10
|
+
<div v-else-if="list.type === 'user'" class="robot user">user</div>
|
|
11
11
|
<div :class="{'user-info': list.type === 'user'}" class="robot-message">
|
|
12
12
|
<div v-html="list.message"></div>
|
|
13
13
|
<div v-if="list.type === 'robot' && list.links.length > 0 && showFile" class="link">
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
:detail-data="list"
|
|
74
74
|
:sending="list.sending"
|
|
75
75
|
:is-last="index === messageData.length - 1"
|
|
76
|
+
:navTopHeight="navTopHeight"
|
|
76
77
|
@on-reanswer="(list) => reanswer(list, index)"
|
|
77
78
|
@on-stop-chat="onStopChat"/>
|
|
78
79
|
</div>
|
|
@@ -125,6 +126,10 @@ export default {
|
|
|
125
126
|
type: String,
|
|
126
127
|
default: '',
|
|
127
128
|
},
|
|
129
|
+
navTopHeight: {
|
|
130
|
+
type: Number,
|
|
131
|
+
default: 0
|
|
132
|
+
}
|
|
128
133
|
},
|
|
129
134
|
data() {
|
|
130
135
|
return {
|
|
@@ -298,12 +303,19 @@ export default {
|
|
|
298
303
|
},
|
|
299
304
|
async clearChat() {
|
|
300
305
|
if (this.messageData.length < 1) {
|
|
301
|
-
this.$message
|
|
302
|
-
|
|
306
|
+
return this.$message({
|
|
307
|
+
message: '当前对话为最新对话',
|
|
308
|
+
type: 'warning',
|
|
309
|
+
offset: this.navTopHeight
|
|
310
|
+
});
|
|
303
311
|
}
|
|
304
312
|
await chartClear(this.chatId);
|
|
305
313
|
this.messageData = []
|
|
306
|
-
this.$message
|
|
314
|
+
this.$message({
|
|
315
|
+
message: '对话清除成功!',
|
|
316
|
+
type: 'success',
|
|
317
|
+
offset: this.navTopHeight
|
|
318
|
+
});
|
|
307
319
|
},
|
|
308
320
|
reanswer(list, index) {
|
|
309
321
|
list.index = index;
|
|
@@ -363,6 +375,10 @@ export default {
|
|
|
363
375
|
.chat-contain {
|
|
364
376
|
height: 100%;
|
|
365
377
|
overflow-y: auto;
|
|
378
|
+
/* 隔离滚动 */
|
|
379
|
+
overscroll-behavior: contain;
|
|
380
|
+
isolation: isolate;
|
|
381
|
+
contain: layout style paint;
|
|
366
382
|
-webkit-overflow-scrolling: touch;
|
|
367
383
|
padding: 0.75rem;
|
|
368
384
|
box-sizing: border-box;
|
|
@@ -102,6 +102,10 @@ export default {
|
|
|
102
102
|
type: String,
|
|
103
103
|
default: ''
|
|
104
104
|
},
|
|
105
|
+
navTopHeight: {
|
|
106
|
+
type: Number,
|
|
107
|
+
default: 0
|
|
108
|
+
}
|
|
105
109
|
},
|
|
106
110
|
data() {
|
|
107
111
|
return {
|
|
@@ -158,7 +162,11 @@ export default {
|
|
|
158
162
|
}
|
|
159
163
|
}
|
|
160
164
|
} catch (e) {
|
|
161
|
-
this.$message
|
|
165
|
+
this.$message({
|
|
166
|
+
message: '解析失败' + e,
|
|
167
|
+
type: 'warning',
|
|
168
|
+
offset: this.navTopHeight
|
|
169
|
+
});
|
|
162
170
|
this.analysisData = {key: true};
|
|
163
171
|
console.log(e);
|
|
164
172
|
}
|
|
@@ -188,7 +196,11 @@ export default {
|
|
|
188
196
|
this.analysisData = JSON.parse(content);
|
|
189
197
|
this.detailData.errId = errId;
|
|
190
198
|
} catch (e) {
|
|
191
|
-
this.$message
|
|
199
|
+
this.$message({
|
|
200
|
+
message: '解析失败' + e,
|
|
201
|
+
type: 'warning',
|
|
202
|
+
offset: this.navTopHeight
|
|
203
|
+
});
|
|
192
204
|
this.analysisData = {key: true};
|
|
193
205
|
console.log(e);
|
|
194
206
|
}
|
|
@@ -104,7 +104,11 @@ export default {
|
|
|
104
104
|
beforeElUpload(file) {
|
|
105
105
|
const MAX_SIZE = 1024 * 1024 * 10;
|
|
106
106
|
if (file.size > MAX_SIZE) {
|
|
107
|
-
this.$message
|
|
107
|
+
this.$message({
|
|
108
|
+
message: '图片大小不能超过10MB',
|
|
109
|
+
type: 'warning',
|
|
110
|
+
offset: this.navTopHeight
|
|
111
|
+
});
|
|
108
112
|
return false;
|
|
109
113
|
}
|
|
110
114
|
return true;
|
|
@@ -128,16 +132,28 @@ export default {
|
|
|
128
132
|
try {
|
|
129
133
|
const response = await submitFeedback(formData, this.businessSource);
|
|
130
134
|
if (response === '反馈成功') {
|
|
131
|
-
this.$message
|
|
135
|
+
this.$message({
|
|
136
|
+
message: '提交成功',
|
|
137
|
+
type: 'success',
|
|
138
|
+
offset: this.navTopHeight
|
|
139
|
+
});
|
|
132
140
|
this.form.description = '';
|
|
133
141
|
this.form.phone = '';
|
|
134
142
|
this.elFileList = [];
|
|
135
143
|
} else {
|
|
136
|
-
this.$message
|
|
144
|
+
this.$message({
|
|
145
|
+
message: response.data.message || '提交失败',
|
|
146
|
+
type: 'warning',
|
|
147
|
+
offset: this.navTopHeight
|
|
148
|
+
});
|
|
137
149
|
}
|
|
138
150
|
} catch (error) {
|
|
139
151
|
this.$message.closeAll && this.$message.closeAll();
|
|
140
|
-
this.$message
|
|
152
|
+
this.$message({
|
|
153
|
+
message:'提交失败,请稍后重试',
|
|
154
|
+
type: 'error',
|
|
155
|
+
offset: this.navTopHeight
|
|
156
|
+
});
|
|
141
157
|
}
|
|
142
158
|
}
|
|
143
159
|
},
|