预览修改为iframe

duhanyu
吕天方 1 year ago
parent 65183fb5cb
commit e145621f0e

@ -5,6 +5,6 @@ ENV = 'development'
VUE_APP_BASE_API = '/dashboard'
# VUE_APP_BASE_API2 = 'http://39.101.188.84:9027'
VUE_APP_BASE_API2 = 'http://localhost:9035'
# VUE_APP_BASE_API2 = 'http://localhost:9035'
VUE_APP_BASE_API2 = 'http://39.101.188.84:9035'
BASE_API = 'http://10.10.3.35:9070'

@ -5,4 +5,5 @@ ENV = 'production'
VUE_APP_BASE_API = '/dashboard'
BASE_API = 'http://47.116.52.164:10002'
VUE_APP_BASE_API2 = 'http://39.101.188.84:9027'
# VUE_APP_BASE_API2 = 'http://39.101.188.84:9027'
VUE_APP_BASE_API2 = 'http://39.101.188.84:9035'

@ -1,19 +1,3 @@
/*
* @Version: 1.0
* @Author: kery.chen
* @Description:
* @Date: 2021-11-30 11:08:42
* @LastEditTime: 2021-12-23 17:55:58
* @FilePath: \tcingiocpro\src\router\index.js
*/
/*
* @Author: your name
* @Date: 2021-11-01 14:22:31
* @LastEditTime: 2021-11-30 11:18:25
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tcingiocpro\src\router\index.js
*/
import Vue from "vue";
import Router from "vue-router";
Vue.use(Router);

@ -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"

@ -1,8 +1,8 @@
<!--
* @Author: your name
* @Date: 2021-12-22 10:12:56
* @LastEditTime: 2022-08-01 16:55:26
* @LastEditors: lough
* @LastEditTime: 2023-10-24 10:07:16
* @LastEditors: JC9527
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tcingiocpro\src\views\privateOrder\sentiment\components\TransferVolume.vue
-->
@ -241,7 +241,7 @@ export default {
if (options && typeof options === "object") {
//
setInterval(() => {
console.log(options);
// console.log(options);
if (options.dataZoom[0].endValue == this.lineValue?.length) {
options.dataZoom[0].endValue = 4;
options.dataZoom[0].startValue = 0;

@ -26,7 +26,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath
*/
// publicPath: './',
publicPath: "/demo/taicangzongzhi",
publicPath: "/demo/tczzbig",
outputDir: "dist",
assetsDir: "static",
lintOnSave: process.env.NODE_ENV === "development",

Loading…
Cancel
Save