askbot-dragon 1.7.45-beta → 1.7.46-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.7.45-beta",
3
+ "version": "1.7.46-beta",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
package/public/index.html CHANGED
@@ -26,7 +26,7 @@
26
26
  <!-- 项目图标 -->
27
27
  <link rel="stylesheet" href="//at.alicdn.com/t/c/font_2913049_ee8dx548hg.css"/>
28
28
  <!-- iconfont图标 -->
29
- <link rel="stylesheet" href="//at.alicdn.com/t/c/font_2913049_mfmhkqumc7i.css"/>
29
+ <link rel="stylesheet" href="//at.alicdn.com/t/c/font_2913049_eje81c90ujh.css"/>
30
30
  <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
31
31
  <!-- aliyun-oss -->
32
32
  <script src="https://static.guoranbot.com/cdn-common/alyun-oss/aliyun-oss-sdk-6.17.1.min.js"></script>
@@ -426,7 +426,7 @@ export default {
426
426
  this.$refs.previewPdf.getBolb(item)
427
427
  }
428
428
  this.$refs.previewPdf.loadIframe(item)
429
- this.$refs.previewPdf.showSummary = true;
429
+ this.$refs.previewPdf.showSummary = false;
430
430
  })
431
431
  }
432
432
  })
@@ -131,7 +131,9 @@ export default {
131
131
  let dom = document.getElementsByClassName('setBgClass' + id);
132
132
  console.log('dom',dom)
133
133
  if (dom && dom.length > 0){
134
- dom.forEach(doms => {
134
+ let newDom = Array.from(dom)
135
+ console.log('newDom',newDom)
136
+ newDom.forEach(doms => {
135
137
  doms.style.backgroundColor = this.colors[colorIndex];
136
138
  })
137
139
  }
@@ -14,7 +14,7 @@
14
14
  :excelRowList="excelRowList"
15
15
  :tableChunkData="tableChunkData"
16
16
  ></excel-view>
17
- <pdf-view v-else-if="fileType === 'PDF'" ref="pdfView" :split_paragraphs="splitParagraph" :ossPath="url"></pdf-view>
17
+ <pdf-view v-else-if="fileType === 'PDF'" ref="pdfView" :split_paragraphs="splitParagraph" :ossPath="url" :isPC="isPC"></pdf-view>
18
18
  </div>
19
19
  <template v-if="splitParagraph.length > 1 && fileType !== 'XLS' && fileType !== 'XLSX'">
20
20
  <div class="btn_footer" v-if="!isPC">
@@ -104,10 +104,14 @@ export default {
104
104
  }
105
105
  this.fileType = res.data.data.fileType
106
106
  }
107
- if (this.fileType === 'XLS' || this.fileType === 'XLSX'){
108
- let dom = document.getElementById('drawer_content_pre');
109
- dom.style.height = 'calc(100% - 90px)'
110
- }
107
+ this.$nextTick(() => {
108
+ if (this.fileType === 'XLS' || this.fileType === 'XLSX'){
109
+ let dom = document.getElementById('drawer_content_pre');
110
+ if (dom){
111
+ dom.style.height = 'calc(100% - 90px)'
112
+ }
113
+ }
114
+ })
111
115
  })
112
116
  },
113
117
  currentChange (value) {
@@ -140,10 +144,14 @@ export default {
140
144
  } else if (this.fileType == 'DOC' || this.fileType == 'DOCX' || this.fileType == 'TXT'){
141
145
  if (this.splitParagraph[this.currentPage] && this.splitParagraph[this.currentPage].original_paragraph){
142
146
  const id = this.splitParagraph[this.currentPage].original_paragraph[0].paragraph_id;
143
- const dom = document.getElementById(id);
147
+ let dom = document.getElementById(id);
148
+ const paragraphs = this.$el.querySelectorAll(`[paragraph-id="${this.splitParagraph[this.currentPage].original_paragraph[0].paragraph_id}"]`);
144
149
  if (dom){
145
150
  dom.scrollIntoView({ behavior: 'smooth' });
146
151
  }
152
+ if (paragraphs && paragraphs.length > 0){
153
+ paragraphs[0].scrollIntoView({ behavior: 'smooth' })
154
+ }
147
155
  if (type === 'first'){
148
156
  if (dom){
149
157
  dom.classList.add('animation')
@@ -151,6 +159,12 @@ export default {
151
159
  dom.classList.remove('animation')
152
160
  }, 3000)
153
161
  }
162
+ if (paragraphs && paragraphs.length > 0){
163
+ paragraphs[0].classList.add('animation')
164
+ setTimeout(() => {
165
+ paragraphs[0].classList.remove('animation')
166
+ }, 3000)
167
+ }
154
168
  } else {
155
169
  for (let i=0;i<this.splitParagraph[this.currentPage].original_paragraph.length;i++){
156
170
  const id = this.splitParagraph[this.currentPage].original_paragraph[i].paragraph_id;
@@ -162,6 +176,13 @@ export default {
162
176
  dom.classList.remove('animation')
163
177
  }, 3000)
164
178
  }
179
+ if (paragraphs && paragraphs.length > 0){
180
+ paragraphs[0].scrollIntoView({ behavior: 'smooth' });
181
+ paragraphs[0].classList.add('animation')
182
+ setTimeout(() => {
183
+ paragraphs[0].classList.remove('animation')
184
+ }, 3000)
185
+ }
165
186
  }
166
187
  }
167
188
  } else if (this.splitParagraph[this.currentPage] && this.splitParagraph[this.currentPage].tableId){
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="pdfViewPage" id="pdfViewPage">
3
3
  <!-- 按钮容器 -->
4
- <div class="button-container">
4
+ <div class="button-container" v-if="false">
5
5
  <div class="change_scale">
6
6
  <section @click="zoomOut">
7
7
  <i class="el-icon-minus"></i>
@@ -62,6 +62,11 @@
62
62
  </div>
63
63
  </div>
64
64
  </div>
65
+
66
+ <div class="change_scale">
67
+ <i class="iconfont guoran-suoxiao1" @click="zoomOut"></i>
68
+ <i class="iconfont guoran-fangda1" @click="zoomIn"></i>
69
+ </div>
65
70
  </div>
66
71
  </template>
67
72
 
@@ -112,6 +117,10 @@ export default {
112
117
  ossPath:{
113
118
  type:String,
114
119
  default:""
120
+ },
121
+ isPC:{
122
+ type:Boolean,
123
+ default:true
115
124
  }
116
125
  },
117
126
  methods: {
@@ -670,7 +679,7 @@ export default {
670
679
  display: flex;
671
680
  flex-direction: column;
672
681
  gap: 10px;
673
- height: calc(100% - 30px);
682
+ height: 100%;
674
683
  overflow-y: auto;
675
684
  overflow-x: auto;
676
685
  margin: 0 auto;
@@ -733,40 +742,50 @@ canvas {
733
742
  .button-container {
734
743
  display: flex;
735
744
  justify-content: center;
736
- .change_scale {
737
- width: 100%;
738
- //height: 50px;
739
- //position: absolute;
740
- //top: 50px;
741
- margin-bottom: 10px;
742
- left: 0;
743
- background: #ffffff;
745
+ }
746
+ .change_scale {
747
+ height: 80px;
748
+ //padding: 10px;
749
+ width: 32px;
750
+ border-top-left-radius: 20px;
751
+ border-bottom-left-radius: 20px;
752
+ position: absolute;
753
+ right: 0;
754
+ top: calc(50% - 40px);
755
+ //top: 50px;
756
+ //margin-bottom: 10px;
757
+ //left: 0;
758
+ background: #ffffff;
759
+ border: 1px solid #A1B9FF;
760
+ display: flex;
761
+ flex-direction: column;
762
+ align-items: center;
763
+ justify-content: space-evenly;
764
+ //padding: 0 10px;
765
+ box-sizing: border-box;
766
+ i{
767
+ color: #366aff;
768
+ font-size: 20px;
769
+ }
770
+ section {
771
+ cursor: pointer;
772
+ width: 30px;
773
+ height: 30px;
774
+ margin-right: 5px;
775
+ border-radius: 5px;
744
776
  display: flex;
745
777
  align-items: center;
746
- //padding: 0 10px;
747
- box-sizing: border-box;
748
-
749
- section {
750
- cursor: pointer;
751
- width: 30px;
752
- height: 30px;
753
- margin-right: 5px;
754
- border-radius: 5px;
755
- display: flex;
756
- align-items: center;
757
- justify-content: center;
758
-
759
- i {
760
- font-weight: 900;
761
- }
762
- }
778
+ justify-content: center;
763
779
 
764
- section:hover {
765
- background: rgba(221, 222, 223, 1);
780
+ i {
781
+ font-weight: 900;
766
782
  }
767
783
  }
768
- }
769
784
 
785
+ section:hover {
786
+ background: rgba(221, 222, 223, 1);
787
+ }
788
+ }
770
789
  .search-nav {
771
790
  display: flex;
772
791
  align-items: center;
@@ -9,28 +9,38 @@
9
9
  :modal="formKnowledgeManagement ? true : false" :direction="previewShowPopup ? 'btt' : 'rtl'" :size="previewShowPopup ? '90%' : '65%'"
10
10
  custom-class="pdf-preview-drawer" v-if="drawer">
11
11
  <!-- v-else-if="drawer" -->
12
- <div class="drawer-header" :class="isLiBang ? 'libang_head' : ''" v-if="!isPc">
13
- <div class="header-btn btn_position">
14
- <div class="onload_btn" v-if="isDownload" @click="downLoad">
15
- 下载
16
- </div>
17
- <div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun" v-if="isHasChat">
18
- <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
19
- <span>智能摘要</span>
20
- </div>
21
- <template v-if="isHasChat">
22
- <div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
23
- <i class="iconfont guoran-wendapingjia"></i>
24
- 聊一聊
25
- </div>
26
- <div class="chat chat_active" @click="previewToDialog(false)" v-else>
27
- <i class="iconfont guoran-wendapingjia"></i>
28
- 聊一聊
12
+ <div class="drawer-header" :class="(isDownload || isHasChat) && isLiBang ? 'has_btn_libang_head' : (isLiBang ? 'libang_head' : (isDownload || isHasChat ? 'has_btn_head' : ''))" v-if="!isPc">
13
+ <div class="header_title">
14
+ <template v-if="isDownload || isHasChat">
15
+ <div class="top-header">
16
+ <div class="header-btn">
17
+ <div class="onload_btn" v-if="isDownload" @click="downLoad">
18
+ 下载
19
+ </div>
20
+ <div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun" v-if="isHasChat">
21
+ <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
22
+ <span>智能摘要</span>
23
+ </div>
24
+ <template v-if="isHasChat">
25
+ <div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
26
+ <i class="iconfont guoran-wendapingjia"></i>
27
+ 聊一聊
28
+ </div>
29
+ <div class="chat chat_active" @click="previewToDialog(false)" v-else>
30
+ <i class="iconfont guoran-wendapingjia"></i>
31
+ 聊一聊
32
+ </div>
33
+ </template>
34
+ </div>
35
+ <section @click="close">
36
+ <i class="iconfont guoran-shanchu"></i>
37
+ </section>
29
38
  </div>
39
+ <span class="title_left">
40
+ {{ title ? title : "查看详情" }}
41
+ </span>
30
42
  </template>
31
- </div>
32
- <div class="header_title">
33
- <div class="header_close">
43
+ <div class="header_close" v-else>
34
44
  <span class="title_left">
35
45
  {{ title ? title : '查看详情' }}
36
46
  </span>
@@ -116,7 +126,7 @@
116
126
  <template v-else>
117
127
  <iframe class="preview_iframe_kk" :src="previewUrl" style="border:none;"
118
128
  :style="{ height: iframeHeight }"></iframe>
119
- <template v-if="(newFileType === 'PPT' && pageChunkData.length > 1)">
129
+ <template v-if="!loading && (newFileType === 'PPT' && pageChunkData.length > 1)">
120
130
  <div class="btn_footer" v-if="!isPc">
121
131
  <div class="prev" @click="prev">上一段</div>
122
132
  <div class="next" @click="next">下一段</div>
@@ -557,6 +567,7 @@ export default {
557
567
  this.newVersion = "";
558
568
  this.$http.get('/knowledge-api/knowledge/knowledge-part-location-info/list?ids=' + this.tagIds.join(',')).then(res => {
559
569
  console.log('getLocationInfo',res)
570
+ this.pageChunkData = [];
560
571
  if (res.data.code == 0){
561
572
  if (res.data.data && res.data.data.length > 0 && res.data.data[0].extractVersion == 'v3'){
562
573
  this.newVersion = true;
@@ -570,7 +581,7 @@ export default {
570
581
  }
571
582
  if (this.pageChunkData.length > 1){
572
583
  let iframe = document.getElementsByClassName('preview_iframe_kk')
573
- if (iframe){
584
+ if (iframe && iframe.length > 0){
574
585
  iframe[0].style.paddingBottom = '50px'
575
586
  }
576
587
  }
@@ -878,7 +889,12 @@ export default {
878
889
  .libang_head {
879
890
  height: 64px !important;
880
891
  }
881
-
892
+ .has_btn_libang_head{
893
+ height: 85px!important;
894
+ }
895
+ .has_btn_head{
896
+ height: 60px!important;
897
+ }
882
898
  .drawer-header {
883
899
  width: 100%;
884
900
  height: 50px;
@@ -972,6 +988,12 @@ justify-content: space-between;
972
988
  margin-right: 8px;
973
989
  }
974
990
  }
991
+ .top-header{
992
+ display: flex;
993
+ align-items: center;
994
+ justify-content: flex-end;
995
+ margin-bottom: 6px;
996
+ }
975
997
  .header_floder {
976
998
  display: flex;
977
999
  align-items: center;