askbot-dragon 1.3.85 → 1.3.87

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.
Files changed (85) hide show
  1. package/README.md +27 -27
  2. package/babel.config.js +6 -6
  3. package/dragon.iml +7 -7
  4. package/package.json +58 -58
  5. package/public/index.html +59 -59
  6. package/src/App.vue +31 -31
  7. package/src/api/index.js +1 -1
  8. package/src/api/mock.http +2 -2
  9. package/src/api/requestUrl.js +185 -185
  10. package/src/assets/js/AliyunlssUtil.js +92 -92
  11. package/src/assets/js/Base64Util.js +22 -22
  12. package/src/assets/js/common.js +11 -11
  13. package/src/assets/js/hammer.js +71 -71
  14. package/src/assets/js/script.js +36 -36
  15. package/src/assets/less/common.css +6773 -6773
  16. package/src/assets/less/converSationContainer/common.less +191 -191
  17. package/src/assets/less/converSationContainer/converSatonContainer.less +493 -493
  18. package/src/assets/less/iconfont.css +37 -37
  19. package/src/assets/less/ticketMessage.less +211 -211
  20. package/src/components/ActionAlertIframe.vue +112 -112
  21. package/src/components/AiGuide.vue +467 -467
  22. package/src/components/AnswerDocknowledge.vue +428 -428
  23. package/src/components/AnswerVoice.vue +280 -280
  24. package/src/components/AskIFrame.vue +15 -15
  25. package/src/components/ConversationContainer.vue +4106 -4106
  26. package/src/components/FileType.vue +86 -86
  27. package/src/components/Message.vue +27 -27
  28. package/src/components/actionSatisfaction.vue +107 -107
  29. package/src/components/actionSendToBot.vue +62 -62
  30. package/src/components/answerDissatisfaction.vue +62 -62
  31. package/src/components/answerRadio.vue +76 -76
  32. package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
  33. package/src/components/ask-components/Msgloading.vue +37 -37
  34. package/src/components/ask-components/SatisfactionV2.vue +15 -15
  35. package/src/components/askVideo.vue +138 -138
  36. package/src/components/assetDetails.vue +370 -370
  37. package/src/components/assetMessage.vue +228 -228
  38. package/src/components/associationIntention.vue +331 -331
  39. package/src/components/attachmentPreview.vue +90 -90
  40. package/src/components/botActionSatisfactor.vue +68 -68
  41. package/src/components/chatContent.vue +513 -513
  42. package/src/components/feedBack.vue +136 -136
  43. package/src/components/fielListView.vue +349 -349
  44. package/src/components/file/AliyunOssComponents.vue +108 -108
  45. package/src/components/formTemplate.vue +3362 -3363
  46. package/src/components/loadingProcess.vue +164 -164
  47. package/src/components/message/ActionAlertIframe.vue +112 -112
  48. package/src/components/message/ShopMessage.vue +164 -164
  49. package/src/components/message/TextMessage.vue +924 -924
  50. package/src/components/message/TicketMessage.vue +177 -177
  51. package/src/components/message/swiper/index.js +4 -4
  52. package/src/components/message/swiper/ticketSwiper.vue +503 -503
  53. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  54. package/src/components/msgLoading.vue +231 -231
  55. package/src/components/myPopup.vue +70 -70
  56. package/src/components/pdfPosition.vue +783 -783
  57. package/src/components/popup.vue +227 -227
  58. package/src/components/previewDoc.vue +228 -228
  59. package/src/components/previewPdf.vue +260 -260
  60. package/src/components/receiverMessagePlatform.vue +65 -65
  61. package/src/components/recommend.vue +89 -89
  62. package/src/components/selector/hOption.vue +20 -20
  63. package/src/components/selector/hSelector.vue +199 -199
  64. package/src/components/selector/hWrapper.vue +216 -216
  65. package/src/components/senderMessagePlatform.vue +50 -50
  66. package/src/components/source/BotMessage.vue +24 -24
  67. package/src/components/source/CustomMessage.vue +24 -24
  68. package/src/components/test.vue +260 -260
  69. package/src/components/tree.vue +294 -294
  70. package/src/components/utils/AliyunIssUtil.js +72 -72
  71. package/src/components/utils/ckeditor.js +155 -155
  72. package/src/components/utils/ckeditorImageUpload/command.js +109 -109
  73. package/src/components/utils/ckeditorImageUpload/editing.js +11 -11
  74. package/src/components/utils/ckeditorImageUpload/plugin-image.js +11 -11
  75. package/src/components/utils/ckeditorImageUpload/toolbar-ui.js +40 -40
  76. package/src/components/utils/ckeditorfileUpload/common.js +133 -111
  77. package/src/components/utils/ckeditorfileUpload/editing.js +11 -11
  78. package/src/components/utils/ckeditorfileUpload/plugin_file.js +11 -11
  79. package/src/components/utils/ckeditorfileUpload/toolbar_ui.js +34 -34
  80. package/src/components/utils/format_date.js +25 -25
  81. package/src/components/utils/index.js +6 -6
  82. package/src/components/utils/math_utils.js +29 -29
  83. package/src/components/voiceComponent.vue +119 -119
  84. package/src/main.js +60 -60
  85. package/vue.config.js +55 -55
@@ -1,332 +1,332 @@
1
- <template>
2
- <div class="association-intention">
3
- <div v-if=" (msgType === 'answer_welcofmetext' || msgType === 'answer_text') && !(msg.recommend&& msg.recommend.status)">
4
- <!-- <p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)"></p>-->
5
- <template v-if="msg.dispatchServiceType === 'CHATGPT'">
6
- <p style="white-space: pre-wrap;">
7
- {{msg.content | msgHtmlContent}}
8
- </p>
9
- </template>
10
- <template v-else>
11
- <p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)" class="answer-rich-text"></p>
12
- </template>
13
- </div>
14
- <div v-if=" (msgType === 'answer_welcofmetext' || msgType === 'answer_text') && (msg.recommend&& msg.recommend.status)">
15
- <template v-if="msg.dispatchServiceType === 'CHATGPT'">
16
- <p style="white-space: pre-wrap;">
17
- {{msg.content | msgHtmlContent}}
18
- </p>
19
- </template>
20
- <template v-else>
21
- <p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)" class="answer-rich-text"></p>
22
- </template>
23
- <Recommend :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
24
- </div>
25
- <div v-if="msg.type === 'answer_rich_text' && !(msg.content.recommend && msg.content.recommend.status)">
26
- <p v-html="$options.filters.imageStyle(msg.content.html)" @click="lookAttach($event)"></p>
27
- </div>
28
- <div v-else-if="msg.type == 'answer_rich_text' && (msg.content.recommend && msg.content.recommend.status)">
29
- <p v-html="$options.filters.imageStyle(msg.content.html)" class="answer-rich-text" @click="lookAttach($event)"></p>
30
- <Recommend :msg="msg.content" @onRadioClickReco="onRadioClickReco"></Recommend>
31
- </div>
32
- <div v-else-if="msgType === 'answer_image'" >
33
- <div
34
- class="association-img"
35
- v-if="msg.content.url"
36
- >
37
- <!-- LPY 原生宽度适配有bug,弃用 -->
38
- <template v-if="sourceOhm === 'ohm' && !isOhmPc">
39
- <viewer :images="[msg.content.url]">
40
- <img
41
- v-for="(src,index) in [msg.content.url]"
42
- :src="src"
43
- :key="index"
44
- style="height: auto; width: calc(100vw - 137px);border-radius: 25px;max-width: 230px"
45
- class="img-class"
46
- />
47
- </viewer>
48
- </template>
49
- <img
50
- v-else
51
- :src="msg.content.url"
52
- style="height: auto; width: calc(100vw - 137px);border-radius: 25px;max-width: 230px"
53
- @click="onImageClick(msg.content.url)"
54
- class="img-class"
55
- />
56
- </div>
57
- <Recommend v-if="msg.recommend && msg.recommend.list && msg.recommend.list.length > 0" :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
58
- </div>
59
- <div v-else-if="msgType === 'answer_video' || msgType === 'user_video' || msgType === 'VIDEO'">
60
- <div class="association-img" v-if="msg.content.url">
61
- <ask-video :msg="msg" :url="msg.content.url" :local-url="msg.content.localUrl"
62
- :progress="msg.content.progress"></ask-video>
63
- </div>
64
- <Recommend v-if="msg.recommend && msg.recommend.list && msg.recommend.list.length > 0" :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
65
- </div>
66
- <van-popup v-model="previewShowPopup" position="bottom" v-if="previewShowPopup" :style="{ height: '90%', background:'#FFFFFF'}">
67
- <previewDoc ref="previewDoc" :url="previewHref" @close="close" v-if="previewShowPopup"></previewDoc>
68
- </van-popup>
69
- <el-drawer
70
- title="我是标题"
71
- :visible.sync="drawer"
72
- :with-header="false"
73
- size="65%"
74
- v-if="drawer"
75
- >
76
- <previewDoc ref="previewDoc" :url="previewHref" @close="close" v-if="drawer"></previewDoc>
77
- </el-drawer>
78
- </div>
79
- </template>
80
-
81
- <script>
82
- import askVideo from "./askVideo";
83
- import Recommend from "./recommend";
84
- import previewDoc from "./previewDoc";
85
- import { isMobile } from "../assets/js/common";
86
- export default {
87
- name: "associationIntention",
88
- components: {Recommend, askVideo, previewDoc},
89
- props: ["msg",'msgType','isOpen','sourceOhm','isOhmPc'],
90
- filters: {
91
- imageStyle: function (html) {
92
- //富文本内图片自适应高度宽度
93
- const regex = new RegExp("<img", "gi");
94
- return html.replace(
95
- regex,
96
- "<img style='max-width: 230px;border-radius: 25px;' onclick='imageOnClick(this)'"
97
- );
98
- },
99
- msgHtmlContent:function (content){
100
- var reg = /<br\/>/g;
101
- let msg = content.replace(reg,'\n');
102
- return msg
103
- },
104
- },
105
- data() {
106
- return {
107
- previewHref: "",
108
- previewShowPopup:false,
109
- drawer:false
110
- }
111
- },
112
- mounted() {
113
- },
114
- methods:{
115
- // 将匹配结果替换表情图片
116
- emotion(res) {
117
- let word = res.replace(/#|;/gi, "");
118
- const list = [
119
- "微笑",
120
- "撇嘴",
121
- "色",
122
- "发呆",
123
- "得意",
124
- "流泪",
125
- "害羞",
126
- "闭嘴",
127
- "睡",
128
- "大哭",
129
- "尴尬",
130
- "发怒",
131
- "调皮",
132
- "呲牙",
133
- "惊讶",
134
- "难过",
135
- "酷",
136
- "冷汗",
137
- "抓狂",
138
- "吐",
139
- "偷笑",
140
- "可爱",
141
- "白眼",
142
- "傲慢",
143
- "饥饿",
144
- "困",
145
- "惊恐",
146
- "流汗",
147
- "憨笑",
148
- "大兵",
149
- "奋斗",
150
- "咒骂",
151
- "疑问",
152
- "嘘",
153
- "晕",
154
- "折磨",
155
- "衰",
156
- "骷髅",
157
- "敲打",
158
- "再见",
159
- "擦汗",
160
- "抠鼻",
161
- "鼓掌",
162
- "糗大了",
163
- "坏笑",
164
- "左哼哼",
165
- "右哼哼",
166
- "哈欠",
167
- "鄙视",
168
- "委屈",
169
- "快哭了",
170
- "阴险",
171
- "亲亲",
172
- "吓",
173
- "可怜",
174
- "菜刀",
175
- "西瓜",
176
- "啤酒",
177
- "篮球",
178
- "乒乓",
179
- "咖啡",
180
- "饭",
181
- "猪头",
182
- "玫瑰",
183
- "凋谢",
184
- "示爱",
185
- "爱心",
186
- "心碎",
187
- "蛋糕",
188
- "闪电",
189
- "炸弹",
190
- "刀",
191
- "足球",
192
- "瓢虫",
193
- "便便",
194
- "月亮",
195
- "太阳",
196
- "礼物",
197
- "拥抱",
198
- "强",
199
- "弱",
200
- "握手",
201
- "胜利",
202
- "抱拳",
203
- "勾引",
204
- "拳头",
205
- "差劲",
206
- "爱你",
207
- "不",
208
- "可以",
209
- "爱情",
210
- "飞吻",
211
- "跳跳",
212
- "发抖",
213
- "怄火",
214
- "转圈",
215
- "磕头",
216
- "回头",
217
- "跳绳",
218
- "挥手",
219
- "激动",
220
- "街舞",
221
- "献吻",
222
- "左太极",
223
- "右太极",
224
- ];
225
- let index = list.indexOf(word);
226
- return `<img height="20px" src="https://guoranim.oss-cn-beijing.aliyuncs.com/emoji/${
227
- index + 1
228
- }.png" align="middle">`;
229
- },
230
- onRadioClickReco(id, name, apikey) {
231
- this.$emit("onRadioClick", id, name, apikey);
232
- },
233
- onImageClick(url){
234
- this.$emit('onImageClick',url)
235
- },
236
- msgContent(content){
237
- console.debug('215',content)
238
- var regBr = /<br\/>/g;
239
- let msg = content.replace(regBr,"\n");
240
- var reg = /<[^>]+>/g;
241
- return reg.test(msg);
242
-
243
- },
244
- //预览图片
245
- lookAttach(e){
246
- /* eslint-disable */
247
- var reg = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\*\+,;=.]+$/;
248
- /* eslint-enable*/
249
- if (e.target.localName == 'a'){
250
- this.previewHref = e.target.href;
251
- if (this.previewHref.includes('https://www') || this.previewHref.includes('http://www') || this.previewHref.indexOf('https://static.guoranbot.com') == -1){
252
- return
253
- } else {
254
- if (isMobile()){
255
- this.previewShowPopup = true
256
- e.returnValue = false
257
- } else {
258
- this.drawer = true;
259
- e.returnValue = false
260
- }
261
- }
262
- // let url = ''
263
- // try {
264
- // url = btoa(e.target.href)
265
- // }
266
- // catch {
267
- // url = encodeURIComponent(btoa(e.target.href))
268
- // }
269
- // window.open('https://test.open.askbot.cn/kkfileview/onlinePreview?url=' + url)
270
- // e.stopPropagation()
271
- // e.preventDefault()
272
- e.returnValue = false
273
- }
274
- },
275
- close(){
276
- this.previewShowPopup = false;
277
- this.drawer = false
278
- }
279
- },
280
- watch:{
281
- isOpen:{
282
- handler(value){
283
- if (value){
284
- let reg = this.msg.content.html
285
- if (reg){
286
- reg = reg.replace('<a',"<span class='isReplace'")
287
- reg = reg.replace('</a>','</span>')
288
- console.debug('reg',reg)
289
- this.msg.content.html = reg
290
- }
291
-
292
- }
293
- else {
294
- let reg = this.msg.content.html
295
- console.debug('reg',reg)
296
- if (reg){
297
- reg = reg.replace("<span class='isReplace'","<a download")
298
- let reg2 = reg
299
- reg2 = reg2.replace('</span>','</a>')
300
- this.msg.content.html = reg2
301
- console.debug('reg',reg2)
302
- }
303
- }
304
- }
305
- }
306
- }
307
- }
308
- </script>
309
-
310
-
311
- <style scoped lang="less">
312
- @import "../assets/less/converSationContainer/common";
313
- .association-intention{
314
- .association-img{
315
- /*display: flex;
316
- align-items: center;
317
- justify-content: center;*/
318
-
319
- }
320
- .answer-rich-text{
321
- /*padding-bottom: 10px;
322
- border-bottom: 1px solid #EEEEEE;*/
323
- }
324
- ///deep/a{
325
- // disabled:true
326
- // //pointer-events: none;
327
- //}
328
- }
329
- /deep/.el-drawer__body{
330
- height: 100%;
331
- }
1
+ <template>
2
+ <div class="association-intention">
3
+ <div v-if=" (msgType === 'answer_welcofmetext' || msgType === 'answer_text') && !(msg.recommend&& msg.recommend.status)">
4
+ <!-- <p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)"></p>-->
5
+ <template v-if="msg.dispatchServiceType === 'CHATGPT'">
6
+ <p style="white-space: pre-wrap;">
7
+ {{msg.content | msgHtmlContent}}
8
+ </p>
9
+ </template>
10
+ <template v-else>
11
+ <p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)" class="answer-rich-text"></p>
12
+ </template>
13
+ </div>
14
+ <div v-if=" (msgType === 'answer_welcofmetext' || msgType === 'answer_text') && (msg.recommend&& msg.recommend.status)">
15
+ <template v-if="msg.dispatchServiceType === 'CHATGPT'">
16
+ <p style="white-space: pre-wrap;">
17
+ {{msg.content | msgHtmlContent}}
18
+ </p>
19
+ </template>
20
+ <template v-else>
21
+ <p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)" class="answer-rich-text"></p>
22
+ </template>
23
+ <Recommend :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
24
+ </div>
25
+ <div v-if="msg.type === 'answer_rich_text' && !(msg.content.recommend && msg.content.recommend.status)">
26
+ <p v-html="$options.filters.imageStyle(msg.content.html)" @click="lookAttach($event)"></p>
27
+ </div>
28
+ <div v-else-if="msg.type == 'answer_rich_text' && (msg.content.recommend && msg.content.recommend.status)">
29
+ <p v-html="$options.filters.imageStyle(msg.content.html)" class="answer-rich-text" @click="lookAttach($event)"></p>
30
+ <Recommend :msg="msg.content" @onRadioClickReco="onRadioClickReco"></Recommend>
31
+ </div>
32
+ <div v-else-if="msgType === 'answer_image'" >
33
+ <div
34
+ class="association-img"
35
+ v-if="msg.content.url"
36
+ >
37
+ <!-- LPY 原生宽度适配有bug,弃用 -->
38
+ <template v-if="sourceOhm === 'ohm' && !isOhmPc">
39
+ <viewer :images="[msg.content.url]">
40
+ <img
41
+ v-for="(src,index) in [msg.content.url]"
42
+ :src="src"
43
+ :key="index"
44
+ style="height: auto; width: calc(100vw - 137px);border-radius: 25px;max-width: 230px"
45
+ class="img-class"
46
+ />
47
+ </viewer>
48
+ </template>
49
+ <img
50
+ v-else
51
+ :src="msg.content.url"
52
+ style="height: auto; width: calc(100vw - 137px);border-radius: 25px;max-width: 230px"
53
+ @click="onImageClick(msg.content.url)"
54
+ class="img-class"
55
+ />
56
+ </div>
57
+ <Recommend v-if="msg.recommend && msg.recommend.list && msg.recommend.list.length > 0" :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
58
+ </div>
59
+ <div v-else-if="msgType === 'answer_video' || msgType === 'user_video' || msgType === 'VIDEO'">
60
+ <div class="association-img" v-if="msg.content.url">
61
+ <ask-video :msg="msg" :url="msg.content.url" :local-url="msg.content.localUrl"
62
+ :progress="msg.content.progress"></ask-video>
63
+ </div>
64
+ <Recommend v-if="msg.recommend && msg.recommend.list && msg.recommend.list.length > 0" :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
65
+ </div>
66
+ <van-popup v-model="previewShowPopup" position="bottom" v-if="previewShowPopup" :style="{ height: '90%', background:'#FFFFFF'}">
67
+ <previewDoc ref="previewDoc" :url="previewHref" @close="close" v-if="previewShowPopup"></previewDoc>
68
+ </van-popup>
69
+ <el-drawer
70
+ title="我是标题"
71
+ :visible.sync="drawer"
72
+ :with-header="false"
73
+ size="65%"
74
+ v-if="drawer"
75
+ >
76
+ <previewDoc ref="previewDoc" :url="previewHref" @close="close" v-if="drawer"></previewDoc>
77
+ </el-drawer>
78
+ </div>
79
+ </template>
80
+
81
+ <script>
82
+ import askVideo from "./askVideo";
83
+ import Recommend from "./recommend";
84
+ import previewDoc from "./previewDoc";
85
+ import { isMobile } from "../assets/js/common";
86
+ export default {
87
+ name: "associationIntention",
88
+ components: {Recommend, askVideo, previewDoc},
89
+ props: ["msg",'msgType','isOpen','sourceOhm','isOhmPc'],
90
+ filters: {
91
+ imageStyle: function (html) {
92
+ //富文本内图片自适应高度宽度
93
+ const regex = new RegExp("<img", "gi");
94
+ return html.replace(
95
+ regex,
96
+ "<img style='max-width: 230px;border-radius: 25px;' onclick='imageOnClick(this)'"
97
+ );
98
+ },
99
+ msgHtmlContent:function (content){
100
+ var reg = /<br\/>/g;
101
+ let msg = content.replace(reg,'\n');
102
+ return msg
103
+ },
104
+ },
105
+ data() {
106
+ return {
107
+ previewHref: "",
108
+ previewShowPopup:false,
109
+ drawer:false
110
+ }
111
+ },
112
+ mounted() {
113
+ },
114
+ methods:{
115
+ // 将匹配结果替换表情图片
116
+ emotion(res) {
117
+ let word = res.replace(/#|;/gi, "");
118
+ const list = [
119
+ "微笑",
120
+ "撇嘴",
121
+ "色",
122
+ "发呆",
123
+ "得意",
124
+ "流泪",
125
+ "害羞",
126
+ "闭嘴",
127
+ "睡",
128
+ "大哭",
129
+ "尴尬",
130
+ "发怒",
131
+ "调皮",
132
+ "呲牙",
133
+ "惊讶",
134
+ "难过",
135
+ "酷",
136
+ "冷汗",
137
+ "抓狂",
138
+ "吐",
139
+ "偷笑",
140
+ "可爱",
141
+ "白眼",
142
+ "傲慢",
143
+ "饥饿",
144
+ "困",
145
+ "惊恐",
146
+ "流汗",
147
+ "憨笑",
148
+ "大兵",
149
+ "奋斗",
150
+ "咒骂",
151
+ "疑问",
152
+ "嘘",
153
+ "晕",
154
+ "折磨",
155
+ "衰",
156
+ "骷髅",
157
+ "敲打",
158
+ "再见",
159
+ "擦汗",
160
+ "抠鼻",
161
+ "鼓掌",
162
+ "糗大了",
163
+ "坏笑",
164
+ "左哼哼",
165
+ "右哼哼",
166
+ "哈欠",
167
+ "鄙视",
168
+ "委屈",
169
+ "快哭了",
170
+ "阴险",
171
+ "亲亲",
172
+ "吓",
173
+ "可怜",
174
+ "菜刀",
175
+ "西瓜",
176
+ "啤酒",
177
+ "篮球",
178
+ "乒乓",
179
+ "咖啡",
180
+ "饭",
181
+ "猪头",
182
+ "玫瑰",
183
+ "凋谢",
184
+ "示爱",
185
+ "爱心",
186
+ "心碎",
187
+ "蛋糕",
188
+ "闪电",
189
+ "炸弹",
190
+ "刀",
191
+ "足球",
192
+ "瓢虫",
193
+ "便便",
194
+ "月亮",
195
+ "太阳",
196
+ "礼物",
197
+ "拥抱",
198
+ "强",
199
+ "弱",
200
+ "握手",
201
+ "胜利",
202
+ "抱拳",
203
+ "勾引",
204
+ "拳头",
205
+ "差劲",
206
+ "爱你",
207
+ "不",
208
+ "可以",
209
+ "爱情",
210
+ "飞吻",
211
+ "跳跳",
212
+ "发抖",
213
+ "怄火",
214
+ "转圈",
215
+ "磕头",
216
+ "回头",
217
+ "跳绳",
218
+ "挥手",
219
+ "激动",
220
+ "街舞",
221
+ "献吻",
222
+ "左太极",
223
+ "右太极",
224
+ ];
225
+ let index = list.indexOf(word);
226
+ return `<img height="20px" src="https://guoranim.oss-cn-beijing.aliyuncs.com/emoji/${
227
+ index + 1
228
+ }.png" align="middle">`;
229
+ },
230
+ onRadioClickReco(id, name, apikey) {
231
+ this.$emit("onRadioClick", id, name, apikey);
232
+ },
233
+ onImageClick(url){
234
+ this.$emit('onImageClick',url)
235
+ },
236
+ msgContent(content){
237
+ console.debug('215',content)
238
+ var regBr = /<br\/>/g;
239
+ let msg = content.replace(regBr,"\n");
240
+ var reg = /<[^>]+>/g;
241
+ return reg.test(msg);
242
+
243
+ },
244
+ //预览图片
245
+ lookAttach(e){
246
+ /* eslint-disable */
247
+ var reg = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\*\+,;=.]+$/;
248
+ /* eslint-enable*/
249
+ if (e.target.localName == 'a'){
250
+ this.previewHref = e.target.href;
251
+ if (this.previewHref.includes('https://www') || this.previewHref.includes('http://www') || this.previewHref.indexOf('https://static.guoranbot.com') == -1){
252
+ return
253
+ } else {
254
+ if (isMobile()){
255
+ this.previewShowPopup = true
256
+ e.returnValue = false
257
+ } else {
258
+ this.drawer = true;
259
+ e.returnValue = false
260
+ }
261
+ }
262
+ // let url = ''
263
+ // try {
264
+ // url = btoa(e.target.href)
265
+ // }
266
+ // catch {
267
+ // url = encodeURIComponent(btoa(e.target.href))
268
+ // }
269
+ // window.open('https://test.open.askbot.cn/kkfileview/onlinePreview?url=' + url)
270
+ // e.stopPropagation()
271
+ // e.preventDefault()
272
+ e.returnValue = false
273
+ }
274
+ },
275
+ close(){
276
+ this.previewShowPopup = false;
277
+ this.drawer = false
278
+ }
279
+ },
280
+ watch:{
281
+ isOpen:{
282
+ handler(value){
283
+ if (value){
284
+ let reg = this.msg.content.html
285
+ if (reg){
286
+ reg = reg.replace('<a',"<span class='isReplace'")
287
+ reg = reg.replace('</a>','</span>')
288
+ console.debug('reg',reg)
289
+ this.msg.content.html = reg
290
+ }
291
+
292
+ }
293
+ else {
294
+ let reg = this.msg.content.html
295
+ console.debug('reg',reg)
296
+ if (reg){
297
+ reg = reg.replace("<span class='isReplace'","<a download")
298
+ let reg2 = reg
299
+ reg2 = reg2.replace('</span>','</a>')
300
+ this.msg.content.html = reg2
301
+ console.debug('reg',reg2)
302
+ }
303
+ }
304
+ }
305
+ }
306
+ }
307
+ }
308
+ </script>
309
+
310
+
311
+ <style scoped lang="less">
312
+ @import "../assets/less/converSationContainer/common";
313
+ .association-intention{
314
+ .association-img{
315
+ /*display: flex;
316
+ align-items: center;
317
+ justify-content: center;*/
318
+
319
+ }
320
+ .answer-rich-text{
321
+ /*padding-bottom: 10px;
322
+ border-bottom: 1px solid #EEEEEE;*/
323
+ }
324
+ ///deep/a{
325
+ // disabled:true
326
+ // //pointer-events: none;
327
+ //}
328
+ }
329
+ /deep/.el-drawer__body{
330
+ height: 100%;
331
+ }
332
332
  </style>