askbot-dragon 1.7.83-beta → 1.7.85-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.
Files changed (95) 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 +60 -60
  5. package/public/index.html +73 -73
  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 +141 -141
  11. package/src/assets/js/Base64Util.js +22 -22
  12. package/src/assets/js/common.js +261 -261
  13. package/src/assets/js/hammer.js +100 -100
  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 +199 -199
  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 +294 -294
  20. package/src/components/ActionAlertIframe.vue +178 -178
  21. package/src/components/AiGuide.vue +434 -434
  22. package/src/components/AnswerDocknowledge.vue +1203 -1203
  23. package/src/components/AnswerVoice.vue +285 -285
  24. package/src/components/AskIFrame.vue +15 -15
  25. package/src/components/ConversationContainer.vue +10684 -10684
  26. package/src/components/FileType.vue +86 -86
  27. package/src/components/Message.vue +27 -27
  28. package/src/components/MyEditor.vue +342 -342
  29. package/src/components/QwFeedback.vue +302 -302
  30. package/src/components/actionSatisfaction.vue +107 -107
  31. package/src/components/actionSendToBot.vue +62 -62
  32. package/src/components/answerDissatisfaction.vue +62 -62
  33. package/src/components/answerRadio.vue +259 -259
  34. package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
  35. package/src/components/ask-components/Msgloading.vue +37 -37
  36. package/src/components/ask-components/SatisfactionV2.vue +15 -15
  37. package/src/components/askVideo.vue +162 -162
  38. package/src/components/assetDetails.vue +378 -378
  39. package/src/components/assetMessage.vue +229 -229
  40. package/src/components/associationIntention.vue +378 -378
  41. package/src/components/attachmentPreview.vue +90 -90
  42. package/src/components/botActionSatisfactor.vue +68 -68
  43. package/src/components/chatContent.vue +513 -513
  44. package/src/components/feedBack.vue +136 -136
  45. package/src/components/fielListView.vue +351 -351
  46. package/src/components/file/AliyunOssComponents.vue +108 -108
  47. package/src/components/formTemplate.vue +3522 -3522
  48. package/src/components/imgView.vue +31 -31
  49. package/src/components/intelligentSummary.vue +234 -234
  50. package/src/components/kkview.vue +1128 -1128
  51. package/src/components/loadingProcess.vue +164 -164
  52. package/src/components/markDownText.vue +959 -960
  53. package/src/components/message/ActionAlertIframe.vue +112 -112
  54. package/src/components/message/ShopMessage.vue +164 -164
  55. package/src/components/message/TextMessage.vue +928 -928
  56. package/src/components/message/TicketMessage.vue +201 -201
  57. package/src/components/message/swiper/index.js +4 -4
  58. package/src/components/message/swiper/ticketSwiper.vue +503 -503
  59. package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
  60. package/src/components/msgLoading.vue +231 -231
  61. package/src/components/myPopup.vue +73 -73
  62. package/src/components/newPdfPosition.vue +877 -877
  63. package/src/components/pagination.vue +128 -128
  64. package/src/components/pdfPosition.vue +1514 -1514
  65. package/src/components/popup.vue +228 -228
  66. package/src/components/preview/docView.vue +122 -113
  67. package/src/components/preview/excelView.vue +206 -198
  68. package/src/components/preview/newPositionPreview.vue +390 -388
  69. package/src/components/preview/pdfView.vue +831 -831
  70. package/src/components/previewDoc.vue +252 -252
  71. package/src/components/previewPdf.vue +1119 -1119
  72. package/src/components/receiverMessagePlatform.vue +69 -69
  73. package/src/components/recommend.vue +80 -80
  74. package/src/components/selector/hOption.vue +20 -20
  75. package/src/components/selector/hSelector.vue +199 -199
  76. package/src/components/selector/hWrapper.vue +216 -216
  77. package/src/components/senderMessagePlatform.vue +58 -58
  78. package/src/components/source/BotMessage.vue +24 -24
  79. package/src/components/source/CustomMessage.vue +24 -24
  80. package/src/components/test.vue +260 -260
  81. package/src/components/tree.vue +307 -307
  82. package/src/components/utils/AliyunIssUtil.js +103 -103
  83. package/src/components/utils/ckeditor.js +185 -185
  84. package/src/components/utils/format_date.js +25 -25
  85. package/src/components/utils/index.js +6 -6
  86. package/src/components/utils/math_utils.js +29 -29
  87. package/src/components/voiceComponent.vue +119 -119
  88. package/src/components/welcomeKnowledgeFile.vue +347 -347
  89. package/src/components/welcomeLlmCard.vue +144 -144
  90. package/src/components/welcomeSuggest.vue +97 -97
  91. package/src/locales/cn.json +98 -98
  92. package/src/locales/en.json +98 -98
  93. package/src/locales/jp.json +72 -72
  94. package/src/main.js +76 -76
  95. package/vue.config.js +54 -54
@@ -1,435 +1,435 @@
1
- <template>
2
- <div id="ai-guide" class="ai-guide" :class="{
3
- phoneClass: isPhone,
4
- companyClass: isPC,
5
- }">
6
- <div class="ig-view-cli">
7
- <!-- 描述 -->
8
- <div v-show="aiGuide.content.descriptionVisible && aiGuide.content.description !== ''" class="ig-types-des">
9
- <span v-html="aiGuide.content.description"></span>
10
- </div>
11
- <!-- 一级分类 -->
12
- <div v-show="aiGuide.content.typesVisible && aiGuide.content.options && aiGuide.content.options.length > 0"
13
- class="ig-types-f">
14
- <span v-for="(fType, fTypeIndex) in aiGuide.content.options" :key="`f_${fTypeIndex}`"
15
- @click="changeFirstType(fTypeIndex)" :class="[
16
- 'ig-types-f-cell',
17
- activeFirstTypeIndex === fTypeIndex
18
- ? 'ig-types-f-cell-active'
19
- : '',
20
- ]">{{ fType.name }}</span>
21
- </div>
22
- <!-- 二级分类 -->
23
- <div v-if="aiGuide.content.typesVisible && aiGuide.content.options[activeFirstTypeIndex] && aiGuide.content.options[activeFirstTypeIndex].types && aiGuide.content.options[activeFirstTypeIndex].types.length !== 0"
24
- class="ig-types-s">
25
- <span v-for="(sType, sTypeIndex) in aiGuide.content.options[
26
- activeFirstTypeIndex
27
- ].types" :key="`s_${sTypeIndex}`" @click="changeLastType(sTypeIndex)" :class="[
28
- 'ig-types-s-cell',
29
- activeSecondTypeIndex === sTypeIndex
30
- ? 'ig-types-s-cell-active'
31
- : '',
32
- ]">{{ sType.name }}</span>
33
- </div>
34
- <!-- 横向排版 -->
35
- <div v-show="activeOtherObj.recommendType == 0 &&
36
- aiGuide.content.typesetting === 'horizontal'
37
- " class="ig-types-tags">
38
- <span v-for="(
39
- intentCell, intentCellIndex
40
- ) in recommendIntentPageList(activeOtherObj)" @click="
41
- sendAiGuideInfo(
42
- activeOtherObj.recommendType,
43
- intentCell
44
- )
45
- " :key="`i_${intentCellIndex}`" class="ig-types-tags-cell">{{ intentCell.questionName }}</span>
46
- </div>
47
- <!-- 竖向排版 -->
48
- <div v-show="activeOtherObj.recommendType == 0 &&
49
- aiGuide.content.typesetting === 'vertical'
50
- " class="ig-types-list">
51
- <span v-for="(
52
- intentCell, intentCellIndex
53
- ) in recommendIntentPageList(activeOtherObj)" @click="
54
- sendAiGuideInfo(
55
- activeOtherObj.recommendType,
56
- intentCell
57
- )
58
- " :key="`i_${intentCellIndex}`" class="ig-types-list-cell">
59
- <span>{{ intentCell.questionName }}</span>
60
- <span><svg t="1720148108415" class="icon" viewBox="0 0 1024 1024" version="1.1"
61
- xmlns="http://www.w3.org/2000/svg" p-id="96725" width="12" height="12">
62
- <path
63
- d="M246.728409 927.106061l414.195993-414.195993-409.542106-417.779487A57.615128 57.615128 0 0 1 256.036184 16.247187a49.377747 49.377747 0 0 1 37.2311-16.335145 48.02812 48.02812 0 0 1 37.231101 16.893611l446.773206 457.616765a57.568589 57.568589 0 0 1-4.653887 78.883394c0 1.489244 0 2.792333-4.653888 4.095421L325.844497 1006.408305a56.218962 56.218962 0 0 1-79.116088-0.605005 62.687865 62.687865 0 0 1 0-78.697239z"
64
- p-id="96726" fill="#366aff"></path>
65
- </svg></span></span>
66
- </div>
67
- <!-- 横向排版 -->
68
- <div v-show="activeOtherObj.recommendType == 1 &&
69
- aiGuide.content.typesetting === 'horizontal'
70
- " class="ig-types-tags">
71
- <span v-for="(intentCell, intentCellIndex) in recommendIntentPageList(activeOtherObj)"
72
- :key="`i_${intentCellIndex}`" @click="
73
- sendAiGuideInfo(
74
- activeOtherObj.recommendType,
75
- intentCell
76
- )
77
- " class="ig-types-tags-cell">{{ intentCell.exampleQuestion }}</span>
78
- </div>
79
- <!-- 竖向排版 -->
80
- <div v-show="activeOtherObj.recommendType == 1 &&
81
- aiGuide.content.typesetting === 'vertical'
82
- " class="ig-types-list">
83
- <span v-for="(intentCell, intentCellIndex) in recommendIntentPageList(activeOtherObj)"
84
- :key="`i_${intentCellIndex}`" @click="
85
- sendAiGuideInfo(
86
- activeOtherObj.recommendType,
87
- intentCell
88
- )
89
- " class="ig-types-list-cell">
90
- <span>{{ intentCell.exampleQuestion }}</span>
91
- <span><svg t="1720148108415" class="icon" viewBox="0 0 1024 1024" version="1.1"
92
- xmlns="http://www.w3.org/2000/svg" p-id="96725" width="12" height="12">
93
- <path
94
- d="M246.728409 927.106061l414.195993-414.195993-409.542106-417.779487A57.615128 57.615128 0 0 1 256.036184 16.247187a49.377747 49.377747 0 0 1 37.2311-16.335145 48.02812 48.02812 0 0 1 37.231101 16.893611l446.773206 457.616765a57.568589 57.568589 0 0 1-4.653887 78.883394c0 1.489244 0 2.792333-4.653888 4.095421L325.844497 1006.408305a56.218962 56.218962 0 0 1-79.116088-0.605005 62.687865 62.687865 0 0 1 0-78.697239z"
95
- p-id="96726" fill="#366aff"></path>
96
- </svg></span></span>
97
- </div>
98
- <!-- 横向排版 -->
99
- <div v-show="activeOtherObj.recommendType == 2 &&
100
- aiGuide.content.typesetting === 'horizontal'
101
- " class="ig-types-tags">
102
- <span v-for="(intentCell, intentCellIndex) in recommendIntentPageList(activeOtherObj)"
103
- :key="`i_${intentCellIndex}`" @click="
104
- sendAiGuideInfo(
105
- activeOtherObj.recommendType,
106
- intentCell
107
- )
108
- " class="ig-types-tags-cell">{{ intentCell.exampleQuestion }}</span>
109
- </div>
110
- <!-- 竖向排版 -->
111
- <div v-show="activeOtherObj.recommendType == 2 &&
112
- aiGuide.content.typesetting === 'vertical'
113
- " class="ig-types-list">
114
- <span v-for="(intentCell, intentCellIndex) in recommendIntentPageList(activeOtherObj)"
115
- :key="`i_${intentCellIndex}`" @click="
116
- sendAiGuideInfo(
117
- activeOtherObj.recommendType,
118
- intentCell
119
- )
120
- " class="ig-types-list-cell">
121
- <span>{{ intentCell.exampleQuestion }}</span>
122
- <span><svg t="1720148108415" class="icon" viewBox="0 0 1024 1024" version="1.1"
123
- xmlns="http://www.w3.org/2000/svg" p-id="96725" width="12" height="12">
124
- <path
125
- d="M246.728409 927.106061l414.195993-414.195993-409.542106-417.779487A57.615128 57.615128 0 0 1 256.036184 16.247187a49.377747 49.377747 0 0 1 37.2311-16.335145 48.02812 48.02812 0 0 1 37.231101 16.893611l446.773206 457.616765a57.568589 57.568589 0 0 1-4.653887 78.883394c0 1.489244 0 2.792333-4.653888 4.095421L325.844497 1006.408305a56.218962 56.218962 0 0 1-79.116088-0.605005 62.687865 62.687865 0 0 1 0-78.697239z"
126
- p-id="96726" fill="#366aff"></path>
127
- </svg></span></span>
128
- </div>
129
- <div v-if="aiGuide.content.groupVisible && totalPage > 1" class="ig-change-list">
130
- <span @click="changeIntellectGuide" class="ig-change-list-btn">
131
- <svg t="1720148246364" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="136175" width="16" height="16"><path d="M225.6 540.8C240 686.4 363.2 800 512 800c76.8 0 150.4-30.4 203.2-84.8 12.8-12.8 32-12.8 44.8 0s12.8 32 0 44.8c-64 65.6-153.6 104-248 104-184 0-336-142.4-350.4-323.2l-43.2 41.6c-12.8 12.8-33.6 11.2-44.8 0s-11.2-33.6 0-44.8l99.2-96c12.8-12.8 33.6-11.2 44.8 0l92.8 96c12.8 12.8 11.2 33.6-1.6 44.8-12.8 12.8-33.6 11.2-44.8-1.6l-38.4-40zM800 497.6C792 345.6 665.6 224 512 224c-76.8 0-148.8 30.4-203.2 83.2-12.8 12.8-33.6 12.8-44.8 0-12.8-12.8-12.8-33.6 0-44.8 65.6-64 153.6-102.4 248-102.4 192 0 347.2 153.6 352 342.4l41.6-40c12.8-12.8 33.6-11.2 44.8 1.6 12.8 12.8 11.2 33.6-1.6 44.8l-94.4 89.6c-12.8 11.2-32 11.2-44.8 0l-97.6-96c-12.8-12.8-12.8-32 0-44.8 12.8-12.8 32-12.8 44.8 0l43.2 40z" p-id="136176" fill="#366aff"></path></svg>
132
- {{$t('dragonCommon.refresh')}}</span
133
- >
134
- </div>
135
- </div>
136
- </div>
137
- </template>
138
- <script>
139
- export default {
140
- name: "aiGuide",
141
- data () {
142
- return {
143
- isPhone: false,
144
- isPC: false,
145
-
146
- activeFirstTypeIndex: 0,
147
- activeSecondTypeIndex: 0,
148
- activeOtherObj: {
149
- name: "",
150
- recommendType: 0, // 0 关联意图 1 高频推荐意图 2 智能推荐
151
- recommendIntentList: [], // recommendType = 0
152
- highFrequency: {
153
- // recommendType = 1
154
- rang: [], // 推荐范围
155
- number: 20, // 最多推荐问题数
156
- question: [],
157
- },
158
- intelligenceRecommend: {
159
- // recommendType = 2
160
- recommendStrategy: [0, 1], // 0 根据与当前用户咨询过相同意图的用户所问的意图进行推荐 1 根据当前用户部门的其他用户咨询过的意图进行推荐
161
- rang: [], // 推荐范围
162
- number: 20, // 最多推荐问题数
163
- question: [],
164
- },
165
- },
166
- activePage: 1,
167
- totalPage: 1,
168
- };
169
- },
170
- props: {
171
- aiGuide: Object,
172
- language: {
173
- type: String,
174
- default: "cn"
175
- }
176
- },
177
- beforeMount () { },
178
- mounted () {
179
- this.isMobile();
180
- if (this.aiGuide.content.options[0] && this.aiGuide.content.options[0] && this.aiGuide.content.options[0].types && this.aiGuide.content.options[0].types.length === 0) {
181
- this.activeOtherObj = this.aiGuide.content.options[0];
182
- } else {
183
- this.activeSecondTypeIndex = 0;
184
- this.activeOtherObj = this.aiGuide.content.options[0] && this.aiGuide.content.options[0].types && this.aiGuide.content.options[0].types[0] ? this.aiGuide.content.options[0].types[0] : [];
185
- }
186
- },
187
- methods: {
188
- isMobile () {
189
- let flag = navigator.userAgent.match(
190
- /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
191
- );
192
- if (flag) {
193
- this.isPhone = true;
194
- } else {
195
- this.isPC = true;
196
- }
197
- },
198
- changeIntellectGuide () {
199
- if (this.activePage === this.totalPage) {
200
- this.activePage = 1;
201
- } else {
202
- this.activePage++;
203
- }
204
- },
205
- changeFirstType (fTypeIndex) {
206
- this.activeFirstTypeIndex = fTypeIndex;
207
- if (this.aiGuide.content.options[fTypeIndex].types.length === 0) {
208
- this.activeOtherObj = this.aiGuide.content.options[fTypeIndex];
209
- } else {
210
- this.activeSecondTypeIndex = 0;
211
- this.activeOtherObj =
212
- this.aiGuide.content.options[fTypeIndex].types[0];
213
- }
214
- this.activePage = 1;
215
- },
216
- changeLastType (sTypeIndex) {
217
- this.activeSecondTypeIndex = sTypeIndex;
218
- this.activeOtherObj =
219
- this.aiGuide.content.options[this.activeFirstTypeIndex].types[
220
- sTypeIndex
221
- ];
222
- this.activePage = 1;
223
- },
224
- // 根据当前分组数页数返回展示列表
225
- recommendIntentPageList (obj) {
226
- let list = [];
227
- if (obj.recommendType === 0) {
228
- list = obj.recommendIntentList;
229
- }
230
- if (obj.recommendType === 1) {
231
- list = obj.highFrequency.question;
232
- }
233
- if (obj.recommendType === 2) {
234
- list = obj.intelligenceRecommend.question;
235
- }
236
- let arr = [];
237
- let len = 0;
238
- if (list) {
239
- len = list.length;
240
-
241
- // 每组展示数
242
- let groupNumber = this.aiGuide.content.groupNumber;
243
-
244
- this.totalPage = Math.ceil(len / groupNumber);
245
- if (this.aiGuide.content.groupVisible) {
246
- arr = list.slice(
247
- (this.activePage - 1) * groupNumber,
248
- this.activePage * groupNumber
249
- );
250
- } else {
251
- arr = list;
252
- }
253
- }
254
- return arr;
255
- },
256
- sendAiGuideInfo(recommendType, cell) {
257
- console.log("组件-312-3", recommendType, cell);
258
- this.$emit('sendAiGuide', recommendType, cell);
259
- },
260
- },
261
- };
262
- </script>
263
-
264
- <style scoped lang="less">
265
- .ig-view-cli {
266
- // background: #fbfcfd;
267
- font-size: 0.9em;
268
- border-radius: 5px;
269
- position: relative;
270
-
271
- .ig-view-example {
272
- position: absolute;
273
- right: -10px;
274
- top: -10px;
275
- opacity: 0.5;
276
-
277
- img {
278
- height: 50px;
279
- }
280
- }
281
-
282
- .ig-types-des {
283
- padding: 12px 16px 0px;
284
- text-align: left;
285
- }
286
-
287
- .ig-types-f {
288
- display: flex;
289
- justify-content: flex-start;
290
- flex-wrap: wrap;
291
- padding: 4px 8px;
292
-
293
- .ig-types-f-cell {
294
- height: 1.8em;
295
- line-height: 1.8em;
296
- padding: 0 12px;
297
- margin-left: 5px;
298
- margin-right: 5px;
299
- margin-top: 4px;
300
- background: #ffffff;
301
- border: 1px solid #e0e6f7;
302
- border-radius: 1em;
303
- color: #a3adc6;
304
- cursor: pointer;
305
- overflow: hidden;
306
- text-overflow: ellipsis;
307
- white-space: nowrap;
308
-
309
- &:hover {
310
- border: 1px solid #366aff;
311
- color: #366aff;
312
- }
313
-
314
- &-active {
315
- background-color: #366aff;
316
- border: 1px solid #366aff;
317
- color: white;
318
- }
319
- }
320
-
321
- .ig-types-f-cell-active {
322
- &:hover {
323
- color: white;
324
- }
325
- }
326
- }
327
-
328
- .ig-types-s {
329
- display: flex;
330
- justify-content: flex-start;
331
- flex-wrap: wrap;
332
- margin: 0px 16px 4px;
333
- border-bottom: solid 1px #e0e6f7;
334
-
335
- .ig-types-s-cell {
336
- height: 2.2em;
337
- line-height: 2.2em;
338
- margin-right: 18px;
339
- color: #b2c2d8;
340
- cursor: pointer;
341
- margin-bottom: -1px;
342
- overflow: hidden;
343
- text-overflow: ellipsis;
344
- white-space: nowrap;
345
-
346
- &:hover {
347
- color: #366aff;
348
- }
349
-
350
- &-active {
351
- border-bottom: 2px solid #366aff;
352
- color: #366aff;
353
- }
354
- }
355
- }
356
-
357
- .ig-types-tags {
358
- margin: 0 16px;
359
- padding: 0 0 12px;
360
- display: flex;
361
- justify-content: flex-start;
362
- flex-wrap: wrap;
363
-
364
- .ig-types-tags-cell {
365
- line-height: 1.4em;
366
- padding: 2px 8px;
367
- margin-right: 6px;
368
- margin-top: 4px;
369
- color: #366aff;
370
- background: #ffffff;
371
- border: 1px solid #a1b9ff;
372
- border-radius: 5px;
373
- cursor: pointer;
374
- }
375
- }
376
-
377
- .ig-high-frequency-empty {
378
- margin: 6px 15px;
379
- height: 40px;
380
- line-height: 40px;
381
- background: #fff8f4;
382
- border-radius: 5px;
383
- color: #ff9555;
384
- padding: 0 12px;
385
- text-align: left;
386
- }
387
-
388
- .ig-types-list {
389
- margin: 0 16px;
390
- padding: 0 0 8px 0;
391
- display: flex;
392
- flex-direction: column;
393
- justify-content: flex-start;
394
-
395
- .ig-types-list-cell {
396
- line-height: 1.1em;
397
- padding: 8px 0;
398
- overflow: hidden;
399
- display: flex;
400
- justify-content: space-between;
401
- color: #366aff;
402
- cursor: pointer;
403
- align-items: center;
404
- text-align: left;
405
-
406
- span {
407
- display: flex;
408
- align-items: center;
409
- flex-direction: column;
410
-
411
- i {
412
- // margin-top: 12px;
413
- }
414
- }
415
- }
416
- }
417
-
418
- .ig-change-list {
419
- padding: 8px 0;
420
- margin-top: 4px;
421
- display: flex;
422
- flex-direction: column;
423
- align-items: center;
424
- border-top: 1px solid #eeeeee;
425
-
426
- .ig-change-list-btn {
427
- font-weight: 600;
428
- color: #366aff;
429
- cursor: pointer;
430
- display: flex;
431
- align-items: center;
432
- }
433
- }
434
- }
1
+ <template>
2
+ <div id="ai-guide" class="ai-guide" :class="{
3
+ phoneClass: isPhone,
4
+ companyClass: isPC,
5
+ }">
6
+ <div class="ig-view-cli">
7
+ <!-- 描述 -->
8
+ <div v-show="aiGuide.content.descriptionVisible && aiGuide.content.description !== ''" class="ig-types-des">
9
+ <span v-html="aiGuide.content.description"></span>
10
+ </div>
11
+ <!-- 一级分类 -->
12
+ <div v-show="aiGuide.content.typesVisible && aiGuide.content.options && aiGuide.content.options.length > 0"
13
+ class="ig-types-f">
14
+ <span v-for="(fType, fTypeIndex) in aiGuide.content.options" :key="`f_${fTypeIndex}`"
15
+ @click="changeFirstType(fTypeIndex)" :class="[
16
+ 'ig-types-f-cell',
17
+ activeFirstTypeIndex === fTypeIndex
18
+ ? 'ig-types-f-cell-active'
19
+ : '',
20
+ ]">{{ fType.name }}</span>
21
+ </div>
22
+ <!-- 二级分类 -->
23
+ <div v-if="aiGuide.content.typesVisible && aiGuide.content.options[activeFirstTypeIndex] && aiGuide.content.options[activeFirstTypeIndex].types && aiGuide.content.options[activeFirstTypeIndex].types.length !== 0"
24
+ class="ig-types-s">
25
+ <span v-for="(sType, sTypeIndex) in aiGuide.content.options[
26
+ activeFirstTypeIndex
27
+ ].types" :key="`s_${sTypeIndex}`" @click="changeLastType(sTypeIndex)" :class="[
28
+ 'ig-types-s-cell',
29
+ activeSecondTypeIndex === sTypeIndex
30
+ ? 'ig-types-s-cell-active'
31
+ : '',
32
+ ]">{{ sType.name }}</span>
33
+ </div>
34
+ <!-- 横向排版 -->
35
+ <div v-show="activeOtherObj.recommendType == 0 &&
36
+ aiGuide.content.typesetting === 'horizontal'
37
+ " class="ig-types-tags">
38
+ <span v-for="(
39
+ intentCell, intentCellIndex
40
+ ) in recommendIntentPageList(activeOtherObj)" @click="
41
+ sendAiGuideInfo(
42
+ activeOtherObj.recommendType,
43
+ intentCell
44
+ )
45
+ " :key="`i_${intentCellIndex}`" class="ig-types-tags-cell">{{ intentCell.questionName }}</span>
46
+ </div>
47
+ <!-- 竖向排版 -->
48
+ <div v-show="activeOtherObj.recommendType == 0 &&
49
+ aiGuide.content.typesetting === 'vertical'
50
+ " class="ig-types-list">
51
+ <span v-for="(
52
+ intentCell, intentCellIndex
53
+ ) in recommendIntentPageList(activeOtherObj)" @click="
54
+ sendAiGuideInfo(
55
+ activeOtherObj.recommendType,
56
+ intentCell
57
+ )
58
+ " :key="`i_${intentCellIndex}`" class="ig-types-list-cell">
59
+ <span>{{ intentCell.questionName }}</span>
60
+ <span><svg t="1720148108415" class="icon" viewBox="0 0 1024 1024" version="1.1"
61
+ xmlns="http://www.w3.org/2000/svg" p-id="96725" width="12" height="12">
62
+ <path
63
+ d="M246.728409 927.106061l414.195993-414.195993-409.542106-417.779487A57.615128 57.615128 0 0 1 256.036184 16.247187a49.377747 49.377747 0 0 1 37.2311-16.335145 48.02812 48.02812 0 0 1 37.231101 16.893611l446.773206 457.616765a57.568589 57.568589 0 0 1-4.653887 78.883394c0 1.489244 0 2.792333-4.653888 4.095421L325.844497 1006.408305a56.218962 56.218962 0 0 1-79.116088-0.605005 62.687865 62.687865 0 0 1 0-78.697239z"
64
+ p-id="96726" fill="#366aff"></path>
65
+ </svg></span></span>
66
+ </div>
67
+ <!-- 横向排版 -->
68
+ <div v-show="activeOtherObj.recommendType == 1 &&
69
+ aiGuide.content.typesetting === 'horizontal'
70
+ " class="ig-types-tags">
71
+ <span v-for="(intentCell, intentCellIndex) in recommendIntentPageList(activeOtherObj)"
72
+ :key="`i_${intentCellIndex}`" @click="
73
+ sendAiGuideInfo(
74
+ activeOtherObj.recommendType,
75
+ intentCell
76
+ )
77
+ " class="ig-types-tags-cell">{{ intentCell.exampleQuestion }}</span>
78
+ </div>
79
+ <!-- 竖向排版 -->
80
+ <div v-show="activeOtherObj.recommendType == 1 &&
81
+ aiGuide.content.typesetting === 'vertical'
82
+ " class="ig-types-list">
83
+ <span v-for="(intentCell, intentCellIndex) in recommendIntentPageList(activeOtherObj)"
84
+ :key="`i_${intentCellIndex}`" @click="
85
+ sendAiGuideInfo(
86
+ activeOtherObj.recommendType,
87
+ intentCell
88
+ )
89
+ " class="ig-types-list-cell">
90
+ <span>{{ intentCell.exampleQuestion }}</span>
91
+ <span><svg t="1720148108415" class="icon" viewBox="0 0 1024 1024" version="1.1"
92
+ xmlns="http://www.w3.org/2000/svg" p-id="96725" width="12" height="12">
93
+ <path
94
+ d="M246.728409 927.106061l414.195993-414.195993-409.542106-417.779487A57.615128 57.615128 0 0 1 256.036184 16.247187a49.377747 49.377747 0 0 1 37.2311-16.335145 48.02812 48.02812 0 0 1 37.231101 16.893611l446.773206 457.616765a57.568589 57.568589 0 0 1-4.653887 78.883394c0 1.489244 0 2.792333-4.653888 4.095421L325.844497 1006.408305a56.218962 56.218962 0 0 1-79.116088-0.605005 62.687865 62.687865 0 0 1 0-78.697239z"
95
+ p-id="96726" fill="#366aff"></path>
96
+ </svg></span></span>
97
+ </div>
98
+ <!-- 横向排版 -->
99
+ <div v-show="activeOtherObj.recommendType == 2 &&
100
+ aiGuide.content.typesetting === 'horizontal'
101
+ " class="ig-types-tags">
102
+ <span v-for="(intentCell, intentCellIndex) in recommendIntentPageList(activeOtherObj)"
103
+ :key="`i_${intentCellIndex}`" @click="
104
+ sendAiGuideInfo(
105
+ activeOtherObj.recommendType,
106
+ intentCell
107
+ )
108
+ " class="ig-types-tags-cell">{{ intentCell.exampleQuestion }}</span>
109
+ </div>
110
+ <!-- 竖向排版 -->
111
+ <div v-show="activeOtherObj.recommendType == 2 &&
112
+ aiGuide.content.typesetting === 'vertical'
113
+ " class="ig-types-list">
114
+ <span v-for="(intentCell, intentCellIndex) in recommendIntentPageList(activeOtherObj)"
115
+ :key="`i_${intentCellIndex}`" @click="
116
+ sendAiGuideInfo(
117
+ activeOtherObj.recommendType,
118
+ intentCell
119
+ )
120
+ " class="ig-types-list-cell">
121
+ <span>{{ intentCell.exampleQuestion }}</span>
122
+ <span><svg t="1720148108415" class="icon" viewBox="0 0 1024 1024" version="1.1"
123
+ xmlns="http://www.w3.org/2000/svg" p-id="96725" width="12" height="12">
124
+ <path
125
+ d="M246.728409 927.106061l414.195993-414.195993-409.542106-417.779487A57.615128 57.615128 0 0 1 256.036184 16.247187a49.377747 49.377747 0 0 1 37.2311-16.335145 48.02812 48.02812 0 0 1 37.231101 16.893611l446.773206 457.616765a57.568589 57.568589 0 0 1-4.653887 78.883394c0 1.489244 0 2.792333-4.653888 4.095421L325.844497 1006.408305a56.218962 56.218962 0 0 1-79.116088-0.605005 62.687865 62.687865 0 0 1 0-78.697239z"
126
+ p-id="96726" fill="#366aff"></path>
127
+ </svg></span></span>
128
+ </div>
129
+ <div v-if="aiGuide.content.groupVisible && totalPage > 1" class="ig-change-list">
130
+ <span @click="changeIntellectGuide" class="ig-change-list-btn">
131
+ <svg t="1720148246364" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="136175" width="16" height="16"><path d="M225.6 540.8C240 686.4 363.2 800 512 800c76.8 0 150.4-30.4 203.2-84.8 12.8-12.8 32-12.8 44.8 0s12.8 32 0 44.8c-64 65.6-153.6 104-248 104-184 0-336-142.4-350.4-323.2l-43.2 41.6c-12.8 12.8-33.6 11.2-44.8 0s-11.2-33.6 0-44.8l99.2-96c12.8-12.8 33.6-11.2 44.8 0l92.8 96c12.8 12.8 11.2 33.6-1.6 44.8-12.8 12.8-33.6 11.2-44.8-1.6l-38.4-40zM800 497.6C792 345.6 665.6 224 512 224c-76.8 0-148.8 30.4-203.2 83.2-12.8 12.8-33.6 12.8-44.8 0-12.8-12.8-12.8-33.6 0-44.8 65.6-64 153.6-102.4 248-102.4 192 0 347.2 153.6 352 342.4l41.6-40c12.8-12.8 33.6-11.2 44.8 1.6 12.8 12.8 11.2 33.6-1.6 44.8l-94.4 89.6c-12.8 11.2-32 11.2-44.8 0l-97.6-96c-12.8-12.8-12.8-32 0-44.8 12.8-12.8 32-12.8 44.8 0l43.2 40z" p-id="136176" fill="#366aff"></path></svg>
132
+ {{$t('dragonCommon.refresh')}}</span
133
+ >
134
+ </div>
135
+ </div>
136
+ </div>
137
+ </template>
138
+ <script>
139
+ export default {
140
+ name: "aiGuide",
141
+ data () {
142
+ return {
143
+ isPhone: false,
144
+ isPC: false,
145
+
146
+ activeFirstTypeIndex: 0,
147
+ activeSecondTypeIndex: 0,
148
+ activeOtherObj: {
149
+ name: "",
150
+ recommendType: 0, // 0 关联意图 1 高频推荐意图 2 智能推荐
151
+ recommendIntentList: [], // recommendType = 0
152
+ highFrequency: {
153
+ // recommendType = 1
154
+ rang: [], // 推荐范围
155
+ number: 20, // 最多推荐问题数
156
+ question: [],
157
+ },
158
+ intelligenceRecommend: {
159
+ // recommendType = 2
160
+ recommendStrategy: [0, 1], // 0 根据与当前用户咨询过相同意图的用户所问的意图进行推荐 1 根据当前用户部门的其他用户咨询过的意图进行推荐
161
+ rang: [], // 推荐范围
162
+ number: 20, // 最多推荐问题数
163
+ question: [],
164
+ },
165
+ },
166
+ activePage: 1,
167
+ totalPage: 1,
168
+ };
169
+ },
170
+ props: {
171
+ aiGuide: Object,
172
+ language: {
173
+ type: String,
174
+ default: "cn"
175
+ }
176
+ },
177
+ beforeMount () { },
178
+ mounted () {
179
+ this.isMobile();
180
+ if (this.aiGuide.content.options[0] && this.aiGuide.content.options[0] && this.aiGuide.content.options[0].types && this.aiGuide.content.options[0].types.length === 0) {
181
+ this.activeOtherObj = this.aiGuide.content.options[0];
182
+ } else {
183
+ this.activeSecondTypeIndex = 0;
184
+ this.activeOtherObj = this.aiGuide.content.options[0] && this.aiGuide.content.options[0].types && this.aiGuide.content.options[0].types[0] ? this.aiGuide.content.options[0].types[0] : [];
185
+ }
186
+ },
187
+ methods: {
188
+ isMobile () {
189
+ let flag = navigator.userAgent.match(
190
+ /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
191
+ );
192
+ if (flag) {
193
+ this.isPhone = true;
194
+ } else {
195
+ this.isPC = true;
196
+ }
197
+ },
198
+ changeIntellectGuide () {
199
+ if (this.activePage === this.totalPage) {
200
+ this.activePage = 1;
201
+ } else {
202
+ this.activePage++;
203
+ }
204
+ },
205
+ changeFirstType (fTypeIndex) {
206
+ this.activeFirstTypeIndex = fTypeIndex;
207
+ if (this.aiGuide.content.options[fTypeIndex].types.length === 0) {
208
+ this.activeOtherObj = this.aiGuide.content.options[fTypeIndex];
209
+ } else {
210
+ this.activeSecondTypeIndex = 0;
211
+ this.activeOtherObj =
212
+ this.aiGuide.content.options[fTypeIndex].types[0];
213
+ }
214
+ this.activePage = 1;
215
+ },
216
+ changeLastType (sTypeIndex) {
217
+ this.activeSecondTypeIndex = sTypeIndex;
218
+ this.activeOtherObj =
219
+ this.aiGuide.content.options[this.activeFirstTypeIndex].types[
220
+ sTypeIndex
221
+ ];
222
+ this.activePage = 1;
223
+ },
224
+ // 根据当前分组数页数返回展示列表
225
+ recommendIntentPageList (obj) {
226
+ let list = [];
227
+ if (obj.recommendType === 0) {
228
+ list = obj.recommendIntentList;
229
+ }
230
+ if (obj.recommendType === 1) {
231
+ list = obj.highFrequency.question;
232
+ }
233
+ if (obj.recommendType === 2) {
234
+ list = obj.intelligenceRecommend.question;
235
+ }
236
+ let arr = [];
237
+ let len = 0;
238
+ if (list) {
239
+ len = list.length;
240
+
241
+ // 每组展示数
242
+ let groupNumber = this.aiGuide.content.groupNumber;
243
+
244
+ this.totalPage = Math.ceil(len / groupNumber);
245
+ if (this.aiGuide.content.groupVisible) {
246
+ arr = list.slice(
247
+ (this.activePage - 1) * groupNumber,
248
+ this.activePage * groupNumber
249
+ );
250
+ } else {
251
+ arr = list;
252
+ }
253
+ }
254
+ return arr;
255
+ },
256
+ sendAiGuideInfo(recommendType, cell) {
257
+ console.log("组件-312-3", recommendType, cell);
258
+ this.$emit('sendAiGuide', recommendType, cell);
259
+ },
260
+ },
261
+ };
262
+ </script>
263
+
264
+ <style scoped lang="less">
265
+ .ig-view-cli {
266
+ // background: #fbfcfd;
267
+ font-size: 0.9em;
268
+ border-radius: 5px;
269
+ position: relative;
270
+
271
+ .ig-view-example {
272
+ position: absolute;
273
+ right: -10px;
274
+ top: -10px;
275
+ opacity: 0.5;
276
+
277
+ img {
278
+ height: 50px;
279
+ }
280
+ }
281
+
282
+ .ig-types-des {
283
+ padding: 12px 16px 0px;
284
+ text-align: left;
285
+ }
286
+
287
+ .ig-types-f {
288
+ display: flex;
289
+ justify-content: flex-start;
290
+ flex-wrap: wrap;
291
+ padding: 4px 8px;
292
+
293
+ .ig-types-f-cell {
294
+ height: 1.8em;
295
+ line-height: 1.8em;
296
+ padding: 0 12px;
297
+ margin-left: 5px;
298
+ margin-right: 5px;
299
+ margin-top: 4px;
300
+ background: #ffffff;
301
+ border: 1px solid #e0e6f7;
302
+ border-radius: 1em;
303
+ color: #a3adc6;
304
+ cursor: pointer;
305
+ overflow: hidden;
306
+ text-overflow: ellipsis;
307
+ white-space: nowrap;
308
+
309
+ &:hover {
310
+ border: 1px solid #366aff;
311
+ color: #366aff;
312
+ }
313
+
314
+ &-active {
315
+ background-color: #366aff;
316
+ border: 1px solid #366aff;
317
+ color: white;
318
+ }
319
+ }
320
+
321
+ .ig-types-f-cell-active {
322
+ &:hover {
323
+ color: white;
324
+ }
325
+ }
326
+ }
327
+
328
+ .ig-types-s {
329
+ display: flex;
330
+ justify-content: flex-start;
331
+ flex-wrap: wrap;
332
+ margin: 0px 16px 4px;
333
+ border-bottom: solid 1px #e0e6f7;
334
+
335
+ .ig-types-s-cell {
336
+ height: 2.2em;
337
+ line-height: 2.2em;
338
+ margin-right: 18px;
339
+ color: #b2c2d8;
340
+ cursor: pointer;
341
+ margin-bottom: -1px;
342
+ overflow: hidden;
343
+ text-overflow: ellipsis;
344
+ white-space: nowrap;
345
+
346
+ &:hover {
347
+ color: #366aff;
348
+ }
349
+
350
+ &-active {
351
+ border-bottom: 2px solid #366aff;
352
+ color: #366aff;
353
+ }
354
+ }
355
+ }
356
+
357
+ .ig-types-tags {
358
+ margin: 0 16px;
359
+ padding: 0 0 12px;
360
+ display: flex;
361
+ justify-content: flex-start;
362
+ flex-wrap: wrap;
363
+
364
+ .ig-types-tags-cell {
365
+ line-height: 1.4em;
366
+ padding: 2px 8px;
367
+ margin-right: 6px;
368
+ margin-top: 4px;
369
+ color: #366aff;
370
+ background: #ffffff;
371
+ border: 1px solid #a1b9ff;
372
+ border-radius: 5px;
373
+ cursor: pointer;
374
+ }
375
+ }
376
+
377
+ .ig-high-frequency-empty {
378
+ margin: 6px 15px;
379
+ height: 40px;
380
+ line-height: 40px;
381
+ background: #fff8f4;
382
+ border-radius: 5px;
383
+ color: #ff9555;
384
+ padding: 0 12px;
385
+ text-align: left;
386
+ }
387
+
388
+ .ig-types-list {
389
+ margin: 0 16px;
390
+ padding: 0 0 8px 0;
391
+ display: flex;
392
+ flex-direction: column;
393
+ justify-content: flex-start;
394
+
395
+ .ig-types-list-cell {
396
+ line-height: 1.1em;
397
+ padding: 8px 0;
398
+ overflow: hidden;
399
+ display: flex;
400
+ justify-content: space-between;
401
+ color: #366aff;
402
+ cursor: pointer;
403
+ align-items: center;
404
+ text-align: left;
405
+
406
+ span {
407
+ display: flex;
408
+ align-items: center;
409
+ flex-direction: column;
410
+
411
+ i {
412
+ // margin-top: 12px;
413
+ }
414
+ }
415
+ }
416
+ }
417
+
418
+ .ig-change-list {
419
+ padding: 8px 0;
420
+ margin-top: 4px;
421
+ display: flex;
422
+ flex-direction: column;
423
+ align-items: center;
424
+ border-top: 1px solid #eeeeee;
425
+
426
+ .ig-change-list-btn {
427
+ font-weight: 600;
428
+ color: #366aff;
429
+ cursor: pointer;
430
+ display: flex;
431
+ align-items: center;
432
+ }
433
+ }
434
+ }
435
435
  </style>