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