From 23dbd68fad36d53caa94b92657cfe75ad2483869 Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Mon, 24 Feb 2025 10:33:12 +0800 Subject: [PATCH] =?UTF-8?q?=20=E8=80=83=E5=8B=A4=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=A1=E6=89=B9=E3=80=81=E8=80=83=E5=8B=A4?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E4=BF=AE=E6=94=B9=E8=AE=B0=E5=BD=95=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/report/attReport/check.vue | 41 +++++++++++++++------------ src/views/report/attReport/index.vue | 36 +++++++++++++---------- src/views/report/attReport/record.vue | 37 +++++++++++++----------- 3 files changed, 65 insertions(+), 49 deletions(-) diff --git a/src/views/report/attReport/check.vue b/src/views/report/attReport/check.vue index b875a77..3b02d21 100644 --- a/src/views/report/attReport/check.vue +++ b/src/views/report/attReport/check.vue @@ -113,7 +113,7 @@ @@ -158,7 +158,7 @@ @@ -217,7 +217,7 @@ @@ -260,7 +260,7 @@ @@ -341,7 +341,6 @@ export default { }, fileView: false, - fileData:[], kkFilePreview: { filePreviewUrl: undefined, fileName: undefined, @@ -537,20 +536,26 @@ export default { return file ? file.filePath : ''; }, - previewFile(filePath) { - var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken(); - window.open(url_) + previewFile(filesVoList,type) { + var filePath = this.getFilePath(filesVoList, type); + var fileName = this.getFileName(filesVoList, type); + + var url_="http://192.168.0.14:8100/statics" + filePath +"?token="+ getToken(); + + console.log("http://192.168.0.14:8100/statics" + filePath +"?token="+ getToken()) + console.log("http://192.168.0.14:1810/statics" + filePath +"?token="+ getToken()) + // var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken(); + // window.open(url_) // 根据文件路径打开预览窗口 - // this.fileView= true; - // this.fileData = filePath; - // this.kkFilePreview = { - // // filePreviewUrl: filePath.data[0].filePath, - // // fileName: filePath.data[0].fileName, - // filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx", - // fileName: "aaaa.docx", - // showDownloadButton: false - // } - // console.log(this.kkFilePreview) + this.fileView= true; + this.kkFilePreview = { + filePreviewUrl: url_, + fileName: fileName, + // filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx", + // fileName: "aaaa.docx", + showDownloadButton: false + } + console.log(this.kkFilePreview) }, } }; diff --git a/src/views/report/attReport/index.vue b/src/views/report/attReport/index.vue index 49b26e0..185a41b 100644 --- a/src/views/report/attReport/index.vue +++ b/src/views/report/attReport/index.vue @@ -163,7 +163,7 @@ > 选择文件 -
+
{{ getFileName(scope.row.filesVoList, '1') }}
@@ -221,7 +221,7 @@ > 选择文件 -
+
{{ getFileName(scope.row.filesVoList, '2') }}
@@ -865,20 +865,26 @@ export default { } }, - previewFile(filePath) { - var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken(); - window.open(url_) + previewFile(filesVoList,type) { + var filePath = this.getFilePath(filesVoList, type); + var fileName = this.getFileName(filesVoList, type); + + var url_="http://192.168.0.14:8100/statics" + filePath +"?token="+ getToken(); + + console.log("http://192.168.0.14:8100/statics" + filePath +"?token="+ getToken()) + console.log("http://192.168.0.14:1810/statics" + filePath +"?token="+ getToken()) + // var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken(); + // window.open(url_) // 根据文件路径打开预览窗口 - // this.fileView= true; - // this.fileData = filePath; - // this.kkFilePreview = { - // // filePreviewUrl: filePath.data[0].filePath, - // // fileName: filePath.data[0].fileName, - // filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx", - // fileName: "aaaa.docx", - // showDownloadButton: false - // } - // console.log(this.kkFilePreview) + this.fileView= true; + this.kkFilePreview = { + filePreviewUrl: url_, + fileName: fileName, + // filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx", + // fileName: "aaaa.docx", + showDownloadButton: false + } + console.log(this.kkFilePreview) }, //获取对应的文件名称 diff --git a/src/views/report/attReport/record.vue b/src/views/report/attReport/record.vue index c36b12e..a93d414 100644 --- a/src/views/report/attReport/record.vue +++ b/src/views/report/attReport/record.vue @@ -90,7 +90,7 @@ @@ -111,7 +111,7 @@ @@ -235,7 +235,6 @@ export default { attStatus: undefined }, fileView: false, - fileData:[], kkFilePreview: { filePreviewUrl: undefined, fileName: undefined, @@ -430,20 +429,26 @@ export default { return file ? file.filePath : ''; }, - previewFile(filePath) { - var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken(); - window.open(url_) + previewFile(filesVoList,type) { + var filePath = this.getFilePath(filesVoList, type); + var fileName = this.getFileName(filesVoList, type); + + var url_="http://192.168.0.14:8001/gzatt-api/system/statics" + filePath +"?token="+ getToken(); + + console.log("http://192.168.0.14:8100/statics" + filePath +"?token="+ getToken()) + console.log("http://192.168.0.14:1810/statics" + filePath +"?token="+ getToken()) + // var url_ = "http://127.0.0.1:1810/statics" + filePath +"?token="+ getToken(); + // window.open(url_) // 根据文件路径打开预览窗口 - // this.fileView= true; - // this.fileData = filePath; - // this.kkFilePreview = { - // // filePreviewUrl: filePath.data[0].filePath, - // // fileName: filePath.data[0].fileName, - // filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx", - // fileName: "aaaa.docx", - // showDownloadButton: false - // } - // console.log(this.kkFilePreview) + this.fileView= true; + this.kkFilePreview = { + filePreviewUrl: url_, + fileName: fileName, + // filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx", + // fileName: "aaaa.docx", + showDownloadButton: false + } + console.log(this.kkFilePreview) }, }