diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue index 87ab7a31..5011b00b 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -339,7 +339,7 @@ @setToolToTarget="setToolToTarget" /> - + -1) { // cornerstoneTools.annotation.state.addAnnotation(this.visitTaskList[taskIdx].Annotations[idx].MeasureData) // } - + // } // }) // // const annotations = cornerstoneTools.annotation.state.getAllAnnotations() @@ -766,14 +766,14 @@ export default { } else { // 多帧 for (let i = 0; i < nFrames; i++) { - const newImageId = `wadouri:${this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&visitTaskId=${taskId}&frame=${i + 1}`; - imageIds.push(newImageId); + const newImageId = `wadouri:${this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&visitTaskId=${taskId}&frame=${i + 1}` + imageIds.push(newImageId) } } this.instanceInfo[instance.Id] = { taskIndex, studyIndex, seriesIndex } } }) - + series.ImageIds = imageIds series.SliceIndex = 0 series.LoadedImageCount = 0 @@ -1037,7 +1037,7 @@ export default { ++loadedImageCount this.$set(series, 'LoadedImageCount', loadedImageCount) } - let newLoadedImageProgress = series.LoadedImageProgress - this.instanceInfo[instanceId].percentComplete + percentComplete + const newLoadedImageProgress = series.LoadedImageProgress - this.instanceInfo[instanceId].percentComplete + percentComplete this.instanceInfo[instanceId].percentComplete = percentComplete this.$set(series, 'LoadedImageProgress', newLoadedImageProgress) }, @@ -1073,7 +1073,6 @@ export default { } } }) - }, addAnnotationListeners() { console.log(toolsEvents) @@ -1102,7 +1101,6 @@ export default { // toolsEvents.TOOL_MODE_CHANGED, // this.toolModeChanged // ) - }, toolModeChanged(e) { console.log(e) @@ -1132,7 +1130,6 @@ export default { annotation.markTool = annotation.metadata.toolName // this.$refs['ecrf'].setAnnotation({ annotation, toolName: annotation.metadata.toolName }) this.$refs[`ecrf_${this.lastViewportTaskId}`][0].setAnnotation({ annotation, toolName: annotation.metadata.toolName }) - } this.setToolsPassive() }, @@ -1216,7 +1213,7 @@ export default { } else { annotations[idx].data.label = obj.name } - + const renderingEngine = getRenderingEngine(renderingEngineId) const viewportId = `viewport-${this.activeViewportIndex}` const viewport = renderingEngine.getViewport(viewportId) diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/Recist/QuestionList.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/Recist/QuestionList.vue index c807af9e..9b54d8e3 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/Recist/QuestionList.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/Recist/QuestionList.vue @@ -485,22 +485,24 @@ export default { ) if (typeof targetTable !== 'object') return this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'MeasureData', annotation) + let length = null + let short = null if (obj.toolName === 'Length') { const referencedImageId = annotation.metadata.referencedImageId - let length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length + length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length length = length ? parseFloat(length).toFixed(this.digitPlaces) : length const lengthId = this.getQuestionId(0, targetTable.TableQuestions.Questions) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionLength', length) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], lengthId, length) } else if (obj.toolName === 'Bidirectional') { const referencedImageId = annotation.metadata.referencedImageId - let length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length + length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length length = length ? parseFloat(length).toFixed(this.digitPlaces) : length const lengthId = this.getQuestionId(0, targetTable.TableQuestions.Questions) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionLength', length) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], lengthId, length) - let short = annotation.data.cachedStats[`imageId:${referencedImageId}`].width + short = annotation.data.cachedStats[`imageId:${referencedImageId}`].width short = short ? parseFloat(short).toFixed(this.digitPlaces) : short const shortId = this.getQuestionId(1, targetTable.TableQuestions.Questions) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionShort', short) @@ -513,6 +515,24 @@ export default { this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionState', 0) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], stateId, 0) } + if (!(innerForm.IsCurrentTaskAdd === 'True')) { + // 非基线时,非淋巴结病灶长径>=10mm,自动给“存在”状态,如果淋巴结病灶短径>=10mm,自动给“存在”状态。 + if (!this.isBaseLineTask && ((obj.toolName === 'Length' && length >= 10) || (obj.toolName === 'Bidirectional' && short >= 10))) { + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionState', 0) + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], stateId, 0) + } + // 非基线时,非淋巴结病灶长径<10mm,自动给“存在”状态,如果淋巴结病灶短径<10mm,自动给“消失”状态。 + if (!this.isBaseLineTask && ((obj.toolName === 'Length' && length < 10) || (obj.toolName === 'Bidirectional' && short < 10))) { + const stateId = this.getQuestionId(7) + if (innerForm.IsLymphNodes) { + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionState', 3) + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], stateId, 3) + } else if (innerForm.IsLymphNodes === 0) { + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionState', 0) + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], stateId, 0) + } + } + } this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'SaveTypeEnum', innerForm.RowId ? 1 : 0) this.$emit('setMarkName', { annotationUID: annotation.annotationUID, @@ -549,22 +569,24 @@ export default { ) if (typeof targetTable !== 'object') return this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'MeasureData', annotation) + let length = null + let short = null if (toolName === 'Length') { const referencedImageId = annotation.metadata.referencedImageId - let length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length + length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length length = length ? parseFloat(length).toFixed(this.digitPlaces) : length const lengthId = this.getQuestionId(0, targetTable.TableQuestions.Questions) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionLength', length) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], lengthId, length) } else if (toolName === 'Bidirectional') { const referencedImageId = annotation.metadata.referencedImageId - let length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length + length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length length = length ? parseFloat(length).toFixed(this.digitPlaces) : length const lengthId = this.getQuestionId(0, targetTable.TableQuestions.Questions) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionLength', length) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], lengthId, length) - let short = annotation.data.cachedStats[`imageId:${referencedImageId}`].width + short = annotation.data.cachedStats[`imageId:${referencedImageId}`].width short = short ? parseFloat(short).toFixed(this.digitPlaces) : short const shortId = this.getQuestionId(1, targetTable.TableQuestions.Questions) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionShort', short) @@ -577,6 +599,26 @@ export default { this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionState', 0) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], stateId, 0) } + const isCurrentTaskAdd = this.innerFormData[`${tableId}_${rowIndex}`].IsCurrentTaskAdd + const isLymphNodes = this.innerFormData[`${tableId}_${rowIndex}`].IsLymphNodes + if (!(isCurrentTaskAdd === 'True')) { + // 非基线时,非淋巴结病灶长径>=10mm,自动给“存在”状态,如果淋巴结病灶短径>=10mm,自动给“存在”状态。 + if (!this.isBaseLineTask && ((toolName === 'Length' && length >= 10) || (toolName === 'Bidirectional' && short >= 10))) { + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionState', 0) + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], stateId, 0) + } + // 非基线时,非淋巴结病灶长径<10mm,自动给“存在”状态,如果淋巴结病灶短径<10mm,自动给“消失”状态。 + if (!this.isBaseLineTask && ((toolName === 'Length' && length < 10) || (toolName === 'Bidirectional' && short < 10))) { + const stateId = this.getQuestionId(7) + if (isLymphNodes) { + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionState', 3) + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], stateId, 3) + } else if (isLymphNodes === 0) { + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionState', 0) + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], stateId, 0) + } + } + } this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'SaveTypeEnum', formData.RowId ? 1 : 0) this.activeName = `${tableId}_${rowIndex}` }, @@ -781,7 +823,7 @@ export default { let lesionShort = innerForm.LesionShort const lymphNodes = innerForm.IsLymphNodes const lesionType = table.LesionType - const lesionPart = innerForm.LesionPart + // const lesionPart = innerForm.LesionPart if (this.isBaseLineTask) { // 基线 // 靶病灶且状态为存在(0) diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/ReportPage.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/ReportPage.vue index 14ced706..6b87086b 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReportPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReportPage.vue @@ -275,7 +275,7 @@ import { getAutoCutNextTask } from '@/api/user' import const_ from '@/const/sign-code' import SignForm from '@/views/trials/components/newSignForm' import { getToken } from '@/utils/auth' -import store from '@/store' +// import store from '@/store' import { mapGetters } from 'vuex' import { changeURLStatic } from '@/utils/history.js' import AdditionalAssessment from '@/views/trials/trials-panel/reading/dicoms/components/AdditionalAssessment' @@ -422,7 +422,6 @@ export default { } else { this.expandedRows.push(item.Id) } - } else { this.expandedRows.push(item.Id) } @@ -518,10 +517,10 @@ export default { var liverSegmentIdx = item.Childrens.findIndex(i => i.QuestionMark === 1106) if (liverSegmentIdx > -1) { if (item.Childrens[liverSegmentIdx].Answer.length > 0) { - let v = item.Childrens[liverSegmentIdx].Answer[0].Answer + const v = item.Childrens[liverSegmentIdx].Answer[0].Answer obj.QuestionName = this.$fd(item.Childrens[liverSegmentIdx].DictionaryCode, parseInt(v)) - let Answers = {} - let mean = item.Childrens.findIndex(i => i.QuestionMark === 1104) + const Answers = {} + const mean = item.Childrens.findIndex(i => i.QuestionMark === 1104) if (mean > -1) { this.visitTaskList.forEach(v => { const o = item.Childrens[mean].Answer.find(v1 => { diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/mRecist/QuestionList.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/mRecist/QuestionList.vue index 967f02f9..4852a2e6 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/mRecist/QuestionList.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/mRecist/QuestionList.vue @@ -490,22 +490,24 @@ export default { ) if (typeof targetTable !== 'object') return this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'MeasureData', annotation) + let length = null + let short = null if (obj.toolName === 'Length') { const referencedImageId = annotation.metadata.referencedImageId - let length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length + length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length length = length ? parseFloat(length).toFixed(this.digitPlaces) : length const lengthId = this.getQuestionId(0, targetTable.TableQuestions.Questions) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionLength', length) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], lengthId, length) } else if (obj.toolName === 'Bidirectional') { const referencedImageId = annotation.metadata.referencedImageId - let length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length + length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length length = length ? parseFloat(length).toFixed(this.digitPlaces) : length const lengthId = this.getQuestionId(0, targetTable.TableQuestions.Questions) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionLength', length) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], lengthId, length) - let short = annotation.data.cachedStats[`imageId:${referencedImageId}`].width + short = annotation.data.cachedStats[`imageId:${referencedImageId}`].width short = short ? parseFloat(short).toFixed(this.digitPlaces) : short const shortId = this.getQuestionId(1, targetTable.TableQuestions.Questions) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionShort', short) @@ -523,6 +525,25 @@ export default { this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionState', 0) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], stateId, 0) } + + if (!(innerForm.IsCurrentTaskAdd === 'True')) { + // 非基线时,非淋巴结病灶长径>=10mm,自动给“存在”状态,如果淋巴结病灶短径>=10mm,自动给“存在”状态。 + if (!this.isBaseLineTask && ((obj.toolName === 'Length' && length >= 10) || (obj.toolName === 'Bidirectional' && short >= 10))) { + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionState', 0) + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], stateId, 0) + } + // 非基线时,非淋巴结病灶长径<10mm,自动给“存在”状态,如果淋巴结病灶短径<10mm,自动给“消失”状态。 + if (!this.isBaseLineTask && ((obj.toolName === 'Length' && length < 10) || (obj.toolName === 'Bidirectional' && short < 10))) { + const stateId = this.getQuestionId(7) + if (innerForm.IsLymphNodes) { + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionState', 3) + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], stateId, 3) + } else if (innerForm.IsLymphNodes === 0) { + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionState', 0) + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], stateId, 0) + } + } + } this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'SaveTypeEnum', innerForm.RowId ? 1 : 0) this.$emit('setMarkName', { annotationUID: annotation.annotationUID, @@ -560,22 +581,24 @@ export default { ) if (typeof targetTable !== 'object') return this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'MeasureData', annotation) + let length = null + let short = null if (toolName === 'Length') { const referencedImageId = annotation.metadata.referencedImageId - let length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length + length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length length = length ? parseFloat(length).toFixed(this.digitPlaces) : length const lengthId = this.getQuestionId(0, targetTable.TableQuestions.Questions) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionLength', length) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], lengthId, length) } else if (toolName === 'Bidirectional') { const referencedImageId = annotation.metadata.referencedImageId - let length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length + length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length length = length ? parseFloat(length).toFixed(this.digitPlaces) : length const lengthId = this.getQuestionId(0, targetTable.TableQuestions.Questions) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionLength', length) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], lengthId, length) - let short = annotation.data.cachedStats[`imageId:${referencedImageId}`].width + short = annotation.data.cachedStats[`imageId:${referencedImageId}`].width short = short ? parseFloat(short).toFixed(this.digitPlaces) : short const shortId = this.getQuestionId(1, targetTable.TableQuestions.Questions) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionShort', short) @@ -592,6 +615,26 @@ export default { this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionState', 0) this.$set(this.innerFormData[`${tableId}_${rowIndex}`], stateId, 0) } + const isCurrentTaskAdd = this.innerFormData[`${tableId}_${rowIndex}`].IsCurrentTaskAdd + const isLymphNodes = this.innerFormData[`${tableId}_${rowIndex}`].IsLymphNodes + if (!(isCurrentTaskAdd === 'True')) { + // 非基线时,非淋巴结病灶长径>=10mm,自动给“存在”状态,如果淋巴结病灶短径>=10mm,自动给“存在”状态。 + if (!this.isBaseLineTask && ((toolName === 'Length' && length >= 10) || (toolName === 'Bidirectional' && short >= 10))) { + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionState', 0) + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], stateId, 0) + } + // 非基线时,非淋巴结病灶长径<10mm,自动给“存在”状态,如果淋巴结病灶短径<10mm,自动给“消失”状态。 + if (!this.isBaseLineTask && ((toolName === 'Length' && length < 10) || (toolName === 'Bidirectional' && short < 10))) { + const stateId = this.getQuestionId(7) + if (isLymphNodes) { + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionState', 3) + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], stateId, 3) + } else if (isLymphNodes === 0) { + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'LesionState', 0) + this.$set(this.innerFormData[`${tableId}_${rowIndex}`], stateId, 0) + } + } + } this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'SaveTypeEnum', formData.RowId ? 1 : 0) this.activeName = `${tableId}_${rowIndex}` }, @@ -1308,11 +1351,11 @@ export default { this.$set(this.innerFormData[`${table.Id}_${rowIndex}`], 'RowId', res.Result.RowId) } this.$set(this.innerFormData[`${table.Id}_${rowIndex}`], 'SaveTypeEnum', 2) - + this.activeName = '' } loading.close() - } catch(e) { + } catch (e) { console.log(e) loading.close() }