From 25ddd422a3588e0a6044c49246a6b1679cef43f8 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Mon, 17 Mar 2025 09:29:56 +0800 Subject: [PATCH] 1 --- .../trial-document/components/report_doc/form.vue | 8 ++++---- .../trial-document/components/trainRecord/form.vue | 8 ++++---- .../trial-document/components/uploadFiles.vue | 8 ++++---- .../trial-document/components/viewer/certificate/form.vue | 8 ++++---- .../components/viewer/certificate/index.vue | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/views/trials/trials-panel/trial-summary/trial-document/components/report_doc/form.vue b/src/views/trials/trials-panel/trial-summary/trial-document/components/report_doc/form.vue index 4ec0252c..0a5e21e3 100644 --- a/src/views/trials/trials-panel/trial-summary/trial-document/components/report_doc/form.vue +++ b/src/views/trials/trials-panel/trial-summary/trial-document/components/report_doc/form.vue @@ -361,11 +361,11 @@ export default { var file = await this.fileToBlob(param.file) let typeArr = ['', 'Report', 'Doc', 'Record', 'Reviewer', 'Template'] let types = typeArr[this.ArchiveTypeEnum] - let fileNameNoType = param.file.name - .substring(0, param.file.name.lastIndexOf('.')) - .toLocaleLowerCase() + // let fileNameNoType = param.file.name + // .substring(0, param.file.name.lastIndexOf('.')) + // .toLocaleLowerCase() const res = await this.OSSclient.put( - `/${trialId}/Document/${types}/${fileNameNoType}${extendName}`, + `/${trialId}/Document/${types}/${this.$guid()}${extendName}`, file ) this.form[`${key}FileRecord`] = { diff --git a/src/views/trials/trials-panel/trial-summary/trial-document/components/trainRecord/form.vue b/src/views/trials/trials-panel/trial-summary/trial-document/components/trainRecord/form.vue index 0533bca0..e7b2cf92 100644 --- a/src/views/trials/trials-panel/trial-summary/trial-document/components/trainRecord/form.vue +++ b/src/views/trials/trials-panel/trial-summary/trial-document/components/trainRecord/form.vue @@ -249,11 +249,11 @@ export default { var file = await this.fileToBlob(param.file) let typeArr = ['', 'Report', 'Doc', 'Record', 'Reviewer', 'Template'] let types = typeArr[this.ArchiveTypeEnum] - let fileNameNoType = param.file.name - .substring(0, param.file.name.lastIndexOf('.')) - .toLocaleLowerCase() + // let fileNameNoType = param.file.name + // .substring(0, param.file.name.lastIndexOf('.')) + // .toLocaleLowerCase() const res = await this.OSSclient.put( - `/${trialId}/Document/${types}/${fileNameNoType}${extendName}`, + `/${trialId}/Document/${types}/${this.$guid()}${extendName}`, file ) this.form[`${key}FileRecord`] = { diff --git a/src/views/trials/trials-panel/trial-summary/trial-document/components/uploadFiles.vue b/src/views/trials/trials-panel/trial-summary/trial-document/components/uploadFiles.vue index 088538f3..0951e123 100644 --- a/src/views/trials/trials-panel/trial-summary/trial-document/components/uploadFiles.vue +++ b/src/views/trials/trials-panel/trial-summary/trial-document/components/uploadFiles.vue @@ -335,10 +335,10 @@ export default { let fileType = file.name .substring(file.name.lastIndexOf('.')) .toLocaleLowerCase() - let fileName = file.name - .substring(0, file.name.lastIndexOf('.')) - .toLocaleLowerCase() - let path = `${this.uploadPath}/${fileName}${fileType}` + // let fileName = file.name + // .substring(0, file.name.lastIndexOf('.')) + // .toLocaleLowerCase() + let path = `${this.uploadPath}/${this.$guid()}${fileType}` file.curPath = path const fileData = await this.fileToBlob(file.file) let res = await this.fileToOss(path, fileData, file) diff --git a/src/views/trials/trials-panel/trial-summary/trial-document/components/viewer/certificate/form.vue b/src/views/trials/trials-panel/trial-summary/trial-document/components/viewer/certificate/form.vue index 756b9eb8..2f543da3 100644 --- a/src/views/trials/trials-panel/trial-summary/trial-document/components/viewer/certificate/form.vue +++ b/src/views/trials/trials-panel/trial-summary/trial-document/components/viewer/certificate/form.vue @@ -236,11 +236,11 @@ export default { var file = await this.fileToBlob(param.file) let typeArr = ['', 'Report', 'Doc', 'Record', 'Reviewer', 'Template'] let types = typeArr[this.ArchiveTypeEnum] - let fileNameNoType = param.file.name - .substring(0, param.file.name.lastIndexOf('.')) - .toLocaleLowerCase() + // let fileNameNoType = param.file.name + // .substring(0, param.file.name.lastIndexOf('.')) + // .toLocaleLowerCase() const res = await this.OSSclient.put( - `/${trialId}/Document/${types}/${fileNameNoType}${extendName}`, + `/${trialId}/Document/${types}/${this.$guid()}${extendName}`, file ) this.form.Path = this.$getObjectName(res.url) diff --git a/src/views/trials/trials-panel/trial-summary/trial-document/components/viewer/certificate/index.vue b/src/views/trials/trials-panel/trial-summary/trial-document/components/viewer/certificate/index.vue index f17fc366..d17a7f8b 100644 --- a/src/views/trials/trials-panel/trial-summary/trial-document/components/viewer/certificate/index.vue +++ b/src/views/trials/trials-panel/trial-summary/trial-document/components/viewer/certificate/index.vue @@ -281,7 +281,7 @@ /> -