askbot-dragon 1.6.59-beta → 1.6.62-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.59-beta",
3
+ "version": "1.6.62-beta",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -1,9 +1,5 @@
1
1
  <template>
2
- <div class="pdf_view" id="pdf_view" :style="{
3
- marginTop: isPC ? '50px' : '',
4
- marginBottom: tagIds.length > 1 ? '60px' : '0px',
5
- height: setHeight
6
- }">
2
+ <div class="pdf_view" id="pdf_view">
7
3
  <div class="change_scale" v-if="isPC">
8
4
  <section @click="changeScale('reduce')">
9
5
  <i class="el-icon-minus"></i>
@@ -30,8 +26,11 @@
30
26
  </div>
31
27
  </div>
32
28
  </template>
33
-
34
29
  <script>
30
+ // :style="{
31
+ // marginBottom: tagIds.length > 1 ? '60px' : '0px',
32
+ // height: setHeight
33
+ // }"
35
34
  import _ from 'lodash'
36
35
  import { newInitWaterMark } from "../assets/js/common";
37
36
  // import * as pdfjsLib from 'pdfjs-dist'
@@ -1275,7 +1274,8 @@ export default {
1275
1274
  <style lang="less" scoped>
1276
1275
  .pdf_view {
1277
1276
  width: 100%;
1278
- height: calc(100% - 110px);
1277
+ // height: calc(100% - 110px);
1278
+ height: 100%;
1279
1279
  overflow: auto;
1280
1280
  //overflow-y: scroll;
1281
1281
  background-color: #f5f7fb;
@@ -45,7 +45,7 @@
45
45
  :with-header="false"
46
46
  :append-to-body="true"
47
47
  :destroy-on-close="true"
48
- :model="false"
48
+ :modal="false"
49
49
  :direction="previewShowPopup ? 'btt' : 'rtl'"
50
50
  :size="previewShowPopup ? '90%' : '65%'"
51
51
  custom-class="pdf-preview-drawer"
@@ -90,9 +90,9 @@
90
90
  @getSummarySuccess="getSummarySuccess"
91
91
  :style="{marginTop:tagIds && tagIds.length != 0 && isPc ? '50px' : ''}"
92
92
  ></intelligent-summary>
93
- <template v-if="tagIds && tagIds.length != 0 && drawer">
94
- <pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord" :fileName="fileName" :textWatermarkStr="textWatermarkStr" ref="pdfPosition"></pdfPosition>
95
- </template>
93
+ <div class="pdf_positon" :style="pdfStyle" v-if="tagIds && tagIds.length != 0 && drawer">
94
+ <pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord" :textWatermarkStr="textWatermarkStr"></pdfPosition>
95
+ </div>
96
96
  <template v-else>
97
97
  <div v-if="fileType == 'VIDEO'" style="width: 100%;">
98
98
  <video :src="url" controls width="100%;" height="98%"></video>
@@ -175,7 +175,7 @@ export default {
175
175
  },
176
176
  isHasChat:{
177
177
  type:Boolean,
178
- default:false
178
+ default:true
179
179
  },
180
180
  knowledgeId:{
181
181
  type: String,
@@ -214,14 +214,17 @@ export default {
214
214
  },
215
215
  showSummary:{
216
216
  handler(val){
217
- if (!val){
218
- this.$nextTick(() => {
219
- let preCon = document.querySelector('.pdf_view');
220
- if (preCon){
221
- preCon.style.height = 'calc(100% - ' + 50 + 'px)'
222
- }
223
- })
224
- } else {
217
+ // if (!val){
218
+ // this.$nextTick(() => {
219
+ // let preCon = document.querySelector('.pdf_view');
220
+ // if (preCon){
221
+ // preCon.style.height = 'calc(100% - ' + 50 + 'px)'
222
+ // }
223
+ // })
224
+ // } else {
225
+ // this.getSummarySuccess();
226
+ // }
227
+ if(val) {
225
228
  this.getSummarySuccess();
226
229
  }
227
230
  }
@@ -235,6 +238,13 @@ export default {
235
238
  }
236
239
  },
237
240
  computed:{
241
+ pdfStyle() {
242
+ return {
243
+ paddingTop: this.isPc ? '30px' : '0', // 30px 是 加上外层的 20 流出 50的上边距展示 放大缩小操作栏
244
+ paddingBottom: this.tagIds > 1 ? '60px' : '0',
245
+ height: '100%'
246
+ }
247
+ },
238
248
  previewUrl() {
239
249
  console.debug('VUE_APP_ENV',process.env.VUE_APP_ENV)
240
250
  let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
@@ -304,7 +314,7 @@ export default {
304
314
  }).then(res =>{
305
315
  if (res.data.code == 0) {
306
316
  this.fileText = res.data.data
307
- this.loading = false
317
+ this.loading = false
308
318
  }
309
319
  })
310
320
  },
@@ -335,17 +345,20 @@ export default {
335
345
  },
336
346
  getSummarySuccess(){
337
347
  this.$nextTick(() => {
338
- if (this.tagIds.length > 0){
339
- let intelligentSummary = document.getElementById('intelligentSummary');
340
- let preCon = document.querySelector('.pdf_view')
341
- if (intelligentSummary){
342
- let height = intelligentSummary.offsetHeight + (this.isPc ? 100 : 50 );
343
- if (preCon){
344
- preCon.style.height = 'calc(100% - ' + height + 'px)'
345
- }
346
- console.log('height',height,preCon)
347
- }
348
- }
348
+ // if (this.tagIds.length > 0){
349
+ // let intelligentSummary = document.getElementById('intelligentSummary');
350
+ // let preCon = document.querySelector('.pdf_view')
351
+ // if (intelligentSummary){
352
+ // let height = intelligentSummary.offsetHeight + (this.isPc ? 100 : 50 );
353
+ // if (preCon){
354
+ // preCon.style.height = 'calc(100% - ' + height + 'px)'
355
+ // }
356
+ // console.log('height',height,preCon)
357
+ // }
358
+ // }
359
+ let intelligentSummary = document.getElementById('intelligentSummary');
360
+ let height = intelligentSummary.offsetHeight
361
+ this.pdfStyle.height = 'calc(100% - ' + height + 'px)'
349
362
  })
350
363
  },
351
364
  getTextWatermark(){
@@ -462,6 +475,10 @@ export default {
462
475
  border-right: none;
463
476
  text-align: center;
464
477
  }
478
+ .pdf_positon {
479
+ width: 100%;
480
+ box-sizing: border-box;
481
+ }
465
482
  }
466
483
  .onload_btn {
467
484
  width: 80px;
@@ -632,7 +649,7 @@ export default {
632
649
  }
633
650
  }
634
651
 
635
- @media screen and (min-width: 1350px) {
652
+ @media screen and (min-width: 1200px) {
636
653
  /* 这里是针对pc设备的css样式设置 */
637
654
  .el-drawer__wrapper {
638
655
  width: 55%;
@@ -651,4 +668,4 @@ export default {
651
668
  background: #FFF;
652
669
  }
653
670
  }
654
- </style>
671
+ </style>
@@ -41,6 +41,8 @@
41
41
  officePreviewType="pdf"
42
42
  @previewToDialog="previewToDialog"
43
43
  @recommendQues="recommendQues"
44
+ @close="close"
45
+ @open="open"
44
46
  :isHasChat="isHasChat"
45
47
  :knowledgeId="previewKnowledgeId"
46
48
  ></previewPdf>
@@ -198,20 +200,26 @@ export default {
198
200
  }
199
201
  })
200
202
  },
201
- previewToDialog(flag){
202
- if (!flag){
203
- this.$refs.previewPdf.previewKnowledgeId = ""
204
- } else {
205
- this.$refs.previewPdf.previewKnowledgeId = this.previewKnowledgeId
206
- }
207
- this.$emit('previewToDialog',flag,this.previewKnowledgeId,this.previewKnowledge)
208
- },
209
- clearKnowledgeId(){
210
- this.previewKnowledgeId = "";
211
- },
212
- recommendQues(item,knowledgeId){
213
- this.$emit('recommendQues',item,knowledgeId)
214
- }
203
+ previewToDialog(flag){
204
+ if (!flag){
205
+ this.$refs.previewPdf.previewKnowledgeId = ""
206
+ } else {
207
+ this.$refs.previewPdf.previewKnowledgeId = this.previewKnowledgeId
208
+ }
209
+ this.$emit('previewToDialog',flag,this.previewKnowledgeId,this.previewKnowledge)
210
+ },
211
+ clearKnowledgeId(){
212
+ this.previewKnowledgeId = "";
213
+ },
214
+ recommendQues(item,knowledgeId){
215
+ this.$emit('recommendQues',item,knowledgeId)
216
+ },
217
+ open() {
218
+ this.$emit('openPreviewDialog')
219
+ },
220
+ close() {
221
+ this.$emit('closePreviewDialog')
222
+ },
215
223
  }
216
224
  };
217
225
  </script>