Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing Details

uat_us
caiyiling 2024-01-24 14:42:44 +08:00
commit 9c97b10c21
3 changed files with 35 additions and 5 deletions

View File

@ -2,7 +2,7 @@
ENV = 'production' ENV = 'production'
NODE_ENV = 'production' NODE_ENV = 'production'
# base public path # 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:否 # 是否开启登陆限制 true:是 false:否
VUE_APP_LOGIN_FOR_PERMISSION = false VUE_APP_LOGIN_FOR_PERMISSION = false

View File

@ -1,5 +1,5 @@
const OSS = require('ali-oss') const OSS = require('ali-oss')
const router = require('@/router');
const Minio = require('minio') const Minio = require('minio')
const stream = require('stream') const stream = require('stream')
console.log(Minio) console.log(Minio)
@ -29,9 +29,12 @@ async function ossGenerateSTS() {
put: function (objectName, object) { put: function (objectName, object) {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
try { try {
var objectItem = objectName.split('/') let _vm = router.default.app
objectItem[objectItem.length - 1] = new Date().getTime() + '_' + objectItem[objectItem.length - 1] if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload') {
objectName = objectItem.join('/') 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) let res = await OSSclient.put(objectName, object)
if (res && res.url) { if (res && res.url) {
resolve({ resolve({
@ -56,6 +59,12 @@ async function ossGenerateSTS() {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
try { try {
var name = objectName.split('/')[objectName.split('/').length - 1] 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(); const reader = new FileReader();
reader.onload = (ex) => { reader.onload = (ex) => {
const bufferStream = new stream.PassThrough() const bufferStream = new stream.PassThrough()
@ -87,6 +96,12 @@ async function ossGenerateSTS() {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
try { try {
var name = objectName.split('/')[objectName.split('/').length - 1] 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(); const reader = new FileReader();
reader.onload = (ex) => { reader.onload = (ex) => {
const bufferStream = new stream.PassThrough() 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 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:#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:#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> <span style="color:#f66" v-else >{{ $t('trials:uploadDicomList:table:Failed') }}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -1313,6 +1314,20 @@ export default {
clearInterval(t) clearInterval(t)
resolve() resolve()
} }
}).catch(() => {
let Record = {
Failed: [],
Existed: [],
Uploaded: [],
FileCount: 0
}
let fileList = scope.uploadQueues[index].fileList
fileList.forEach(v => {
Record.Failed.push(v.webkitRelativePath)
})
scope.uploadQueues[index].uploadState.record = Record
scope.studyErrorList.push(dicomInfo.accNumber)
resolve()
}) })
} catch (e) { } catch (e) {
console.log(e) console.log(e)