|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
* @Author: kery.chen
|
|
|
|
|
* @Description: 总体概览左侧
|
|
|
|
|
* @Date: 2021-11-30 11:08:50
|
|
|
|
|
* @LastEditTime: 2023-10-23 16:51:32
|
|
|
|
|
* @LastEditTime: 2023-10-24 16:04:14
|
|
|
|
|
* @FilePath : \\tcingiocpro\\src\\views\\privateOrder\\ecosphere\\components\\componentLeft.vue
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
@ -339,10 +339,10 @@
|
|
|
|
|
v-if="fileExtension === 'pdf'"
|
|
|
|
|
class="file-content file-content-pdf"
|
|
|
|
|
>
|
|
|
|
|
<!-- <iframe style="height: 100%; width: 100%" :src="pdfUrl"></iframe> -->
|
|
|
|
|
<div v-for="i in numPages" :key="i">
|
|
|
|
|
<iframe style="height: 100%; width: 100%" :src="pdfUrl"></iframe>
|
|
|
|
|
<!-- <div v-for="i in numPages" :key="i">
|
|
|
|
|
<pdf ref="pdf" :key="i" :src="pdfUrl" :page="i"></pdf>
|
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
@ -964,15 +964,17 @@ export default {
|
|
|
|
|
}, 6000);
|
|
|
|
|
},
|
|
|
|
|
iconClick(row) {
|
|
|
|
|
// console.log(row);
|
|
|
|
|
console.log(row,'row');
|
|
|
|
|
if (row.URL) {
|
|
|
|
|
this.href = row.URL;
|
|
|
|
|
this.pageDetails = true;
|
|
|
|
|
} else if (row.网站域名) {
|
|
|
|
|
if (row.网站域名.substring(0, 4) === "http") {
|
|
|
|
|
console.log(row.网站域名,'row.网站域名')
|
|
|
|
|
this.href = row.网站域名;
|
|
|
|
|
this.pageDetails = true;
|
|
|
|
|
} else {
|
|
|
|
|
console.log(row.网站域名,'row.网站域名')
|
|
|
|
|
this.href = "http://" + row.网站域名;
|
|
|
|
|
this.pageDetails = true;
|
|
|
|
|
}
|
|
|
|
@ -1144,10 +1146,12 @@ export default {
|
|
|
|
|
this.fileExtension = row["材料路径"].substring(
|
|
|
|
|
row["材料路径"].lastIndexOf(".") + 1
|
|
|
|
|
);
|
|
|
|
|
// console.log(row['材料路径'],'process.env.VUE_APP_BASE_API2')
|
|
|
|
|
if (this.fileExtension == "pdf") {
|
|
|
|
|
// this.pdfUrl = process.env.VUE_APP_BASE_API2 + row['材料路径'];
|
|
|
|
|
this.getNumPages(process.env.VUE_APP_BASE_API2 + row["材料路径"]);
|
|
|
|
|
// this.dialogDetails = true
|
|
|
|
|
this.pdfUrl = row['材料路径'];
|
|
|
|
|
this.dialogDetails = true;
|
|
|
|
|
console.log(this.pdfUrl,'this.pdfUrl')
|
|
|
|
|
// this.getNumPages(process.env.VUE_APP_BASE_API2 + row["材料路径"]);
|
|
|
|
|
} else if (
|
|
|
|
|
this.fileExtension === "docx" ||
|
|
|
|
|
this.fileExtension === "doc"
|
|
|
|
@ -1191,7 +1195,6 @@ export default {
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
getNumPages(url) {
|
|
|
|
|
// console.log(url)
|
|
|
|
|
axios({
|
|
|
|
|
method: "GET",
|
|
|
|
|
url: url, // 后台接口
|
|
|
|
@ -1205,6 +1208,7 @@ export default {
|
|
|
|
|
responseType: "blob",
|
|
|
|
|
})
|
|
|
|
|
.then((response) => {
|
|
|
|
|
console.log(response,'response')
|
|
|
|
|
this.pdfUrl = this.getObjectURL(response.data);
|
|
|
|
|
const loadingTask = pdf.createLoadingTask(this.pdfUrl);
|
|
|
|
|
loadingTask.promise
|
|
|
|
@ -1265,14 +1269,14 @@ export default {
|
|
|
|
|
listYtlc({name:val}).then(res=>{
|
|
|
|
|
this.dialogDetails = true;
|
|
|
|
|
this.dialogTitle = val;
|
|
|
|
|
console.log(res,'res')
|
|
|
|
|
this.fileExtension = res.rows[0].fileUrl.substring(
|
|
|
|
|
res.rows[0].fileUrl.lastIndexOf(".") + 1
|
|
|
|
|
);
|
|
|
|
|
// console.log(this.fileExtension,'this.fileExtension')
|
|
|
|
|
if (this.fileExtension == "pdf") {
|
|
|
|
|
// this.pdfUrl = process.env.VUE_APP_BASE_API2 + row['材料路径'];
|
|
|
|
|
this.getNumPages(process.env.VUE_APP_BASE_API2 + res.rows[0].fileUrl);
|
|
|
|
|
// this.dialogDetails = true
|
|
|
|
|
this.pdfUrl = row['材料路径'];
|
|
|
|
|
// this.getNumPages(process.env.VUE_APP_BASE_API2 + res.rows[0].fileUrl);
|
|
|
|
|
this.dialogDetails = true
|
|
|
|
|
} else if (
|
|
|
|
|
this.fileExtension === "docx" ||
|
|
|
|
|
this.fileExtension === "doc"
|
|
|
|
|