文件查看方式

lvtianfang
吕天方 1 year ago
parent 47acb23fe8
commit 069fe29d04

@ -3,7 +3,7 @@
* @Author: kery.chen * @Author: kery.chen
* @Description: 总体概览左侧 * @Description: 总体概览左侧
* @Date: 2021-11-30 11:08:50 * @Date: 2021-11-30 11:08:50
* @LastEditTime: 2023-10-25 14:51:49 * @LastEditTime: 2023-10-31 16:34:08
* @FilePath : \\tcingiocpro\\src\\views\\privateOrder\\ecosphere\\components\\componentLeft.vue * @FilePath : \\tcingiocpro\\src\\views\\privateOrder\\ecosphere\\components\\componentLeft.vue
--> -->
<template> <template>
@ -1151,15 +1151,15 @@ export default {
this.fileExtension = row["材料路径"].substring( this.fileExtension = row["材料路径"].substring(
row["材料路径"].lastIndexOf(".") + 1 row["材料路径"].lastIndexOf(".") + 1
); );
let newarr = row["材料路径"].split("/"); // let newarr = row[""].split("/");
let lastArr = newarr.slice(newarr.indexOf("demo") + 1, newarr.length); // let lastArr = newarr.slice(newarr.indexOf("demo") + 1, newarr.length);
// console.log(row[''],'process.env.VUE_APP_BASE_API2') // console.log(row[''],'process.env.VUE_APP_BASE_API2')
if (this.fileExtension == "pdf") { if (this.fileExtension == "pdf") {
// this.pdfUrl = row['']; // this.pdfUrl = row[''];
// this.dialogDetails = true; // this.dialogDetails = true;
// console.log(this.pdfUrl,'this.pdfUrl') // console.log(this.pdfUrl,'this.pdfUrl')
// this.getNumPages(process.env.VUE_APP_BASE_API2 + row[""]); this.getNumPages(row["材料路径"]);
this.getNumPages("/demo" + "/" + lastArr.join("/")); // this.getNumPages("/demo" + "/" + lastArr.join("/"));
} else if ( } else if (
this.fileExtension === "docx" || this.fileExtension === "docx" ||
this.fileExtension === "doc" this.fileExtension === "doc"
@ -1293,7 +1293,7 @@ export default {
// console.log(this.fileExtension,'this.fileExtension') // console.log(this.fileExtension,'this.fileExtension')
if (this.fileExtension == "pdf") { if (this.fileExtension == "pdf") {
// this.pdfUrl = row['']; // this.pdfUrl = row[''];
this.getNumPages(process.env.VUE_APP_BASE_API2 + res.rows[0].fileUrl); this.getNumPages(res.rows[0].fileUrl);
this.dialogDetails = true this.dialogDetails = true
} else if ( } else if (
this.fileExtension === "docx" || this.fileExtension === "docx" ||
@ -1302,7 +1302,7 @@ export default {
axios({ axios({
method: "get", method: "get",
responseType: "blob", // responseType: "blob", //
url: process.env.VUE_APP_BASE_API2 + res.rows[0].fileUrl, url: res.rows[0].fileUrl,
}).then(({ data }) => { }).then(({ data }) => {
if (data) { if (data) {
this.$nextTick(() => { this.$nextTick(() => {

@ -1,8 +1,8 @@
<!-- <!--
* @Author: lough11 * @Author: lough11
* @Date: 2021-12-24 13:17:50 * @Date: 2021-12-24 13:17:50
* @LastEditors: lough * @LastEditors: JC9527
* @LastEditTime: 2022-11-15 22:38:43 * @LastEditTime: 2023-10-31 16:33:12
* @Description: * @Description:
--> -->
<template> <template>
@ -469,7 +469,7 @@ export default {
flex-wrap: wrap; flex-wrap: wrap;
margin-top: 20px; margin-top: 20px;
justify-content: space-between; justify-content: space-between;
align-content: start; align-content: flex-start;
.smallIcon { .smallIcon {
margin-top: 28px; margin-top: 28px;
height: 61px; height: 61px;

Loading…
Cancel
Save