From 515a9a92b62f47471c8dd7e9425deab5614ac3b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E9=A3=9E?= Date: Wed, 24 Jan 2024 13:33:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E9=A1=B5=E9=9D=A2=E5=8E=BB?= =?UTF-8?q?=E9=99=A4=E6=97=B6=E9=97=B4=E6=88=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.usa | 2 +- src/utils/oss.js | 23 +++++++++++++++---- .../components/uploadDicomFiles2.vue | 1 + 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.env.usa b/.env.usa index 544847ff..228514cb 100644 --- a/.env.usa +++ b/.env.usa @@ -2,7 +2,7 @@ ENV = 'production' NODE_ENV = 'production' # base public path -VUE_APP_BASE_PATH = 'https://ei-code-prod.s3.amazonaws.com/2024-01-22/' +VUE_APP_BASE_PATH = 'https://ei-code-prod.s3.amazonaws.com/2024-01-24/' # 是否开启登陆限制 true:是 false:否 VUE_APP_LOGIN_FOR_PERMISSION = false diff --git a/src/utils/oss.js b/src/utils/oss.js index 4138a02c..c3222350 100644 --- a/src/utils/oss.js +++ b/src/utils/oss.js @@ -1,5 +1,5 @@ const OSS = require('ali-oss') - +const router = require('@/router'); const Minio = require('minio') const stream = require('stream') console.log(Minio) @@ -29,9 +29,12 @@ async function ossGenerateSTS() { put: function (objectName, object) { return new Promise(async (resolve, reject) => { try { - var objectItem = objectName.split('/') - objectItem[objectItem.length - 1] = new Date().getTime() + '_' + objectItem[objectItem.length - 1] - objectName = objectItem.join('/') + let _vm = router.default.app + if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload') { + var objectItem = objectName.split('/') + objectItem[objectItem.length - 1] = new Date().getTime() + '_' + objectItem[objectItem.length - 1] + objectName = objectItem.join('/') + } let res = await OSSclient.put(objectName, object) if (res && res.url) { resolve({ @@ -56,6 +59,12 @@ async function ossGenerateSTS() { return new Promise(async (resolve, reject) => { try { var name = objectName.split('/')[objectName.split('/').length - 1] + let _vm = router.default.app + if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload') { + var objectItem = objectName.split('/') + objectItem[objectItem.length - 1] = new Date().getTime() + '_' + objectItem[objectItem.length - 1] + objectName = objectItem.join('/') + } const reader = new FileReader(); reader.onload = (ex) => { const bufferStream = new stream.PassThrough() @@ -87,6 +96,12 @@ async function ossGenerateSTS() { return new Promise(async (resolve, reject) => { try { var name = objectName.split('/')[objectName.split('/').length - 1] + let _vm = router.default.app + if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload') { + var objectItem = objectName.split('/') + objectItem[objectItem.length - 1] = new Date().getTime() + '_' + objectItem[objectItem.length - 1] + objectName = objectItem.join('/') + } const reader = new FileReader(); reader.onload = (ex) => { const bufferStream = new stream.PassThrough() diff --git a/src/views/trials/trials-panel/visit/crc-upload/components/uploadDicomFiles2.vue b/src/views/trials/trials-panel/visit/crc-upload/components/uploadDicomFiles2.vue index 776a3ec5..fb6f23ad 100644 --- a/src/views/trials/trials-panel/visit/crc-upload/components/uploadDicomFiles2.vue +++ b/src/views/trials/trials-panel/visit/crc-upload/components/uploadDicomFiles2.vue @@ -293,6 +293,7 @@ {{$t('trials:uploadDicomList:table:status1')}} {{$t('trials:uploadDicomList:table:status2')}} {{$t('trials:uploadDicomList:table:status3')}} + {{$t('trials:uploadDicomList:table:status5')}} {{ $t('trials:uploadDicomList:table:Failed') }}