askbot-dragon 1.7.62-beta → 1.7.64-beta
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/package.json
CHANGED
|
@@ -42,11 +42,24 @@
|
|
|
42
42
|
</template>
|
|
43
43
|
<template v-else>{{ msg.content.text }}</template>
|
|
44
44
|
</div>
|
|
45
|
-
<
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
<template v-if="isPC">
|
|
46
|
+
<div v-if="msg.content.images && msg.content.images.length != 0" class="answer-kn-image-box-pc">
|
|
47
|
+
<img v-for="(imageItem, imageItemIndex) in msg.content.images"
|
|
48
|
+
style="max-width: 230px;" :src="imageItem.url"
|
|
49
|
+
v-show="showImage || imageItemIndex < 2"
|
|
50
|
+
:key="imageItemIndex" alt @click="lookAttach(imageItem.url, imageItem, $event)" />
|
|
51
|
+
<div class="img-placeholder" v-if="msg.content.images.length > 2 && !showImage" @click="showImage = true">
|
|
52
|
+
+{{ msg.content.images.length - 2 }}
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|
|
56
|
+
<template v-else>
|
|
57
|
+
<div v-if="msg.content.images && msg.content.images.length != 0" class="answer-kn-image-box-mobile">
|
|
58
|
+
<img v-for="(imageItem, imageItemIndex) in msg.content.images"
|
|
59
|
+
style="max-width: 230px;" :src="imageItem.url"
|
|
60
|
+
:key="imageItemIndex" alt @click="lookAttach(imageItem.url, imageItem, $event)" />
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
50
63
|
</div>
|
|
51
64
|
<template v-if="!isLiBang">
|
|
52
65
|
<div class="ad-list" :class="msg.content.type == 0 || msg.content.type == 2 ? 'ad-list-recognition' : ''">
|
|
@@ -285,7 +298,8 @@ export default {
|
|
|
285
298
|
folderUrl: '',
|
|
286
299
|
previewKnowledgeId: "",
|
|
287
300
|
previewKnowledge: {},
|
|
288
|
-
previewOssPath: ""
|
|
301
|
+
previewOssPath: "",
|
|
302
|
+
showImage: false
|
|
289
303
|
}
|
|
290
304
|
},
|
|
291
305
|
props: ['msg', 'isAskLightning', 'isMessageRecord', "isApp", "isHasChat", "activeKnowledgeId", "isLiBang","language","isHistory","knowledgeIndex"],
|
|
@@ -308,15 +322,16 @@ export default {
|
|
|
308
322
|
// }
|
|
309
323
|
},
|
|
310
324
|
created () {
|
|
311
|
-
var system = {};
|
|
312
|
-
system.pingtai = /(Win32|Win16|WinCE|Mac68K|MacIntel|MacIntel|MacPPC|Linux mips64)/i.test(navigator.platform);
|
|
313
|
-
if (system.pingtai) {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
} else {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}
|
|
325
|
+
// var system = {};
|
|
326
|
+
// system.pingtai = /(Win32|Win16|WinCE|Mac68K|MacIntel|MacIntel|MacPPC|Linux mips64)/i.test(navigator.platform);
|
|
327
|
+
// if (system.pingtai) {
|
|
328
|
+
// //电脑
|
|
329
|
+
// this.isPC = true;
|
|
330
|
+
// } else {
|
|
331
|
+
// //手机
|
|
332
|
+
// this.isPC = false;
|
|
333
|
+
// }
|
|
334
|
+
this.isPC = !isMobile()
|
|
320
335
|
// this.msg.content.list.forEach(element => {
|
|
321
336
|
// console.log(this.imageObj[element.format],1111);
|
|
322
337
|
// element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/' + this.imageObj[element.format] + '.png';
|
|
@@ -608,8 +623,59 @@ export default {
|
|
|
608
623
|
}
|
|
609
624
|
}
|
|
610
625
|
|
|
611
|
-
.answer-kn-image-box {
|
|
626
|
+
// .answer-kn-image-box {
|
|
627
|
+
// margin-bottom: 10px;
|
|
628
|
+
// }
|
|
629
|
+
.answer-kn-image-box-pc {
|
|
612
630
|
margin-bottom: 10px;
|
|
631
|
+
display: flex;
|
|
632
|
+
width: 100%;
|
|
633
|
+
overflow: hidden;
|
|
634
|
+
overflow-x: auto;
|
|
635
|
+
img {
|
|
636
|
+
width: 120px;
|
|
637
|
+
height: 120px;
|
|
638
|
+
border-radius: 5px;
|
|
639
|
+
object-fit: cover;
|
|
640
|
+
margin-right: 10px;
|
|
641
|
+
margin-bottom: 10px;
|
|
642
|
+
cursor: pointer;
|
|
643
|
+
flex: none;
|
|
644
|
+
}
|
|
645
|
+
.img-placeholder {
|
|
646
|
+
width: 120px;
|
|
647
|
+
height: 120px;
|
|
648
|
+
border-radius: 5px;
|
|
649
|
+
margin-right: 10px;
|
|
650
|
+
margin-bottom: 10px;
|
|
651
|
+
cursor: pointer;
|
|
652
|
+
border: 1px dashed #d9d9d9;
|
|
653
|
+
color: #366aff;
|
|
654
|
+
flex: none;
|
|
655
|
+
display: flex;
|
|
656
|
+
align-items: center;
|
|
657
|
+
justify-content: center;
|
|
658
|
+
font-size: 22px;
|
|
659
|
+
}
|
|
660
|
+
.img-placeholder:hover {
|
|
661
|
+
border: 1px dashed #366aff;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
.answer-kn-image-box-mobile {
|
|
665
|
+
margin-bottom: 10px;
|
|
666
|
+
display: flex;
|
|
667
|
+
width: 100%;
|
|
668
|
+
overflow: hidden;
|
|
669
|
+
overflow-x: auto;
|
|
670
|
+
img {
|
|
671
|
+
width: 35vw;
|
|
672
|
+
height: 35vw;
|
|
673
|
+
border-radius: 5px;
|
|
674
|
+
object-fit: cover;
|
|
675
|
+
margin-right: 10px;
|
|
676
|
+
margin-bottom: 10px;
|
|
677
|
+
flex: none;
|
|
678
|
+
}
|
|
613
679
|
}
|
|
614
680
|
}
|
|
615
681
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
</div> -->
|
|
38
38
|
|
|
39
39
|
<!-- <text-message :text="text" @submitClick="submitClick"></text-message> -->
|
|
40
|
-
<answer-docknowledge :isAskLightning="2" :isHasChat="true" :msg="
|
|
40
|
+
<answer-docknowledge :isAskLightning="2" :isHasChat="true" :msg="answerDocknowledge4" :isLiBang="false"></answer-docknowledge>
|
|
41
41
|
<welcomeSuggest :msg="welcomeSuggest"></welcomeSuggest>
|
|
42
42
|
<!-- <voice-component @closeVoice="closeVoice">
|
|
43
43
|
<div slot="voiceTip">
|
|
@@ -10428,7 +10428,7 @@ export default {
|
|
|
10428
10428
|
}
|
|
10429
10429
|
}
|
|
10430
10430
|
],
|
|
10431
|
-
inLoading:
|
|
10431
|
+
inLoading: false,
|
|
10432
10432
|
dataNote: 0,
|
|
10433
10433
|
timer: null,
|
|
10434
10434
|
finished: false,
|
|
@@ -10713,9 +10713,9 @@ export default {
|
|
|
10713
10713
|
console.debug('this.dataNote', this.dataNote)
|
|
10714
10714
|
}, 1000)
|
|
10715
10715
|
|
|
10716
|
-
setTimeout(() => {
|
|
10717
|
-
|
|
10718
|
-
}, 2000)
|
|
10716
|
+
// setTimeout(() => {
|
|
10717
|
+
// this.inLoading = true
|
|
10718
|
+
// }, 2000)
|
|
10719
10719
|
setTimeout(() => {
|
|
10720
10720
|
this.finished = true
|
|
10721
10721
|
this.dataNote = 10
|
|
@@ -879,7 +879,13 @@ export default {
|
|
|
879
879
|
language:{
|
|
880
880
|
type:String,
|
|
881
881
|
default:"cn"
|
|
882
|
-
}
|
|
882
|
+
},
|
|
883
|
+
isCustomerService: {
|
|
884
|
+
type: Boolean,
|
|
885
|
+
default () {
|
|
886
|
+
return false;
|
|
887
|
+
}
|
|
888
|
+
},
|
|
883
889
|
},
|
|
884
890
|
computed: {
|
|
885
891
|
acceptType: function () {
|
|
@@ -2010,6 +2016,10 @@ export default {
|
|
|
2010
2016
|
},
|
|
2011
2017
|
//提交按钮事件
|
|
2012
2018
|
submitClick () {
|
|
2019
|
+
if(this.isCustomerService) {
|
|
2020
|
+
this.$message.warning('当前为人工客服模式,暂时无法提交')
|
|
2021
|
+
return
|
|
2022
|
+
}
|
|
2013
2023
|
if (this.uploadImgQueue || this.attachmentList.some(arrach => { return !arrach.url })) {
|
|
2014
2024
|
this.$message.warning(this.$t('formTemplate.uploading'))
|
|
2015
2025
|
return
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
</div>
|
|
9
9
|
|
|
10
10
|
</template>
|
|
11
|
-
|
|
12
11
|
<script>
|
|
13
12
|
import VueMarkdown from 'vue-markdown';
|
|
14
13
|
import ImgView from "./imgView";
|
|
@@ -127,7 +126,7 @@
|
|
|
127
126
|
let matched = [];
|
|
128
127
|
let recommendItems = [];
|
|
129
128
|
let isfirstStr = false;
|
|
130
|
-
const backslashOrNRegex =
|
|
129
|
+
const backslashOrNRegex = /\n/;
|
|
131
130
|
eventSource.onmessage = (event) => {
|
|
132
131
|
const data = JSON.parse(event.data);
|
|
133
132
|
if (event.lastEventId === 'finish') { // 不能删除 finish
|
|
@@ -181,10 +180,6 @@
|
|
|
181
180
|
this.scrollMarkdown();
|
|
182
181
|
}
|
|
183
182
|
}, 20);
|
|
184
|
-
console.log(
|
|
185
|
-
"answerDocKnowledgeFn 1"
|
|
186
|
-
);
|
|
187
|
-
|
|
188
183
|
this.$emit("answerDocKnowledgeFn");
|
|
189
184
|
}
|
|
190
185
|
let repStr = tempString.replace(/\\n/g, '\n');
|
package/src/locales/cn.json
CHANGED
|
@@ -58,5 +58,39 @@
|
|
|
58
58
|
"willServeYou": "将为您服务",
|
|
59
59
|
"check": "查看",
|
|
60
60
|
"clickme": "点我"
|
|
61
|
+
},
|
|
62
|
+
"common": {
|
|
63
|
+
"submit": "提交",
|
|
64
|
+
"inputPlaceholder": "请输入",
|
|
65
|
+
"selectDate": "选择日期",
|
|
66
|
+
"selectTime": "选择时间",
|
|
67
|
+
"selectDateTime": "选择日期时间",
|
|
68
|
+
"selectPlaceholder": "请选择",
|
|
69
|
+
"loadMore": "加载更多",
|
|
70
|
+
"submited": "已提交"
|
|
71
|
+
},
|
|
72
|
+
"formTemplate": {
|
|
73
|
+
"report": "报单人",
|
|
74
|
+
"feedbackDes": "反馈描述",
|
|
75
|
+
"orderDes": "工单描述",
|
|
76
|
+
"uploadType": "只能上传图片格式",
|
|
77
|
+
"uploadImageSize": "上传图片大小不能超过 8MB!",
|
|
78
|
+
"uploadVideoType": "只能上传视频格式",
|
|
79
|
+
"uploadVideoSize": "上传视频大小不能超过100MB!",
|
|
80
|
+
"uploadFileSize": "上传附件大小不能超过100MB!",
|
|
81
|
+
"onlyUpload": "仅支持上传",
|
|
82
|
+
"number": "个",
|
|
83
|
+
"textFlag": "必须要有文字",
|
|
84
|
+
"imageOrAttachment": "必须要有图片或附件",
|
|
85
|
+
"imageFlag": "必须要有图片",
|
|
86
|
+
"attachmentFlag": "必须要有附件",
|
|
87
|
+
"image": "图片",
|
|
88
|
+
"file": "附件",
|
|
89
|
+
"and": "和",
|
|
90
|
+
"required": "是必填的",
|
|
91
|
+
"uploading": "文件正在上传,请稍后",
|
|
92
|
+
"pleaseImprove": "请完善",
|
|
93
|
+
"feedbackDesRequired": "反馈描述是必填的",
|
|
94
|
+
"orderDesRequired": "问题描述是必填的"
|
|
61
95
|
}
|
|
62
96
|
}
|
package/src/locales/en.json
CHANGED
|
@@ -58,5 +58,39 @@
|
|
|
58
58
|
"willServeYou": "will serve you",
|
|
59
59
|
"check": "Check",
|
|
60
60
|
"clickme": "Click me"
|
|
61
|
+
},
|
|
62
|
+
"common": {
|
|
63
|
+
"submit": "Submit",
|
|
64
|
+
"inputPlaceholder": "Please enter",
|
|
65
|
+
"selectDate": "Select Date",
|
|
66
|
+
"selectTime": "Select Time",
|
|
67
|
+
"selectDateTime": "Select Date Time",
|
|
68
|
+
"selectPlaceholder": "Please select",
|
|
69
|
+
"loadMore": "Load More",
|
|
70
|
+
"submited": "Submited"
|
|
71
|
+
},
|
|
72
|
+
"formTemplate": {
|
|
73
|
+
"report": "Reporter",
|
|
74
|
+
"feedbackDes": "Feedback Description",
|
|
75
|
+
"orderDes": "Work Order Description",
|
|
76
|
+
"uploadType": "Only upload image format",
|
|
77
|
+
"uploadImageSize": "Uploaded image size cannot exceed 8MB!",
|
|
78
|
+
"uploadVideoType": "Only upload video format",
|
|
79
|
+
"uploadVideoSize": "Uploaded video size cannot exceed 100MB!",
|
|
80
|
+
"uploadFileSize": "Uploaded attachment size cannot exceed 100MB!",
|
|
81
|
+
"onlyUpload": "Only support upload",
|
|
82
|
+
"number": "",
|
|
83
|
+
"textFlag": "must have text",
|
|
84
|
+
"imageOrAttachment": "must have image or attachment",
|
|
85
|
+
"imageFlag": "must have image",
|
|
86
|
+
"attachmentFlag": "must have attachment",
|
|
87
|
+
"image": "Image",
|
|
88
|
+
"file": "Attachment",
|
|
89
|
+
"and": "and",
|
|
90
|
+
"required": "is required",
|
|
91
|
+
"uploading": "File is uploading, please wait",
|
|
92
|
+
"pleaseImprove": "Please improve",
|
|
93
|
+
"feedbackDesRequired": "Feedback description is required",
|
|
94
|
+
"orderDesRequired": "Problem description is required"
|
|
61
95
|
}
|
|
62
96
|
}
|