|
@@ -519,7 +519,8 @@
|
|
|
class="el-dialog__header"
|
|
|
:close-on-click-modal="false"
|
|
|
>
|
|
|
- <div ref="file"></div>
|
|
|
+ <!-- <div ref="file"></div> -->
|
|
|
+ <iframe :src="imgVisbleURL" frameborder="0" width="100%" height="700%"></iframe>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="open33 = false">关 闭</el-button>
|
|
|
<!-- <el-button type="primary" @click="open33 = false">
|
|
@@ -751,6 +752,7 @@
|
|
|
// 点击右侧一级分类进去
|
|
|
Ids: null,
|
|
|
last: null,
|
|
|
+ imgVisbleURL:null
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -940,11 +942,6 @@
|
|
|
this.queryParams.pageNum = 1,
|
|
|
this.handleCurrentChangess()
|
|
|
}
|
|
|
- // if (row.subclassification == 0) {
|
|
|
- // this.parentId = "";
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // this.queryParams1.pageNum=1;
|
|
|
// 目录
|
|
|
listDirectoryinfo({
|
|
|
parentId: this.parentId,
|
|
@@ -1051,16 +1048,6 @@
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- // 文件名
|
|
|
- // this.form.fileName = this.form.file[0].name;
|
|
|
- // // 路径
|
|
|
- // this.form.parentDirName = this.form.file[0].url;
|
|
|
- // // 后缀
|
|
|
- // this.form.parentDirId = this.form.file[0].houZUI;
|
|
|
- // // 页数
|
|
|
- // this.form.theNumberPages = this.form.file[0].pageCount;
|
|
|
- // // 文件大小
|
|
|
- // this.form.fileSize = this.form.file[0].fileLength;
|
|
|
// // 目录名称
|
|
|
this.form.directoryName = this.form.subclassification;
|
|
|
this.form.bdglFileInfos = this.moreFile;
|
|
@@ -1209,16 +1196,21 @@
|
|
|
// 阅读按钮操作
|
|
|
ViewRead(row) {
|
|
|
if (row.parentDirId == ".docx" || row.parentDirId == ".doc") {
|
|
|
+ // let ext =row.substr(index)
|
|
|
+ let pdfurl = process.env.VUE_APP_BASE_API + row.parentDirName;
|
|
|
+ let url =+ encodeURIComponent(pdfurl)
|
|
|
+ console.log(url);
|
|
|
+ this.imgVisbleURL=`https://view.officeapps.live.com/op/view.aspx?src=${url}`
|
|
|
this.open33 = true;
|
|
|
- axios({
|
|
|
- method: "get",
|
|
|
- responseType: "blob", // 设置响应文件格式
|
|
|
- url: process.env.VUE_APP_BASE_API + row.parentDirName,
|
|
|
- }).then(({ data }) => {
|
|
|
- $(".docx").attr("id", "printArea");
|
|
|
+ // axios({
|
|
|
+ // method: "get",
|
|
|
+ // responseType: "blob", // 设置响应文件格式
|
|
|
+ // url: process.env.VUE_APP_BASE_API + row.parentDirName,
|
|
|
+ // }).then(({ data }) => {
|
|
|
+ // $(".docx").attr("id", "printArea");
|
|
|
|
|
|
- docx.renderAsync(data, this.$refs.file); // 渲染到页面预览
|
|
|
- });
|
|
|
+ // docx.renderAsync(data, this.$refs.file); // 渲染到页面预览
|
|
|
+ // });
|
|
|
} else if (row.parentDirId == ".pdf") {
|
|
|
this.previewDialog = true;
|
|
|
this.pdfurl = process.env.VUE_APP_BASE_API + row.parentDirName;
|