From bc6bbcc29db971f352d9de01f1b74574c0b0f53b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E9=A3=9E?= Date: Tue, 16 Jan 2024 15:30:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E4=BC=A0=E6=AF=94=E5=AF=B9=E7=AE=97?= =?UTF-8?q?=E6=B3=95=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/uploadDicomFiles2.vue | 49 ++++++++++--------- .../trials-panel/visit/qc-check/index.vue | 2 + vue.config.js | 48 +++++++++--------- 3 files changed, 52 insertions(+), 47 deletions(-) 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 b170469b..5d596f5f 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 @@ -673,11 +673,9 @@ export default { var time = data.string('x00080030') var studyTime = '' if (date) { - // date = `${date.substr(0, 4)}-${date.substr(4, 2)}-${date.substr(6, 2)}` date = `${date.substring(0, 4)}-${date.substring(4, 6)}-${date.substring(6, 8)}` } if (time) { - // time = `${time.substr(0, 2)}:${time.substr(2, 2)}:${time.substr(4, 2)}` time = `${time.substring(0, 2)}:${time.substring(2, 4)}:${time.substring(4, 6)}` } if(date){ @@ -757,11 +755,9 @@ export default { var time = data.string('x00080031') var seriesTime = '' if (date) { - // date = `${date.substr(0, 4)}-${date.substr(4, 2)}-${date.substr(6, 2)}` date = `${date.substring(0, 4)}-${date.substring(4, 6)}-${date.substring(6, 8)}` } if (time) { - // time = `${time.substr(0, 2)}:${time.substr(2, 2)}:${time.substr(4, 2)}` time = `${time.substring(0, 2)}:${time.substring(2, 4)}:${time.substring(4, 6)}` } if(date){ @@ -792,11 +788,9 @@ export default { var time = data.string('x00080033') var instanceTime = '' if (date) { - // date = `${date.substr(0, 4)}-${date.substr(4, 2)}-${date.substr(6, 2)}` date = `${date.substring(0, 4)}-${date.substring(4, 6)}-${date.substring(6, 8)}` } if (time) { - // time = `${time.substr(0, 2)}:${time.substr(2, 2)}:${time.substr(4, 2)}` time = `${time.substring(0, 2)}:${time.substring(2, 4)}:${time.substring(4, 6)}` } if(date){ @@ -824,7 +818,6 @@ export default { } resolve() } catch (error) { - // scope.$alert(scope.$t('trials:trials-panel:message:notIsHasDicom')) console.log(error) resolve() } @@ -883,37 +876,47 @@ export default { var messageArr = [] res.Result.forEach((item) => { const i = this.uploadQueues.findIndex((value) => value.dicomInfo.studyUid === item.StudyInstanceUid) + let instanceUidList = [] + item.UploadedSeriesList.forEach(v => { + v.SOPInstanceUIDList.forEach(v1 => { + instanceUidList.push(v1) + }) + }) + // isReUploadinstanceUidList1.includes(instanceUidList2) try { this.uploadQueues[i].seriesList.forEach(v => { let o = item.UploadedSeriesList.find(v1 => { - v.instanceList.forEach(v2 => { - let o2 = v1.SOPInstanceUIDList.find(v3 => { - console.log(v3, v2.instanceUid) - return v3 === v2.instanceUid - }) - console.log(v2) - if (!!o2) { - v2.isReUpload = true - } - }) + return v.seriesUid === v1.SeriesId + // v.instanceList.forEach(v2 => { + // let o2 = v1.SOPInstanceUIDList.find(v3 => { + // return v3 === v2.instanceUid + // }) + // if (!!o2) { + // v2.isReUpload = true + // } + // }) }) if (!!o) { v.isReUpload = true } }) + this.uploadQueues[i].seriesList.forEach(v => { + v.instanceList.forEach(v2 => { + let o2 = instanceUidList.find(v3 => { + return v3 === v2.instanceUid + }) + if (!!o2) { + v2.isReUpload = true + } + }) + }) } catch (e) { console.log(e) } // 不能上传或不能重传时,收集校验结果提示,并取消勾选,设置上传状态 if (item.ErrorMesseage) { - // Uploading not allowed - // this.uploadQueues[i].uploadState.stateText = this.$t('trials:uploadDicomList:label:uploadingNotAllowed') - // this.uploadQueues[i].uploadState.selected = true - // this.uploadQueues[i].uploadState.stateCode = 'Uploading not allowed' - // this.uploadQueues[i].uploadState.errorMessage = item.ErrorMesseage this.uploadQueues[i].uploadState.AllowReUpload = item.AllowReUpload this.$refs.dicomFilesTable.toggleRowSelection(this.uploadQueues[i]) - // const msg = `ACC:${this.uploadQueues[i].dicomInfo.accNumber}, ${item.ErrorMesseage}` const msg = `${item.ErrorMesseage}` messageArr.push(msg) } diff --git a/src/views/trials/trials-panel/visit/qc-check/index.vue b/src/views/trials/trials-panel/visit/qc-check/index.vue index e032f080..f79946aa 100644 --- a/src/views/trials/trials-panel/visit/qc-check/index.vue +++ b/src/views/trials/trials-panel/visit/qc-check/index.vue @@ -638,6 +638,8 @@ import Pagination from '@/components/Pagination' import moment from 'moment' import { changeURLStatic } from '@/utils/history.js' import { getToken } from '@/utils/auth' + + const searchDataDefault = () => { return { TrialId: '', diff --git a/vue.config.js b/vue.config.js index 6e0495aa..2c8ec49a 100644 --- a/vue.config.js +++ b/vue.config.js @@ -3,7 +3,7 @@ const path = require('path') // eslint-disable-next-line no-undef const defaultSettings = require('./src/settings.js') const CopyPlugin = require('copy-webpack-plugin') -// const WebpackAliyunOss = require('webpack-aliyun-oss') +const WebpackAliyunOss = require('webpack-aliyun-oss') const moment = require('moment') var distDate = moment(new Date()).format('YYYY-MM-DD') console.log(distDate) @@ -18,8 +18,8 @@ const name = defaultSettings.title || 'IRCIS' // page title module.exports = { // lintOnSave: false, transpileDependencies: ['@cornerstonejs', 'minio'], - // publicPath: process.env.NODE_ENV === 'development' || process.env.VUE_APP_OSS_CONFIG_BUCKET === 'zyypacs-usa' ? process.env.VUE_APP_BASE_PATH : `${process.env.VUE_FILE_PATH}${process.env.VUE_APP_OSS_PATH}${distDate}/`, - publicPath: '/', + publicPath: process.env.NODE_ENV === 'development' || process.env.VUE_APP_OSS_CONFIG_BUCKET === 'zyypacs-usa' ? process.env.VUE_APP_BASE_PATH : `${process.env.VUE_FILE_PATH}${process.env.VUE_APP_OSS_PATH}${distDate}/`, + // publicPath: '/', outputDir: 'dist', assetsDir: 'static', productionSourceMap: false, @@ -93,27 +93,27 @@ module.exports = { to: path.resolve(__dirname, './dist/static'), ignore: ['.*'] } - ]) - // process.env.NODE_ENV === 'development' || process.env.VUE_APP_OSS_CONFIG_BUCKET === 'zyypacs-usa' ? function() {} - // : new WebpackAliyunOss({ - // from: ['./dist/**'], - // dist: process.env.VUE_APP_OSS_PATH + distDate, - // region: process.env.OSS_REGION, - // accessKeyId: process.env.OSS_ACCESS_KEY_ID, - // accessKeySecret: process.env.OSS_ACCESS_KEY_SECRET, - // bucket: process.env.OSS_BUCKET, - // overwrite: true, - // setOssPath: filePath => { - // const index = filePath.lastIndexOf('dist') - // const Path = filePath.substring(index + 4, filePath.length) - // return Path.replace(/\\/g, '/') - // }, - // setHeaders: filePath => { - // return { - // 'Cache-Control': 'max-age=31536000' - // } - // } - // }) + ]), + process.env.NODE_ENV === 'development' || process.env.VUE_APP_OSS_CONFIG_BUCKET === 'zyypacs-usa' ? function() {} + : new WebpackAliyunOss({ + from: ['./dist/**'], + dist: process.env.VUE_APP_OSS_PATH + distDate, + region: process.env.OSS_REGION, + accessKeyId: process.env.OSS_ACCESS_KEY_ID, + accessKeySecret: process.env.OSS_ACCESS_KEY_SECRET, + bucket: process.env.OSS_BUCKET, + overwrite: true, + setOssPath: filePath => { + const index = filePath.lastIndexOf('dist') + const Path = filePath.substring(index + 4, filePath.length) + return Path.replace(/\\/g, '/') + }, + setHeaders: filePath => { + return { + 'Cache-Control': 'max-age=31536000' + } + } + }) // new OfflinePlugin({}) ], performance: {