askbot-dragon 1.7.35-beta → 1.7.37-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.35-beta",
3
+ "version": "1.7.37-beta",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -134,7 +134,7 @@
134
134
  d="M225.6 540.8C240 686.4 363.2 800 512 800c76.8 0 150.4-30.4 203.2-84.8 12.8-12.8 32-12.8 44.8 0s12.8 32 0 44.8c-64 65.6-153.6 104-248 104-184 0-336-142.4-350.4-323.2l-43.2 41.6c-12.8 12.8-33.6 11.2-44.8 0s-11.2-33.6 0-44.8l99.2-96c12.8-12.8 33.6-11.2 44.8 0l92.8 96c12.8 12.8 11.2 33.6-1.6 44.8-12.8 12.8-33.6 11.2-44.8-1.6l-38.4-40zM800 497.6C792 345.6 665.6 224 512 224c-76.8 0-148.8 30.4-203.2 83.2-12.8 12.8-33.6 12.8-44.8 0-12.8-12.8-12.8-33.6 0-44.8 65.6-64 153.6-102.4 248-102.4 192 0 347.2 153.6 352 342.4l41.6-40c12.8-12.8 33.6-11.2 44.8 1.6 12.8 12.8 11.2 33.6-1.6 44.8l-94.4 89.6c-12.8 11.2-32 11.2-44.8 0l-97.6-96c-12.8-12.8-12.8-32 0-44.8 12.8-12.8 32-12.8 44.8 0l43.2 40z"
135
135
  p-id="136176" fill="#366aff"></path>
136
136
  </svg>
137
- {{ $t('common.changeBatch') }}</span>
137
+ 换一批</span>
138
138
  </div>
139
139
  </div>
140
140
  </div>
@@ -5,7 +5,7 @@
5
5
  <template>
6
6
  <div class="answer-docknowledge">
7
7
  <div :class="['answer-docknowledge-header', msg.content.isKnowledgeSummary ? 'bgc' : '']">
8
- <div v-if="msg.content.isKnowledgeSummary" class="tips">{{$t('answerDocKnowledge.title')}}</div>
8
+ <div v-if="msg.content.isKnowledgeSummary" class="tips">AI为您总结生成了以下摘要</div>
9
9
  <!-- <div v-if="msg.content.type == 0" class="answer-text">
10
10
  <template v-if="msg.content.renderType == 1">
11
11
  <p v-html="msg.content.text"></p>
@@ -35,7 +35,7 @@
35
35
  <div class="alc-title">
36
36
  <div class="alc-box">
37
37
  <div class="alc-source-left">
38
- <span class="source-form">{{$t('answerDocKnowledge.sourceFrom')}}</span>
38
+ <span class="source-form">出自</span>
39
39
  <img class="alc-title-icon" height="24px" width="24px" :src="getIconSrc(item)" alt=""
40
40
  srcset="">
41
41
  <span class="alc-title-from">{{ item.from }}</span>
@@ -55,7 +55,7 @@
55
55
  {{ docSource[item.source] }}
56
56
  </div>
57
57
  <div v-show="item.url" class="alc-content-text">
58
- <span @click="lookAttach(item.url, item, $event)" class="aci-view">{{$t('answerDocKnowledge.view')}} ></span>
58
+ <span @click="lookAttach(item.url, item, $event)" class="aci-view">查看 ></span>
59
59
  </div>
60
60
  </div>
61
61
  </div>
@@ -79,15 +79,15 @@
79
79
  <div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex" class="ad-list-cell-recognition">
80
80
  <div class="alc-source-name" @click="lookAttach(item.url, item, $event)">
81
81
  <img class="alc-title-icon" height="18px" width="18px" :src="getIconSrc(item)" alt srcset />
82
- <span class="alc-title-from">{{ item.from }}</span>
82
+ <span class="alc-title-from">{{ item.from }}</span>&nbsp;-&nbsp;
83
83
  <div v-show="docSource[item.source]" class="upload-source">
84
- -{{ docSource[item.source] }}
84
+ {{ docSource[item.source] }}
85
85
  </div>
86
86
  <i class="iconfont guoran-right"></i>
87
87
  </div>
88
88
  </div>
89
89
  </template>
90
- <div class="ad-loadmore" v-if="loadMoreFlag" @click="lazyLoadKnowledegList">{{$t('common.loadMore')}}</div>
90
+ <div class="ad-loadmore" v-if="loadMoreFlag" @click="lazyLoadKnowledegList">查看更多</div>
91
91
  </div>
92
92
  </template>
93
93
  <template v-if="isLiBang">
@@ -97,7 +97,7 @@
97
97
  <div class="libang_title">
98
98
  <div class="libang_box">
99
99
  <div class="libang_source_left">
100
- <span class="source-form">{{$t('answerDocKnowledge.sourceFrom')}}</span>
100
+ <span class="source-form">出自</span>
101
101
  <img class="libang_title_icon" height="24px" width="24px" :src="getIconSrc(item)" alt=""
102
102
  srcset="">
103
103
  <span class="libang_title_from">{{ item.from }}</span>
@@ -123,7 +123,7 @@
123
123
  </div>
124
124
  </div>
125
125
  <div v-show="item.url" class="libang_content_text">
126
- <span @click="lookAttach(item.url, item, $event)" class="aci-view">{{$t('answerDocKnowledge.view')}} ></span>
126
+ <span @click="lookAttach(item.url, item, $event)" class="aci-view">查看 ></span>
127
127
  </div>
128
128
  </div>
129
129
  </div>
@@ -149,9 +149,9 @@
149
149
  <div class="libang_list_cell_left" >
150
150
  <div class="libang_source_name" >
151
151
  <img class="libang_title_icon" height="18px" width="18px" :src="getIconSrc(item)" alt srcset />
152
- <span class="libang_title_from">{{ item.from }}</span>
152
+ <span class="libang_title_from">{{ item.from }}</span>&nbsp;-&nbsp;
153
153
  <div v-show="docSource[item.source]" class="upload_source">
154
- -{{ docSource[item.source] }}
154
+ {{ docSource[item.source] }}
155
155
  </div>
156
156
  </div>
157
157
  <div class="libang_source_floder" @click.stop="clickFloder(item)">
@@ -162,7 +162,7 @@
162
162
  <i class="iconfont guoran-right" @click="lookAttach(item.url, item, $event)"></i>
163
163
  </div>
164
164
  </template>
165
- <div class="ad-loadmore" v-if="loadMoreFlag" @click="lazyLoadKnowledegList">{{$t('common.loadMore')}}</div>
165
+ <div class="ad-loadmore" v-if="loadMoreFlag" @click="lazyLoadKnowledegList">查看更多</div>
166
166
  </div>
167
167
  </template>
168
168
 
@@ -361,26 +361,21 @@ export default {
361
361
  this.$refs.previewPdf.previewShowPopup = false;
362
362
  this.$refs.previewPdf.drawer = false;
363
363
  this.previewOssPath = url;
364
- // let index = url.lastIndexOf('?')
364
+ let index = url.lastIndexOf('?')
365
365
  let type = ''
366
366
  let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate'
367
- // if (index !== -1) {
368
- // url = url.substring(0, index)
369
- // type = this.fileType(url)
370
- // } else {
371
- // type = this.fileType(url)
372
- // }
373
- // if (type === '' || type === 'OTHER' || type == 'IMAGE') {
374
- // httpUrl = httpUrl += '?needEncrypt=true'
375
- // } else {
376
- // httpUrl = httpUrl += '?needEncrypt=false'
377
- // }
378
- type = this.getFileType(url)
379
- if (type === 'VIDEO' || type === 'PDF' || type === 'EXCEL' || type === 'TXT' || type === 'DOC') {
380
- httpUrl += '?needEncrypt=false'
367
+ if (index !== -1) {
368
+ url = url.substring(0, index)
369
+ type = this.fileType(url)
370
+ } else {
371
+ type = this.fileType(url)
372
+ }
373
+ if (type === '' || type === 'OTHER' || type == 'IMAGE') {
374
+ httpUrl = httpUrl += '?needEncrypt=true'
381
375
  } else {
382
- httpUrl += '?needEncrypt=true'
376
+ httpUrl = httpUrl += '?needEncrypt=false'
383
377
  }
378
+ this.$refs.previewPdf.getOssPath(url);
384
379
  this.$http.post(httpUrl, {
385
380
  "fileInOssPath": url
386
381
  }).then(res => {
@@ -449,31 +444,6 @@ export default {
449
444
  return 'OTHER'
450
445
  }
451
446
  },
452
- getFileType(url){
453
- let index = url.lastIndexOf('?')
454
- let newFileInOssPath = url.substring(0, url.indexOf("?"))
455
- if (index == -1){
456
- newFileInOssPath = url
457
- }
458
- const fileType = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'));
459
- if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.MOVC' || fileType === '.mov' || fileType === '.movc') {
460
- return 'VIDEO'
461
- } else if (fileType === '.html') {
462
- return 'HTML'
463
- } else if (fileType === '.png' || fileType === '.jpg' || fileType === '.jpeg' || fileType === '.PNG' || fileType === '.JPG' || fileType === '.JPEG') {
464
- return 'IMAGE'
465
- } else if (fileType === '.docx'){
466
- return 'DOC'
467
- } else if (fileType === '.ppt' || fileType === '.pptx'){
468
- return 'PPT'
469
- } else if (fileType === '.pdf'){
470
- return 'PDF'
471
- } else if (fileType === '.txt'){
472
- return 'TXT'
473
- } else {
474
- return 'OTHER'
475
- }
476
- },
477
447
  srcContentTypeIMG (item) {
478
448
  let url = item.url || '';
479
449
  const type = url.substring(url.lastIndexOf('.'));
@@ -17,7 +17,7 @@
17
17
  )
18
18
  "
19
19
  >
20
- {{$t('actionSatisfaction.satisfaction')}}
20
+ 满意
21
21
  </div>
22
22
  <div
23
23
  class="statisfaction-item"
@@ -32,7 +32,7 @@
32
32
  )
33
33
  "
34
34
  >
35
- {{$t('actionSatisfaction.notSatisfied')}}
35
+ 不满意
36
36
  </div>
37
37
  </div>
38
38
 
@@ -4,7 +4,7 @@
4
4
  v-if="msg.content.description && !msg.content.isKnowledgeSummary"></p>
5
5
  <div class="bottom-link" v-if="msg.content.description && !msg.content.isKnowledgeSummary"></div>
6
6
  <div :class="['options-list', msg.content.isKnowledgeSummary ? 'isKnowledgeSummary' : '']">
7
- <div v-if="msg.content.isKnowledgeSummary" class="tips">{{$t('answerRadio.tip')}}</div>
7
+ <div v-if="msg.content.isKnowledgeSummary" class="tips">AI为您推荐了以下内容</div>
8
8
  <div v-for="(option, index) in showOptions" class="options-item"
9
9
  :class="index !== msg.content.options.length - 1 ? 'recommend-item' : 'last-item'" :key="msg.nodeId + '_' + index"
10
10
  @click="radioClick(msg, option, index)">
@@ -13,7 +13,7 @@
13
13
  </div>
14
14
  </div>
15
15
  <div v-if="showPage" class="switch-page">
16
- <span @click="changeActivePage" class="switch-page-btn">{{$t('answerRadio.loadMore')}}</span>
16
+ <span @click="changeActivePage" class="switch-page-btn">换一批</span>
17
17
  <!-- <span @click="showMore" class="switch-page-btn">查看更多</span> -->
18
18
  </div>
19
19
  </div>
@@ -71,7 +71,7 @@
71
71
  <previewDoc ref="previewDoc" :url="previewHref" :language="language" @close="close" v-if="previewShowPopup"></previewDoc>
72
72
  </van-popup>
73
73
  <el-drawer
74
- :title="$t('common.drawerTitle')"
74
+ :title="'我是标题'"
75
75
  :append-to-body="true"
76
76
  :model="false"
77
77
  :visible.sync="drawer"
@@ -3,11 +3,11 @@
3
3
  <div class="summaryHeader">
4
4
  <div class="left">
5
5
  <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
6
- <span>{{$t('previewPdf.intelligentSummary')}}</span>
6
+ <span>智能摘要</span>
7
7
  </div>
8
8
  <div class="right">
9
9
  <div class="regenerationBtn" @click="regeneration">
10
- <template v-if="!isLoading">{{$t('previewPdf.regeneration')}}</template>
10
+ <template v-if="!isLoading">重新生成</template>
11
11
  <template v-else>
12
12
  <img
13
13
  height="20px"
@@ -17,7 +17,7 @@
17
17
  srcset
18
18
  style="margin-right: 6px"
19
19
  />
20
- <span>{{$t('previewPdf.generating')}}</span>
20
+ <span>生成中</span>
21
21
  </template>
22
22
  </div>
23
23
  <i class="iconfont guoran-tongyichicun-shouqi" @click="closeSummary"></i>
@@ -12,14 +12,14 @@
12
12
  </div>
13
13
  <div v-if="isCompany">
14
14
  <div v-if="single === true" class="editMessage">
15
- <el-input v-model="input" :placeholder="$t('common.inputPlaceholder')" class="inputClass" @input="testClick" @blur="inputBlur"></el-input>
15
+ <el-input v-model="input" placeholder="请输入内容" class="inputClass" @input="testClick" @blur="inputBlur"></el-input>
16
16
  <!-- <span @click="quedingClick" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
17
17
  --> </div>
18
18
  <div v-if="date" class="editMessage">
19
19
  <el-date-picker
20
20
  v-model="dateValue"
21
21
  type="date"
22
- :placeholder="$t('common.selectDate')"
22
+ placeholder="选择日期"
23
23
  style="width: 100%;margin: 10px 0 10px 0"
24
24
  :clearable=false
25
25
  @change="dataclick"
@@ -31,7 +31,7 @@
31
31
  <div v-if="time" class="editMessage">
32
32
  <el-time-picker
33
33
  v-model="timeValue"
34
- :placeholder="$t('common.selectTime')"
34
+ placeholder="任意时间点"
35
35
  style="margin: 10px 0 10px 0;width: 100%"
36
36
  :clearable=false
37
37
  @change="dataclick"
@@ -43,7 +43,7 @@
43
43
  <el-date-picker
44
44
  v-model="dateTimeValue"
45
45
  type="datetime"
46
- :placeholder="$t('common.selectDateTime')"
46
+ placeholder="选择日期时间"
47
47
  style="width: 100%;margin: 10px 0 10px 0"
48
48
  @change="dataclick"
49
49
  >
@@ -92,7 +92,7 @@
92
92
  </div>
93
93
  <div v-if="isPhone">
94
94
  <div v-if="single" class="editMessage">
95
- <el-input v-model="input" :placeholder="$t('common.inputPlaceholder')" class="inputClass" @input="testClick" @blur="inputBlur"></el-input>
95
+ <el-input v-model="input" placeholder="请输入内容" class="inputClass" @input="testClick" @blur="inputBlur"></el-input>
96
96
  <!-- <span @click="quedingClick" style="display: flex;align-items: center"><i class="el-icon-success" style="color: #4C61E1;font-size: 32px;cursor: pointer"></i></span>
97
97
  --> </div>
98
98
  <div v-if="date">
@@ -113,7 +113,7 @@
113
113
  <van-datetime-picker
114
114
  v-model="timeValue"
115
115
  type="datetime"
116
- :title="$t('common.selectTime')"
116
+ title="选择时间"
117
117
  :min-date="minDate"
118
118
  :formatter="formatter"
119
119
  @cancel="showTimePicker = false"
@@ -134,7 +134,7 @@
134
134
  <van-datetime-picker
135
135
  v-model="dateTimeValue"
136
136
  type="datetime"
137
- :title="$t('common.selectDateTime')"
137
+ title="选择日期时间"
138
138
  :min-date="minDate"
139
139
  :formatter="formatter"
140
140
  @cancel="showDateTimePicker = false"
@@ -371,11 +371,11 @@ export default {
371
371
  }
372
372
  if(this.submit===true)
373
373
  {
374
- this.submitValue=this.$t('common.confirmed')
374
+ this.submitValue='已确认'
375
375
  }
376
376
  else
377
377
  {
378
- this.submitValue=this.$t('common.confirm')
378
+ this.submitValue='确认'
379
379
  }
380
380
  },
381
381
  methods:{
@@ -616,7 +616,7 @@ export default {
616
616
  infomation['template']=innerhtml.querySelector('#html').innerHTML
617
617
  infomation['apiKey']=this.text.apiKey
618
618
  this.$emit('submitClick',infomation,this.text.apiKey)
619
- this.submitValue=this.$t('common.confirmed')
619
+ this.submitValue='已确认'
620
620
  this.disableds=true
621
621
  },
622
622
  addZero(i){
@@ -8,20 +8,20 @@
8
8
  <section @click="changeScale('zoom')">
9
9
  <i class="el-icon-plus"></i>
10
10
  </section>
11
- <el-select size="small" v-model="handScale" @change="changeScale" :placeholder="$t('common.selectPlaceholder')">
11
+ <el-select size="small" v-model="handScale" @change="changeScale" placeholder="请选择">
12
12
  <el-option v-for="item in scaleList" :key="item.value" :label="item.label" :value="item.value">
13
13
  </el-option>
14
14
  </el-select>
15
15
  </div>
16
16
  <div class="pdf_container_view" id="pdf_container_view" @scroll="pdfScroll" ref="pdfView"></div>
17
17
  <div class="btn_footer" v-if="tagIds.length > 1 && !isPC">
18
- <div class="prev" @click="prev">{{$t('common.previous')}}</div>
19
- <div class="next" @click="next">{{$t('common.next')}}</div>
18
+ <div class="prev" @click="prev">上一段</div>
19
+ <div class="next" @click="next">下一段</div>
20
20
  </div>
21
21
  <div id="pagination" v-if="tagIds.length > 1 && isPC">
22
22
  <el-pagination :current-page="currentPage + 1" @current-change="currentChange" @prev-click="prev"
23
23
  @next-click="next" layout="slot, prev, pager, next" :page-size="1" :total="tagIds.length">
24
- <span class="total-class">{{$t('previewPdf.answer')}}{{ tagIds.length }}{{$t('previewPdf.answerTip')}}</span>
24
+ <span class="total-class">答案由{{ tagIds.length }}段内容生成</span>
25
25
  </el-pagination>
26
26
  </div>
27
27
  </div>
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <div class="popUp">
3
3
  <div class="topBtn">
4
- <span class="cancel" @click="closeBtn">{{$t('common.cancel')}}</span>
5
- <span class="sure" @click="sure">{{$t('common.confirm')}}</span>
4
+ <span class="cancel" @click="closeBtn">取消</span>
5
+ <span class="sure" @click="sure">确定</span>
6
6
  </div>
7
7
  <slot name="popup-header" class="popup-header"></slot>
8
8
  <div class="popup-content">
@@ -598,6 +598,7 @@ export default {
598
598
  async mounted() {
599
599
  window.addEventListener("resize", this.onResize);
600
600
  this.pdfFile = this.ossPath;
601
+ console.log('ossPath',this.ossPath)
601
602
  // this.clearPages();
602
603
  // this.loadPdf();
603
604
  },
@@ -619,6 +620,14 @@ export default {
619
620
  },
620
621
  immediate:true,
621
622
  deep:true
623
+ },
624
+ ossPath:{
625
+ handler(val){
626
+ if (val){
627
+ this.pdfFile = this.ossPath;
628
+ }
629
+ },
630
+ immediate:true
622
631
  }
623
632
  }
624
633
  };
@@ -6,7 +6,7 @@
6
6
 
7
7
  <div class="previewDoc">
8
8
  <div class="footer">
9
- <span>{{$t('common.viewDetail')}}</span>
9
+ <span>查看详情</span>
10
10
  <section @click="close">
11
11
  <i class="iconfont guoran-shanchu"></i>
12
12
  </section>
@@ -42,7 +42,7 @@
42
42
  <iframe class="preview_iframe" :src="previewUrl" style="border:none;"></iframe>
43
43
  </div>
44
44
  <div class="onload_btn" @click="downLoad">
45
- {{$t('common.download')}}
45
+ 下载
46
46
  </div>
47
47
  <div id="text">
48
48
  {{ copy }}
@@ -5,34 +5,34 @@
5
5
  另外增加了在知识项目中预览当前文件的一些功能
6
6
  -->
7
7
  <template>
8
- <el-drawer :title="$t('common.drawerTitle')" :visible.sync="drawer" :with-header="false" :append-to-body="true" :destroy-on-close="true"
8
+ <el-drawer :title="'我是标题'" :visible.sync="drawer" :with-header="false" :append-to-body="true" :destroy-on-close="true"
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
12
  <div class="drawer-header" :class="isLiBang ? 'libang_head' : ''" v-if="!isPc">
13
13
  <div class="header-btn btn_position">
14
14
  <div class="onload_btn" v-if="isDownload" @click="downLoad">
15
- {{$t('common.download')}}
15
+ 下载
16
16
  </div>
17
17
  <div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun" v-if="isHasChat">
18
18
  <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
19
- <span>{{$t('previewPdf.intelligentSummary')}}</span>
19
+ <span>智能摘要</span>
20
20
  </div>
21
21
  <template v-if="isHasChat">
22
22
  <div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
23
23
  <i class="iconfont guoran-wendapingjia"></i>
24
- {{$t('previewPdf.chat')}}
24
+ 聊一聊
25
25
  </div>
26
26
  <div class="chat chat_active" @click="previewToDialog(false)" v-else>
27
27
  <i class="iconfont guoran-wendapingjia"></i>
28
- {{$t('previewPdf.chat')}}
28
+ 聊一聊
29
29
  </div>
30
30
  </template>
31
31
  </div>
32
32
  <div class="header_title">
33
33
  <div class="header_close">
34
34
  <span class="title_left">
35
- {{ title ? title : $t('common.viewDetail') }}
35
+ {{ title ? title : '查看详情' }}
36
36
  </span>
37
37
  <section @click="close">
38
38
  <i class="iconfont guoran-shanchu"></i>
@@ -53,21 +53,21 @@
53
53
  </span>
54
54
  <div class="header-btn">
55
55
  <div class="onload_btn" v-if="isDownload" @click="downLoad">
56
- {{$t('common.download')}}
56
+ 下载
57
57
  </div>
58
58
  <div class="summaryBtn" :class="showSummary ? 'summaryActiveBtn' : ''" @click="summaryFun"
59
59
  v-if="isHasChat || formKnowledgeManagement">
60
60
  <i class="iconfont guoran-tongyichicun-write-29-jiqiren"></i>
61
- <span>{{$t('previewPdf.intelligentSummary')}}</span>
61
+ <span>智能摘要</span>
62
62
  </div>
63
63
  <template v-if="isHasChat">
64
64
  <div class="chat" @click="previewToDialog(true)" v-if="!previewKnowledgeId">
65
65
  <i class="iconfont guoran-wendapingjia"></i>
66
- {{$t('previewPdf.chat')}}
66
+ 聊一聊
67
67
  </div>
68
68
  <div class="chat chat_active" @click="previewToDialog(false)" v-else>
69
69
  <i class="iconfont guoran-wendapingjia"></i>
70
- {{$t('previewPdf.chat')}}
70
+ 聊一聊
71
71
  </div>
72
72
  </template>
73
73
  <section @click="close">
@@ -95,7 +95,7 @@
95
95
  <pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord" :textWatermarkStr="textWatermarkStr">
96
96
  </pdfPosition>
97
97
  </div>
98
- <new-position-preview v-else-if="newVersion" :knowledgeId="knowledgeId" :tagIds="tagIds" :url="url"></new-position-preview>
98
+ <new-position-preview v-else-if="newVersion" :knowledgeId="knowledgeId" :tagIds="tagIds" :url="previewHref"></new-position-preview>
99
99
  <template v-else>
100
100
  <div v-if="fileType == 'VIDEO'" style="width: 100%;height: 100%">
101
101
  <video :src="url" controls width="100%;" height="98%"></video>
@@ -150,7 +150,8 @@ export default {
150
150
  isDownload: false,
151
151
  textWatermarkStr:"",
152
152
  copy:'',
153
- newVersion:''}
153
+ newVersion:'',
154
+ previewHref:""}
154
155
  },
155
156
  mounted() {
156
157
  window.addEventListener('message',this.handleIframeMessage,false);
@@ -427,7 +428,7 @@ export default {
427
428
  selection.addRange(range);
428
429
  document.execCommand('copy');
429
430
  selection.removeAllRanges()
430
- Toast(this.$t('previewPdf.copyUrl'));
431
+ Toast('下载地址已复制,请前往Safari浏览器访问下载');
431
432
  this.close()
432
433
  },100)
433
434
  } else {
@@ -475,9 +476,52 @@ export default {
475
476
  clickFloder() {
476
477
  this.$emit('previewClickFloder')
477
478
  },
479
+ getOssPath(url){
480
+ let httpUrl = '/knowledge-api/knowledge/getTemporaryCertificate';
481
+ let type = this.getFileType(url)
482
+ if (type === 'VIDEO' || type === 'PDF' || type === 'EXCEL' || type === 'TXT' || type === 'DOC') {
483
+ httpUrl += '?needEncrypt=false'
484
+ } else {
485
+ httpUrl += '?needEncrypt=true'
486
+ }
487
+ this.$http.post(httpUrl, {
488
+ "fileInOssPath": url
489
+ }).then(res => {
490
+ console.log('getOssPath',res)
491
+ if (res.data.code == '0'){
492
+ this.previewHref = res.data.data;
493
+ }
494
+ })
495
+ },
496
+ getFileType(url){
497
+ let index = url.lastIndexOf('?')
498
+ let newFileInOssPath = url.substring(0, url.indexOf("?"))
499
+ if (index == -1){
500
+ newFileInOssPath = url
501
+ }
502
+ const fileType = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'));
503
+ if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.MOVC' || fileType === '.mov' || fileType === '.movc') {
504
+ return 'VIDEO'
505
+ } else if (fileType === '.html') {
506
+ return 'HTML'
507
+ } else if (fileType === '.png' || fileType === '.jpg' || fileType === '.jpeg' || fileType === '.PNG' || fileType === '.JPG' || fileType === '.JPEG') {
508
+ return 'IMAGE'
509
+ } else if (fileType === '.docx'){
510
+ return 'DOC'
511
+ } else if (fileType === '.ppt' || fileType === '.pptx'){
512
+ return 'PPT'
513
+ } else if (fileType === '.pdf'){
514
+ return 'PDF'
515
+ } else if (fileType === '.txt'){
516
+ return 'TXT'
517
+ } else {
518
+ return 'OTHER'
519
+ }
520
+ },
478
521
  //判断是否使用新定位组件
479
522
  getLocationInfo(){
480
523
  this.$http.get('/knowledge-api/knowledge/knowledge-part-location-info/list?ids=' + this.tagIds.join(',')).then(res => {
524
+ console.log('getLocationInfo',res)
481
525
  if (res.data.code == 0){
482
526
  if (res.data.data && res.data.data.length > 0 && res.data.data[0].extractVersion == 'v3'){
483
527
  this.newVersion = true;
@@ -31,7 +31,7 @@
31
31
  <!-- v-if="msgContent.totalCount > msgContent.knowledgeFileInfos.length" -->
32
32
 
33
33
  <div class="load_moreKnowledge" v-if="page < msgContent.totalPages" @click="loadMore">
34
- <span>{{$t('common.lodeMore')}}</span>
34
+ <span>查看更多</span>
35
35
  </div>
36
36
  </div>
37
37
  <previewPdf ref="previewPdf"
@@ -4,7 +4,7 @@
4
4
  <div class="title_desc">{{ msg.content.problemRecommendationDesc }}</div>
5
5
  <div class="title_change_batch" v-if="msg.content.page && msg.content.problemRecommendationValue.length > msg.content.pageCount" @click="changeBatch">
6
6
  <i class="iconfont guoran-tongyichicun-huanyipi"></i>
7
- <span>{{$t('common.changeBatch')}}</span>
7
+ <span>换一批</span>
8
8
  </div>
9
9
  </div>
10
10
  <div class="content">