askbot-dragon 0.7.60 → 0.7.73
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 +1 -1
- package/src/components/AiGuide.vue +471 -0
- package/src/components/ConversationContainer.vue +165 -37
- package/vue.config.js +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
id="ai-guide"
|
|
4
|
+
class="ai-guide"
|
|
5
|
+
:class="{
|
|
6
|
+
phoneClass: isPhone,
|
|
7
|
+
companyClass: isPC,
|
|
8
|
+
}"
|
|
9
|
+
>
|
|
10
|
+
<div class="ig-view-cli">
|
|
11
|
+
<!-- 描述 -->
|
|
12
|
+
<div
|
|
13
|
+
v-show="aiGuide.content.descriptionVisible && aiGuide.content.description !== ''"
|
|
14
|
+
class="ig-types-des"
|
|
15
|
+
>
|
|
16
|
+
{{ aiGuide.content.description }}
|
|
17
|
+
</div>
|
|
18
|
+
<!-- 一级分类 -->
|
|
19
|
+
<div v-show="aiGuide.content.typesVisible" class="ig-types-f">
|
|
20
|
+
<span
|
|
21
|
+
v-for="(fType, fTypeIndex) in aiGuide.content.options"
|
|
22
|
+
:key="`f_${fTypeIndex}`"
|
|
23
|
+
@click="changeFirstType(fTypeIndex)"
|
|
24
|
+
:class="[
|
|
25
|
+
'ig-types-f-cell',
|
|
26
|
+
activeFirstTypeIndex === fTypeIndex
|
|
27
|
+
? 'ig-types-f-cell-active'
|
|
28
|
+
: '',
|
|
29
|
+
]"
|
|
30
|
+
>{{ fType.name }}</span
|
|
31
|
+
>
|
|
32
|
+
</div>
|
|
33
|
+
<!-- 二级分类 -->
|
|
34
|
+
<div v-show="aiGuide.content.typesVisible" class="ig-types-s">
|
|
35
|
+
<span
|
|
36
|
+
v-for="(sType, sTypeIndex) in aiGuide.content.options[
|
|
37
|
+
activeFirstTypeIndex
|
|
38
|
+
].types"
|
|
39
|
+
:key="`s_${sTypeIndex}`"
|
|
40
|
+
@click="changeLastType(sTypeIndex)"
|
|
41
|
+
:class="[
|
|
42
|
+
'ig-types-s-cell',
|
|
43
|
+
activeSecondTypeIndex === sTypeIndex
|
|
44
|
+
? 'ig-types-s-cell-active'
|
|
45
|
+
: '',
|
|
46
|
+
]"
|
|
47
|
+
>{{ sType.name }}</span
|
|
48
|
+
>
|
|
49
|
+
</div>
|
|
50
|
+
<!-- 横向排版 -->
|
|
51
|
+
<div
|
|
52
|
+
v-show="
|
|
53
|
+
activeOtherObj.recommendType == 0 &&
|
|
54
|
+
aiGuide.content.typesetting === 'horizontal'
|
|
55
|
+
"
|
|
56
|
+
class="ig-types-tags"
|
|
57
|
+
>
|
|
58
|
+
<span
|
|
59
|
+
v-for="(
|
|
60
|
+
intentCell, intentCellIndex
|
|
61
|
+
) in recommendIntentPageList(activeOtherObj)"
|
|
62
|
+
@click="
|
|
63
|
+
sendAiGuideInfo(
|
|
64
|
+
activeOtherObj.recommendType,
|
|
65
|
+
intentCell
|
|
66
|
+
)
|
|
67
|
+
"
|
|
68
|
+
:key="`i_${intentCellIndex}`"
|
|
69
|
+
class="ig-types-tags-cell"
|
|
70
|
+
>{{ intentCell.questionName }}</span
|
|
71
|
+
>
|
|
72
|
+
</div>
|
|
73
|
+
<!-- 竖向排版 -->
|
|
74
|
+
<div
|
|
75
|
+
v-show="
|
|
76
|
+
activeOtherObj.recommendType == 0 &&
|
|
77
|
+
aiGuide.content.typesetting === 'vertical'
|
|
78
|
+
"
|
|
79
|
+
class="ig-types-list"
|
|
80
|
+
>
|
|
81
|
+
<span
|
|
82
|
+
v-for="(
|
|
83
|
+
intentCell, intentCellIndex
|
|
84
|
+
) in recommendIntentPageList(activeOtherObj)"
|
|
85
|
+
@click="
|
|
86
|
+
sendAiGuideInfo(
|
|
87
|
+
activeOtherObj.recommendType,
|
|
88
|
+
intentCell
|
|
89
|
+
)
|
|
90
|
+
"
|
|
91
|
+
:key="`i_${intentCellIndex}`"
|
|
92
|
+
class="ig-types-list-cell"
|
|
93
|
+
>
|
|
94
|
+
<span>{{ intentCell.questionName }}</span>
|
|
95
|
+
<span><i class="el-icon-arrow-right"></i></span
|
|
96
|
+
></span>
|
|
97
|
+
</div>
|
|
98
|
+
<!-- 横向排版 -->
|
|
99
|
+
<div
|
|
100
|
+
v-show="
|
|
101
|
+
activeOtherObj.recommendType == 1 &&
|
|
102
|
+
aiGuide.content.typesetting === 'horizontal'
|
|
103
|
+
"
|
|
104
|
+
class="ig-types-tags"
|
|
105
|
+
>
|
|
106
|
+
<span
|
|
107
|
+
v-for="(intentCell, intentCellIndex) in activeOtherObj
|
|
108
|
+
.highFrequency.question"
|
|
109
|
+
:key="`i_${intentCellIndex}`"
|
|
110
|
+
@click="
|
|
111
|
+
sendAiGuideInfo(
|
|
112
|
+
activeOtherObj.recommendType,
|
|
113
|
+
intentCell
|
|
114
|
+
)
|
|
115
|
+
"
|
|
116
|
+
class="ig-types-tags-cell"
|
|
117
|
+
>{{ intentCell.name }}</span
|
|
118
|
+
>
|
|
119
|
+
</div>
|
|
120
|
+
<!-- 竖向排版 -->
|
|
121
|
+
<div
|
|
122
|
+
v-show="
|
|
123
|
+
activeOtherObj.recommendType == 1 &&
|
|
124
|
+
aiGuide.content.typesetting === 'vertical'
|
|
125
|
+
"
|
|
126
|
+
class="ig-types-list"
|
|
127
|
+
>
|
|
128
|
+
<span
|
|
129
|
+
v-for="(intentCell, intentCellIndex) in activeOtherObj
|
|
130
|
+
.highFrequency.question"
|
|
131
|
+
:key="`i_${intentCellIndex}`"
|
|
132
|
+
@click="
|
|
133
|
+
sendAiGuideInfo(
|
|
134
|
+
activeOtherObj.recommendType,
|
|
135
|
+
intentCell
|
|
136
|
+
)
|
|
137
|
+
"
|
|
138
|
+
class="ig-types-list-cell"
|
|
139
|
+
>
|
|
140
|
+
<span>{{ intentCell.name }}</span>
|
|
141
|
+
<span><i class="el-icon-arrow-right"></i></span
|
|
142
|
+
></span>
|
|
143
|
+
</div>
|
|
144
|
+
<!-- 横向排版 -->
|
|
145
|
+
<div
|
|
146
|
+
v-show="
|
|
147
|
+
activeOtherObj.recommendType == 2 &&
|
|
148
|
+
aiGuide.content.typesetting === 'horizontal'
|
|
149
|
+
"
|
|
150
|
+
class="ig-types-tags"
|
|
151
|
+
>
|
|
152
|
+
<span
|
|
153
|
+
v-for="(intentCell, intentCellIndex) in activeOtherObj
|
|
154
|
+
.intelligenceRecommend.question"
|
|
155
|
+
:key="`i_${intentCellIndex}`"
|
|
156
|
+
@click="
|
|
157
|
+
sendAiGuideInfo(
|
|
158
|
+
activeOtherObj.recommendType,
|
|
159
|
+
intentCell
|
|
160
|
+
)
|
|
161
|
+
"
|
|
162
|
+
class="ig-types-tags-cell"
|
|
163
|
+
>{{ intentCell.name }}</span
|
|
164
|
+
>
|
|
165
|
+
</div>
|
|
166
|
+
<!-- 竖向排版 -->
|
|
167
|
+
<div
|
|
168
|
+
v-show="
|
|
169
|
+
activeOtherObj.recommendType == 2 &&
|
|
170
|
+
aiGuide.content.typesetting === 'vertical'
|
|
171
|
+
"
|
|
172
|
+
class="ig-types-list"
|
|
173
|
+
>
|
|
174
|
+
<span
|
|
175
|
+
v-for="(intentCell, intentCellIndex) in activeOtherObj
|
|
176
|
+
.intelligenceRecommend.question"
|
|
177
|
+
:key="`i_${intentCellIndex}`"
|
|
178
|
+
@click="
|
|
179
|
+
sendAiGuideInfo(
|
|
180
|
+
activeOtherObj.recommendType,
|
|
181
|
+
intentCell
|
|
182
|
+
)
|
|
183
|
+
"
|
|
184
|
+
class="ig-types-list-cell"
|
|
185
|
+
>
|
|
186
|
+
<span>{{ intentCell.name }}</span>
|
|
187
|
+
<span><i class="el-icon-arrow-right"></i></span
|
|
188
|
+
></span>
|
|
189
|
+
</div>
|
|
190
|
+
<div
|
|
191
|
+
v-if="aiGuide.content.groupVisible && totalPage > 1"
|
|
192
|
+
class="ig-change-list"
|
|
193
|
+
>
|
|
194
|
+
<span @click="changeIntellectGuide" class="ig-change-list-btn">
|
|
195
|
+
<i class="el-icon-refresh">换一批</i></span
|
|
196
|
+
>
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
</template>
|
|
201
|
+
<script>
|
|
202
|
+
export default {
|
|
203
|
+
name: "aiGuide",
|
|
204
|
+
data() {
|
|
205
|
+
return {
|
|
206
|
+
isPhone: false,
|
|
207
|
+
isPC: false,
|
|
208
|
+
|
|
209
|
+
activeFirstTypeIndex: 0,
|
|
210
|
+
activeSecondTypeIndex: 0,
|
|
211
|
+
activeOtherObj: {
|
|
212
|
+
name: "",
|
|
213
|
+
recommendType: 0, // 0 关联意图 1 高频推荐意图 2 智能推荐
|
|
214
|
+
recommendIntentList: [], // recommendType = 0
|
|
215
|
+
highFrequency: {
|
|
216
|
+
// recommendType = 1
|
|
217
|
+
rang: [], // 推荐范围
|
|
218
|
+
number: 20, // 最多推荐问题数
|
|
219
|
+
question: [],
|
|
220
|
+
},
|
|
221
|
+
intelligenceRecommend: {
|
|
222
|
+
// recommendType = 2
|
|
223
|
+
recommendStrategy: [0, 1], // 0 根据与当前用户咨询过相同意图的用户所问的意图进行推荐 1 根据当前用户部门的其他用户咨询过的意图进行推荐
|
|
224
|
+
rang: [], // 推荐范围
|
|
225
|
+
number: 20, // 最多推荐问题数
|
|
226
|
+
question: [],
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
activePage: 1,
|
|
230
|
+
totalPage: 1,
|
|
231
|
+
};
|
|
232
|
+
},
|
|
233
|
+
props: {
|
|
234
|
+
aiGuide: Object,
|
|
235
|
+
},
|
|
236
|
+
beforeMount() {},
|
|
237
|
+
mounted() {
|
|
238
|
+
this.isMobile();
|
|
239
|
+
if (this.aiGuide.content.options[0].types.length === 0) {
|
|
240
|
+
this.activeOtherObj = this.aiGuide.content.options[0];
|
|
241
|
+
} else {
|
|
242
|
+
this.activeSecondTypeIndex = 0;
|
|
243
|
+
this.activeOtherObj = this.aiGuide.content.options[0].types[0];
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
methods: {
|
|
247
|
+
isMobile() {
|
|
248
|
+
let flag = navigator.userAgent.match(
|
|
249
|
+
/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
|
|
250
|
+
);
|
|
251
|
+
if (flag) {
|
|
252
|
+
this.isPhone = true;
|
|
253
|
+
} else {
|
|
254
|
+
this.isPC = true;
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
changeIntellectGuide() {
|
|
258
|
+
if (this.activePage === this.totalPage) {
|
|
259
|
+
this.activePage = 1;
|
|
260
|
+
} else {
|
|
261
|
+
this.activePage++;
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
changeFirstType(fTypeIndex) {
|
|
265
|
+
this.activeFirstTypeIndex = fTypeIndex;
|
|
266
|
+
if (this.aiGuide.content.options[fTypeIndex].types.length === 0) {
|
|
267
|
+
this.activeOtherObj = this.aiGuide.content.options[fTypeIndex];
|
|
268
|
+
} else {
|
|
269
|
+
this.activeSecondTypeIndex = 0;
|
|
270
|
+
this.activeOtherObj =
|
|
271
|
+
this.aiGuide.content.options[fTypeIndex].types[0];
|
|
272
|
+
}
|
|
273
|
+
this.activePage = 1;
|
|
274
|
+
},
|
|
275
|
+
changeLastType(sTypeIndex) {
|
|
276
|
+
this.activeSecondTypeIndex = sTypeIndex;
|
|
277
|
+
this.activeOtherObj =
|
|
278
|
+
this.aiGuide.content.options[this.activeFirstTypeIndex].types[
|
|
279
|
+
sTypeIndex
|
|
280
|
+
];
|
|
281
|
+
this.activePage = 1;
|
|
282
|
+
},
|
|
283
|
+
// 根据当前分组数页数返回展示列表
|
|
284
|
+
recommendIntentPageList(obj) {
|
|
285
|
+
let list = [];
|
|
286
|
+
if (obj.recommendType === 0) {
|
|
287
|
+
list = obj.recommendIntentList;
|
|
288
|
+
}
|
|
289
|
+
if (obj.recommendType === 1) {
|
|
290
|
+
list = obj.highFrequency.question;
|
|
291
|
+
}
|
|
292
|
+
if (obj.recommendType === 2) {
|
|
293
|
+
list = obj.intelligenceRecommend.question;
|
|
294
|
+
}
|
|
295
|
+
let arr = [];
|
|
296
|
+
let len = 0;
|
|
297
|
+
if (list) {
|
|
298
|
+
len = list.length;
|
|
299
|
+
|
|
300
|
+
// 每组展示数
|
|
301
|
+
let groupNumber = this.aiGuide.content.groupNumber;
|
|
302
|
+
|
|
303
|
+
this.totalPage = Math.ceil(len / groupNumber);
|
|
304
|
+
arr = list.slice(
|
|
305
|
+
(this.activePage - 1) * groupNumber,
|
|
306
|
+
this.activePage * groupNumber
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
return arr;
|
|
310
|
+
},
|
|
311
|
+
sendAiGuideInfo(recommendType, cell) {
|
|
312
|
+
console.log("组件-312", recommendType, cell);
|
|
313
|
+
this.$emit('sendAiGuide', recommendType, cell);
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
};
|
|
317
|
+
</script>
|
|
318
|
+
|
|
319
|
+
<style scoped lang="less">
|
|
320
|
+
.ig-view-cli {
|
|
321
|
+
// background: #fbfcfd;
|
|
322
|
+
border-radius: 5px;
|
|
323
|
+
position: relative;
|
|
324
|
+
.ig-view-example {
|
|
325
|
+
position: absolute;
|
|
326
|
+
right: -10px;
|
|
327
|
+
top: -10px;
|
|
328
|
+
opacity: 0.5;
|
|
329
|
+
img {
|
|
330
|
+
height: 50px;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
.ig-types-des {
|
|
334
|
+
padding: 16px 16px 0px;
|
|
335
|
+
text-align: left;
|
|
336
|
+
}
|
|
337
|
+
.ig-types-f {
|
|
338
|
+
display: flex;
|
|
339
|
+
justify-content: flex-start;
|
|
340
|
+
flex-wrap: wrap;
|
|
341
|
+
padding: 8px 8px;
|
|
342
|
+
.ig-types-f-cell {
|
|
343
|
+
height: 2.2em;
|
|
344
|
+
font-size: 1em;
|
|
345
|
+
line-height: 2.2em;
|
|
346
|
+
padding: 0 14px;
|
|
347
|
+
margin-left: 8px;
|
|
348
|
+
margin-top: 4px;
|
|
349
|
+
background: #ffffff;
|
|
350
|
+
border: 1px solid #e0e6f7;
|
|
351
|
+
border-radius: 1.1em;
|
|
352
|
+
color: #a3adc6;
|
|
353
|
+
cursor: pointer;
|
|
354
|
+
overflow: hidden;
|
|
355
|
+
text-overflow: ellipsis;
|
|
356
|
+
white-space: nowrap;
|
|
357
|
+
&:hover {
|
|
358
|
+
border: 1px solid #366aff;
|
|
359
|
+
color: #366aff;
|
|
360
|
+
}
|
|
361
|
+
&-active {
|
|
362
|
+
background-color: #366aff;
|
|
363
|
+
border: 1px solid #366aff;
|
|
364
|
+
color: white;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
.ig-types-f-cell-active {
|
|
368
|
+
&:hover {
|
|
369
|
+
color: white;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
.ig-types-s {
|
|
374
|
+
display: flex;
|
|
375
|
+
justify-content: flex-start;
|
|
376
|
+
flex-wrap: wrap;
|
|
377
|
+
margin: 0px 16px 8px;
|
|
378
|
+
border-bottom: solid 2px #e0e6f7;
|
|
379
|
+
.ig-types-s-cell {
|
|
380
|
+
height: 3em;
|
|
381
|
+
line-height: 3em;
|
|
382
|
+
margin-right: 18px;
|
|
383
|
+
color: #b2c2d8;
|
|
384
|
+
cursor: pointer;
|
|
385
|
+
font-size: 1em;
|
|
386
|
+
margin-bottom: -2px;
|
|
387
|
+
overflow: hidden;
|
|
388
|
+
text-overflow: ellipsis;
|
|
389
|
+
white-space: nowrap;
|
|
390
|
+
&:hover {
|
|
391
|
+
color: #366aff;
|
|
392
|
+
}
|
|
393
|
+
&-active {
|
|
394
|
+
border-bottom: 2px solid #366aff;
|
|
395
|
+
color: #366aff;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
.ig-types-tags {
|
|
400
|
+
margin: 0 16px;
|
|
401
|
+
padding: 8px 0 12px;
|
|
402
|
+
display: flex;
|
|
403
|
+
justify-content: flex-start;
|
|
404
|
+
flex-wrap: wrap;
|
|
405
|
+
.ig-types-tags-cell {
|
|
406
|
+
line-height: 1.4em;
|
|
407
|
+
padding: 4px 8px;
|
|
408
|
+
margin-right: 6px;
|
|
409
|
+
margin-top: 4px;
|
|
410
|
+
color: #366aff;
|
|
411
|
+
font-weight: 500;
|
|
412
|
+
background: #ffffff;
|
|
413
|
+
font-size: 0.9em;
|
|
414
|
+
border: 1px solid #a1b9ff;
|
|
415
|
+
border-radius: 5px;
|
|
416
|
+
cursor: pointer;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
.ig-high-frequency-empty {
|
|
420
|
+
margin: 6px 15px;
|
|
421
|
+
height: 40px;
|
|
422
|
+
line-height: 40px;
|
|
423
|
+
background: #fff8f4;
|
|
424
|
+
border-radius: 5px;
|
|
425
|
+
font-size: 0.9em;
|
|
426
|
+
color: #ff9555;
|
|
427
|
+
padding: 0 12px;
|
|
428
|
+
text-align: left;
|
|
429
|
+
}
|
|
430
|
+
.ig-types-list {
|
|
431
|
+
margin: 0 16px;
|
|
432
|
+
padding: 0 0 10px 0;
|
|
433
|
+
display: flex;
|
|
434
|
+
flex-direction: column;
|
|
435
|
+
justify-content: flex-start;
|
|
436
|
+
.ig-types-list-cell {
|
|
437
|
+
line-height: 1.1em;
|
|
438
|
+
padding: 12px 0;
|
|
439
|
+
overflow: hidden;
|
|
440
|
+
display: flex;
|
|
441
|
+
justify-content: space-between;
|
|
442
|
+
color: #366aff;
|
|
443
|
+
font-size: 0.9em;
|
|
444
|
+
cursor: pointer;
|
|
445
|
+
align-items: center;
|
|
446
|
+
span {
|
|
447
|
+
display: flex;
|
|
448
|
+
align-items: center;
|
|
449
|
+
flex-direction: column;
|
|
450
|
+
i {
|
|
451
|
+
// margin-top: 12px;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
.ig-change-list {
|
|
457
|
+
padding: 16px 0;
|
|
458
|
+
margin-top: 4px;
|
|
459
|
+
display: flex;
|
|
460
|
+
flex-direction: column;
|
|
461
|
+
align-items: center;
|
|
462
|
+
border-top: 2px solid #eeeeee;
|
|
463
|
+
.ig-change-list-btn {
|
|
464
|
+
font-weight: 600;
|
|
465
|
+
font-size: 1.1em;
|
|
466
|
+
color: #366aff;
|
|
467
|
+
cursor: pointer;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
</style>
|
|
@@ -2,41 +2,42 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<div id="conversation">
|
|
4
4
|
<!-- <asser-deatils></asser-deatils> -->
|
|
5
|
-
<msg-loading v-if="inLoading"></msg-loading>
|
|
5
|
+
<!-- <msg-loading v-if="inLoading"></msg-loading>
|
|
6
6
|
<div style="position: relative" class="img_div">
|
|
7
7
|
<img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/2021/08/24/07/35/45c878fd-6a8e-40e2-b599-bdba8e17cf8a/微信图片_20210423113520.jpg?x-oss-process=image/auto-orient,1/quality,q_90/watermark,text_MjE=,color_cccccc,size_48,rotate_315,fill_1,x_10,y_10,t_0" style="width: 100px"/>
|
|
8
8
|
<div class="mask">
|
|
9
9
|
<loading-process :dataNote="dataNote" :finished="finished"></loading-process>
|
|
10
10
|
</div>
|
|
11
|
-
</div>
|
|
11
|
+
</div> -->
|
|
12
12
|
|
|
13
|
-
<form-template
|
|
13
|
+
<!-- <form-template
|
|
14
14
|
:formList="formList2"
|
|
15
15
|
@submitClick="submitClick"
|
|
16
|
-
></form-template>
|
|
16
|
+
></form-template> -->
|
|
17
17
|
<!-- <voice-component @closeVoice="closeVoice">
|
|
18
18
|
<div slot="voiceTip">
|
|
19
19
|
松开发送
|
|
20
20
|
</div>
|
|
21
21
|
</voice-component>-->
|
|
22
22
|
<!-- 点选 -->
|
|
23
|
-
<div v-html="htmlContainer">
|
|
24
|
-
</div>
|
|
25
|
-
<answer-radio :msg="answerRadios"></answer-radio>
|
|
23
|
+
<!-- <div v-html="htmlContainer">
|
|
24
|
+
</div> -->
|
|
25
|
+
<!-- <answer-radio :msg="answerRadios"></answer-radio>
|
|
26
26
|
<action-send-to-bot :msg="answerRadios"></action-send-to-bot>
|
|
27
27
|
<ticket-message :content="contents"></ticket-message>
|
|
28
28
|
<text-message :text="text" @submitClick="submitClick"></text-message>
|
|
29
29
|
<div v-for="(item,index) in processAction" :key="index">
|
|
30
30
|
<association-intention :msg="item" :msgType="item.type" :isOpen="isOpen"></association-intention>
|
|
31
31
|
</div>
|
|
32
|
-
<el-button @click="isOpen=!isOpen">切换</el-button>
|
|
32
|
+
<el-button @click="isOpen=!isOpen">切换</el-button> -->
|
|
33
33
|
<!-- 满意组件 -->
|
|
34
|
-
<action-satisfaction :msg="actionSatisfactions[0]"></action-satisfaction>
|
|
34
|
+
<!-- <action-satisfaction :msg="actionSatisfactions[0]"></action-satisfaction> -->
|
|
35
35
|
<!-- 满意或不满意-->
|
|
36
|
-
<bot-action-satisfactor :msg="botActionSatis"></bot-action-satisfactor>
|
|
36
|
+
<!-- <bot-action-satisfactor :msg="botActionSatis"></bot-action-satisfactor>
|
|
37
37
|
<answer-dissatisfaction :msg="answerDiss"></answer-dissatisfaction>
|
|
38
38
|
<feed-back :feedBack="feedBack"></feed-back>
|
|
39
|
-
<voice-compontent></voice-compontent>
|
|
39
|
+
<voice-compontent></voice-compontent> -->
|
|
40
|
+
<ai-guide :aiGuide="ActionAiGuideObj"></ai-guide>
|
|
40
41
|
|
|
41
42
|
<!-- <FileType :urls="urls" :color="black"></FileType>-->
|
|
42
43
|
<!-- <FileType :urls="urls" :color="black"></FileType>
|
|
@@ -44,24 +45,24 @@
|
|
|
44
45
|
</div>
|
|
45
46
|
</template>
|
|
46
47
|
<script>
|
|
47
|
-
import TextMessage from "@/components/message/TextMessage";
|
|
48
|
+
// import TextMessage from "@/components/message/TextMessage";
|
|
48
49
|
|
|
49
50
|
|
|
50
51
|
/*import FormTemplate from "@/components/formTemplate";
|
|
51
52
|
import TextMessage from "@/components/message/TextMessage";*/
|
|
52
53
|
|
|
53
|
-
import FormTemplate from "@/components/formTemplate";
|
|
54
|
-
import AnswerRadio from "./answerRadio";
|
|
55
|
-
import TicketMessage from "./message/TicketMessage";
|
|
54
|
+
// import FormTemplate from "@/components/formTemplate";
|
|
55
|
+
// import AnswerRadio from "./answerRadio";
|
|
56
|
+
// import TicketMessage from "./message/TicketMessage";
|
|
56
57
|
/*import VoiceComponent from "./voiceComponent";*/
|
|
57
|
-
import AssociationIntention from "./associationIntention";
|
|
58
|
-
import ActionSatisfaction from "./actionSatisfaction";
|
|
59
|
-
import MsgLoading from "./msgLoading";
|
|
60
|
-
import LoadingProcess from "./loadingProcess";
|
|
61
|
-
import BotActionSatisfactor from "./botActionSatisfactor";
|
|
62
|
-
import AnswerDissatisfaction from "./answerDissatisfaction";
|
|
63
|
-
import ActionSendToBot from "./actionSendToBot";
|
|
64
|
-
import VoiceCompontent from './voiceComponent'
|
|
58
|
+
// import AssociationIntention from "./associationIntention";
|
|
59
|
+
// import ActionSatisfaction from "./actionSatisfaction";
|
|
60
|
+
// import MsgLoading from "./msgLoading";
|
|
61
|
+
// import LoadingProcess from "./loadingProcess";
|
|
62
|
+
// import BotActionSatisfactor from "./botActionSatisfactor";
|
|
63
|
+
// import AnswerDissatisfaction from "./answerDissatisfaction";
|
|
64
|
+
// import ActionSendToBot from "./actionSendToBot";
|
|
65
|
+
// import VoiceCompontent from './voiceComponent'
|
|
65
66
|
// import AsserDeatils from './assetDetails.vue'
|
|
66
67
|
/* import TicketMessage from "@/components/message/TicketMessage";
|
|
67
68
|
import TicketMessage from "@/components/message/TicketMessage";
|
|
@@ -69,27 +70,30 @@ import TextMessage from "@/components/message/TextMessage";
|
|
|
69
70
|
import FeedBack from "@/components/feedBack";*/
|
|
70
71
|
// iframe 弹窗组件测试
|
|
71
72
|
/*import ActionAlert from "@/components/message/ActionAlertIframe";*/
|
|
73
|
+
// 智能引导组件
|
|
74
|
+
import AiGuide from "@/components/AiGuide";
|
|
72
75
|
/*import FileType from "@/components/FileType";
|
|
73
76
|
import ChatContent from "./chatContent";*/
|
|
74
|
-
import FeedBack from "@/components/feedBack"
|
|
77
|
+
// import FeedBack from "@/components/feedBack"
|
|
75
78
|
export default {
|
|
76
79
|
name: "ConversationContainer",
|
|
77
80
|
components: {
|
|
78
|
-
ActionSendToBot,
|
|
79
|
-
AnswerDissatisfaction,
|
|
80
|
-
BotActionSatisfactor,
|
|
81
|
-
LoadingProcess,
|
|
82
|
-
MsgLoading,
|
|
83
|
-
ActionSatisfaction,
|
|
84
|
-
AssociationIntention,
|
|
81
|
+
// ActionSendToBot,
|
|
82
|
+
// AnswerDissatisfaction,
|
|
83
|
+
// BotActionSatisfactor,
|
|
84
|
+
// LoadingProcess,
|
|
85
|
+
// MsgLoading,
|
|
86
|
+
// ActionSatisfaction,
|
|
87
|
+
// AssociationIntention,
|
|
85
88
|
/* VoiceComponent,*/
|
|
86
|
-
TicketMessage,
|
|
89
|
+
// TicketMessage,
|
|
87
90
|
// AsserDeatils,
|
|
88
|
-
AnswerRadio,
|
|
89
|
-
FormTemplate,
|
|
90
|
-
TextMessage,
|
|
91
|
-
FeedBack,
|
|
92
|
-
VoiceCompontent
|
|
91
|
+
// AnswerRadio,
|
|
92
|
+
// FormTemplate,
|
|
93
|
+
// TextMessage,
|
|
94
|
+
// FeedBack,
|
|
95
|
+
// VoiceCompontent,
|
|
96
|
+
AiGuide
|
|
93
97
|
|
|
94
98
|
|
|
95
99
|
},
|
|
@@ -99,6 +103,130 @@ export default {
|
|
|
99
103
|
data() {
|
|
100
104
|
return {
|
|
101
105
|
black:'',
|
|
106
|
+
ActionAiGuideObj: {
|
|
107
|
+
// 智能引导
|
|
108
|
+
type: "answer_intellect_guide",
|
|
109
|
+
conditionList: [],
|
|
110
|
+
content: {
|
|
111
|
+
typesetting: "horizontal", // 排版方式 vertical 竖向 horizontal 横向
|
|
112
|
+
description: "", // 描述
|
|
113
|
+
descriptionVisible: true, // 是否展示描述
|
|
114
|
+
typesVisible: true, // 是否展示分类信息
|
|
115
|
+
groupVisible: true, // 是否分组展示
|
|
116
|
+
groupNumber: 5, // 每组展示数量
|
|
117
|
+
options: [
|
|
118
|
+
{
|
|
119
|
+
name: '常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题',
|
|
120
|
+
recommendType: 0, // 0 关联意图 1 高频推荐意图 2 智能推荐
|
|
121
|
+
recommendIntentList: [{ questionName: "打印机1", intentId: 11 },], // recommendType = 0
|
|
122
|
+
highFrequency: { // recommendType = 1
|
|
123
|
+
rang: [], // 推荐范围
|
|
124
|
+
number: 20, // 最多推荐问题数
|
|
125
|
+
question: [],
|
|
126
|
+
},
|
|
127
|
+
intelligenceRecommend: { // recommendType = 2
|
|
128
|
+
recommendStrategy: [0, 1], // 0 根据与当前用户咨询过相同意图的用户所问的意图进行推荐 1 根据当前用户部门的其他用户咨询过的意图进行推荐
|
|
129
|
+
rang: [], // 推荐范围
|
|
130
|
+
number: 20, // 最多推荐问题数
|
|
131
|
+
question: [],
|
|
132
|
+
},
|
|
133
|
+
types: [
|
|
134
|
+
{
|
|
135
|
+
name: "常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题",
|
|
136
|
+
recommendType: 0, // 0 关联意图 1 高频推荐意图 2 智能推荐
|
|
137
|
+
recommendIntentList: [
|
|
138
|
+
{ questionName: "常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题", intentId: 11 },
|
|
139
|
+
{ questionName: "打印机2", intentId: 11 },
|
|
140
|
+
{ questionName: "打印机3", intentId: 11 },
|
|
141
|
+
{ questionName: "打印机4", intentId: 11 },
|
|
142
|
+
{ questionName: "打印机5", intentId: 11 },
|
|
143
|
+
{ questionName: "打印机6", intentId: 11 },
|
|
144
|
+
{ questionName: "打印机7", intentId: 11 },
|
|
145
|
+
{ questionName: "打印机8", intentId: 11 },
|
|
146
|
+
], // recommendType = 0
|
|
147
|
+
highFrequency: { // recommendType = 1
|
|
148
|
+
rang: [], // 推荐范围
|
|
149
|
+
number: 20, // 最多推荐问题数
|
|
150
|
+
question: [],
|
|
151
|
+
},
|
|
152
|
+
intelligenceRecommend: { // recommendType = 2
|
|
153
|
+
recommendStrategy: [0, 1], // 0 根据与当前用户咨询过相同意图的用户所问的意图进行推荐 1 根据当前用户部门的其他用户咨询过的意图进行推荐
|
|
154
|
+
rang: [], // 推荐范围
|
|
155
|
+
number: 20, // 最多推荐问题数
|
|
156
|
+
question: [],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: "打印机问题2",
|
|
161
|
+
recommendType: 0, // 0 关联意图 1 高频推荐意图 2 智能推荐
|
|
162
|
+
recommendIntentList: [{ questionName: "打印机", intentId: 11 }], // recommendType = 0
|
|
163
|
+
highFrequency: { // recommendType = 1
|
|
164
|
+
rang: [], // 推荐范围
|
|
165
|
+
number: 20, // 最多推荐问题数
|
|
166
|
+
question: [],
|
|
167
|
+
},
|
|
168
|
+
intelligenceRecommend: { // recommendType = 2
|
|
169
|
+
recommendStrategy: [0, 1], // 0 根据与当前用户咨询过相同意图的用户所问的意图进行推荐 1 根据当前用户部门的其他用户咨询过的意图进行推荐
|
|
170
|
+
rang: [], // 推荐范围
|
|
171
|
+
number: 20, // 最多推荐问题数
|
|
172
|
+
question: [],
|
|
173
|
+
},
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: '常见问题2',
|
|
179
|
+
recommendType: 0, // 0 关联意图 1 高频推荐意图 2 智能推荐
|
|
180
|
+
recommendIntentList: [{ questionName: "打印机", intentId: 11 }], // recommendType = 0
|
|
181
|
+
highFrequency: { // recommendType = 1
|
|
182
|
+
rang: [], // 推荐范围
|
|
183
|
+
number: 20, // 最多推荐问题数
|
|
184
|
+
question: [],
|
|
185
|
+
},
|
|
186
|
+
intelligenceRecommend: { // recommendType = 2
|
|
187
|
+
recommendStrategy: [0, 1], // 0 根据与当前用户咨询过相同意图的用户所问的意图进行推荐 1 根据当前用户部门的其他用户咨询过的意图进行推荐
|
|
188
|
+
rang: [], // 推荐范围
|
|
189
|
+
number: 20, // 最多推荐问题数
|
|
190
|
+
question: [],
|
|
191
|
+
},
|
|
192
|
+
types: [
|
|
193
|
+
{
|
|
194
|
+
name: "打印机问题2",
|
|
195
|
+
recommendType: 0, // 0 关联意图 1 高频推荐意图 2 智能推荐
|
|
196
|
+
recommendIntentList: [{ questionName: "打印机", intentId: 11 }], // recommendType = 0
|
|
197
|
+
highFrequency: { // recommendType = 1
|
|
198
|
+
rang: [], // 推荐范围
|
|
199
|
+
number: 20, // 最多推荐问题数
|
|
200
|
+
question: [],
|
|
201
|
+
},
|
|
202
|
+
intelligenceRecommend: { // recommendType = 2
|
|
203
|
+
recommendStrategy: [0, 1], // 0 根据与当前用户咨询过相同意图的用户所问的意图进行推荐 1 根据当前用户部门的其他用户咨询过的意图进行推荐
|
|
204
|
+
rang: [], // 推荐范围
|
|
205
|
+
number: 20, // 最多推荐问题数
|
|
206
|
+
question: [],
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: "打印机问题3",
|
|
211
|
+
recommendType: 0, // 0 关联意图 1 高频推荐意图 2 智能推荐
|
|
212
|
+
recommendIntentList: [{ questionName: "打印机", intentId: 11 }], // recommendType = 0
|
|
213
|
+
highFrequency: { // recommendType = 1
|
|
214
|
+
rang: [], // 推荐范围
|
|
215
|
+
number: 20, // 最多推荐问题数
|
|
216
|
+
question: [],
|
|
217
|
+
},
|
|
218
|
+
intelligenceRecommend: { // recommendType = 2
|
|
219
|
+
recommendStrategy: [0, 1], // 0 根据与当前用户咨询过相同意图的用户所问的意图进行推荐 1 根据当前用户部门的其他用户咨询过的意图进行推荐
|
|
220
|
+
rang: [], // 推荐范围
|
|
221
|
+
number: 20, // 最多推荐问题数
|
|
222
|
+
question: [],
|
|
223
|
+
},
|
|
224
|
+
}
|
|
225
|
+
]
|
|
226
|
+
}
|
|
227
|
+
], // 分类和意图数组 二维数组
|
|
228
|
+
},
|
|
229
|
+
},
|
|
102
230
|
// 弹窗组件模拟数据
|
|
103
231
|
actionAlertIframeObj: {
|
|
104
232
|
iframeId: "iframeId999999998",
|