上传页面去除时间戳
continuous-integration/drone/push Build is passing Details

uat_us
熊飞 2024-01-24 13:33:55 +08:00
parent 5de4bf9bed
commit 515a9a92b6
3 changed files with 21 additions and 5 deletions

View File

@ -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

View File

@ -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()

View File

@ -293,6 +293,7 @@
<span v-if="!scope.row.dicomInfo.failedFileCount">{{$t('trials:uploadDicomList:table:status1')}}</span>
<span style="color:#409eff" v-else-if="scope.row.dicomInfo.failedFileCount < scope.row.dicomInfo.fileCount && !scope.row.uploadState.record">{{$t('trials:uploadDicomList:table:status2')}}</span>
<span style="color:#2cc368" v-else-if="scope.row.dicomInfo.failedFileCount === scope.row.dicomInfo.fileCount">{{$t('trials:uploadDicomList:table:status3')}}</span>
<span style="color:#f66" v-else-if="scope.row.uploadState.record && scope.row.uploadState.record.fileCount === 0">{{$t('trials:uploadDicomList:table:status5')}}</span>
<span style="color:#f66" v-else >{{ $t('trials:uploadDicomList:table:Failed') }}</span>
</template>
</el-table-column>