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) }, }