askbot-dragon 1.7.25-beta → 1.7.26-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 (35) hide show
  1. package/package.json +12 -14
  2. package/public/index.html +10 -8
  3. package/src/assets/js/AliyunlssUtil.js +26 -50
  4. package/src/assets/js/hammer.js +2 -13
  5. package/src/assets/less/converSationContainer/common.less +0 -7
  6. package/src/components/ActionAlertIframe.vue +1 -24
  7. package/src/components/AiGuide.vue +154 -121
  8. package/src/components/AnswerDocknowledge.vue +100 -108
  9. package/src/components/ConversationContainer.vue +220 -13
  10. package/src/components/MyEditor.vue +1 -2
  11. package/src/components/QwFeedback.vue +301 -0
  12. package/src/components/actionSatisfaction.vue +3 -3
  13. package/src/components/answerRadio.vue +3 -3
  14. package/src/components/askVideo.vue +0 -23
  15. package/src/components/associationIntention.vue +7 -11
  16. package/src/components/formTemplate.vue +50 -54
  17. package/src/components/intelligentSummary.vue +4 -8
  18. package/src/components/message/TextMessage.vue +11 -15
  19. package/src/components/message/swiper/ticketSwiper.vue +1 -1
  20. package/src/components/pdfPosition.vue +37 -217
  21. package/src/components/popup.vue +2 -2
  22. package/src/components/previewDoc.vue +2 -6
  23. package/src/components/previewPdf.vue +134 -159
  24. package/src/components/senderMessagePlatform.vue +4 -4
  25. package/src/components/utils/ckeditor.js +1 -1
  26. package/src/components/welcomeKnowledgeFile.vue +2 -6
  27. package/src/components/welcomeLlmCard.vue +1 -5
  28. package/src/components/welcomeSuggest.vue +1 -1
  29. package/src/main.js +0 -18
  30. package/src/components/imgView.vue +0 -32
  31. package/src/components/markDownText.vue +0 -128
  32. package/src/components/newPdfPosition.vue +0 -878
  33. package/src/locales/cn.json +0 -72
  34. package/src/locales/en.json +0 -73
  35. package/src/locales/jp.json +0 -73
@@ -0,0 +1,301 @@
1
+ <template>
2
+ <div class="qw-feedback">
3
+ <div class="qw-guide-text" v-if="msg.content.guideText">
4
+ <!-- 不要替换成图片地址或者字体 -->
5
+ <svg
6
+ t="1730450955692"
7
+ class="icon"
8
+ viewBox="0 0 1024 1024"
9
+ version="1.1"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ p-id="8682"
12
+ width="22"
13
+ height="22"
14
+ >
15
+ <path
16
+ d="M565.096296 289.185185s-0.948148 0 0 0c-110.933333-20.859259-208.592593 40.77037-237.985185 148.859259-14.222222 53.096296-24.651852 101.451852 44.562963 221.866667 14.222222 25.6 11.377778 70.162963 8.533333 95.762963-1.896296 14.222222 64.474074 36.02963 89.125926 42.666667l95.762963-509.155556z"
17
+ fill="#FDB813"
18
+ p-id="8683"
19
+ ></path>
20
+ <path
21
+ d="M732.918519 513.896296c11.377778-111.881481-56.888889-203.851852-166.874075-224.711111h-0.948148L469.333333 798.340741c25.6 2.844444 94.814815 6.637037 98.607408-7.585185 6.637037-25.6 20.859259-67.318519 42.666666-86.281482C719.644444 618.192593 727.22963 568.888889 732.918519 513.896296z"
22
+ fill="#FD9B13"
23
+ p-id="8684"
24
+ ></path>
25
+ <path
26
+ d="M467.437037 806.874074c-7.585185-0.948148-12.325926-7.585185-14.222222-14.222222l-38.874074-256c-0.948148-5.688889 0.948148-11.377778 4.74074-15.170371 3.792593-3.792593 9.481481-5.688889 15.170371-4.74074l167.822222 31.288889c5.688889 0.948148 10.42963 4.740741 12.325926 9.481481 1.896296 4.740741 1.896296 11.377778-0.948148 16.118519L486.4 798.340741c-3.792593 6.637037-11.377778 10.42963-18.962963 8.533333z m-14.222222-251.259259l27.496296 182.992592L572.681481 578.37037l-119.466666-22.755555z"
27
+ fill="#F12A3F"
28
+ p-id="8685"
29
+ ></path>
30
+ <path
31
+ d="M375.466667 709.214815l-25.6 137.481481c0 2.844444 1.896296 5.688889 7.585185 10.42963l65.422222 54.992593c5.688889 4.740741 15.17037 8.533333 23.703704 10.429629l36.029629-193.422222-107.14074-19.911111z"
32
+ fill="#2D4375"
33
+ p-id="8686"
34
+ ></path>
35
+ <path
36
+ d="M482.607407 729.125926l-36.029629 193.422222c9.481481 1.896296 18.014815 1.896296 25.6-0.948148l80.592592-27.496296c6.637037-1.896296 10.42963-4.740741 11.377778-6.637037L589.748148 749.037037l-107.140741-19.911111z"
37
+ fill="#1E2D4F"
38
+ p-id="8687"
39
+ ></path>
40
+ <path
41
+ d="M612.503704 217.125926c-3.792593 18.014815-20.859259 29.392593-38.874074 26.548148-18.014815-3.792593-30.340741-20.859259-26.548149-38.874074l18.962963-100.503704c3.792593-18.014815 20.859259-29.392593 38.874075-26.548148 18.014815 3.792593 30.340741 20.859259 26.548148 38.874074l-18.962963 100.503704z"
42
+ fill="#FDB813"
43
+ p-id="8688"
44
+ ></path>
45
+ <path
46
+ d="M382.103704 228.503704c10.42963 15.17037 6.637037 36.02963-8.533334 46.459259-15.17037 10.42963-36.02963 6.637037-46.459259-8.533333l-57.837037-84.385186c-10.42963-15.17037-6.637037-36.02963 8.533333-46.459259 15.17037-10.42963 36.02963-6.637037 46.45926 8.533334l57.837037 84.385185zM757.57037 298.666667c-15.17037 10.42963-18.962963 31.288889-8.533333 46.459259 10.42963 15.17037 31.288889 18.962963 46.459259 8.533333l84.385185-57.837037c15.17037-10.42963 18.962963-31.288889 8.533334-46.459259-10.42963-15.17037-31.288889-18.962963-46.459259-8.533333l-84.385186 57.837037z"
47
+ fill="#FDB813"
48
+ p-id="8689"
49
+ ></path>
50
+ <path
51
+ d="M252.207407 361.244444c18.014815 3.792593 30.340741 20.859259 26.548149 38.874075-3.792593 18.014815-20.859259 29.392593-38.874075 26.548148l-100.503703-18.962963c-18.014815-3.792593-30.340741-20.859259-26.548148-38.874074 3.792593-18.014815 20.859259-29.392593 38.874074-26.548149l100.503703 18.962963zM931.081481 488.296296c18.014815 3.792593 30.340741 20.859259 26.548149 38.874074-3.792593 18.014815-20.859259 29.392593-38.874074 26.548149l-100.503704-18.962963c-18.014815-3.792593-30.340741-20.859259-26.548148-38.874075 3.792593-18.014815 20.859259-29.392593 38.874074-26.548148l100.503703 18.962963z"
52
+ fill="#FDB813"
53
+ p-id="8690"
54
+ ></path>
55
+ <path
56
+ d="M593.540741 807.822222c1.896296-7.585185-3.792593-15.17037-11.377778-16.118518l-107.140741-19.911111-4.740741 27.496296 107.140741 19.911111c6.637037 0.948148 14.222222-3.792593 16.118519-11.377778z"
57
+ fill="#CEEFF6"
58
+ p-id="8691"
59
+ ></path>
60
+ <path
61
+ d="M366.933333 750.933333c-7.585185-1.896296-15.17037 3.792593-16.118518 11.377778-1.896296 7.585185 3.792593 15.17037 11.377778 16.118519l107.14074 19.911111 4.740741-27.496297-107.140741-19.911111zM356.503704 808.77037c-7.585185-1.896296-15.17037 3.792593-16.118519 11.377778-1.896296 7.585185 3.792593 15.17037 11.377778 16.118519l107.140741 19.911111 4.74074-27.496297-107.14074-19.911111z"
62
+ fill="#FFFFFF"
63
+ p-id="8692"
64
+ ></path>
65
+ <path
66
+ d="M570.785185 848.592593l-107.140741-19.911112-4.74074 27.496297 107.14074 19.911111c7.585185 1.896296 15.17037-3.792593 16.118519-11.377778 1.896296-7.585185-2.844444-15.17037-11.377778-16.118518z"
67
+ fill="#CEEFF6"
68
+ p-id="8693"
69
+ ></path>
70
+ </svg>
71
+ <!-- 不要替换成图片地址或者字体 -->
72
+ <p class="radio-description" v-html="msg.content.guideText"></p>
73
+ </div>
74
+
75
+ <div class="options-list">
76
+ <div
77
+ v-for="(option, index) in showOptions"
78
+ class="options-item"
79
+ :class="
80
+ index !== msg.content.questionList.length - 1
81
+ ? 'recommend-item'
82
+ : 'last-item'
83
+ "
84
+ :key="'qwfeedback_' + index"
85
+ @click="handleWelcome(option)"
86
+ >
87
+ <span> {{ getFilteredName(option) }}</span>
88
+ <i class="arsenal_icon arsenalangle-right-solid"></i>
89
+ </div>
90
+ </div>
91
+ <div v-if="showPage" class="switch-page">
92
+ <!-- <span @click="changeActivePage" class="switch-page-btn"
93
+ >换一批</span
94
+ > -->
95
+ <span @click="showMore" class="switch-page-btn">查看更多</span>
96
+ </div>
97
+ </div>
98
+ </template>
99
+
100
+ <script>
101
+ export default {
102
+ name: "answerRadio",
103
+ data() {
104
+ return {
105
+ isMobile: false,
106
+ formatOptions: [],
107
+ activeIndex: 0,
108
+ pageSize: 5,
109
+ showPage: false,
110
+ showOptions: [],
111
+ };
112
+ },
113
+ props: ["msg"],
114
+ mounted() {
115
+ console.log(this.msg, "msg");
116
+ // 关键词推荐 前端分页
117
+ if (this.msg.content.questionList.length > this.pageSize) {
118
+ this.formatOptions = this.chunkArray(
119
+ this.msg.content.questionList,
120
+ this.pageSize
121
+ );
122
+ this.activeIndex = 0;
123
+ this.showPage = true;
124
+ } else {
125
+ this.formatOptions = [this.msg.content.questionList];
126
+ this.activeIndex = 0;
127
+ }
128
+ this.showOptions = this.formatOptions[0];
129
+ this.judgeIsMobile();
130
+ },
131
+ methods: {
132
+ getFilteredName(name) {
133
+ if (typeof name === "string") {
134
+ return name.replace(/<\/?p>/g, "");
135
+ } else {
136
+ return name;
137
+ }
138
+ },
139
+ showMore() {
140
+ if (this.activeIndex == this.formatOptions.length - 2) {
141
+ this.activeIndex++;
142
+ this.showPage = false;
143
+ } else {
144
+ this.activeIndex++;
145
+ }
146
+ this.showOptions = [
147
+ ...this.showOptions.concat(
148
+ this.formatOptions[this.activeIndex]
149
+ ),
150
+ ];
151
+ },
152
+ changeActivePage() {
153
+ if (this.activeIndex >= this.formatOptions.length - 1) {
154
+ this.activeIndex = 0;
155
+ } else {
156
+ this.activeIndex++;
157
+ }
158
+ this.showOptions = this.formatOptions[this.activeIndex];
159
+ },
160
+ chunkArray(array, size) {
161
+ let chunks = [];
162
+ for (let i = 0; i < array.length; i += size) {
163
+ let chunk = array.slice(i, i + size);
164
+ chunks.push(chunk);
165
+ }
166
+ return chunks;
167
+ },
168
+ judgeIsMobile() {
169
+ let flag = navigator.userAgent.match(
170
+ /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
171
+ );
172
+ if (flag) {
173
+ this.isMobile = true;
174
+ } else {
175
+ this.isMobile = false;
176
+ }
177
+ console.log(this.isMobile, "this.isMobile");
178
+ },
179
+ handleWelcome (item) {
180
+ console.log(item, 'item');
181
+
182
+ this.$emit('handleWelcome', item)
183
+ },
184
+ radioClick(msg, option, index) {
185
+ let value = option.answerId
186
+ ? msg.id +
187
+ "_" +
188
+ index +
189
+ "_" +
190
+ option.value +
191
+ "_" +
192
+ option.name +
193
+ "_" +
194
+ option.answerId
195
+ : msg.id + "_" + index + "_" + option.value + "_" + option.name;
196
+ this.$emit(
197
+ "onRadioClick",
198
+ value,
199
+ option.name,
200
+ msg.apiKey,
201
+ msg.actionCategory,
202
+ msg.msgId ? msg.msgId : "",
203
+ option.apiKey
204
+ );
205
+ },
206
+ },
207
+ };
208
+ </script>
209
+
210
+ <style scoped lang="less">
211
+ .qw-feedback {
212
+ background-color: white;
213
+ padding-bottom: 16px;
214
+ .qw-guide-text {
215
+ display: flex;
216
+ justify-content: flex-start;
217
+ align-items: center;
218
+ background-color: #f2f5ff;
219
+ padding: 16px;
220
+ .radio-description {
221
+ margin-left: 6px;
222
+ }
223
+ }
224
+ .switch-page {
225
+ margin-top: 10px;
226
+ display: flex;
227
+ flex-direction: column;
228
+ align-items: center;
229
+ .switch-page-btn {
230
+ width: 80px;
231
+ height: 24px;
232
+ border-radius: 15px;
233
+ border: solid 1px #366aff;
234
+ color: #366aff;
235
+ line-height: 24px;
236
+ text-align: center;
237
+ cursor: pointer;
238
+ font-size: 12px;
239
+ }
240
+ }
241
+ .radio-description {
242
+ word-wrap: break-word;
243
+ word-break: break-all;
244
+ overflow: hidden;
245
+ /*padding: 8px 10px 10px 0;*/
246
+ height: auto;
247
+ /* border-bottom: 1px solid #EEEEEE;*/
248
+ }
249
+
250
+ .bottom-link {
251
+ height: 1px;
252
+ background-color: #eeeeee;
253
+ }
254
+
255
+ .options-list {
256
+ padding-top: 4px;
257
+ /* padding-top: 10px;*/
258
+ padding-left: 16px;
259
+ padding-right: 16px;
260
+
261
+ .options-item {
262
+ // height: 25px;
263
+ line-height: 25px;
264
+ background-color: #ffffff;
265
+ color: #366aff;
266
+ cursor: pointer;
267
+ display: flex;
268
+ align-items: center;
269
+ justify-content: space-between;
270
+
271
+ i {
272
+ padding-left: 10px;
273
+ }
274
+
275
+ .options-item-text {
276
+ text-overflow: ellipsis;
277
+ display: -webkit-box; //使用了flex,需要加
278
+ overflow: hidden; //超出隐藏
279
+ word-break: break-all; //纯英文、数字、中文
280
+ text-overflow: ellipsis; //省略号
281
+ -webkit-box-orient: vertical; //垂直
282
+ -webkit-line-clamp: 1; //显示一行
283
+ white-space: pre-line; //
284
+ }
285
+ }
286
+
287
+ .recommend-item {
288
+ padding: 8px 0;
289
+ }
290
+
291
+ .last-item {
292
+ padding-top: 8px;
293
+ }
294
+
295
+ .end {
296
+ border-bottom-left-radius: 25px !important;
297
+ border-bottom-right-radius: 25px !important;
298
+ }
299
+ }
300
+ }
301
+ </style>
@@ -17,7 +17,7 @@
17
17
  )
18
18
  "
19
19
  >
20
- {{$t('actionSatisfaction.satisfaction')}}
20
+ 满意
21
21
  </div>
22
22
  <div
23
23
  class="statisfaction-item"
@@ -32,7 +32,7 @@
32
32
  )
33
33
  "
34
34
  >
35
- {{$t('actionSatisfaction.notSatisfied')}}
35
+ 不满意
36
36
  </div>
37
37
  </div>
38
38
 
@@ -42,7 +42,7 @@
42
42
  <script>
43
43
  export default {
44
44
  name: "actionSatisfaction",
45
- props:['msg',"language"],
45
+ props:['msg'],
46
46
  data(){
47
47
  return{
48
48
  isCheckSatis:false,
@@ -4,7 +4,7 @@
4
4
  v-if="msg.content.description && !msg.content.isKnowledgeSummary"></p>
5
5
  <div class="bottom-link" v-if="msg.content.description && !msg.content.isKnowledgeSummary"></div>
6
6
  <div :class="['options-list', msg.content.isKnowledgeSummary ? 'isKnowledgeSummary' : '']">
7
- <div v-if="msg.content.isKnowledgeSummary" class="tips">{{$t('answerRadio.tip')}}</div>
7
+ <div v-if="msg.content.isKnowledgeSummary" class="tips">AI为您推荐了以下内容</div>
8
8
  <div v-for="(option, index) in showOptions" class="options-item"
9
9
  :class="index !== msg.content.options.length - 1 ? 'recommend-item' : 'last-item'" :key="msg.nodeId + '_' + index"
10
10
  @click="radioClick(msg, option, index)">
@@ -13,7 +13,7 @@
13
13
  </div>
14
14
  </div>
15
15
  <div v-if="showPage" class="switch-page">
16
- <span @click="changeActivePage" class="switch-page-btn">{{$t('answerRadio.loadMore')}}</span>
16
+ <span @click="changeActivePage" class="switch-page-btn">换一批</span>
17
17
  <!-- <span @click="showMore" class="switch-page-btn">查看更多</span> -->
18
18
  </div>
19
19
  </div>
@@ -32,7 +32,7 @@ export default {
32
32
  showOptions: [],
33
33
  }
34
34
  },
35
- props: ['msg','language'],
35
+ props: ['msg'],
36
36
  mounted() {
37
37
  console.log(this.msg, 'msg');
38
38
  // 关键词推荐 前端分页
@@ -22,9 +22,6 @@
22
22
  :id="msg.id+'key'">
23
23
  <source :src="videoSrc"/>
24
24
  </video>
25
- <div v-show="!nodownload" class="dragon-video-download">
26
- <a :href="msg.content.url" download><span class="el-icon-download"></span></a>
27
- </div>
28
25
  <div id="output"></div>
29
26
  </div>
30
27
  </template>
@@ -126,8 +123,6 @@
126
123
  video::-webkit-media-controls-mute-button { display: none !important;}
127
124
  #dragon-video{
128
125
  position: relative;
129
- width: calc(100vw - 109px);
130
- max-width: 260px;
131
126
  #outputVideo{
132
127
  position: absolute;
133
128
  top: 0px;
@@ -139,24 +134,6 @@ video::-webkit-media-controls-mute-button { display: none !important;}
139
134
  }
140
135
 
141
136
  }
142
- .dragon-video-download{
143
- position: absolute;
144
- width: 40px;
145
- height: 26px;
146
- background-color: rgba(54, 106, 255, 0.5);
147
- border-radius: 13px;
148
- text-align: center;
149
- bottom: 2px;
150
- right: 6px;
151
- a {
152
- span {
153
- height: 26px;
154
- line-height: 26px;
155
- display: block;
156
- color: white;
157
- }
158
- }
159
- }
160
137
  }
161
138
 
162
139
  </style>
@@ -68,10 +68,10 @@
68
68
  <span class="model-switch-handle-name">{{msg.footerStyleValue}}</span>
69
69
  </div>
70
70
  <van-popup v-model="previewShowPopup" position="bottom" v-if="previewShowPopup" :style="{ height: '90%', background:'#FFFFFF'}">
71
- <previewDoc ref="previewDoc" :url="previewHref" :language="language" @close="close" v-if="previewShowPopup"></previewDoc>
71
+ <previewDoc ref="previewDoc" :url="previewHref" @close="close" v-if="previewShowPopup"></previewDoc>
72
72
  </van-popup>
73
73
  <el-drawer
74
- :title="$t('common.drawerTitle')"
74
+ title="我是标题"
75
75
  :append-to-body="true"
76
76
  :model="false"
77
77
  :visible.sync="drawer"
@@ -79,7 +79,7 @@
79
79
  size="65%"
80
80
  v-if="drawer"
81
81
  >
82
- <previewDoc ref="previewDoc" :url="previewHref" :language="language" @close="close" v-if="drawer"></previewDoc>
82
+ <previewDoc ref="previewDoc" :url="previewHref" @close="close" v-if="drawer"></previewDoc>
83
83
  </el-drawer>
84
84
  </div>
85
85
  </template>
@@ -92,7 +92,7 @@
92
92
  export default {
93
93
  name: "associationIntention",
94
94
  components: {Recommend, askVideo, previewDoc},
95
- props: ["msg",'msgType','isOpen','sourceOhm','isOhmPc', 'nodownload', 'hiddenHeaderFooter','language'],
95
+ props: ["msg",'msgType','isOpen','sourceOhm','isOhmPc', 'nodownload', 'hiddenHeaderFooter'],
96
96
  filters: {
97
97
  imageStyle: function (html) {
98
98
  //富文本内图片自适应高度宽度
@@ -115,6 +115,8 @@
115
115
  drawer:false
116
116
  }
117
117
  },
118
+ mounted() {
119
+ },
118
120
  methods:{
119
121
  // 将匹配结果替换表情图片
120
122
  emotion(res) {
@@ -235,7 +237,7 @@
235
237
  this.$emit("onRadioClick", id, name, apikey,optionApiKey);
236
238
  },
237
239
  onImageClick(url){
238
- this.$emit('onImageClick', encodeURI(url))
240
+ this.$emit('onImageClick',url)
239
241
  },
240
242
  msgContent(content){
241
243
  console.debug('215',content)
@@ -366,12 +368,6 @@
366
368
  display: block;
367
369
  }
368
370
  }
369
- /deep/ img {
370
- height: auto;
371
- width: calc(100vw - 137px);
372
- border-radius: 25px;
373
- max-width: 230px;
374
- }
375
371
  }
376
372
  /deep/.el-drawer__body{
377
373
  height: 100%;