diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue
index 5fd7308e..631e32fc 100644
--- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue
@@ -103,7 +103,7 @@
@@ -468,9 +468,6 @@ export default {
mounted() {
document.documentElement.style.userSelect = 'none'
window.addEventListener('message', this.receiveMsg)
-
- console.log(cornerstoneTools)
- console.log(cornerstone3D)
this.$i18n.locale = this.$route.query.lang
this.setLanguage(this.$route.query.lang)
this.readingTaskState = parseInt(this.$route.query.readingTaskState)
@@ -851,6 +848,9 @@ export default {
const { detail } = e
const { annotation } = detail
const { metadata } = annotation
+ if (!metadata || metadata.toolName === FusionJumpToPointTool.toolName) {
+ return
+ }
const measureData = {}
measureData.frame = 0
measureData.data = annotation
@@ -868,6 +868,9 @@ export default {
const { detail } = e
const { annotation } = detail
const { metadata, data } = annotation
+ if (!metadata || metadata.toolName === FusionJumpToPointTool.toolName) {
+ return
+ }
// var i = this.initAnnotations.findIndex(i => i.orderMark === data.remark && !i.isInit)
// if (i > -1) {
// console.log(data.remark)
diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestions.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestions.vue
index 6e46f6c6..66c91200 100644
--- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestions.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestions.vue
@@ -172,6 +172,13 @@ export default {
beforeDestroy() {
},
methods: {
+ getQuestionFormRef(refName) {
+ const ref = this.$refs[refName]
+ if (!ref) {
+ return null
+ }
+ return Array.isArray(ref) ? ref[0] : ref
+ },
handleReadingChart(e) {
this.$emit('handleReadingChart', e)
},
@@ -191,7 +198,8 @@ export default {
this.tableQuestions.forEach(item => {
item.TableQuestions.Answers.forEach(i => {
var refName = `${item.Id}_${i.RowIndex}`
- this.$refs[refName] && this.$refs[refName][0].initForm(isRerender)
+ const questionFormRef = this.getQuestionFormRef(refName)
+ questionFormRef && questionFormRef.initForm(isRerender)
})
})
})
@@ -271,7 +279,8 @@ export default {
this.tableQuestions.forEach(item => {
item.TableQuestions.Answers.forEach(i => {
var refName = `${item.Id}_${i.RowIndex}`
- this.$refs[refName] && this.$refs[refName][0].initForm()
+ const questionFormRef = this.getQuestionFormRef(refName)
+ questionFormRef && questionFormRef.initForm()
})
})
})
@@ -379,7 +388,8 @@ export default {
this.tableQuestions.forEach(item => {
item.TableQuestions.Answers.forEach(i => {
var refName = `${item.Id}_${i.RowIndex}`
- this.$refs[refName] && this.$refs[refName][0].initForm()
+ const questionFormRef = this.getQuestionFormRef(refName)
+ questionFormRef && questionFormRef.initForm()
})
})
})
@@ -391,7 +401,8 @@ export default {
var rowIndex = String(this.unSaveTargets[0].rowIndex)
var questionId = this.unSaveTargets[0].questionId
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
- if (rowIndex === this.activeItem.activeRowIndex && questionId === this.activeItem.activeCollapseId && !this.$refs[refName][0].questionForm.OtherMeasureData) {
+ const questionFormRef = this.getQuestionFormRef(refName)
+ if (rowIndex === this.activeItem.activeRowIndex && questionId === this.activeItem.activeCollapseId && questionFormRef && !questionFormRef.questionForm.OtherMeasureData) {
if (toolName === 'CircleROI') {
return { isCanActiveTool: true, reason: '' }
} else {
@@ -522,7 +533,8 @@ export default {
if (item.TableQuestions && item.TableQuestions.Answers) {
item.TableQuestions.Answers.map(t => {
const refName = `${item.Id}_${t.RowIndex}`
- if (this.$refs[refName] && this.$refs[refName][0] && this.$refs[refName][0].questionForm.saveTypeEnum !== 2) {
+ const questionFormRef = this.getQuestionFormRef(refName)
+ if (questionFormRef && questionFormRef.questionForm.saveTypeEnum !== 2) {
var lessionName = this.getLesionName(item.OrderMark, t.RowIndex)
arr.push({ lessionName: lessionName, rowIndex: t.RowIndex, questionId: item.Id })
}
@@ -552,11 +564,15 @@ export default {
this.activeItem.activeCollapseId = arr[0]
this.$nextTick(() => {
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
- if (this.$refs[refName][0].questionForm.IsDicomReading !== false) {
+ const questionFormRef = this.getQuestionFormRef(refName)
+ if (!questionFormRef) {
+ return
+ }
+ if (questionFormRef.questionForm.IsDicomReading !== false) {
var markTool = 'CircleROI'
- var isMarked = !!this.$refs[refName][0].questionForm.OtherMeasureData
+ var isMarked = !!questionFormRef.questionForm.OtherMeasureData
}
- FusionEvent.$emit('imageLocation', { otherMeasureData: this.$refs[refName][0].questionForm.OtherMeasureData, markTool, isMarked })
+ FusionEvent.$emit('imageLocation', { otherMeasureData: questionFormRef.questionForm.OtherMeasureData, markTool, isMarked })
})
} else {
this.activeItem.activeRowIndex = null
@@ -576,7 +592,10 @@ export default {
},
collapseRightClick(e, obj, activeCollapseId, activeRowIndex) {
const refName = `${activeCollapseId}_${activeRowIndex}`
- FusionEvent.$emit('imageLocation', { otherMeasureData: this.$refs[refName][0].questionForm.OtherMeasureData })
+ const questionFormRef = this.getQuestionFormRef(refName)
+ if (questionFormRef) {
+ FusionEvent.$emit('imageLocation', { otherMeasureData: questionFormRef.questionForm.OtherMeasureData })
+ }
e.stopImmediatePropagation()
e.stopPropagation()
@@ -621,8 +640,12 @@ export default {
this.activeName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
this.$nextTick(() => {
+ const questionFormRef = this.getQuestionFormRef(refName)
+ if (!questionFormRef) {
+ return
+ }
if (deleteInfo) {
- this.$refs[refName][0].setDeleteInfo(deleteInfo)
+ questionFormRef.setDeleteInfo(deleteInfo)
}
if (questionsObj.otherMeasureData) {
const measureData = {}
@@ -631,7 +654,7 @@ export default {
measureData.type = questionsObj.otherMeasureData.metadata.toolName
measureData.suvMax = questionsObj.suvMax
- this.$refs[refName][0].setMeasureData(measureData)
+ questionFormRef.setMeasureData(measureData)
}
})
},
@@ -719,21 +742,28 @@ export default {
this.activeItem.activeRowIndex = String(measureObj.questionInfo.RowIndex)
this.activeName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
- if (this.$refs[refName]) {
- this.$refs[refName][0].setMeasureData(measureObj.measureData)
+ const questionFormRef = this.getQuestionFormRef(refName)
+ if (questionFormRef) {
+ questionFormRef.setMeasureData(measureObj.measureData)
}
}
},
clearMeasuredData() {
if (this.activeItem.activeCollapseId && this.activeItem.activeRowIndex && this.activeName) {
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
- this.$refs[refName][0].clearMeasurement()
+ const questionFormRef = this.getQuestionFormRef(refName)
+ if (questionFormRef) {
+ questionFormRef.clearMeasurement()
+ }
}
},
setOutsideMeasuredData(annotation) {
if (this.activeItem.activeCollapseId && this.activeItem.activeRowIndex && this.activeName) {
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
- this.$refs[refName][0].setOutsideMeasuredData(annotation)
+ const questionFormRef = this.getQuestionFormRef(refName)
+ if (questionFormRef) {
+ questionFormRef.setOutsideMeasuredData(annotation)
+ }
}
},
// 设置测量数据
@@ -779,8 +809,22 @@ export default {
// 判断是否存在测量数据
this.$nextTick(() => {
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
- if (!this.$refs[refName][0].questionForm.OtherMeasureData) {
- this.$refs[refName][0].setMeasureData(measureData)
+ const questionFormRef = this.getQuestionFormRef(refName)
+ if (!questionFormRef) {
+ if (this.isBaseLineTask) {
+ var idx = this.tableQuestions.findIndex(item => item.LesionType === 0)
+ if (this.tableQuestions[idx].TableQuestions.Answers.length < this.tableQuestions[idx].MaxQuestionCount && (measureData.type === 'CircleROI')) {
+ this.createTTarget(measureData)
+ } else {
+ this.createNTTarget(measureData)
+ }
+ } else {
+ this.createNLTarget(measureData)
+ }
+ return
+ }
+ if (!questionFormRef.questionForm.OtherMeasureData) {
+ questionFormRef.setMeasureData(measureData)
} else {
if (this.isBaseLineTask) {
var idx = this.tableQuestions.findIndex(item => item.LesionType === 0)
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 7cc0fb81..49c168e8 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue
@@ -653,7 +653,7 @@ const newStyles = {
}
}
annotation.config.style.setDefaultToolStyles(newStyles)
-const { MouseBindings, Events: toolsEvents } = csToolsEnums
+const { MouseBindings, Events: toolsEvents, ChangeTypes } = csToolsEnums
export default {
name: 'ReadPage',
components: {
@@ -974,7 +974,6 @@ export default {
this.tools = getCustomizeStandardsTools(this.taskInfo.ReadingToolList)
const toolNames = this.tools.map(i => i.toolName)
this.customizeStandards = config.customizeStandards.filter(item => !toolNames.includes(item.toolName))
- console.log(this.customizeStandards, 'this.customizeStandards')
} else {
this.tools = getTools(this.criterionType)
}
@@ -1058,7 +1057,6 @@ export default {
let imageId = imageIds[0]
const imagePixelModule = metaData.get('imagePixelModule', imageId);
const photometricInterpretation = imagePixelModule?.photometricInterpretation;
- console.log(photometricInterpretation, 'photometricInterpretation')
if (photometricInterpretation && photometricInterpretation !== 'MONOCHROME1' && photometricInterpretation !== 'MONOCHROME2') return this.$confirm(this.$t('trials:histogram:confirm:photometricInterpretationNotSupported'))
this.histogramVisible = true
this.setToolsPassive()
@@ -1939,12 +1937,6 @@ export default {
// this.toolModeChanged
// )
},
- toolModeChanged(e) {
- console.log(e)
- const arr = cornerstoneTools.annotation.state.getAllAnnotations()
- // if (arr)
- console.log(arr)
- },
annotationAddedListener(e) {
},
@@ -1978,12 +1970,13 @@ export default {
},
annotationModifiedListener(e) {
console.log('Modified')
- const { annotation } = e.detail
+ const { annotation, changeType } = e.detail
+ const isStatsUpdated = changeType === ChangeTypes.StatsUpdated
if (!annotation) return
if (annotation.metadata.toolName === FusionJumpToPointTool.toolName) return
if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation)
if (this.readingTaskState === 2) return
- if (!annotation.highlighted) return
+ if (!annotation.highlighted && !isStatsUpdated) return
if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
@@ -2040,7 +2033,6 @@ export default {
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
const referencedImageId = annotation.metadata.referencedImageId
- console.log(annotation, 'annotation')
const params = this.getInstanceInfo(referencedImageId)
annotation.visitTaskId = series.TaskInfo.VisitTaskId
annotation.studyId = series.StudyId
@@ -2114,12 +2106,13 @@ export default {
}
},
customAnnotationModifiedListener(e) {
- const { annotation } = e.detail
+ const { annotation, changeType } = e.detail
+ const isStatsUpdated = changeType === ChangeTypes.StatsUpdated
if (!annotation) return
if (annotation.metadata.toolName === FusionJumpToPointTool.toolName) return
if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation)
if (this.readingTaskState === 2) return
- if (!annotation.highlighted) return
+ if (!annotation.highlighted && !isStatsUpdated) return
const i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName)
if (i === -1) {
if (annotation.metadata.toolName !== LabelMapEditWithContourTool.toolName) this.setToolsPassive()
@@ -2216,7 +2209,6 @@ export default {
}
},
contentMouseup(e) {
- console.log('contentMouseup')
if (this.$refs.Segmentations) {
this.$refs.Segmentations.contentMouseup()
}
@@ -3395,7 +3387,6 @@ export default {
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].resize(true)
} else if (shortcutKeyEnum === 15) {
// 截图
- console.log("截图")
this.saveImage()
} else if (shortcutKeyEnum === 16) {
// 反色
@@ -4061,7 +4052,6 @@ export default {
})
},
setToolToTarget(obj) {
- console.log('setToolToTarget')
if (obj.visitTaskId === this.taskInfo.VisitTaskId && this.readingTaskState !== 2 && obj.markTool && !obj.isMarked) {
const toolName = obj.markTool
if (this.activeTool) {
diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue
index 38c3ce25..29eadf0c 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue
@@ -1263,10 +1263,23 @@ export default {
} else if (this.isNoneDicom && value !== null) {
value = this.reRound(csUtils.roundNumber(value), this.digitPlaces)
}
+ if (prop === 'total' && value !== null) {
+ return this.formatStatSum(value)
+ }
return value !== null
? parseFloat(value).toFixed(this.digitPlaces)
: value
},
+ formatStatSum(value) {
+ const num = Number(value)
+ if (!Number.isFinite(num)) return value
+
+ if (Math.abs(num - Math.round(num)) < 1e-6) {
+ return String(Math.round(num))
+ }
+
+ return this.reRound(num, this.digitPlaces)
+ },
reRound(result, finalPrecision) {
if (typeof result === 'string' && result.includes(', ')) {
const numStrs = result.split(', ')