|
@@ -84,7 +84,7 @@
|
|
|
<ResBelong class="pd-filter-wrap" v-show="routerScope == 'school'" @pd-change="(data)=>{filterPeriod = data}"></ResBelong>
|
|
|
<div class="content-filter-wrap">
|
|
|
<Input v-model="keyWord" search size="small" :placeholder="$t('teachContent.searchText')" class="key-word-search" @on-change="searchKeyWord" @on-search="searchKeyWord" />
|
|
|
- <CheckboxGroup v-model="extFilter" @on-change="filterFileByExtension">
|
|
|
+ <CheckboxGroup v-model="extFilter" @on-change="filterFileByExtension">
|
|
|
<Checkbox :label="item" v-for="(item ,index) in extensions" :key="index">
|
|
|
<span>{{item}}</span>
|
|
|
</Checkbox>
|
|
@@ -186,7 +186,7 @@
|
|
|
{{$t('teachContent.notAudio')}}
|
|
|
</audio>
|
|
|
<img v-else-if="previewFile.type == 'image'" :src="previewFile.url" style="border-radius: 5px;max-height: 800px;max-width:870px;" />
|
|
|
- <embed v-else-if="previewFile.extension == 'PDF'" :src="previewFile.url" width="870" height="720" />
|
|
|
+ <iframe v-else-if="previewFile.extension == 'PDF'" :src="'/web/viewer.html?file=' + escapeBlobUrl" width='870' height='700' frameborder='1'></iframe>
|
|
|
<iframe v-else :src="'https://view.officeapps.live.com/op/view.aspx?src=' + escapeBlobUrl" width='870' height='700' frameborder='1'></iframe>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -837,16 +837,22 @@ export default {
|
|
|
xhr.send(formData);
|
|
|
})
|
|
|
},
|
|
|
+ /* 打开PDF文件进行预览 */
|
|
|
+ openPdf(url) {
|
|
|
+ window.open('/web/viewer.html?file=' + encodeURIComponent(url))
|
|
|
+ },
|
|
|
openPreviewFile(index) {
|
|
|
// if (this.fileListShow[index].extension == 'HTEX') {
|
|
|
// this.$Message.warning('暂未处理HTEX文件预览功能')
|
|
|
// return
|
|
|
// }
|
|
|
this.previewFile = this._.cloneDeep(this.fileListShow[index])
|
|
|
+ // PDF预览
|
|
|
if (this.activeType == 'image' || this.activeType == 'video') {
|
|
|
this.previewFile.url = this.previewFile.url.replace('thum/', '')
|
|
|
}
|
|
|
- if (this.fileListShow[index].type == 'image' || this.fileListShow[index].type == 'video' || this.fileListShow[index].extension == 'pdf') {
|
|
|
+ if (this.fileListShow[index].extension == 'PDF') {
|
|
|
+ this.escapeBlobUrl = encodeURIComponent(this.previewFile.url)
|
|
|
} else {
|
|
|
this.escapeBlobUrl = escape(this.previewFile.url)
|
|
|
}
|