From 11471525afad7a999492bd501e2d031fdfdd778c Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Thu, 17 Apr 2025 17:36:35 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=88=96=E8=80=85=E5=8D=95=E4=B8=AA=E7=97=85=E7=81=B6=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=97=B6=E5=89=8D=E7=AB=AF=E7=BC=93=E5=AD=98=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E7=8A=B6=E6=80=81=E4=B8=8D=E5=88=B7=E6=96=B0ecrf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reading/dicoms3D/components/ReadPage.vue | 91 ++++++++++++------- .../components/Recist/QuestionList.vue | 41 ++++++--- .../components/mRecist/QuestionList.vue | 42 ++++++--- 3 files changed, 113 insertions(+), 61 deletions(-) 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 117d0ddd..87ab7a31 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -318,20 +318,28 @@
- +
+ +
+
i.VisitTaskId === this.taskInfo.VisitTaskId) - const annotationUIDs = this.visitTaskList[taskIdx].AnnotationUIDs - const annotations = cornerstoneTools.annotation.state.getAllAnnotations() - annotations.forEach(i => { - if (!(annotationUIDs.includes(i.annotationUID)) && i.visitTaskId === this.taskInfo.VisitTaskId) { - cornerstoneTools.annotation.state.removeAnnotation(i.annotationUID) - } - }) + if (!this.lastViewportTaskIds.includes(id)) { + this.lastViewportTaskIds.push(id) } + // if (this.readingTaskState === 2) return + // if (id !== this.taskInfo.VisitTaskId) { + // const taskIdx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.taskInfo.VisitTaskId) + // // const annotationUIDs = this.visitTaskList[taskIdx].AnnotationUIDs + // const annotations = cornerstoneTools.annotation.state.getAllAnnotations() + // // const annotations = this.visitTaskList[taskIdx].Annotations + // annotations.forEach(i => { + // if (i.visitTaskId === this.taskInfo.VisitTaskId) { + // cornerstoneTools.annotation.state.removeAnnotation(i.annotationUID) + // let idx = this.visitTaskList[taskIdx].Annotations.findIndex(v=>v.MeasureData && v.MeasureData.annotationUID === i.annotationUID) + // console.log('123',idx) + // if (idx > -1) { + // cornerstoneTools.annotation.state.addAnnotation(this.visitTaskList[taskIdx].Annotations[idx].MeasureData) + // } + + // } + // }) + // // const annotations = cornerstoneTools.annotation.state.getAllAnnotations() + // // annotations.forEach(i => { + // // if (!(annotationUIDs.includes(i.annotationUID)) && i.visitTaskId === this.taskInfo.VisitTaskId) { + // // cornerstoneTools.annotation.state.removeAnnotation(i.annotationUID) + // // } + // // }) + // } } } }, @@ -763,10 +788,10 @@ export default { keyImages.forEach(instance => { if (instance.KeyFramesList.length > 0) { instance.KeyFramesList.map(i => { - keyImageIds.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?frame=${i}&instanceId=${instance.Id}&visitTaskId=${taskId}`) + keyImageIds.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&visitTaskId=${taskId}&frame=${i}`) }) } else { - keyImageIds.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?frame=0&instanceId=${instance.Id}&visitTaskId=${taskId}`) + keyImageIds.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&visitTaskId=${taskId}`) } }) res1.Result[keyStudyIndex].SeriesList[keySeriesIndex].ImageIds = keyImageIds @@ -1105,7 +1130,9 @@ export default { annotation.sliceThickness = series.SliceThickness annotation.numberOfFrames = isNaN(parseInt(params.frame)) ? null : parseInt(params.frame) annotation.markTool = annotation.metadata.toolName - this.$refs['ecrf'].setAnnotation({ annotation, toolName: 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() }, @@ -1117,7 +1144,8 @@ export default { if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return const series = this.$refs[`viewport-${this.activeViewportIndex}`][0].series if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) { - this.$refs['ecrf'].modifyAnnotation({ annotation, toolName: annotation.metadata.toolName }) + // this.$refs['ecrf'].modifyAnnotation({ annotation, toolName: annotation.metadata.toolName }) + this.$refs[`ecrf_${this.lastViewportTaskId}`][0].modifyAnnotation({ annotation, toolName: annotation.metadata.toolName }) } this.setToolsPassive() }, @@ -1164,7 +1192,7 @@ export default { } return i }) - this.$set(this.visitTaskList[taskIdx], 'annotations', annotations) + this.$set(this.visitTaskList[taskIdx], 'Annotations', annotations) // 移除病灶 const arr = cornerstoneTools.annotation.state.getAllAnnotations() arr.map(i => { @@ -1371,7 +1399,8 @@ export default { this.setToolEnabled() } } else { - const obj = this.$refs['ecrf'].validTool(toolName, true) + // const obj = this.$refs['ecrf'].validTool(toolName, true) + const obj = this.$refs[`ecrf_${this.lastViewportTaskId}`][0].validTool(toolName, true) this.tools[i].disabledReason = obj.reason if (!obj.isCanActiveTool) { if (this.activeTool === toolName) { 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 c6accb1b..c807af9e 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 @@ -257,27 +257,30 @@ export default { ...mapGetters(['language']) }, watch: { - lastViewportTaskId: { - immediate: true, - handler(id) { - if (!id) return - this.visitTaskId = id - this.$nextTick(() => { - this.activeName = '' - this.getOuterQuestions() - this.getTableQuestions() - }) - } - } + // lastViewportTaskId: { + // immediate: true, + // handler(id) { + // if (!id) return + // this.visitTaskId = id + // this.$nextTick(() => { + // this.activeName = '' + // this.getOuterQuestions() + // this.getTableQuestions() + // }) + // } + // } }, mounted() { this.trialId = this.$route.query.trialId + this.visitTaskId = this.visitInfo.VisitTaskId this.taskInfo = JSON.parse(localStorage.getItem('taskInfo')) this.isBaseLineTask = this.taskInfo.IsBaseLine this.criterionType = this.taskInfo.CriterionType const digitPlaces = Number(localStorage.getItem('digitPlaces')) this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces this.getOrganList() + this.getOuterQuestions() + this.getTableQuestions() }, methods: { // 获取器官信息 @@ -654,7 +657,11 @@ export default { } ) } - this.innerFormData[`${tableInfo.Id}_${answer.RowIndex}`] = answer + this.$set(this.innerFormData, `${tableInfo.Id}_${answer.RowIndex}`, {}) + for (const key in answer) { + this.$set(this.innerFormData[`${tableInfo.Id}_${answer.RowIndex}`], key, answer[key]) + } + // this.innerFormData[`${tableInfo.Id}_${answer.RowIndex}`] = answer this.activeName = `${tableInfo.Id}_${answer.RowIndex}` }, // 创建靶病灶 @@ -1247,8 +1254,12 @@ export default { if (res.IsSuccess) { // 保存成功! this.$message.success(this.$t('common:message:savedSuccessfully')) - this.getTableQuestions() - this.$emit('getAnnotations', this.visitTaskId) + // this.getTableQuestions() + // this.$emit('getAnnotations', this.visitTaskId) + if (!this.innerFormData[`${table.Id}_${rowIndex}`].RowId) { + this.$set(this.innerFormData[`${table.Id}_${rowIndex}`], 'RowId', res.Result.RowId) + } + this.$set(this.innerFormData[`${table.Id}_${rowIndex}`], 'SaveTypeEnum', 2) } loading.close() }, 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 39fdcba9..967f02f9 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 @@ -257,27 +257,30 @@ export default { ...mapGetters(['language']) }, watch: { - lastViewportTaskId: { - immediate: true, - handler(id) { - if (!id) return - this.visitTaskId = id - this.$nextTick(() => { - this.activeName = '' - this.getOuterQuestions() - this.getTableQuestions() - }) - } - } + // lastViewportTaskId: { + // immediate: true, + // handler(id) { + // if (!id) return + // this.visitTaskId = id + // this.$nextTick(() => { + // this.activeName = '' + // this.getOuterQuestions() + // this.getTableQuestions() + // }) + // } + // } }, mounted() { this.trialId = this.$route.query.trialId + this.visitTaskId = this.visitInfo.VisitTaskId this.taskInfo = JSON.parse(localStorage.getItem('taskInfo')) this.isBaseLineTask = this.taskInfo.IsBaseLine this.criterionType = this.taskInfo.CriterionType const digitPlaces = Number(localStorage.getItem('digitPlaces')) this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces this.getOrganList() + this.getOuterQuestions() + this.getTableQuestions() }, methods: { // 获取器官信息 @@ -669,7 +672,11 @@ export default { } ) } - this.innerFormData[`${tableInfo.Id}_${answer.RowIndex}`] = answer + this.$set(this.innerFormData, `${tableInfo.Id}_${answer.RowIndex}`, {}) + for (const key in answer) { + this.$set(this.innerFormData[`${tableInfo.Id}_${answer.RowIndex}`], key, answer[key]) + } + // this.innerFormData[`${tableInfo.Id}_${answer.RowIndex}`] = answer this.activeName = `${tableInfo.Id}_${answer.RowIndex}` }, // 创建靶病灶 @@ -1295,8 +1302,13 @@ export default { if (res.IsSuccess) { // 保存成功! this.$message.success(this.$t('common:message:savedSuccessfully')) - this.getTableQuestions() - this.$emit('getAnnotations', this.visitTaskId) + // this.getTableQuestions() + // this.$emit('getAnnotations', this.visitTaskId) + if (!this.innerFormData[`${table.Id}_${rowIndex}`].RowId) { + this.$set(this.innerFormData[`${table.Id}_${rowIndex}`], 'RowId', res.Result.RowId) + } + this.$set(this.innerFormData[`${table.Id}_${rowIndex}`], 'SaveTypeEnum', 2) + this.activeName = '' } loading.close() From 993d97e20538ef68fb71aaf7721975dd665918e7 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Fri, 18 Apr 2025 09:21:47 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B5=8B=E9=87=8F=E6=97=B6=E7=97=85?= =?UTF-8?q?=E7=81=B6=E9=BB=98=E8=AE=A4=E7=8A=B6=E6=80=81=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reading/dicoms3D/components/ReadPage.vue | 17 +++--- .../components/Recist/QuestionList.vue | 56 +++++++++++++++--- .../dicoms3D/components/ReportPage.vue | 9 ++- .../components/mRecist/QuestionList.vue | 59 ++++++++++++++++--- 4 files changed, 111 insertions(+), 30 deletions(-) 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() } From 76fe08ed230c348425face6b3851a3a3f52c3fc5 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Fri, 18 Apr 2025 09:43:21 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=87=8D=E7=BD=AE=E8=A7=86=E5=8F=A3?= =?UTF-8?q?=E6=97=B6=E9=87=8D=E7=BD=AE=E7=AA=97=E5=AE=BD=E7=AA=97=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trials-panel/reading/dicoms3D/components/ReadPage.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 5011b00b..2508f272 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -132,7 +132,7 @@
@@ -1450,6 +1450,8 @@ export default { const viewport = renderingEngine.getViewport(viewportId) this.$refs[`viewport-${this.activeViewportIndex}`][0].resetOrientationMarkers() viewport.resetCamera({ resetPan: true, resetZoom: true, resetToCenter: true }) + viewport.resetProperties() + viewport.render() renderingEngine.render() }, // 更改视图布局