diff --git a/src/views/report/attReport/check.vue b/src/views/report/attReport/check.vue index 2c9916a..62495af 100644 --- a/src/views/report/attReport/check.vue +++ b/src/views/report/attReport/check.vue @@ -96,23 +96,28 @@ - - + + + @@ -135,18 +140,27 @@ + + + + + @@ -187,18 +201,25 @@ + + + @@ -222,18 +243,26 @@ + + + + @@ -255,18 +284,27 @@ + + + + + + diff --git a/src/views/report/attReport/index.vue b/src/views/report/attReport/index.vue index dab5968..cfeb3ca 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') }}
@@ -368,6 +368,7 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css' import { checkPersonAssignment } from '@/api/system/userInfo' import { getDetail } from '@/api/report/monthlyError' +import { getToken } from '@/utils/auth' export default { name: 'AttDetails', dicts: ['att_status'], @@ -439,8 +440,8 @@ export default { fileView: false, fileData:[], kkFilePreview: { - filePreviewUrl: "http://192.168.0.14:31909/file/ynRealName/proFile/2025/02/19/5bb40b949c3b490b85540e6289a24c962.docx", - fileName: "aaaa.docx", + filePreviewUrl: undefined, + fileName: undefined, } } }, @@ -823,17 +824,19 @@ export default { }, previewFile(filePath) { + 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.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) }, //获取对应的文件名称 diff --git a/src/views/report/attReport/record.vue b/src/views/report/attReport/record.vue index 939a377..01e89a5 100644 --- a/src/views/report/attReport/record.vue +++ b/src/views/report/attReport/record.vue @@ -82,14 +82,19 @@ - - + + + + + + + + + + + + +
@@ -175,6 +194,7 @@ import {getDetailsRecordList, updateAttDetailsDataExamine,listDept} from "@/api/report/attReport"; import Treeselect from "@riophae/vue-treeselect"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; +import { getToken } from '@/utils/auth' export default { name: "Record", @@ -214,6 +234,12 @@ export default { orgId: undefined, attStatus: undefined }, + fileView: false, + fileData:[], + kkFilePreview: { + filePreviewUrl: undefined, + fileName: undefined, + } }; }, created() { @@ -375,6 +401,35 @@ export default { }, `type_${new Date().getTime()}.xlsx`) }, + //获取对应的文件名称 + getFileName(filesVoList, attType) { + if (!filesVoList) return ''; + const file = filesVoList.find(file => file.attType === attType); + return file ? file.fileName : ''; + }, + //获取对应的文件路径 + getFilePath(filesVoList, attType) { + if (!filesVoList) return ''; + const file = filesVoList.find(file => file.attType === attType); + return file ? file.filePath : ''; + }, + + previewFile(filePath) { + 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) + }, + } };