askbot-dragon 1.7.83-beta → 1.7.84-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.
@@ -108,7 +108,7 @@
108
108
  :textWatermarkStr="textWatermarkStr"
109
109
  :knowledgeId="knowledgeId" :tagIds="tagIds" :url="previewHref"></new-position-preview>
110
110
  <template v-else>
111
- <div v-if="fileType == 'VIDEO'" style="width: 100%;height: 100%">
111
+ <div v-if="fileType == 'VIDEO'" style="width: 100%;">
112
112
  <video :src="url" controls width="100%;" height="98%"></video>
113
113
  </div>
114
114
  <div v-else-if="fileType == 'HTML'" style="width: 100%;">
@@ -154,170 +154,166 @@ import { isMobile } from "../assets/js/common";
154
154
  import { Toast } from 'vant';
155
155
  import NewPositionPreview from "./preview/newPositionPreview";
156
156
  export default {
157
- data() {
158
- return {
159
- previewShowPopup: false,
160
- fileText: '',
161
- fileType: "",
162
- isPc: false,
163
- drawer: false,
164
- tagIds: [],
165
- // '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
166
- loading: true,
167
- fileName: '',
168
- previewKnowledgeId: "",
169
- showSummary: false,
170
- iframeHeight: "100%",
171
- isDownload: false,
172
- textWatermarkStr: "",
173
- copy: '',
174
- newVersion: '',
175
- previewHref: "",
176
- newFileType: "",
177
- numberPage: 0,
178
- pageChunkData: [],
179
- currentPage: 0
180
- }
181
- },
182
- mounted () {
183
- this.$i18n.locale = sessionStorage.getItem("systemLanguage") || 'cn';
184
- window.addEventListener('message', this.handleIframeMessage, false);
185
- this.isPcFun();
186
- },
187
- props: {
188
- url: {
189
- type: String,
190
- required: true,
191
- },
192
- officePreviewType: {
193
- type: String,
194
- default: ''
195
- },
196
- isMessageRecord: {
197
- type: Boolean,
198
- default: false,
199
- },
200
- sourceFileType: {
201
- type: String,
202
- default: '',
203
- },
204
- title: {
205
- type: String,
206
- default: ''
207
- },
208
- isHasChat: {
209
- type: Boolean,
210
- default: false
211
- },
212
- knowledgeId: {
213
- type: String,
214
- default: '',
215
- },
216
- previewOssPath: {
217
- type: String,
218
- default: '',
219
- },
220
- folderName: {
221
- type: String,
222
- default: '',
223
- },
224
- folderUrl: {
225
- type: String,
226
- default: '',
227
- },
228
- isLiBang: {
229
- type: Boolean,
230
- default: false
231
- },
232
- formKnowledgeManagement: {
233
- type: Boolean,
234
- default: false
235
- },
236
- mainId: {
237
- type: String,
238
- default: ''
239
- },
240
- userId: {
241
- type: String,
242
- default: ''
243
- }
157
+ data() {
158
+ return {
159
+ previewShowPopup: false,
160
+ fileText: '',
161
+ fileType: "",
162
+ isPc: false,
163
+ drawer: false,
164
+ tagIds: [],
165
+ // '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
166
+ loading: true,
167
+ previewKnowledgeId: "",
168
+ showSummary: false,
169
+ iframeHeight: "100%",
170
+ isDownload: false,
171
+ textWatermarkStr: "",
172
+ copy: '',
173
+ newVersion: '',
174
+ previewHref: "",
175
+ newFileType: "",
176
+ numberPage: 0,
177
+ pageChunkData: [],
178
+ currentPage: 0
179
+ }
180
+ },
181
+ mounted() {
182
+ this.$i18n.locale = sessionStorage.getItem("systemLanguage") || 'cn';
183
+ window.addEventListener('message', this.handleIframeMessage, false);
184
+ this.isPcFun();
185
+ },
186
+ props: {
187
+ url: {
188
+ type: String,
189
+ required: true,
190
+ },
191
+ officePreviewType: {
192
+ type: String,
193
+ default: ''
194
+ },
195
+ isMessageRecord: {
196
+ type: Boolean,
197
+ default: false,
198
+ },
199
+ sourceFileType: {
200
+ type: String,
201
+ default: '',
202
+ },
203
+ title: {
204
+ type: String,
205
+ default: ''
206
+ },
207
+ isHasChat: {
208
+ type: Boolean,
209
+ default: false
210
+ },
211
+ knowledgeId: {
212
+ type: String,
213
+ default: '',
214
+ },
215
+ previewOssPath: {
216
+ type: String,
217
+ default: '',
218
+ },
219
+ folderName: {
220
+ type: String,
221
+ default: '',
222
+ },
223
+ folderUrl: {
224
+ type: String,
225
+ default: '',
226
+ },
227
+ isLiBang: {
228
+ type: Boolean,
229
+ default: false
230
+ },
231
+ mainId: {
232
+ type: String,
233
+ default: ''
234
+ },
235
+ userId: {
236
+ type: String,
237
+ default: ''
238
+ }
244
239
  },
245
240
  components: {
246
241
  NewPositionPreview,
247
242
  IntelligentSummary,
248
243
  pdfPosition
249
244
  },
250
- watch: {
251
- drawer (value) {
252
- if (value) {
253
- this.$emit('open')
254
- this.$nextTick(() => {
255
- zoomElement(document.getElementById('drawer_content_pre'))
256
- })
257
- } else {
258
- this.$emit('close')
259
- }
260
- },
261
- showSummary: {
262
- handler (val) {
263
- // if (!val){
264
- // this.$nextTick(() => {
265
- // let preCon = document.querySelector('.pdf_view');
266
- // if (preCon){
267
- // preCon.style.height = 'calc(100% - ' + 50 + 'px)'
268
- // }
269
- // })
270
- // } else {
271
- // this.getSummarySuccess();
272
- // }
273
- if (val) {
274
- this.getSummarySuccess();
275
- }
276
- }
277
- },
278
- knowledgeId: {
279
- handler (val) {
280
- if (val) {
281
- this.getTextWatermark();
282
- }
283
- }
284
- }
285
- },
286
- computed: {
287
- pdfStyle () {
288
- return {
289
- paddingTop: this.isPc ? '30px' : '0', // 30px 是 加上外层的 20 流出 50的上边距展示 放大缩小操作栏
290
- paddingBottom: this.tagIds > 1 ? '60px' : '0',
291
- height: '100%'
245
+ watch: {
246
+ drawer(value) {
247
+ if (value) {
248
+ this.$emit('open')
249
+ this.$nextTick(() => {
250
+ zoomElement(document.getElementById('drawer_content_pre'))
251
+ })
252
+ } else {
253
+ this.$emit('close')
254
+ }
255
+ },
256
+ showSummary: {
257
+ handler(val) {
258
+ // if (!val){
259
+ // this.$nextTick(() => {
260
+ // let preCon = document.querySelector('.pdf_view');
261
+ // if (preCon){
262
+ // preCon.style.height = 'calc(100% - ' + 50 + 'px)'
263
+ // }
264
+ // })
265
+ // } else {
266
+ // this.getSummarySuccess();
267
+ // }
268
+ if (val) {
269
+ this.getSummarySuccess();
270
+ }
271
+ }
272
+ },
273
+ knowledgeId: {
274
+ handler(val) {
275
+ if (val) {
276
+ this.getTextWatermark();
277
+ }
278
+ }
292
279
  }
293
280
  },
294
- previewUrl () {
295
- console.debug('VUE_APP_ENV', process.env.VUE_APP_ENV)
296
- let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
297
- // if(this.url != '') {
298
- // if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
299
- // url += btoa(encodeURIComponent(this.url))
300
- // } else {
301
- // url += btoa(this.url)
302
- // }
303
- // }
304
- url = url + this.url
305
- if (this.sourceFileType == '.ppt' || this.sourceFileType == '.pptx' || this.sourceFileType == '.pdf') {
306
- url += '&officePreviewType=pdf'
307
- if (this.watermark) {
308
- url = this.watermark.textWatermarkValue ? (url += '&textWatermarkValue=' + this.watermark.textWatermarkValue) : url
309
- url = this.watermark.visitorWatermarkValue ? (url += '&visitorWatermarkValue=' + this.watermark.visitorWatermarkValue) : url
281
+ computed: {
282
+ pdfStyle() {
283
+ return {
284
+ paddingTop: this.isPc ? '30px' : '0', // 30px 是 加上外层的 20 流出 50的上边距展示 放大缩小操作栏
285
+ paddingBottom: this.tagIds > 1 ? '60px' : '0',
286
+ height: '100%'
310
287
  }
311
- let mainId = sessionStorage.getItem('_mainId')
312
- let userId = sessionStorage.getItem('_currentUserId')
313
- let test = process.env.VUE_APP_ENV === 'production'
314
- url += '&mainId=' + mainId+ '&userId=' + userId + '&test=' + test
315
- console.log('textWatermarkStr 216', this.textWatermarkStr)
288
+ },
289
+ previewUrl() {
290
+ console.debug('VUE_APP_ENV', process.env.VUE_APP_ENV)
291
+ let url = process.env.VUE_APP_ENV === 'production' ? 'https://kkfileview.askbot.cn/onlinePreview?url=' : 'https://test.open.askbot.cn/kkfileview/onlinePreview?url='
292
+ // if(this.url != '') {
293
+ // if(/[\u4E00-\u9FA5]+/g.test(this.url)) {
294
+ // url += btoa(encodeURIComponent(this.url))
295
+ // } else {
296
+ // url += btoa(this.url)
297
+ // }
298
+ // }
299
+ url = url + this.url
300
+ if (this.sourceFileType == '.ppt' || this.sourceFileType == '.pptx' || this.sourceFileType == '.pdf') {
301
+ url += '&officePreviewType=pdf'
302
+ }
303
+ if(sessionStorage.getItem('wxAuth') ) {
304
+ let wxAuth = JSON.parse(sessionStorage.getItem('wxAuth'))
305
+ let mainId = wxAuth.mainId ? wxAuth.mainId : ''
306
+ let userId = wxAuth.userId ? wxAuth.userId : ''
307
+ let test = wxAuth.test ? wxAuth.test : ''
308
+ let corpId = wxAuth.corpId ? wxAuth.corpId : ''
309
+ url += '&mainId=' + mainId + '&userId=' + userId + '&test=' + test + '&corpId=' + corpId
310
+ }
311
+ // console.log('textWatermarkStr 216', this.textWatermarkStr)
316
312
  if (this.textWatermarkStr) {
317
313
  url += '&textWatermarkValue=' + this.textWatermarkStr
318
314
  }
319
- }
320
- return url
315
+ return url
316
+ },
321
317
  // fileType() {
322
318
  // const fileType = this.url.substring(this.url.lastIndexOf('.'));
323
319
  // if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.mov') {
@@ -326,7 +322,7 @@ export default {
326
322
  // return 'OTHER'
327
323
  // }
328
324
 
329
- }
325
+ // }
330
326
  },
331
327
  methods: {
332
328
  load() {
@@ -627,7 +623,7 @@ export default {
627
623
  }
628
624
  },
629
625
  beforeDestroy() {
630
- window.removeEventListener('message', this.handleIframeMessage);
626
+ window.removeEventListener('message', this.handleIframeMessage);
631
627
  }
632
628
  }
633
629
  </script>
@@ -923,26 +919,26 @@ export default {
923
919
  align-items: center;
924
920
  justify-content: space-between;
925
921
 
926
- .header-right {
927
- display: flex;
928
- }
922
+ .header-right {
923
+ display: flex;
924
+ }
929
925
 
930
- .summaryBtn {
931
- flex: none;
932
- //width: 95px;
933
- height: 26px;
934
- padding: 0 8px;
935
- background: #ffffff;
936
- display: flex;
937
- align-items: center;
938
- justify-content: center;
939
- box-sizing: border-box;
940
- border: 1px solid #a1b9ff;
941
- border-radius: 15px;
942
- cursor: pointer;
943
- color: #366aff;
944
- margin-right: 10px;
945
- font-size: 14px;
926
+ .summaryBtn {
927
+ flex: none;
928
+ //width: 95px;
929
+ height: 26px;
930
+ padding: 0 8px;
931
+ background: #ffffff;
932
+ display: flex;
933
+ align-items: center;
934
+ justify-content: center;
935
+ box-sizing: border-box;
936
+ border: 1px solid #a1b9ff;
937
+ border-radius: 15px;
938
+ cursor: pointer;
939
+ color: #366aff;
940
+ margin-right: 10px;
941
+ font-size: 14px;
946
942
 
947
943
  i {
948
944
  font-size: 14px;
@@ -1045,11 +1041,15 @@ export default {
1045
1041
  height: 100%;
1046
1042
  }
1047
1043
 
1048
- #drawer_content_pre {
1049
- overflow: auto;
1050
- height: calc(100% - 50px);
1051
- background: #FFF;
1052
- }
1044
+ #drawer_content_pre {
1045
+ overflow: auto;
1046
+ height: calc(100% - 50px);
1047
+ background: #FFF;
1048
+ background-image: url('https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif');
1049
+ background-position: center;
1050
+ background-size: 50px;
1051
+ background-repeat: no-repeat;
1052
+ }
1053
1053
 
1054
1054
  .libang_content_pre {
1055
1055
  height: calc(100% - 64px) !important;
@@ -25,7 +25,7 @@ export default {
25
25
 
26
26
  }
27
27
  },
28
- props:['source','payload',"language", 'isShow'],
28
+ props:['source','payload', 'isShow'],
29
29
  computed: {
30
30
  messagePlateform() {
31
31
  if(this.payload) {
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable */
2
- import { multipartUpload, ossFileUrl } from "../../assets/js/AliyunIssUtil";
2
+ import { multipartUpload, ossFileUrl } from "./AliyunIssUtil";
3
3
  import { v4 as uuidv4 } from "uuid";
4
4
 
5
5
  const getPrivateOssConfig = () => {
@@ -92,11 +92,7 @@ export default {
92
92
  bindCode:{
93
93
  type: String,
94
94
  default: ''
95
- },
96
- language:{
97
- type: String,
98
- default: 'en'
99
- }
95
+ }
100
96
  },
101
97
  data () {
102
98
  return {
@@ -39,11 +39,7 @@ export default {
39
39
  clickFun (item) {
40
40
  this.$emit('llmCardClickFun', item)
41
41
  }
42
- },
43
- mounted() {
44
- let languageCode = sessionStorage.getItem('languageCode');
45
- console.log('languageCode',languageCode,this.$i18n.locale,localStorage.getItem('languageCode'))
46
- }
42
+ }
47
43
  };
48
44
  </script>
49
45
 
package/src/main.js CHANGED
@@ -71,6 +71,6 @@ Vue.prototype.requestUrl = requestUrl;
71
71
  Vue.prototype.utils = utils;
72
72
 
73
73
  new Vue({
74
- i18n,
75
74
  render: h => h(App),
75
+ i18n
76
76
  }).$mount('#app')