确认长度
parent
8c6b5b4e55
commit
c297b41225
|
@ -516,6 +516,7 @@ import DicomPreview from '@/views/dicom-show/dicom-preview'
|
||||||
import dicomStore from '@/utils/dicom-store'
|
import dicomStore from '@/utils/dicom-store'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import {dcmUpload} from '@/utils/dcmUpload/dcmUpload'
|
import {dcmUpload} from '@/utils/dcmUpload/dcmUpload'
|
||||||
|
import { convertBytes } from '@/utils/dicom-character-set';
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
export default {
|
export default {
|
||||||
name: 'UploadDicomFiles',
|
name: 'UploadDicomFiles',
|
||||||
|
@ -680,7 +681,7 @@ export default {
|
||||||
})(i)
|
})(i)
|
||||||
}
|
}
|
||||||
p.then(function(result) {
|
p.then(function(result) {
|
||||||
scope.uploadQueues.forEach(v => {
|
scope.uploadQueues.forEach((v, i) => {
|
||||||
scope.$refs.dicomFilesTable.toggleRowSelection(v, true)
|
scope.$refs.dicomFilesTable.toggleRowSelection(v, true)
|
||||||
})
|
})
|
||||||
scope.scanState = 'finished'
|
scope.scanState = 'finished'
|
||||||
|
@ -724,6 +725,9 @@ export default {
|
||||||
if(date){
|
if(date){
|
||||||
studyTime = time ? `${date} ${time}` : `${date} 00:00:00`
|
studyTime = time ? `${date} ${time}` : `${date} 00:00:00`
|
||||||
}
|
}
|
||||||
|
const patientNameElement = data.elements.x00100010;
|
||||||
|
const patientNameBytes = new Uint8Array(data.byteArray.buffer, patientNameElement.dataOffset, patientNameElement.length);
|
||||||
|
const patientNameStr = convertBytes(data.string('x00080005'), patientNameBytes);
|
||||||
scope.uploadQueues.push({
|
scope.uploadQueues.push({
|
||||||
studyIndex: studyIndex,
|
studyIndex: studyIndex,
|
||||||
seriesList: [],
|
seriesList: [],
|
||||||
|
@ -732,7 +736,7 @@ export default {
|
||||||
studyId: data.string('x00200010'),
|
studyId: data.string('x00200010'),
|
||||||
studyUid: studyUid,
|
studyUid: studyUid,
|
||||||
patientId: data.string('x00100020'),
|
patientId: data.string('x00100020'),
|
||||||
patientName: data.string('x00100010') ? data.string('x00100010') : '',
|
patientName: patientNameStr,
|
||||||
patientAge: data.string('x00101010') ? data.string('x00101010') : '',
|
patientAge: data.string('x00101010') ? data.string('x00101010') : '',
|
||||||
patientSex: data.string('x00100040') ? data.string('x00100040') : '',
|
patientSex: data.string('x00100040') ? data.string('x00100040') : '',
|
||||||
patientBirthDate: data.string('x00100030'),
|
patientBirthDate: data.string('x00100030'),
|
||||||
|
@ -806,11 +810,14 @@ export default {
|
||||||
if(date){
|
if(date){
|
||||||
seriesTime = time ? `${date} ${time}` : `${date} 00:00:00`
|
seriesTime = time ? `${date} ${time}` : `${date} 00:00:00`
|
||||||
}
|
}
|
||||||
|
const seriesDescriptionElement = data.elements.x0008103e;
|
||||||
|
const seriesDescriptionBytes = new Uint8Array(data.byteArray.buffer, seriesDescriptionElement.dataOffset, seriesDescriptionElement.length);
|
||||||
|
const seriesDescriptionStr = convertBytes(data.string('x00080005'), seriesDescriptionBytes);
|
||||||
seriesItem = {
|
seriesItem = {
|
||||||
seriesUid: seriesUid,
|
seriesUid: seriesUid,
|
||||||
seriesNumber: data.intString('x00200011') || 1,
|
seriesNumber: data.intString('x00200011') || 1,
|
||||||
modality: data.string('x00080060') || '',
|
modality: data.string('x00080060') || '',
|
||||||
description: data.string('x0008103e') || '',
|
description: seriesDescriptionStr,
|
||||||
seriesTime: seriesTime,
|
seriesTime: seriesTime,
|
||||||
sliceThickness: data.string('x00180050') || '',
|
sliceThickness: data.string('x00180050') || '',
|
||||||
imagePositionPatient: data.string('x00200032') || '',
|
imagePositionPatient: data.string('x00200032') || '',
|
||||||
|
@ -874,6 +881,7 @@ export default {
|
||||||
// 上传之前校验基本信息及检查是否已上传
|
// 上传之前校验基本信息及检查是否已上传
|
||||||
beginUploadQueues() {
|
beginUploadQueues() {
|
||||||
this.scanState = 'uploading'
|
this.scanState = 'uploading'
|
||||||
|
console.log(this.uploadQueues, this.selectArr)
|
||||||
this.warningArr = []
|
this.warningArr = []
|
||||||
for (let i = 0; i < this.selectArr.length; ++i) {
|
for (let i = 0; i < this.selectArr.length; ++i) {
|
||||||
const index = this.selectArr[i].studyIndex
|
const index = this.selectArr[i].studyIndex
|
||||||
|
@ -997,18 +1005,17 @@ export default {
|
||||||
await this.archiveStudy(index, res.OtherInfo)
|
await this.archiveStudy(index, res.OtherInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(1)
|
|
||||||
this.$set(this, 'uploadQueues', [...this.uploadQueues.filter(v => {
|
this.$set(this, 'uploadQueues', [...this.uploadQueues.filter(v => {
|
||||||
return !v.uploadState.record || (v.uploadState.record && !!v.uploadState.record.Failed.length)
|
return !v.uploadState.record || (v.uploadState.record && !!v.uploadState.record.Failed.length)
|
||||||
})])
|
})])
|
||||||
console.log(2)
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.selectArr = []
|
this.selectArr = []
|
||||||
this.uploadQueues.forEach(v => {
|
this.uploadQueues.forEach((v, i) => {
|
||||||
if (v.uploadState.record) {
|
if (v.uploadState.record) {
|
||||||
v.uploadState.selected = false
|
v.uploadState.selected = false
|
||||||
this.$refs.dicomFilesTable.toggleRowSelection(v, true)
|
this.$refs.dicomFilesTable.toggleRowSelection(v, true)
|
||||||
}
|
}
|
||||||
|
v.studyIndex = i
|
||||||
})
|
})
|
||||||
this.$refs.pathClear.value = ''
|
this.$refs.pathClear.value = ''
|
||||||
this.btnLoading = false
|
this.btnLoading = false
|
||||||
|
@ -1257,6 +1264,7 @@ export default {
|
||||||
if (logRes && logRes.url) {
|
if (logRes && logRes.url) {
|
||||||
params.study.instanceCount = dicomInfo.failedFileCount
|
params.study.instanceCount = dicomInfo.failedFileCount
|
||||||
params.RecordPath = scope.$getObjectName(logRes.url)
|
params.RecordPath = scope.$getObjectName(logRes.url)
|
||||||
|
console.log(JSON.stringify(params))
|
||||||
addOrUpdateArchiveStudy(params).then(res => {
|
addOrUpdateArchiveStudy(params).then(res => {
|
||||||
if (dicomInfo.failedFileCount === dicomInfo.fileCount) {
|
if (dicomInfo.failedFileCount === dicomInfo.fileCount) {
|
||||||
scope.$message.success(scope.$t('trials:uploadDicomList:label:uploaded'))
|
scope.$message.success(scope.$t('trials:uploadDicomList:label:uploaded'))
|
||||||
|
|
Loading…
Reference in New Issue