askbot-dragon 1.7.43-beta → 1.7.44-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 +56 -56
  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 +252 -252
  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 +177 -177
  21. package/src/components/AiGuide.vue +438 -438
  22. package/src/components/AnswerDocknowledge.vue +1091 -1091
  23. package/src/components/AnswerVoice.vue +285 -285
  24. package/src/components/AskIFrame.vue +15 -15
  25. package/src/components/ConversationContainer.vue +10766 -10766
  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 +301 -301
  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 +211 -211
  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 +228 -228
  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 +3501 -3501
  48. package/src/components/imgView.vue +31 -31
  49. package/src/components/intelligentSummary.vue +231 -231
  50. package/src/components/kkview.vue +1138 -1138
  51. package/src/components/loadingProcess.vue +164 -164
  52. package/src/components/markDownText.vue +197 -197
  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 +70 -70
  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 +227 -227
  66. package/src/components/preview/docView.vue +106 -106
  67. package/src/components/preview/excelView.vue +176 -176
  68. package/src/components/preview/newPositionPreview.vue +350 -337
  69. package/src/components/preview/pdfView.vue +760 -754
  70. package/src/components/previewDoc.vue +251 -251
  71. package/src/components/previewPdf.vue +1069 -872
  72. package/src/components/receiverMessagePlatform.vue +65 -65
  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 +50 -50
  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 +344 -344
  89. package/src/components/welcomeLlmCard.vue +144 -144
  90. package/src/components/welcomeSuggest.vue +97 -97
  91. package/src/locales/cn.json +71 -71
  92. package/src/locales/en.json +72 -72
  93. package/src/locales/jp.json +72 -72
  94. package/src/main.js +75 -75
  95. package/vue.config.js +54 -54
@@ -1,439 +1,439 @@
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"
132
- xmlns="http://www.w3.org/2000/svg" p-id="136175" width="16" height="16">
133
- <path
134
- 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"
135
- p-id="136176" fill="#366aff"></path>
136
- </svg>
137
- 换一批</span>
138
- </div>
139
- </div>
140
- </div>
141
- </template>
142
- <script>
143
- export default {
144
- name: "aiGuide",
145
- data () {
146
- return {
147
- isPhone: false,
148
- isPC: false,
149
-
150
- activeFirstTypeIndex: 0,
151
- activeSecondTypeIndex: 0,
152
- activeOtherObj: {
153
- name: "",
154
- recommendType: 0, // 0 关联意图 1 高频推荐意图 2 智能推荐
155
- recommendIntentList: [], // recommendType = 0
156
- highFrequency: {
157
- // recommendType = 1
158
- rang: [], // 推荐范围
159
- number: 20, // 最多推荐问题数
160
- question: [],
161
- },
162
- intelligenceRecommend: {
163
- // recommendType = 2
164
- recommendStrategy: [0, 1], // 0 根据与当前用户咨询过相同意图的用户所问的意图进行推荐 1 根据当前用户部门的其他用户咨询过的意图进行推荐
165
- rang: [], // 推荐范围
166
- number: 20, // 最多推荐问题数
167
- question: [],
168
- },
169
- },
170
- activePage: 1,
171
- totalPage: 1,
172
- };
173
- },
174
- props: {
175
- aiGuide: Object,
176
- language: {
177
- type: String,
178
- default: "cn"
179
- }
180
- },
181
- beforeMount () { },
182
- mounted () {
183
- this.isMobile();
184
- 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) {
185
- this.activeOtherObj = this.aiGuide.content.options[0];
186
- } else {
187
- this.activeSecondTypeIndex = 0;
188
- 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] : [];
189
- }
190
- },
191
- methods: {
192
- isMobile () {
193
- let flag = navigator.userAgent.match(
194
- /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
195
- );
196
- if (flag) {
197
- this.isPhone = true;
198
- } else {
199
- this.isPC = true;
200
- }
201
- },
202
- changeIntellectGuide () {
203
- if (this.activePage === this.totalPage) {
204
- this.activePage = 1;
205
- } else {
206
- this.activePage++;
207
- }
208
- },
209
- changeFirstType (fTypeIndex) {
210
- this.activeFirstTypeIndex = fTypeIndex;
211
- if (this.aiGuide.content.options[fTypeIndex].types.length === 0) {
212
- this.activeOtherObj = this.aiGuide.content.options[fTypeIndex];
213
- } else {
214
- this.activeSecondTypeIndex = 0;
215
- this.activeOtherObj =
216
- this.aiGuide.content.options[fTypeIndex].types[0];
217
- }
218
- this.activePage = 1;
219
- },
220
- changeLastType (sTypeIndex) {
221
- this.activeSecondTypeIndex = sTypeIndex;
222
- this.activeOtherObj =
223
- this.aiGuide.content.options[this.activeFirstTypeIndex].types[
224
- sTypeIndex
225
- ];
226
- this.activePage = 1;
227
- },
228
- // 根据当前分组数页数返回展示列表
229
- recommendIntentPageList (obj) {
230
- let list = [];
231
- if (obj.recommendType === 0) {
232
- list = obj.recommendIntentList;
233
- }
234
- if (obj.recommendType === 1) {
235
- list = obj.highFrequency.question;
236
- }
237
- if (obj.recommendType === 2) {
238
- list = obj.intelligenceRecommend.question;
239
- }
240
- let arr = [];
241
- let len = 0;
242
- if (list) {
243
- len = list.length;
244
-
245
- // 每组展示数
246
- let groupNumber = this.aiGuide.content.groupNumber;
247
-
248
- this.totalPage = Math.ceil(len / groupNumber);
249
- if (this.aiGuide.content.groupVisible) {
250
- arr = list.slice(
251
- (this.activePage - 1) * groupNumber,
252
- this.activePage * groupNumber
253
- );
254
- } else {
255
- arr = list;
256
- }
257
- }
258
- return arr;
259
- },
260
- sendAiGuideInfo (recommendType, cell) {
261
- console.log("组件-312-3", recommendType, cell);
262
- this.$emit('sendAiGuide', recommendType, cell);
263
- },
264
- },
265
- };
266
- </script>
267
-
268
- <style scoped lang="less">
269
- .ig-view-cli {
270
- // background: #fbfcfd;
271
- font-size: 0.9em;
272
- border-radius: 5px;
273
- position: relative;
274
-
275
- .ig-view-example {
276
- position: absolute;
277
- right: -10px;
278
- top: -10px;
279
- opacity: 0.5;
280
-
281
- img {
282
- height: 50px;
283
- }
284
- }
285
-
286
- .ig-types-des {
287
- padding: 12px 16px 0px;
288
- text-align: left;
289
- }
290
-
291
- .ig-types-f {
292
- display: flex;
293
- justify-content: flex-start;
294
- flex-wrap: wrap;
295
- padding: 4px 8px;
296
-
297
- .ig-types-f-cell {
298
- height: 1.8em;
299
- line-height: 1.8em;
300
- padding: 0 12px;
301
- margin-left: 5px;
302
- margin-right: 5px;
303
- margin-top: 4px;
304
- background: #ffffff;
305
- border: 1px solid #e0e6f7;
306
- border-radius: 1em;
307
- color: #a3adc6;
308
- cursor: pointer;
309
- overflow: hidden;
310
- text-overflow: ellipsis;
311
- white-space: nowrap;
312
-
313
- &:hover {
314
- border: 1px solid #366aff;
315
- color: #366aff;
316
- }
317
-
318
- &-active {
319
- background-color: #366aff;
320
- border: 1px solid #366aff;
321
- color: white;
322
- }
323
- }
324
-
325
- .ig-types-f-cell-active {
326
- &:hover {
327
- color: white;
328
- }
329
- }
330
- }
331
-
332
- .ig-types-s {
333
- display: flex;
334
- justify-content: flex-start;
335
- flex-wrap: wrap;
336
- margin: 0px 16px 4px;
337
- border-bottom: solid 1px #e0e6f7;
338
-
339
- .ig-types-s-cell {
340
- height: 2.2em;
341
- line-height: 2.2em;
342
- margin-right: 18px;
343
- color: #b2c2d8;
344
- cursor: pointer;
345
- margin-bottom: -1px;
346
- overflow: hidden;
347
- text-overflow: ellipsis;
348
- white-space: nowrap;
349
-
350
- &:hover {
351
- color: #366aff;
352
- }
353
-
354
- &-active {
355
- border-bottom: 2px solid #366aff;
356
- color: #366aff;
357
- }
358
- }
359
- }
360
-
361
- .ig-types-tags {
362
- margin: 0 16px;
363
- padding: 0 0 12px;
364
- display: flex;
365
- justify-content: flex-start;
366
- flex-wrap: wrap;
367
-
368
- .ig-types-tags-cell {
369
- line-height: 1.4em;
370
- padding: 2px 8px;
371
- margin-right: 6px;
372
- margin-top: 4px;
373
- color: #366aff;
374
- background: #ffffff;
375
- border: 1px solid #a1b9ff;
376
- border-radius: 5px;
377
- cursor: pointer;
378
- }
379
- }
380
-
381
- .ig-high-frequency-empty {
382
- margin: 6px 15px;
383
- height: 40px;
384
- line-height: 40px;
385
- background: #fff8f4;
386
- border-radius: 5px;
387
- color: #ff9555;
388
- padding: 0 12px;
389
- text-align: left;
390
- }
391
-
392
- .ig-types-list {
393
- margin: 0 16px;
394
- padding: 0 0 8px 0;
395
- display: flex;
396
- flex-direction: column;
397
- justify-content: flex-start;
398
-
399
- .ig-types-list-cell {
400
- line-height: 1.1em;
401
- padding: 8px 0;
402
- overflow: hidden;
403
- display: flex;
404
- justify-content: space-between;
405
- color: #366aff;
406
- cursor: pointer;
407
- align-items: center;
408
- text-align: left;
409
-
410
- span {
411
- display: flex;
412
- align-items: center;
413
- flex-direction: column;
414
-
415
- i {
416
- // margin-top: 12px;
417
- }
418
- }
419
- }
420
- }
421
-
422
- .ig-change-list {
423
- padding: 8px 0;
424
- margin-top: 4px;
425
- display: flex;
426
- flex-direction: column;
427
- align-items: center;
428
- border-top: 1px solid #eeeeee;
429
-
430
- .ig-change-list-btn {
431
- font-weight: 600;
432
- color: #366aff;
433
- cursor: pointer;
434
- display: flex;
435
- align-items: center;
436
- }
437
- }
438
- }
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"
132
+ xmlns="http://www.w3.org/2000/svg" p-id="136175" width="16" height="16">
133
+ <path
134
+ 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"
135
+ p-id="136176" fill="#366aff"></path>
136
+ </svg>
137
+ 换一批</span>
138
+ </div>
139
+ </div>
140
+ </div>
141
+ </template>
142
+ <script>
143
+ export default {
144
+ name: "aiGuide",
145
+ data () {
146
+ return {
147
+ isPhone: false,
148
+ isPC: false,
149
+
150
+ activeFirstTypeIndex: 0,
151
+ activeSecondTypeIndex: 0,
152
+ activeOtherObj: {
153
+ name: "",
154
+ recommendType: 0, // 0 关联意图 1 高频推荐意图 2 智能推荐
155
+ recommendIntentList: [], // recommendType = 0
156
+ highFrequency: {
157
+ // recommendType = 1
158
+ rang: [], // 推荐范围
159
+ number: 20, // 最多推荐问题数
160
+ question: [],
161
+ },
162
+ intelligenceRecommend: {
163
+ // recommendType = 2
164
+ recommendStrategy: [0, 1], // 0 根据与当前用户咨询过相同意图的用户所问的意图进行推荐 1 根据当前用户部门的其他用户咨询过的意图进行推荐
165
+ rang: [], // 推荐范围
166
+ number: 20, // 最多推荐问题数
167
+ question: [],
168
+ },
169
+ },
170
+ activePage: 1,
171
+ totalPage: 1,
172
+ };
173
+ },
174
+ props: {
175
+ aiGuide: Object,
176
+ language: {
177
+ type: String,
178
+ default: "cn"
179
+ }
180
+ },
181
+ beforeMount () { },
182
+ mounted () {
183
+ this.isMobile();
184
+ 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) {
185
+ this.activeOtherObj = this.aiGuide.content.options[0];
186
+ } else {
187
+ this.activeSecondTypeIndex = 0;
188
+ 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] : [];
189
+ }
190
+ },
191
+ methods: {
192
+ isMobile () {
193
+ let flag = navigator.userAgent.match(
194
+ /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
195
+ );
196
+ if (flag) {
197
+ this.isPhone = true;
198
+ } else {
199
+ this.isPC = true;
200
+ }
201
+ },
202
+ changeIntellectGuide () {
203
+ if (this.activePage === this.totalPage) {
204
+ this.activePage = 1;
205
+ } else {
206
+ this.activePage++;
207
+ }
208
+ },
209
+ changeFirstType (fTypeIndex) {
210
+ this.activeFirstTypeIndex = fTypeIndex;
211
+ if (this.aiGuide.content.options[fTypeIndex].types.length === 0) {
212
+ this.activeOtherObj = this.aiGuide.content.options[fTypeIndex];
213
+ } else {
214
+ this.activeSecondTypeIndex = 0;
215
+ this.activeOtherObj =
216
+ this.aiGuide.content.options[fTypeIndex].types[0];
217
+ }
218
+ this.activePage = 1;
219
+ },
220
+ changeLastType (sTypeIndex) {
221
+ this.activeSecondTypeIndex = sTypeIndex;
222
+ this.activeOtherObj =
223
+ this.aiGuide.content.options[this.activeFirstTypeIndex].types[
224
+ sTypeIndex
225
+ ];
226
+ this.activePage = 1;
227
+ },
228
+ // 根据当前分组数页数返回展示列表
229
+ recommendIntentPageList (obj) {
230
+ let list = [];
231
+ if (obj.recommendType === 0) {
232
+ list = obj.recommendIntentList;
233
+ }
234
+ if (obj.recommendType === 1) {
235
+ list = obj.highFrequency.question;
236
+ }
237
+ if (obj.recommendType === 2) {
238
+ list = obj.intelligenceRecommend.question;
239
+ }
240
+ let arr = [];
241
+ let len = 0;
242
+ if (list) {
243
+ len = list.length;
244
+
245
+ // 每组展示数
246
+ let groupNumber = this.aiGuide.content.groupNumber;
247
+
248
+ this.totalPage = Math.ceil(len / groupNumber);
249
+ if (this.aiGuide.content.groupVisible) {
250
+ arr = list.slice(
251
+ (this.activePage - 1) * groupNumber,
252
+ this.activePage * groupNumber
253
+ );
254
+ } else {
255
+ arr = list;
256
+ }
257
+ }
258
+ return arr;
259
+ },
260
+ sendAiGuideInfo (recommendType, cell) {
261
+ console.log("组件-312-3", recommendType, cell);
262
+ this.$emit('sendAiGuide', recommendType, cell);
263
+ },
264
+ },
265
+ };
266
+ </script>
267
+
268
+ <style scoped lang="less">
269
+ .ig-view-cli {
270
+ // background: #fbfcfd;
271
+ font-size: 0.9em;
272
+ border-radius: 5px;
273
+ position: relative;
274
+
275
+ .ig-view-example {
276
+ position: absolute;
277
+ right: -10px;
278
+ top: -10px;
279
+ opacity: 0.5;
280
+
281
+ img {
282
+ height: 50px;
283
+ }
284
+ }
285
+
286
+ .ig-types-des {
287
+ padding: 12px 16px 0px;
288
+ text-align: left;
289
+ }
290
+
291
+ .ig-types-f {
292
+ display: flex;
293
+ justify-content: flex-start;
294
+ flex-wrap: wrap;
295
+ padding: 4px 8px;
296
+
297
+ .ig-types-f-cell {
298
+ height: 1.8em;
299
+ line-height: 1.8em;
300
+ padding: 0 12px;
301
+ margin-left: 5px;
302
+ margin-right: 5px;
303
+ margin-top: 4px;
304
+ background: #ffffff;
305
+ border: 1px solid #e0e6f7;
306
+ border-radius: 1em;
307
+ color: #a3adc6;
308
+ cursor: pointer;
309
+ overflow: hidden;
310
+ text-overflow: ellipsis;
311
+ white-space: nowrap;
312
+
313
+ &:hover {
314
+ border: 1px solid #366aff;
315
+ color: #366aff;
316
+ }
317
+
318
+ &-active {
319
+ background-color: #366aff;
320
+ border: 1px solid #366aff;
321
+ color: white;
322
+ }
323
+ }
324
+
325
+ .ig-types-f-cell-active {
326
+ &:hover {
327
+ color: white;
328
+ }
329
+ }
330
+ }
331
+
332
+ .ig-types-s {
333
+ display: flex;
334
+ justify-content: flex-start;
335
+ flex-wrap: wrap;
336
+ margin: 0px 16px 4px;
337
+ border-bottom: solid 1px #e0e6f7;
338
+
339
+ .ig-types-s-cell {
340
+ height: 2.2em;
341
+ line-height: 2.2em;
342
+ margin-right: 18px;
343
+ color: #b2c2d8;
344
+ cursor: pointer;
345
+ margin-bottom: -1px;
346
+ overflow: hidden;
347
+ text-overflow: ellipsis;
348
+ white-space: nowrap;
349
+
350
+ &:hover {
351
+ color: #366aff;
352
+ }
353
+
354
+ &-active {
355
+ border-bottom: 2px solid #366aff;
356
+ color: #366aff;
357
+ }
358
+ }
359
+ }
360
+
361
+ .ig-types-tags {
362
+ margin: 0 16px;
363
+ padding: 0 0 12px;
364
+ display: flex;
365
+ justify-content: flex-start;
366
+ flex-wrap: wrap;
367
+
368
+ .ig-types-tags-cell {
369
+ line-height: 1.4em;
370
+ padding: 2px 8px;
371
+ margin-right: 6px;
372
+ margin-top: 4px;
373
+ color: #366aff;
374
+ background: #ffffff;
375
+ border: 1px solid #a1b9ff;
376
+ border-radius: 5px;
377
+ cursor: pointer;
378
+ }
379
+ }
380
+
381
+ .ig-high-frequency-empty {
382
+ margin: 6px 15px;
383
+ height: 40px;
384
+ line-height: 40px;
385
+ background: #fff8f4;
386
+ border-radius: 5px;
387
+ color: #ff9555;
388
+ padding: 0 12px;
389
+ text-align: left;
390
+ }
391
+
392
+ .ig-types-list {
393
+ margin: 0 16px;
394
+ padding: 0 0 8px 0;
395
+ display: flex;
396
+ flex-direction: column;
397
+ justify-content: flex-start;
398
+
399
+ .ig-types-list-cell {
400
+ line-height: 1.1em;
401
+ padding: 8px 0;
402
+ overflow: hidden;
403
+ display: flex;
404
+ justify-content: space-between;
405
+ color: #366aff;
406
+ cursor: pointer;
407
+ align-items: center;
408
+ text-align: left;
409
+
410
+ span {
411
+ display: flex;
412
+ align-items: center;
413
+ flex-direction: column;
414
+
415
+ i {
416
+ // margin-top: 12px;
417
+ }
418
+ }
419
+ }
420
+ }
421
+
422
+ .ig-change-list {
423
+ padding: 8px 0;
424
+ margin-top: 4px;
425
+ display: flex;
426
+ flex-direction: column;
427
+ align-items: center;
428
+ border-top: 1px solid #eeeeee;
429
+
430
+ .ig-change-list-btn {
431
+ font-weight: 600;
432
+ color: #366aff;
433
+ cursor: pointer;
434
+ display: flex;
435
+ align-items: center;
436
+ }
437
+ }
438
+ }
439
439
  </style>