askbot-dragon 1.6.44-beta → 1.6.45-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askbot-dragon",
3
- "version": "1.6.44-beta",
3
+ "version": "1.6.45-beta",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -27,14 +27,12 @@
27
27
  <span>{{ typedContent }}</span>
28
28
  </div>
29
29
  <div class="intelligentBottom" v-if="recommendQuestions.length > 0">
30
- <div class="intelligentList">
31
- <div class="intelligentQues"
32
- v-for="(item,index) in recommendQuestions"
33
- :key="index"
34
- @click="recommendQues(item)"
35
- >
36
- {{ item }}
37
- </div>
30
+ <div class="intelligentQues"
31
+ v-for="(item,index) in recommendQuestions"
32
+ :key="index"
33
+ @click="recommendQues(item)"
34
+ >
35
+ {{ item }}
38
36
  </div>
39
37
  </div>
40
38
  </div>
@@ -66,14 +64,16 @@ export default {
66
64
  console.log('res',res)
67
65
  if (res.data.data){
68
66
  this.summary = res.data.data.summary;
69
- this.recommendQuestions = res.data.data.recommendQuestions ? res.data.data.recommendQuestions : [];
67
+ this.recommendQuestions = res.data.data.recommendQuestions ? res.data.data.recommendQuestions.splice(0,5) : [];
70
68
  if (!this.summary){
71
69
  this.regeneration();
72
70
  } else {
73
- this.$emit('getSummarySuccess')
74
- this.startTypingEffect();
71
+ this.typedContent = this.summary;
75
72
  }
76
73
  }
74
+ this.$nextTick(() => {
75
+ this.$emit('getSummarySuccess')
76
+ })
77
77
  })
78
78
  },
79
79
  regeneration(){
@@ -91,9 +91,12 @@ export default {
91
91
  console.log('regeneration',res)
92
92
  if (res.data.data){
93
93
  this.summary = res.data.data.summary;
94
- this.recommendQuestions = res.data.data.recommendQuestions ? res.data.data.recommendQuestions : [];
95
- this.$emit('getSummarySuccess')
94
+ this.recommendQuestions = res.data.data.recommendQuestions ? res.data.data.recommendQuestions.splice(0,5) : [];
96
95
  this.startTypingEffect();
96
+ } else {
97
+ this.$nextTick(() => {
98
+ this.$emit('getSummarySuccess')
99
+ })
97
100
  }
98
101
  this.isLoading = false;
99
102
  })
@@ -112,6 +115,9 @@ export default {
112
115
  i++;
113
116
  } else {
114
117
  clearInterval(interval);
118
+ setTimeout(() => {
119
+ this.$emit('getSummarySuccess')
120
+ },240)
115
121
  }
116
122
  }, this.typingSpeed);
117
123
  },
@@ -173,17 +179,12 @@ export default {
173
179
  }
174
180
  .intelligentBottom{
175
181
  background: #F9FAFD;
176
- padding: 0 10px;
177
- height: 50px;
182
+ padding: 0 20px;
178
183
  border-bottom-left-radius: 20px;
179
184
  border-bottom-right-radius: 20px;
180
- .intelligentList{
181
- overflow-x: scroll;
182
- overflow-y: hidden;
183
- display: flex;
184
- align-items: center;
185
- height: 50px;
186
- }
185
+ display: flex;
186
+ align-items: center;
187
+ flex-wrap: wrap;
187
188
  .intelligentQues{
188
189
  height: 26px;
189
190
  display: flex;
@@ -193,7 +194,9 @@ export default {
193
194
  background: #E5EBFF;
194
195
  color: #366AFF;
195
196
  border-radius: 10px;
196
- margin-right: 10px;
197
+ margin-right: 5px;
198
+ margin-top: 5px;
199
+ margin-bottom: 5px;
197
200
  font-size: 12px;
198
201
  cursor: pointer;
199
202
  white-space: nowrap;
@@ -77,6 +77,8 @@
77
77
  :knowledgeId="knowledgeId"
78
78
  @closeSummary="closeSummary"
79
79
  @recommendQues="recommendQues"
80
+ @getSummarySuccess="getSummarySuccess"
81
+ :style="{marginTop:tagIds && tagIds.length != 0 ? '50px' : ''}"
80
82
  ></intelligent-summary>
81
83
  <template v-if="tagIds && tagIds.length != 0 && drawer">
82
84
  <pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord" :fileName="fileName" :knowledgeItem="watermark" ref="pdfPosition"></pdfPosition>
@@ -187,6 +189,20 @@ export default {
187
189
  }
188
190
  })
189
191
  })
192
+ },
193
+ showSummary:{
194
+ handler(val){
195
+ if (!val){
196
+ this.$nextTick(() => {
197
+ let preCon = document.querySelector('.pdf_view');
198
+ if (preCon){
199
+ preCon.style.height = 'calc(100% - ' + 50 + 'px)'
200
+ }
201
+ })
202
+ } else {
203
+ this.getSummarySuccess();
204
+ }
205
+ }
190
206
  }
191
207
  },
192
208
  computed:{
@@ -283,7 +299,23 @@ export default {
283
299
  if (this.showSummary){
284
300
  document.getElementById('drawer_content_pre').scrollTop = 0;
285
301
  }
286
- }
302
+ },
303
+ getSummarySuccess(){
304
+ this.$nextTick(() => {
305
+ if (this.tagIds.length > 0){
306
+ let intelligentSummary = document.getElementById('intelligentSummary');
307
+ let preCon = document.querySelector('.pdf_view')
308
+ console.log('intelligentSummary',preCon,intelligentSummary)
309
+ if (intelligentSummary){
310
+ let height = intelligentSummary.offsetHeight + 100;
311
+ if (preCon){
312
+ preCon.style.height = 'calc(100% - ' + height + 'px)'
313
+ }
314
+ console.log('height',height,preCon)
315
+ }
316
+ }
317
+ })
318
+ },
287
319
  },
288
320
  beforeDestroy() {
289
321
  window.removeEventListener('message', this.handleIframeMessage);