askbot-dragon 0.6.21 → 0.6.25
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/public/index.html +1 -1
- package/src/App.vue +2 -1
- package/src/assets/js/script.js +37 -0
- package/src/assets/less/common.css +17 -7
- package/src/assets/less/converSationContainer/common.less +23 -4583
- package/src/assets/less/converSationContainer/converSatonContainer.less +1 -0
- package/src/assets/less/iconfont.css +17 -0
- package/src/assets/less/ticketMessage.less +84 -188
- package/src/components/ConversationContainer.vue +334 -510
- package/src/components/actionSatisfaction.vue +76 -0
- package/src/components/actionSendToBot.vue +60 -0
- package/src/components/answerDissatisfaction.vue +61 -0
- package/src/components/answerRadio.vue +64 -0
- package/src/components/askVideo.vue +46 -0
- package/src/components/associationIntention.vue +91 -0
- package/src/components/botActionSatisfactor.vue +72 -0
- package/src/components/feedBack.vue +26 -15
- package/src/components/formTemplate.vue +160 -79
- package/src/components/loadingProcess.vue +176 -0
- package/src/components/message/TextMessage.vue +47 -12
- package/src/components/message/TicketMessage.vue +16 -22
- package/src/components/message/swiper/ticketSwiper.vue +9 -35
- package/src/components/msgLoading.vue +231 -0
- package/src/components/recommend.vue +76 -0
- package/src/components/voiceComponent.vue +102 -0
|
@@ -1,528 +1,60 @@
|
|
|
1
1
|
<!-- 消息记录容器 -->
|
|
2
2
|
<template>
|
|
3
3
|
<div id="conversation">
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<!-- <form-template @submitClick="submitClick" :formList="formList"></form-template>
|
|
11
|
-
<form-template @submitClick="submitClick" :formList="formList" :type="rem"></form-template>
|
|
12
|
-
|
|
13
|
-
<!– <div class="conversation-container">
|
|
14
|
-
<div
|
|
15
|
-
v-if="showPreview"
|
|
16
|
-
style="
|
|
17
|
-
width: 100vw;
|
|
18
|
-
height: 100vh;
|
|
19
|
-
z-index: 10000;
|
|
20
|
-
position: fixed;
|
|
21
|
-
top: 0;
|
|
22
|
-
left: 0;
|
|
23
|
-
background-color: rgba(0, 0, 0, 0.8);
|
|
24
|
-
"
|
|
25
|
-
>
|
|
26
|
-
<div
|
|
27
|
-
@click="showPreview = false"
|
|
28
|
-
style="
|
|
29
|
-
color: white;
|
|
30
|
-
font-size: 30px;
|
|
31
|
-
padding: 30px 30px 15vh;
|
|
32
|
-
text-align: right;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
"
|
|
35
|
-
>
|
|
36
|
-
X
|
|
37
|
-
</div>
|
|
38
|
-
<img
|
|
39
|
-
style="max-height: 70vh; max-width: 70vw"
|
|
40
|
-
:src="previewImageUrl"
|
|
41
|
-
alt
|
|
42
|
-
srcset
|
|
43
|
-
/>
|
|
44
|
-
</div>
|
|
45
|
-
<div class="test-box">
|
|
46
|
-
<div class="gr-header">
|
|
47
|
-
<span class="bot-name" v-if="currentBot != null">
|
|
48
|
-
<!– {{ currentBot.name }}–>
|
|
49
|
-
我是名字
|
|
50
|
-
<el-popover
|
|
51
|
-
v-if="botList.length > 1"
|
|
52
|
-
placement="bottom"
|
|
53
|
-
trigger="hover"
|
|
54
|
-
width="250"
|
|
55
|
-
>
|
|
56
|
-
<el-radio-group v-model="currentBot.id" @change="changeCurrentBot">
|
|
57
|
-
<el-radio v-for="bot in botList" :key="bot.id" :label="bot.id">{{
|
|
58
|
-
bot.name
|
|
59
|
-
}}</el-radio>
|
|
60
|
-
</el-radio-group>
|
|
61
|
-
<i slot="reference" class="el-icon-s-operation"></i>
|
|
62
|
-
</el-popover>
|
|
63
|
-
</span>
|
|
64
|
-
<span class="el-icon-refresh" @click="cleanSession(true)"></span>
|
|
65
|
-
<span class="el-icon-close" @click="handleClose(false)"></span>
|
|
66
|
-
</div>
|
|
67
|
-
<transition name="fade">
|
|
68
|
-
<div class="mod-loading" v-if="isShow" transiton="fade">
|
|
69
|
-
<span>已将该问法添加至知识库, 正在重新训练模型</span>
|
|
70
|
-
<em class="el-icon-loading"></em>
|
|
71
|
-
</div>
|
|
72
|
-
</transition>
|
|
73
|
-
<div id="grContent" class="gr-content" ref="grContent">
|
|
74
|
-
<ul class="chat-list">
|
|
75
|
-
<li
|
|
76
|
-
v-for="(item, index) in chatList"
|
|
77
|
-
:key="index"
|
|
78
|
-
:class="[
|
|
79
|
-
'chat-cell',
|
|
80
|
-
item.user === 'bot' ? 'via-bot-outer' : 'via-user-outer',
|
|
81
|
-
]"
|
|
82
|
-
>
|
|
83
|
-
<div class="chat-content">
|
|
84
|
-
<div
|
|
85
|
-
class="chat-content"
|
|
86
|
-
v-if="item.type === 'TEXT' && item.user === 'user'"
|
|
87
|
-
>
|
|
88
|
-
<span class>{{ item.content }}</span>
|
|
89
|
-
<el-cascader
|
|
90
|
-
v-if="item.requestCompleted && item.needShowIntent"
|
|
91
|
-
style="width: 290px"
|
|
92
|
-
placeholder="未识别到意图,可选择所属意图,提高识别率"
|
|
93
|
-
size="mini"
|
|
94
|
-
v-model="item.intentId"
|
|
95
|
-
:options="intentionList"
|
|
96
|
-
:props="optionProps"
|
|
97
|
-
@change="changeIntent(item)"
|
|
98
|
-
></el-cascader>
|
|
99
|
-
</div>
|
|
100
|
-
|
|
101
|
-
<span
|
|
102
|
-
v-html="item.text"
|
|
103
|
-
v-if="item.type === 'answer_text' && item.user === 'bot'"
|
|
104
|
-
></span>
|
|
105
|
-
<div
|
|
106
|
-
v-html="item.text"
|
|
107
|
-
v-if="
|
|
108
|
-
item.type === 'answer_rich_text_pro' && item.user === 'bot'
|
|
109
|
-
"
|
|
110
|
-
></div>
|
|
111
|
-
|
|
112
|
-
<img
|
|
113
|
-
v-if="item.type === 'answer_image'"
|
|
114
|
-
width="150px"
|
|
115
|
-
:src="item.url"
|
|
116
|
-
alt
|
|
117
|
-
/>
|
|
118
|
-
<video-player
|
|
119
|
-
v-if="item.type === 'answer_video'"
|
|
120
|
-
class="video-player vjs-custom-skin"
|
|
121
|
-
:options="videoOptions(item.content)"
|
|
122
|
-
style="width: 300px"
|
|
123
|
-
/>
|
|
124
|
-
<div v-if="item.type === 'answer_radio'" class="link-list-outer">
|
|
125
|
-
<span>{{ item.description }}</span>
|
|
126
|
-
<span
|
|
127
|
-
v-for="(cell, index) in item.options"
|
|
128
|
-
:key="item.nodeId + '_' + index"
|
|
129
|
-
class="link-cell cursor"
|
|
130
|
-
@click="
|
|
131
|
-
sendTestContent(
|
|
132
|
-
'RADIO',
|
|
133
|
-
item.actionId + '_' + index + '_' + cell.value,
|
|
134
|
-
cell.name,
|
|
135
|
-
false
|
|
136
|
-
)
|
|
137
|
-
"
|
|
138
|
-
>{{ cell.name }}</span
|
|
139
|
-
>
|
|
140
|
-
</div>
|
|
141
|
-
<div
|
|
142
|
-
v-if="item.type === 'unSatisfactionChoose'"
|
|
143
|
-
class="link-list-outer"
|
|
144
|
-
>
|
|
145
|
-
<span>{{ item.content.description }}</span>
|
|
146
|
-
<span
|
|
147
|
-
v-for="(cell, index) in item.content.options"
|
|
148
|
-
:key="index"
|
|
149
|
-
class="link-cell cursor"
|
|
150
|
-
@click="
|
|
151
|
-
chatList.push({
|
|
152
|
-
type: 'TEXT',
|
|
153
|
-
content: cell.name,
|
|
154
|
-
user: 'user',
|
|
155
|
-
}),
|
|
156
|
-
addAnswerList([
|
|
157
|
-
{
|
|
158
|
-
type: 'answer_text',
|
|
159
|
-
content: { list: [cell.answer] },
|
|
160
|
-
},
|
|
161
|
-
])
|
|
162
|
-
"
|
|
163
|
-
>{{ cell.name }}</span
|
|
164
|
-
>
|
|
165
|
-
</div>
|
|
166
|
-
<div
|
|
167
|
-
v-if="item.type === 'action_satisfaction'"
|
|
168
|
-
class="link-list-outer"
|
|
169
|
-
>
|
|
170
|
-
<span>{{ item.content.satisfactionDes }}</span>
|
|
171
|
-
<span
|
|
172
|
-
class="link-cell cursor"
|
|
173
|
-
@click="
|
|
174
|
-
satisfacte('满意', item.content.satisfactoryAnswer, null)
|
|
175
|
-
"
|
|
176
|
-
>满意</span
|
|
177
|
-
>
|
|
178
|
-
<span
|
|
179
|
-
class="link-cell cursor"
|
|
180
|
-
@click="
|
|
181
|
-
satisfacte(
|
|
182
|
-
'不满意',
|
|
183
|
-
item.content.unsatisfiedAnswer,
|
|
184
|
-
item.content.answerRadio
|
|
185
|
-
)
|
|
186
|
-
"
|
|
187
|
-
>不满意</span
|
|
188
|
-
>
|
|
189
|
-
</div>
|
|
190
|
-
</div>
|
|
191
|
-
</li>
|
|
192
|
-
</ul>
|
|
193
|
-
</div>
|
|
194
|
-
<div class="gr-footer">
|
|
195
|
-
<el-input
|
|
196
|
-
size="small"
|
|
197
|
-
placeholder="请输入测试问题"
|
|
198
|
-
v-model="testValue"
|
|
199
|
-
@keyup.enter.native="
|
|
200
|
-
sendTestContent('TEXT', testValue, testValue, true)
|
|
201
|
-
"
|
|
202
|
-
>
|
|
203
|
-
<el-button
|
|
204
|
-
type="primary"
|
|
205
|
-
size="small"
|
|
206
|
-
slot="append"
|
|
207
|
-
@click="sendTestContent('TEXT', testValue, testValue, true)"
|
|
208
|
-
>发送</el-button
|
|
209
|
-
>
|
|
210
|
-
<el-button
|
|
211
|
-
type="info"
|
|
212
|
-
size="small"
|
|
213
|
-
slot="append"
|
|
214
|
-
@click="sendTestContent('END_SESSION', 'END_SESSION', null, false)"
|
|
215
|
-
>结束</el-button
|
|
216
|
-
>
|
|
217
|
-
</el-input>
|
|
218
|
-
</div>
|
|
219
|
-
</div>
|
|
4
|
+
<msg-loading v-if="inLoading"></msg-loading>
|
|
5
|
+
<div style="position: relative" class="img_div">
|
|
6
|
+
<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"/>
|
|
7
|
+
<div class="mask">
|
|
8
|
+
<loading-process :dataNote="dataNote" :finished="finished"></loading-process>
|
|
220
9
|
</div>
|
|
221
|
-
|
|
222
|
-
<div class="headerName">对话记录</div>
|
|
223
|
-
<div class="dialogContent" id="messageContent" ref="msgContainer">
|
|
224
|
-
<!– <div class="message">
|
|
225
|
-
<div class="user-detail">
|
|
226
|
-
<div class="media-body">
|
|
227
|
-
<p><el-image
|
|
228
|
-
style="width: 100px; height: 100px"
|
|
229
|
-
:src="url"
|
|
230
|
-
:preview-src-list="srcList">
|
|
231
|
-
</el-image>
|
|
232
|
-
</p>
|
|
233
|
-
</div>
|
|
234
|
-
</div>
|
|
235
|
-
</div>
|
|
236
|
-
<div class="message-notice">
|
|
237
|
-
<p class="notice-content">客户和机器人建立会话 11:15:42</p>
|
|
238
|
-
</div>
|
|
239
|
-
<div class="message-notice">
|
|
240
|
-
<p class="notice-content">客户转人工服务 11:15:45</p>
|
|
241
|
-
</div>
|
|
242
|
-
<div class="message-notice">
|
|
243
|
-
<p class="notice-content">客户和客服 阿毛 的会话已结束 11:16:01 </p>
|
|
244
|
-
</div>
|
|
245
|
-
<div class="message-notice">
|
|
246
|
-
<p class="notice-content-day">
|
|
247
|
-
<span class="line-left"></span>
|
|
248
|
-
<span class="line-text">2020-01-06</span>
|
|
249
|
-
<span class="line-right"> </span>
|
|
250
|
-
</p>
|
|
251
|
-
</div>–>
|
|
252
|
-
<div v-for="(item,index) in userMessages" :key="index">
|
|
253
|
-
<el-link
|
|
254
|
-
:underline="false"
|
|
255
|
-
v-if="index==0 && moreMessages"
|
|
256
|
-
type="primary"
|
|
257
|
-
@click="clickUserli(activeClass,userList[activeClass].destId,userList[activeClass].sourceId,false,item.id,false,userList[activeClass].channel)"
|
|
258
|
-
>更多消息</el-link>
|
|
259
|
-
<el-link
|
|
260
|
-
:underline="false"
|
|
261
|
-
v-if="index==0 && !moreMessages"
|
|
262
|
-
type="primary"
|
|
263
|
-
disabled
|
|
264
|
-
>没有更多消息了</el-link>
|
|
265
|
-
<div class="message message-kf" v-if="item.source=='WEB_SOCKET'">
|
|
266
|
-
<div class="user-detail">
|
|
267
|
-
<div class="media-body">
|
|
268
|
-
<p
|
|
269
|
-
v-if="item.type == 'user_action_to_satisfaction'|| item.type == 'user_action_to_unsatisfactory'"
|
|
270
|
-
>{{JSON.parse(item.content).input}}</p>
|
|
271
|
-
<p
|
|
272
|
-
v-else
|
|
273
|
-
v-html="item.type == 'RADIO'? item.content.split('_')[item.content.split('_').length - 1] :item.content "
|
|
274
|
-
></p>
|
|
275
|
-
<span>{{new Date(item.time).Format("yyyy-MM-dd hh:mm:s")}}</span>
|
|
276
|
-
</div>
|
|
277
|
-
</div>
|
|
278
|
-
</div>
|
|
279
|
-
<div class="message message-kf" v-if="item.source=='WEBSITE_SOCKET'">
|
|
280
|
-
<div class="user-detail">
|
|
281
|
-
<div class="media-body">
|
|
282
|
-
<p
|
|
283
|
-
v-if="item.type == 'user_action_to_satisfaction'|| item.type == 'user_action_to_unsatisfactory'"
|
|
284
|
-
>{{JSON.parse(item.content).input}}</p>
|
|
285
|
-
<p
|
|
286
|
-
v-else
|
|
287
|
-
v-html="item.type == 'RADIO'? item.content.split('_')[item.content.split('_').length - 1] :item.content "
|
|
288
|
-
></p>
|
|
289
|
-
<span>{{new Date(item.time).Format("yyyy-MM-dd hh:mm:s")}}</span>
|
|
290
|
-
</div>
|
|
291
|
-
</div>
|
|
292
|
-
</div>
|
|
293
|
-
<div class="message message-kf" v-if="item.source=='MINI_PROGRAM_WEB_SOCKET'">
|
|
294
|
-
<div class="user-detail">
|
|
295
|
-
<div class="media-body">
|
|
296
|
-
<p
|
|
297
|
-
v-if="item.type == 'user_action_to_satisfaction'|| item.type == 'user_action_to_unsatisfactory'"
|
|
298
|
-
>{{JSON.parse(item.content).input}}</p>
|
|
299
|
-
<p
|
|
300
|
-
v-else
|
|
301
|
-
v-html="item.type == 'RADIO'? item.content.split('_')[item.content.split('_').length - 1] :item.content "
|
|
302
|
-
></p>
|
|
303
|
-
<span>{{new Date(item.time).Format("yyyy-MM-dd hh:mm:s")}}</span>
|
|
304
|
-
</div>
|
|
305
|
-
</div>
|
|
306
|
-
</div>
|
|
307
|
-
<div class="message" v-if="item.type=='user_action_to_satisfaction' ">
|
|
308
|
-
<template>
|
|
309
|
-
<div class="user-detail" v-if="JSON.parse(item.content)!=null">
|
|
310
|
-
<div class="media-body">
|
|
311
|
-
<p v-html="JSON.parse(item.content).reply_text"></p>
|
|
312
|
-
<span>{{new Date(item.time).Format("yyyy-MM-dd hh:mm:ss")}}</span>
|
|
313
|
-
<span v-if="item.source=='GUORAN_BOT'" class="botname">{{userInfor.botName}}</span>
|
|
314
|
-
<span
|
|
315
|
-
v-else-if="item.source=='CUSTOMER_SERVICE_SYSTEM'"
|
|
316
|
-
class="botname"
|
|
317
|
-
>{{item.sourceId}}</span>
|
|
318
|
-
</div>
|
|
319
|
-
</div>
|
|
320
|
-
</template>
|
|
321
|
-
</div>
|
|
322
|
-
|
|
323
|
-
<div class="message" v-if="item.type=='user_action_to_unsatisfactory'">
|
|
324
|
-
<template>
|
|
325
|
-
<div class="user-detail" v-if="JSON.parse(item.content)!=null">
|
|
326
|
-
<div class="media-body-ps">
|
|
327
|
-
<p
|
|
328
|
-
class="other"
|
|
329
|
-
v-if="JSON.parse(item.content).reply_text!=null"
|
|
330
|
-
>{{JSON.parse(item.content).reply_text}}</p>
|
|
331
|
-
<div v-if="JSON.parse(item.content).reply_options!=null && JSON.parse(item.content).reply_options.length>0"
|
|
332
|
-
>
|
|
333
|
-
<p
|
|
334
|
-
class="ps"
|
|
335
|
-
v-for="(option,index) in JSON.parse(item.content).options"
|
|
336
|
-
:key="index"
|
|
337
|
-
>{{option.name}}</p>
|
|
338
|
-
</div>
|
|
339
|
-
|
|
340
|
-
<span>{{new Date(item.time).Format("yyyy-MM-dd hh:mm:ss")}}</span>
|
|
341
|
-
<span class="botname">{{userInfor.botName}}</span>
|
|
342
|
-
</div>
|
|
343
|
-
</div>
|
|
344
|
-
</template>
|
|
345
|
-
</div>
|
|
346
|
-
<template
|
|
347
|
-
v-if="(item.source=='GUORAN_BOT' || item.source=='CUSTOMER_SERVICE_SYSTEM') && item.type!='user_action_to_satisfaction' && item.type!='user_action_to_unsatisfactory' "
|
|
348
|
-
>
|
|
349
|
-
<div class="message" v-for="(msg,index) in JSON.parse(item.content)" :key="index">
|
|
350
|
-
<div class="user-detail" v-if="msg.content!=null">
|
|
351
|
-
<div
|
|
352
|
-
class="media-body"
|
|
353
|
-
v-if="(msg.type =='answer_text' || msg.type=='answer_welcometext' || msg.type=='answer_correct') && msg.content.list!=null && msg.content.list[0]!='__welcome__' "
|
|
354
|
-
>
|
|
355
|
-
<p v-html="msg.content.list != null?msg.content.list[0]:''"></p>
|
|
356
|
-
<span>{{new Date(item.time).Format("yyyy-MM-dd hh:mm:ss")}}</span>
|
|
357
|
-
<span v-if="item.source=='GUORAN_BOT'" class="botname">{{userInfor.botName}}</span>
|
|
358
|
-
<span
|
|
359
|
-
v-else-if="item.source=='CUSTOMER_SERVICE_SYSTEM'"
|
|
360
|
-
class="botname"
|
|
361
|
-
>{{item.sourceId}}</span>
|
|
362
|
-
</div>
|
|
363
|
-
<div
|
|
364
|
-
class="media-body"
|
|
365
|
-
style="max-width: 300px"
|
|
366
|
-
v-else-if="(msg.type =='answer_rich_text')"
|
|
367
|
-
>
|
|
368
|
-
<p v-html="msg.content.html"></p>
|
|
369
|
-
<span>{{new Date(item.time).Format("yyyy-MM-dd hh:mm:ss")}}</span>
|
|
370
|
-
<span v-if="item.source=='GUORAN_BOT'" class="botname">{{userInfor.botName}}</span>
|
|
371
|
-
<span
|
|
372
|
-
v-else-if="item.source=='CUSTOMER_SERVICE_SYSTEM'"
|
|
373
|
-
class="botname"
|
|
374
|
-
>{{item.sourceId}}</span>
|
|
375
|
-
</div>
|
|
376
|
-
<div
|
|
377
|
-
class="media-body"
|
|
378
|
-
v-else-if="msg.type =='action_question' && msg.content!=null && msg.content.questions!=null && msg.content.questions.length>0"
|
|
379
|
-
>
|
|
380
|
-
<p v-html="msg.content.questions[0]"></p>
|
|
381
|
-
<span>{{new Date(item.time).Format("yyyy-MM-dd hh:mm:ss")}}</span>
|
|
382
|
-
<span v-if="item.source=='GUORAN_BOT'" class="botname">{{userInfor.botName}}</span>
|
|
383
|
-
<span
|
|
384
|
-
v-else-if="item.source=='CUSTOMER_SERVICE_SYSTEM'"
|
|
385
|
-
class="botname"
|
|
386
|
-
>{{item.sourceId}}</span>
|
|
387
|
-
</div>
|
|
388
|
-
<div class="media-body" v-else-if="msg.type == 'answer_image'">
|
|
389
|
-
<p>
|
|
390
|
-
<el-image style="width: 35%;" :src="msg.content.url"></el-image>
|
|
391
|
-
</p>
|
|
392
|
-
<span>{{new Date(item.time).Format("yyyy-MM-dd hh:mm:ss")}}</span>
|
|
393
|
-
<span v-if="item.source=='GUORAN_BOT'" class="botname">{{userInfor.botName}}</span>
|
|
394
|
-
<span
|
|
395
|
-
v-else-if="item.source=='CUSTOMER_SERVICE_SYSTEM'"
|
|
396
|
-
class="botname"
|
|
397
|
-
>{{item.sourceId}}</span>
|
|
398
|
-
</div>
|
|
399
|
-
<div v-else-if="msg.type=='answer_radio'" class="media-body-ps">
|
|
400
|
-
<p class="other">{{msg.content.description}}</p>
|
|
401
|
-
<p
|
|
402
|
-
class="ps"
|
|
403
|
-
v-for="(option,index) in msg.content.options"
|
|
404
|
-
:key="index"
|
|
405
|
-
>{{option.name}}</p>
|
|
406
|
-
<span
|
|
407
|
-
style="margin-left:15px;margin-top:5px"
|
|
408
|
-
>{{new Date(item.time).Format("yyyy-MM-dd hh:mm:ss")}}</span>
|
|
409
|
-
<span v-if="item.source=='GUORAN_BOT'" class="botname">{{userInfor.botName}}</span>
|
|
410
|
-
<span
|
|
411
|
-
v-else-if="item.source=='CUSTOMER_SERVICE_SYSTEM'"
|
|
412
|
-
class="botname"
|
|
413
|
-
>{{item.sourceId}}</span>
|
|
414
|
-
</div>
|
|
415
|
-
<div v-else-if="msg.type=='action_satisfaction'" class="media-body-ps">
|
|
416
|
-
<p class="other">{{msg.content.satisfactionDes}}</p>
|
|
417
|
-
<p class="ps" v-for="(option,index) in ['满意','不满意']" :key="index">{{option}}</p>
|
|
418
|
-
</div>
|
|
419
|
-
<div v-else-if="msg.type=='answer_video'" class="media-body">
|
|
420
|
-
<p>
|
|
421
|
-
<video-player
|
|
422
|
-
class="video-player vjs-custom-skin"
|
|
423
|
-
:options="videoOptions(msg.content)"
|
|
424
|
-
style="height:auto"
|
|
425
|
-
/>
|
|
426
|
-
</p>
|
|
427
|
-
<span>{{new Date(item.time).Format("yyyy-MM-dd hh:mm:ss")}}</span>
|
|
428
|
-
<span v-if="item.source=='GUORAN_BOT'" class="botname">{{userInfor.botName}}</span>
|
|
429
|
-
<span
|
|
430
|
-
v-else-if="item.source=='CUSTOMER_SERVICE_SYSTEM'"
|
|
431
|
-
class="botname"
|
|
432
|
-
>{{item.sourceId}}</span>
|
|
433
|
-
</div>
|
|
10
|
+
</div>
|
|
434
11
|
|
|
435
|
-
<div v-else-if="msg.type=='action_transfer'">
|
|
436
|
-
<!– 机器人回复为转人工组件内容 –>
|
|
437
|
-
</div>
|
|
438
|
-
<div v-else>
|
|
439
|
-
<p>{{msg}}</p>
|
|
440
|
-
</div>
|
|
441
|
-
</div>
|
|
442
|
-
</div>
|
|
443
|
-
</template>
|
|
444
|
-
</div>
|
|
445
|
-
<!– <div class="message">–>
|
|
446
|
-
<!– <div class="user-detail">–>
|
|
447
|
-
<!– –>
|
|
448
|
-
<!– </div>–>
|
|
449
|
-
<!– </div>–>
|
|
450
|
-
<!– <div class="message">
|
|
451
|
-
<div class="user-detail">
|
|
452
|
-
<div class="media-body">
|
|
453
|
-
<p>
|
|
454
|
-
<video-player
|
|
455
|
-
class="video-player vjs-custom-skin"
|
|
456
|
-
ref="videoPlayer"
|
|
457
|
-
:playsinline="true"
|
|
458
|
-
:options="playerOptions"
|
|
459
|
-
>
|
|
460
|
-
</video-player>
|
|
461
|
-
</p>
|
|
462
|
-
</div>
|
|
463
|
-
</div>
|
|
464
|
-
</div>–>
|
|
465
|
-
</div>
|
|
466
|
-
</div>–>
|
|
467
|
-
<text-message :text="text" @submitClick="submitClicks"></text-message>
|
|
468
|
-
<text-message :text="text" @submitClick="submitClicks" :type="rem"></text-message>
|
|
469
|
-
<text-message :text="text" @submitClick="submitClicks" :type="rem"></text-message>-->
|
|
470
|
-
|
|
471
|
-
<!-- <ticket-message :content="contents" @touchEnd="touchEnd"></ticket-message>-->
|
|
472
|
-
<!-- <ticket-message :content="contents" type="rem"></ticket-message>
|
|
473
|
-
<ticket-message :content="contents" type="rem"></ticket-message>
|
|
474
|
-
<ticket-message :content="contents" type="rem"></ticket-message>
|
|
475
|
-
<ticket-message :content="contents" ></ticket-message>
|
|
476
|
-
<ticket-message :content="contents"></ticket-message>
|
|
477
|
-
<ticket-message :content="contents" ></ticket-message>
|
|
478
|
-
<ticket-message :content="contents" ></ticket-message>-->
|
|
479
|
-
<!-- <text-message :text="text" :type="rem" @submitClick="submitClick"></text-message>
|
|
480
|
-
<text-message :text="text" @submitClick="submitClick"></text-message>-->
|
|
481
|
-
<!-- <text-message :text="text"></text-message>
|
|
482
|
-
<form-template :formList="formList" @submitClick="submitClick"></form-template>
|
|
483
|
-
<form-template :formList="formList" @submitClick="submitClick"></form-template>
|
|
484
|
-
<form-template :formList="formList" @submitClick="submitClick"></form-template>-->
|
|
485
|
-
|
|
486
|
-
<!-- <feed-back
|
|
487
|
-
:feedBack="feedBack"
|
|
488
|
-
:rem="rem"
|
|
489
|
-
@positiveFeedback="positiveFeedback"
|
|
490
|
-
></feed-back>-->
|
|
491
|
-
<!-- <feed-back
|
|
492
|
-
:feedBack="feedBack"
|
|
493
|
-
@positiveFeedback="positiveFeedback"
|
|
494
|
-
></feed-back>-->
|
|
495
|
-
<form-template
|
|
496
|
-
:formList="formList"
|
|
497
|
-
@submitClick="submitClick"
|
|
498
|
-
></form-template>
|
|
499
12
|
<form-template
|
|
500
13
|
:formList="formList2"
|
|
501
14
|
@submitClick="submitClick"
|
|
502
15
|
></form-template>
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
></
|
|
510
|
-
<
|
|
16
|
+
<!-- <voice-component @closeVoice="closeVoice">
|
|
17
|
+
<div slot="voiceTip">
|
|
18
|
+
松开发送
|
|
19
|
+
</div>
|
|
20
|
+
</voice-component>-->
|
|
21
|
+
<!-- 点选 -->
|
|
22
|
+
<answer-radio :msg="answerRadios"></answer-radio>
|
|
23
|
+
<action-send-to-bot :msg="answerRadios"></action-send-to-bot>
|
|
24
|
+
<ticket-message :content="contents"></ticket-message>
|
|
25
|
+
<text-message :text="text" @submitClick="submitClick"></text-message>
|
|
26
|
+
<div v-for="(item,index) in processAction" :key="index">
|
|
27
|
+
<association-intention :msg="item" :msgType="item.type"></association-intention>
|
|
28
|
+
</div>
|
|
29
|
+
<!-- 满意组件 -->
|
|
30
|
+
<action-satisfaction :msg="actionSatisfactions[0]"></action-satisfaction>
|
|
31
|
+
<!-- 满意或不满意-->
|
|
32
|
+
<bot-action-satisfactor :msg="botActionSatis"></bot-action-satisfactor>
|
|
33
|
+
<answer-dissatisfaction :msg="answerDiss"></answer-dissatisfaction>
|
|
34
|
+
|
|
35
|
+
<!-- <FileType :urls="urls" :color="black"></FileType>-->
|
|
36
|
+
<!-- <FileType :urls="urls" :color="black"></FileType>
|
|
511
37
|
<chat-content :messageList="messageList"></chat-content>-->
|
|
512
38
|
</div>
|
|
513
39
|
</template>
|
|
514
40
|
<script>
|
|
515
|
-
|
|
516
|
-
import FormTemplate from "@/components/formTemplate";
|
|
517
|
-
import TextMessage from "@/components/message/TextMessage";*/
|
|
41
|
+
import TextMessage from "@/components/message/TextMessage";
|
|
518
42
|
|
|
519
43
|
|
|
520
44
|
/*import FormTemplate from "@/components/formTemplate";
|
|
521
45
|
import TextMessage from "@/components/message/TextMessage";*/
|
|
522
46
|
|
|
523
47
|
import FormTemplate from "@/components/formTemplate";
|
|
524
|
-
|
|
525
|
-
|
|
48
|
+
import AnswerRadio from "./answerRadio";
|
|
49
|
+
import TicketMessage from "./message/TicketMessage";
|
|
50
|
+
/*import VoiceComponent from "./voiceComponent";*/
|
|
51
|
+
import AssociationIntention from "./associationIntention";
|
|
52
|
+
import ActionSatisfaction from "./actionSatisfaction";
|
|
53
|
+
import MsgLoading from "./msgLoading";
|
|
54
|
+
import LoadingProcess from "./loadingProcess";
|
|
55
|
+
import BotActionSatisfactor from "./botActionSatisfactor";
|
|
56
|
+
import AnswerDissatisfaction from "./answerDissatisfaction";
|
|
57
|
+
import ActionSendToBot from "./actionSendToBot";
|
|
526
58
|
/* import TicketMessage from "@/components/message/TicketMessage";
|
|
527
59
|
import TicketMessage from "@/components/message/TicketMessage";
|
|
528
60
|
import TextMessage from "@/components/message/TextMessage";
|
|
@@ -535,9 +67,20 @@ import ChatContent from "./chatContent";*/
|
|
|
535
67
|
export default {
|
|
536
68
|
name: "ConversationContainer",
|
|
537
69
|
components: {
|
|
70
|
+
ActionSendToBot,
|
|
71
|
+
AnswerDissatisfaction,
|
|
72
|
+
BotActionSatisfactor,
|
|
73
|
+
LoadingProcess,
|
|
74
|
+
MsgLoading,
|
|
75
|
+
ActionSatisfaction,
|
|
76
|
+
AssociationIntention,
|
|
77
|
+
/* VoiceComponent,*/
|
|
78
|
+
TicketMessage,
|
|
538
79
|
|
|
539
|
-
|
|
80
|
+
AnswerRadio,
|
|
540
81
|
FormTemplate,
|
|
82
|
+
TextMessage,
|
|
83
|
+
|
|
541
84
|
|
|
542
85
|
|
|
543
86
|
},
|
|
@@ -1338,7 +881,7 @@ export default {
|
|
|
1338
881
|
|
|
1339
882
|
text: {
|
|
1340
883
|
template:
|
|
1341
|
-
'<p>开始时间 <span class="ask-component-placeholder-container"><span class="ask-component-placeholder-span" data="${开始时间戳_秒}" type="INPUT">1607427268</span><i class="ask-component-placeholder-icon arsenal_icon
|
|
884
|
+
'<p>开始时间 <span class="ask-component-placeholder-container"><span class="ask-component-placeholder-span" data="${开始时间戳_秒}" type="INPUT">1607427268</span><i class="ask-component-placeholder-icon arsenal_icon arsenalbianji2" icon="arsenal_icon arsenalkebianji" editable="true" onclick="_askEditValue(this,this.previousElementSibling)"></i><br/></span>结束时间 <span class="ask-component-placeholder-container"><span class="ask-component-placeholder-span" data="${结束时间戳_秒}" type="TIME_PICKER">1607772868</span><i class="ask-component-placeholder-icon arsenal_icon arsenalkebianji" icon="arsenal_icon arsenalkebianji" editable="true" onclick="_askEditValue(this,this.previousElementSibling)"></i></span></p>',
|
|
1342
885
|
goToAction: { value: "123" },
|
|
1343
886
|
apiKey:''
|
|
1344
887
|
},
|
|
@@ -1359,6 +902,259 @@ export default {
|
|
|
1359
902
|
{content:'您好,我是郑俊成的智能助理,请问您是为企业咨询还是个人兴趣?',speaker:'bot',type:'answer_text'},
|
|
1360
903
|
{content:'单位',speaker:'user',type:'answer_text'}
|
|
1361
904
|
],
|
|
905
|
+
answerMsg:{
|
|
906
|
+
content:{
|
|
907
|
+
description:'你好,我是点选',
|
|
908
|
+
options:[{
|
|
909
|
+
name: "跳转意图",
|
|
910
|
+
scope: "INTENT",
|
|
911
|
+
value: "3535"
|
|
912
|
+
}]
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
showLoad:false,
|
|
916
|
+
videoUrl:'https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/2021/08/27/10/22/56fb13eb-b94a-45e8-b131-04531330cb2c/微信_20210719215122.mp4',
|
|
917
|
+
processAction:[
|
|
918
|
+
{
|
|
919
|
+
content:{
|
|
920
|
+
html:'<p><img onclick=\'previewImage(this)\' width=\\"100%\\" src=\\"https://static.guoranbot.com/ueditor/2021/07/02/78f1af50e47440c1b573f227c2618be1/下载" title="下载 (1).png" alt="下载 (1).png"/></p>',
|
|
921
|
+
actionType: "answer_text",
|
|
922
|
+
list:['关联意图'],
|
|
923
|
+
recommend:{
|
|
924
|
+
description: "关联意图测试描述",
|
|
925
|
+
list:[
|
|
926
|
+
{
|
|
927
|
+
id: "3539",
|
|
928
|
+
text: "文本",
|
|
929
|
+
type: 1
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
id: "3540",
|
|
933
|
+
text: "图片",
|
|
934
|
+
type: 1
|
|
935
|
+
}
|
|
936
|
+
],
|
|
937
|
+
status: true
|
|
938
|
+
},
|
|
939
|
+
replyIndex: 0
|
|
940
|
+
},
|
|
941
|
+
type:'answer_text',
|
|
942
|
+
id:'60df04245987400458f697cd',
|
|
943
|
+
intentId:6064,
|
|
944
|
+
recommend:{
|
|
945
|
+
description: "关联意图测试描述",
|
|
946
|
+
list:[
|
|
947
|
+
{
|
|
948
|
+
id: "3539",
|
|
949
|
+
text: "文本",
|
|
950
|
+
type: 1
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
id: "3540",
|
|
954
|
+
text: "图片",
|
|
955
|
+
type: 1
|
|
956
|
+
}
|
|
957
|
+
],
|
|
958
|
+
status: true
|
|
959
|
+
},
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
content:{
|
|
963
|
+
html:'<p><img onclick=\'previewImage(this)\' width=\\"100%\\" src=\\"https://static.guoranbot.com/ueditor/2021/07/02/78f1af50e47440c1b573f227c2618be1/下载" title="下载 (1).png" alt="下载 (1).png"/></p>',
|
|
964
|
+
recommend:{
|
|
965
|
+
description: "关联意图测试描述",
|
|
966
|
+
list:[
|
|
967
|
+
{
|
|
968
|
+
id: "3539",
|
|
969
|
+
text: "文本",
|
|
970
|
+
type: 1
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
id: "3540",
|
|
974
|
+
text: "图片",
|
|
975
|
+
type: 1
|
|
976
|
+
}
|
|
977
|
+
],
|
|
978
|
+
status: true
|
|
979
|
+
}
|
|
980
|
+
},
|
|
981
|
+
type:'answer_rich_text',
|
|
982
|
+
id:'60df03aeeea6014311dc4285',
|
|
983
|
+
intentId:6064,
|
|
984
|
+
recommend:{
|
|
985
|
+
description: "关联意图测试描述",
|
|
986
|
+
list:[
|
|
987
|
+
{
|
|
988
|
+
id: "3539",
|
|
989
|
+
text: "文本",
|
|
990
|
+
type: 1
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
id: "3540",
|
|
994
|
+
text: "图片",
|
|
995
|
+
type: 1
|
|
996
|
+
}
|
|
997
|
+
],
|
|
998
|
+
status: true
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
|
|
1002
|
+
{
|
|
1003
|
+
content:{
|
|
1004
|
+
url:'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',
|
|
1005
|
+
recommend:{
|
|
1006
|
+
description: "关联意图测试描述",
|
|
1007
|
+
list:[
|
|
1008
|
+
{
|
|
1009
|
+
id: "3539",
|
|
1010
|
+
text: "文本",
|
|
1011
|
+
type: 1
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
id: "3540",
|
|
1015
|
+
text: "图片",
|
|
1016
|
+
type: 1
|
|
1017
|
+
}
|
|
1018
|
+
],
|
|
1019
|
+
status: true
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1022
|
+
type:'answer_image',
|
|
1023
|
+
id:'6124d9b1c12fa234e0b3ddc8',
|
|
1024
|
+
intentId:6064,
|
|
1025
|
+
recommend:{
|
|
1026
|
+
description: "关联意图测试描述",
|
|
1027
|
+
list:[
|
|
1028
|
+
{
|
|
1029
|
+
id: "3539",
|
|
1030
|
+
text: "文本",
|
|
1031
|
+
type: 1
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
id: "3540",
|
|
1035
|
+
text: "图片",
|
|
1036
|
+
type: 1
|
|
1037
|
+
}
|
|
1038
|
+
],
|
|
1039
|
+
status: true
|
|
1040
|
+
}
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
content:{
|
|
1044
|
+
url:'https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/2021/08/24/07/35/41221223-c180-4f3f-bdc8-94875b693965/WeChat_20210719215122.mp4',
|
|
1045
|
+
videoFlag: false,
|
|
1046
|
+
videoUploadPercent:0,
|
|
1047
|
+
isShowUploadVideo:true,
|
|
1048
|
+
recommend:{
|
|
1049
|
+
description: "关联意图测试描述",
|
|
1050
|
+
list:[
|
|
1051
|
+
{
|
|
1052
|
+
id: "3539",
|
|
1053
|
+
text: "文本",
|
|
1054
|
+
type: 1
|
|
1055
|
+
}
|
|
1056
|
+
],
|
|
1057
|
+
status: true
|
|
1058
|
+
}
|
|
1059
|
+
},
|
|
1060
|
+
type:'answer_video',
|
|
1061
|
+
id:'60df03aeeea6014311dc4285',
|
|
1062
|
+
intentId:6064,
|
|
1063
|
+
recommend:{
|
|
1064
|
+
description: "关联意图测试描述",
|
|
1065
|
+
list:[
|
|
1066
|
+
{
|
|
1067
|
+
id: "3539",
|
|
1068
|
+
text: "文本",
|
|
1069
|
+
type: 1
|
|
1070
|
+
}
|
|
1071
|
+
],
|
|
1072
|
+
status: true
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
],
|
|
1076
|
+
actionSatisfactions:[
|
|
1077
|
+
{
|
|
1078
|
+
content:{
|
|
1079
|
+
satisfactionDes:'满意度',
|
|
1080
|
+
satisfactoryAnswer:'',
|
|
1081
|
+
unsatisfiedAnswer:'',
|
|
1082
|
+
answerRadio:[
|
|
1083
|
+
{
|
|
1084
|
+
answer:'哦哦哦',
|
|
1085
|
+
name:'哈哈哈'
|
|
1086
|
+
}
|
|
1087
|
+
]
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
}
|
|
1091
|
+
],
|
|
1092
|
+
inLoading:true,
|
|
1093
|
+
dataNote:0,
|
|
1094
|
+
timer:null,
|
|
1095
|
+
finished:false,
|
|
1096
|
+
botActionSatis:{
|
|
1097
|
+
content:{
|
|
1098
|
+
reply_text:'哈哈哈哈哈',
|
|
1099
|
+
reply_options:[
|
|
1100
|
+
{
|
|
1101
|
+
name:'暗示丢',
|
|
1102
|
+
answer:'暗示丢1504559775615045597756kjl',
|
|
1103
|
+
apiKey:''
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
name:'暗示丢2',
|
|
1107
|
+
answer:'暗示丢11504559775615045597756kjl',
|
|
1108
|
+
apiKey:''
|
|
1109
|
+
}
|
|
1110
|
+
]
|
|
1111
|
+
}
|
|
1112
|
+
},
|
|
1113
|
+
answerDiss:{
|
|
1114
|
+
content:{
|
|
1115
|
+
replyText:'哈哈哈哈哈',
|
|
1116
|
+
replyOptions:[
|
|
1117
|
+
{
|
|
1118
|
+
name:'暗示丢',
|
|
1119
|
+
answer:'暗示丢1504559775615045597756kjl',
|
|
1120
|
+
apiKey:''
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
name:'暗示丢2',
|
|
1124
|
+
answer:'暗示丢11504559775615045597756kjl',
|
|
1125
|
+
apiKey:''
|
|
1126
|
+
}
|
|
1127
|
+
]
|
|
1128
|
+
}
|
|
1129
|
+
},
|
|
1130
|
+
answerRadios:{
|
|
1131
|
+
content:{
|
|
1132
|
+
description:'请点击下方选项继续测试',
|
|
1133
|
+
options:[
|
|
1134
|
+
{
|
|
1135
|
+
name: "跳转节点1",
|
|
1136
|
+
scope: "NODE",
|
|
1137
|
+
value: "60177b9470814d4ce924f1ed"
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
name: "跳转意图",
|
|
1141
|
+
scope: "INTENT",
|
|
1142
|
+
value: "3558"
|
|
1143
|
+
},
|
|
1144
|
+
{
|
|
1145
|
+
name: "跳转节点2",
|
|
1146
|
+
scope: "NODE",
|
|
1147
|
+
value: "60af4505d0acd7017620c4f2"
|
|
1148
|
+
}
|
|
1149
|
+
],
|
|
1150
|
+
recommend:{
|
|
1151
|
+
description:'',
|
|
1152
|
+
status:false,
|
|
1153
|
+
list:[]
|
|
1154
|
+
}
|
|
1155
|
+
},
|
|
1156
|
+
type:'answer_radio'
|
|
1157
|
+
}
|
|
1362
1158
|
};
|
|
1363
1159
|
},
|
|
1364
1160
|
methods: {
|
|
@@ -1373,9 +1169,26 @@ export default {
|
|
|
1373
1169
|
},
|
|
1374
1170
|
touchEnd(index){
|
|
1375
1171
|
console.log(index)
|
|
1376
|
-
}
|
|
1172
|
+
},
|
|
1173
|
+
closeVoice(){
|
|
1174
|
+
console.debug('我是close事件')
|
|
1175
|
+
},
|
|
1176
|
+
},
|
|
1177
|
+
mounted() {
|
|
1178
|
+
this.timer = setInterval(()=>{
|
|
1179
|
+
this.dataNote+=1
|
|
1180
|
+
console.debug('this.dataNote',this.dataNote)
|
|
1181
|
+
},1000)
|
|
1182
|
+
|
|
1183
|
+
setTimeout(()=>{
|
|
1184
|
+
this.inLoading = true
|
|
1185
|
+
},2000)
|
|
1186
|
+
setTimeout(()=>{
|
|
1187
|
+
this.finished = true
|
|
1188
|
+
this.dataNote = 10
|
|
1189
|
+
clearInterval(this.timer)
|
|
1190
|
+
},5000)
|
|
1377
1191
|
},
|
|
1378
|
-
mounted() {},
|
|
1379
1192
|
updated() {},
|
|
1380
1193
|
};
|
|
1381
1194
|
</script>
|
|
@@ -1385,4 +1198,15 @@ export default {
|
|
|
1385
1198
|
@import "../assets/less/converSationContainer/converSatonContainer";
|
|
1386
1199
|
#conversation{
|
|
1387
1200
|
}
|
|
1201
|
+
.img_div{
|
|
1202
|
+
position: relative;
|
|
1203
|
+
.mask{
|
|
1204
|
+
position: absolute;
|
|
1205
|
+
top: 0;
|
|
1206
|
+
right: 0;
|
|
1207
|
+
width: 100%;
|
|
1208
|
+
height: 100%;
|
|
1209
|
+
border-radius: 10px;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1388
1212
|
</style>
|