askbot-dragon 1.5.78-beta → 1.5.78

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 (46) hide show
  1. package/package.json +1 -4
  2. package/public/index.html +1 -3
  3. package/src/assets/image/default_avt_ui.png +0 -0
  4. package/src/assets/image/filtType/audio.png +0 -0
  5. package/src/assets/image/filtType/excel1.png +0 -0
  6. package/src/assets/image/filtType/general.png +0 -0
  7. package/src/assets/image/filtType/image1.png +0 -0
  8. package/src/assets/image/filtType/link.png +0 -0
  9. package/src/assets/image/filtType/md2.png +0 -0
  10. package/src/assets/image/filtType/mode.png +0 -0
  11. package/src/assets/image/filtType/news.png +0 -0
  12. package/src/assets/image/filtType/pdf1.png +0 -0
  13. package/src/assets/image/filtType/ppt1.png +0 -0
  14. package/src/assets/image/filtType/selfadd1.png +0 -0
  15. package/src/assets/image/filtType/txt1.png +0 -0
  16. package/src/assets/image/filtType/video.png +0 -0
  17. package/src/assets/image/filtType/wechat.png +0 -0
  18. package/src/assets/image/filtType/word1.png +0 -0
  19. package/src/assets/image/loading.gif +0 -0
  20. package/src/assets/js/common.js +241 -0
  21. package/src/components/ActionAlertIframe.vue +43 -1
  22. package/src/components/AnswerDocknowledge.vue +849 -275
  23. package/src/components/ConversationContainer.vue +354 -27
  24. package/src/components/MyEditor.vue +351 -0
  25. package/src/components/answerRadio.vue +115 -61
  26. package/src/components/assetDetails.vue +13 -5
  27. package/src/components/associationIntention.vue +2 -2
  28. package/src/components/chatContent.vue +1 -1
  29. package/src/components/formTemplate.vue +77 -111
  30. package/src/components/intelligentSummary.vue +228 -0
  31. package/src/components/pdfPosition.vue +23 -12
  32. package/src/components/previewDoc.vue +5 -0
  33. package/src/components/previewPdf.vue +675 -199
  34. package/src/components/welcomeKnowledgeFile.vue +341 -0
  35. package/src/components/welcomeLlmCard.vue +141 -0
  36. package/src/components/welcomeSuggest.vue +98 -0
  37. package/src/main.js +0 -3
  38. package/vue.config.js +0 -1
  39. package/src/components/utils/ckeditorImageUpload/command.js +0 -110
  40. package/src/components/utils/ckeditorImageUpload/editing.js +0 -12
  41. package/src/components/utils/ckeditorImageUpload/plugin-image.js +0 -12
  42. package/src/components/utils/ckeditorImageUpload/toolbar-ui.js +0 -41
  43. package/src/components/utils/ckeditorfileUpload/common.js +0 -182
  44. package/src/components/utils/ckeditorfileUpload/editing.js +0 -12
  45. package/src/components/utils/ckeditorfileUpload/plugin_file.js +0 -12
  46. package/src/components/utils/ckeditorfileUpload/toolbar_ui.js +0 -34
@@ -1,9 +1,5 @@
1
1
  <template>
2
- <div class="pdf_view" ref="pdfView" @scroll="pdfScroll" :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>
@@ -17,6 +13,7 @@
17
13
  </el-option>
18
14
  </el-select>
19
15
  </div>
16
+ <div class="pdf_container_view" id="pdf_container_view" @scroll="pdfScroll" ref="pdfView"></div>
20
17
  <div class="btn_footer" v-if="tagIds.length > 1 && !isPC">
21
18
  <div class="prev" @click="prev">上一段</div>
22
19
  <div class="next" @click="next">下一段</div>
@@ -29,9 +26,13 @@
29
26
  </div>
30
27
  </div>
31
28
  </template>
32
-
33
29
  <script>
30
+ // :style="{
31
+ // marginBottom: tagIds.length > 1 ? '60px' : '0px',
32
+ // height: setHeight
33
+ // }"
34
34
  import _ from 'lodash'
35
+ import { newInitWaterMark } from "../assets/js/common";
35
36
  // import * as pdfjsLib from 'pdfjs-dist'
36
37
  // pdfjsLib.GlobalWorkerOptions.workerSrc = 'pdfjs-dist/build/pdf.worker';
37
38
  // import { TextLayerBuilder } from "pdfjs-dist/web/pdf_viewer";
@@ -47,7 +48,7 @@ const { TextLayerBuilder } = window['pdfjs-dist/web/pdf_viewer']
47
48
  // import { zoomElement } from '../assets/js/hammer'
48
49
  export default {
49
50
  name: 'pdfView',
50
- props: ['tagIds', 'isMessageRecord'],
51
+ props: ['tagIds', 'isMessageRecord','textWatermarkStr'],
51
52
  data () {
52
53
  return {
53
54
  url: '',
@@ -258,6 +259,9 @@ export default {
258
259
  this.contentView.style.paddingBottom = '60px'
259
260
  // contentView.style.overflowY = 'auto'
260
261
  this.$refs.pdfView.appendChild(this.contentView);
262
+ if (this.textWatermarkStr){
263
+ newInitWaterMark('pdf_container_view',this.textWatermarkStr)
264
+ }
261
265
  }
262
266
  this.renderPages(pageIndex)
263
267
  },
@@ -444,7 +448,7 @@ export default {
444
448
  endNum = startNum + Math.ceil(height / (that.pageSize.height + that.PAGE_INTVERVAL))
445
449
  }
446
450
  for (let pageIndex = startNum; pageIndex < endNum; pageIndex++) {
447
- if (pageIndex > 0 && pageIndex < that.pages.length) {
451
+ if (pageIndex > 0 && pageIndex <= that.pages.length) {
448
452
  that.loadPdfData(pageIndex)
449
453
  }
450
454
  }
@@ -864,6 +868,7 @@ export default {
864
868
  // 在 pdf_view 下创建 所有canvs的容器
865
869
  this.contentView = document.createElement('div')
866
870
  this.contentView.style.transformOrigin = '0px 0px 0px'
871
+ this.contentView.setAttribute('id','contentView');
867
872
  this.$http.get('/knowledge-api/knowledge/knowledge-part-location-info/list?ids=' + value.join(',')).then(res => {
868
873
  // res.data = {"data":[{"id":"64591b7d8bb8ab1b91c65f24","knowledgeId":"64591a9c8da27649473f3b4b","mainId":"fb348d095c0b4fd7bbd37826563dac7d","page":3,"total":18,"pageHeight":540.0,"pageWidth":960.00946,"publicPageFileUrl":"https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/fb348d095c0b4fd7bbd37826563dac7d/2023/05/08/11/55/18/64591b638bb8ab1b91c65eed/3.pdf","extractInfo":{"location":[280.488,161.32,398.71573,61.99298],"content":"黄花城水长城旅游区位于北京市怀柔区九渡河镇境内,距北京市区65公里,是以奇而著称,融山川、碧水、古长城为一体的旅游休闲胜地。而这里的“三绝景”更是引人入","lines":[{"content":"黄花城水长城旅游区位于北京市怀柔区九渡河镇境内,距","location":[280.488,161.32,398.71573,15.9869995]},{"content":"北京市区65公里,是以奇而著称,融山川、碧水、古长","location":[283.691,184.30899,392.3055,15.9869995]},{"content":"城为一体的旅游休闲胜地。而这里的“三绝景”更是引人入","location":[282.699,207.32599,394.3033,15.9869995]}],"tagId":null}}],"code":"0","msg":null,"traceId":null}
869
874
  // res.data = {"data":[{"id":"64590ce1eb1320043401cc90","knowledgeId":"64590cd5017b461d67e282e1","mainId":"fb348d095c0b4fd7bbd37826563dac7d","page":2,"total":5,"pageHeight":841.8898,"pageWidth":595.30396,"publicPageFileUrl":"https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/fb348d095c0b4fd7bbd37826563dac7d/2023/05/08/10/53/20/64590ce0eb1320043401cc7b/2.pdf","extractInfo":{"location":[89.32981,638.1907,415.15512,98.63251],"content":":北京地铁 13\r号线 :藤黄\r色 :西直门站—\r东直门站 :17 :41.\r5 :6\r准\rB :2002年\r09月\r28日 ","lines":[{"content":":北京地铁 13\r号线 ","location":[89.32981,638.1907,99.44599,98.63251]},{"content":":藤黄\r色 ","location":[188.7758,638.1907,46.79959,98.63251]},{"content":":西直门站—\r东直门站 ","location":[235.5754,638.1907,86.09996,98.63251]},{"content":":17 ","location":[321.67535,638.1907,36.200012,98.63251]},{"content":":41.\r5 ","location":[357.87537,638.1907,39.400696,98.63251]},{"content":":6\r准\rB ","location":[397.27606,638.1907,41.099,98.63251]},{"content":":2002年\r09月\r28日 ","location":[438.37506,638.1907,66.10986,98.63251]}],"tagId":null}}],"code":"0","msg":null,"traceId":null}
@@ -1030,9 +1035,9 @@ export default {
1030
1035
  // tagIds 会按照gpt识别的生成有序的数组,前端直接按照下标的顺序取就可以了
1031
1036
  // 缓存拿到的所有数据
1032
1037
  this.cachePdf = res.data.data
1033
- let publicPageFileUrl = res.data.data[0].publicPageFileUrl
1038
+ let publicPageFileUrl = res.data.data && res.data.data[0] ? res.data.data[0].publicPageFileUrl : ''
1034
1039
  this.currentPage = 0
1035
- if (publicPageFileUrl.substring(publicPageFileUrl.lastIndexOf('.')) === '.pdf') {
1040
+ if (publicPageFileUrl && publicPageFileUrl.substring(publicPageFileUrl.lastIndexOf('.')) === '.pdf') {
1036
1041
  this.preViewType = 'pdf'
1037
1042
  this.setPageAllLine(this.cachePdf)
1038
1043
  this.getpdfResloutePage(res.data.data[0])
@@ -1098,12 +1103,12 @@ export default {
1098
1103
  <style lang="less" scoped>
1099
1104
  .pdf_view {
1100
1105
  width: 100%;
1101
- height: calc(100% - 110px);
1106
+ // height: calc(100% - 110px);
1107
+ height: 100%;
1102
1108
  overflow: auto;
1103
1109
  background-color: #f5f7fb;
1104
1110
  // margin-bottom: 60px;
1105
1111
  box-sizing: border-box;
1106
-
1107
1112
  // position: relative;
1108
1113
  // > div {
1109
1114
  // width: 100%;
@@ -1292,6 +1297,12 @@ export default {
1292
1297
  background: rgba(221, 222, 223, 1);
1293
1298
  }
1294
1299
  }
1300
+ .pdf_container_view{
1301
+ height: 100%;
1302
+ width: 100%;
1303
+ position: relative;
1304
+ overflow: auto;
1305
+ }
1295
1306
  }
1296
1307
  </style>
1297
1308
  <style lang="less">
@@ -1,4 +1,9 @@
1
+ <!-- preview-document
2
+ 组件主要负责 富文本中配置的链接,图片 及上传附件下的附件列表中的单纯预览
3
+ 走的是kkview项目预览或者iframe直接打开文件地址,不对预览文件解析不包含其他功能开发
4
+ -->
1
5
  <template>
6
+
2
7
  <div class="previewDoc">
3
8
  <div class="footer">
4
9
  <span>查看详情</span>