diff --git a/src/views/trials/trials-panel/reading/dicoms/components/NoneDicomsCanvas.vue b/src/views/trials/trials-panel/reading/dicoms/components/NoneDicomsCanvas.vue
index 26a39252..b751fdce 100644
--- a/src/views/trials/trials-panel/reading/dicoms/components/NoneDicomsCanvas.vue
+++ b/src/views/trials/trials-panel/reading/dicoms/components/NoneDicomsCanvas.vue
@@ -570,7 +570,7 @@ export default {
end: { x: e.offsetX, y: e.offsetY }
},
remark: this.lesionName,
- uuid: `${this.imgId}-${this.lesionName}`,
+ uuid: `${this.imgId}-${this.lesionName ? this.lesionName : Date.now()}`,
toolName: 'ArrowAnnotate',
toolType: 'ArrowAnnotate'
}
@@ -601,7 +601,7 @@ export default {
end: { x: e.offsetX, y: e.offsetY }
},
remark: this.lesionName,
- uuid: `${this.imgId}-${this.lesionName}`,
+ uuid: `${this.imgId}-${this.lesionName ? this.lesionName : Date.now()}`,
toolName: 'RectangleRoi',
toolType: 'RectangleRoi'
}
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 fc995333..c147ebc1 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue
@@ -1405,7 +1405,7 @@ export default {
if (taskIdx === -1) return
const annotations = this.visitTaskList[taskIdx].Annotations
annotations.map(i => {
- if (i.MeasureData) {
+ if (i.MeasureData && !Object.hasOwn(i.MeasureData, 'isDicomReading')) {
const annotation = i.MeasureData
annotation.highlighted = false
cornerstoneTools.annotation.state.addAnnotation(annotation)
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 b913e0c5..acaf05d4 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
@@ -8,35 +8,24 @@
{{ visitInfo.TaskBlindName }}
-
-
+
+
-
-
+
+
@@ -44,146 +33,116 @@
-
-
- {{ language==='en'?qs.GroupEnName:qs.GroupName }}
+
+
+ {{ language === 'en' ? qs.GroupEnName : qs.GroupName }}
-
-
+
+
{{ table.QuestionName }}
-
-
-
+
+
-
- {{ getLesionName(table.OrderMark,answer.RowIndex) }}
+
+ {{ getLesionName(table.OrderMark, answer.RowIndex) }}
-
+
-
+
-
+ :title="innerFormData[`${table.Id}_${answer.RowIndex}`].LesionPart">
{{ innerFormData[`${table.Id}_${answer.RowIndex}`].LesionPart }}
-
+
- {{ $fd('TargetState',parseInt(innerFormData[`${table.Id}_${answer.RowIndex}`].LesionState)) }}
+ {{
+ $fd('TargetState', parseInt(innerFormData[`${table.Id}_${answer.RowIndex}`].LesionState))
+ }}
- {{ $fd('NoTargetState',parseInt(innerFormData[`${table.Id}_${answer.RowIndex}`].LesionState)) }}
+ {{
+ $fd('NoTargetState',
+ parseInt(innerFormData[`${table.Id}_${answer.RowIndex}`].LesionState))
+ }}
- {{ $fd('NewLesionState',parseInt(innerFormData[`${table.Id}_${answer.RowIndex}`].LesionState)) }}
+ {{
+ $fd('NewLesionState',
+ parseInt(innerFormData[`${table.Id}_${answer.RowIndex}`].LesionState))
+ }}
-
-
+
+
{{ innerFormData[`${table.Id}_${answer.RowIndex}`].LesionShort }}mm
-
+
{{ innerFormData[`${table.Id}_${answer.RowIndex}`].LesionLength }}mm
-
-
-
-
+
+
+
-
+
{{ $t('trials:reading:button:removeMark') }}
-
+
{{ $t('common:button:delete') }}
-
+
{{ $t('common:button:save') }}
@@ -212,6 +171,7 @@ import { resetReadingTask, setSkipReadingCache } from '@/api/reading'
import { mapGetters } from 'vuex'
import QuestionFormItem from './QuestionFormItem'
import TableQuestionFormItem from './TableQuestionFormItem'
+import DicomEvent from '@/views/trials/trials-panel/reading/dicoms/components/DicomEvent'
export default {
name: 'QuestionList',
components: {
@@ -283,6 +243,7 @@ export default {
this.getOrganList()
this.getOuterQuestions()
this.getTableQuestions()
+ window.addEventListener('message', this.receiveMsg)
},
methods: {
// 获取器官信息
@@ -344,7 +305,7 @@ export default {
this.$set(this.outerForm, v, null)
},
setOuterFormItemData(obj) {
-
+
},
// 获取表格问题
async getTableQuestions() {
@@ -468,7 +429,7 @@ export default {
}
},
setAnnotation(obj) {
- const annotation = Object.assign({}, obj.annotation)
+ const annotation = Object.assign({}, !Object.hasOwn(obj, 'isDicomReading') ? obj.annotation : obj)
if (this.activeName) {
// 判断当前激活的病灶是否有标注信息
const tableId = this.activeName.split('_')[0]
@@ -493,6 +454,13 @@ export default {
child => child.Id === tableId
)
if (typeof targetTable !== 'object') return
+ if (Object.hasOwn(annotation, 'isDicomReading') && !annotation.isDicomReading) {
+ // 非dicom获取名称进行重绘
+ annotation.data.remark = innerForm.LesionName
+ annotation.markTool = annotation.data.toolName
+ DicomEvent.$emit('addNoneDicomMeasureData', annotation)
+ this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'IsDicomReading', false)
+ }
this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'MeasureData', annotation)
let length = null
let short = null
@@ -544,7 +512,7 @@ export default {
}
this.$set(this.innerFormData[`${tableId}_${rowIndex}`], 'SaveTypeEnum', innerForm.RowId ? 1 : 0)
this.setMarkName(this.innerFormData[`${tableId}_${rowIndex}`].LesionType, this.innerFormData[`${tableId}_${rowIndex}`][stateId], this.innerFormData[`${tableId}_${rowIndex}`].LesionName, annotation)
-
+
}
} else {
if (this.isBaseLineTask) {
@@ -656,7 +624,7 @@ export default {
this.$confirm(msg, {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
return
}
@@ -667,7 +635,7 @@ export default {
this.$confirm(msg, {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
return
}
@@ -676,10 +644,16 @@ export default {
answer.RowId = ''
const maxIndex = this.getMaxRowIndex(tableInfo.TableQuestions.Answers)
answer.RowIndex = `${maxIndex + 1}.00`
- answer.IsDicomReading = true
+ answer.IsDicomReading = annotation && Object.hasOwn(annotation, 'isDicomReading') ? annotation.isDicomReading : true
answer.SaveTypeEnum = 0
answer.LesionType = tableInfo.LesionType
answer.LesionName = this.getLesionName(tableInfo.OrderMark, answer.RowIndex)
+ if (!answer.IsDicomReading) {
+ // 非dicom获取名称进行重绘
+ annotation.data.remark = answer.LesionName
+ annotation.markTool = annotation.data.toolName
+ DicomEvent.$emit('addNoneDicomMeasureData', annotation)
+ }
let state = null
if (this.isBaseLineTask && tableInfo.LesionType === 0) {
state = 0
@@ -693,14 +667,14 @@ export default {
tableInfo.TableQuestions.Answers.push(answer)
if (typeof annotation === 'object') {
answer.MeasureData = annotation
- if (annotation.metadata.toolName === 'Length') {
+ if (annotation.metadata?.toolName === 'Length') {
const referencedImageId = annotation.metadata.referencedImageId
let length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length
length = length ? parseFloat(length).toFixed(this.digitPlaces) : length
const lengthId = this.getQuestionId(0, tableInfo.TableQuestions.Questions)
answer.LesionLength = length
answer[lengthId] = length
- } else if (annotation.metadata.toolName === 'Bidirectional') {
+ } else if (annotation.metadata?.toolName === 'Bidirectional') {
const referencedImageId = annotation.metadata.referencedImageId
let length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length
length = length ? parseFloat(length).toFixed(this.digitPlaces) : length
@@ -775,7 +749,11 @@ export default {
this.$set(this.innerFormData[`${table.Id}_${rowIndex}`], 'LesionState', null)
const obj = Object.assign({}, innerForm.MeasureData)
// 移除标注信息
- this.$emit('removeAnnotation', obj)
+ if (innerForm.IsDicomReading && innerForm.IsDicomReading !== 'False') {
+ this.$emit('removeAnnotation', obj)
+ } else {
+ DicomEvent.$emit('removeNoneDicomMeasureData', obj)
+ }
// 重置标注信息
this.$set(this.innerFormData[`${table.Id}_${rowIndex}`], 'MeasureData', null)
// 重置保存标志
@@ -806,7 +784,11 @@ export default {
if (innerForm.MeasureData) {
// 移除标注信息
const obj = Object.assign({}, innerForm.MeasureData)
- this.$emit('removeAnnotation', obj)
+ if (innerForm.IsDicomReading && innerForm.IsDicomReading !== 'False') {
+ this.$emit('removeAnnotation', obj)
+ } else {
+ DicomEvent.$emit('removeNoneDicomMeasureData', obj)
+ }
}
// 刷新表格问题
await this.getTableQuestions()
@@ -819,7 +801,11 @@ export default {
if (innerForm.MeasureData) {
// 移除标注信息
const obj = Object.assign({}, innerForm.MeasureData)
- this.$emit('removeAnnotation', obj)
+ if (innerForm.IsDicomReading && innerForm.IsDicomReading !== 'False') {
+ this.$emit('removeAnnotation', obj)
+ } else {
+ DicomEvent.$emit('removeNoneDicomMeasureData', obj)
+ }
}
// 移除病灶
this.removeAnswer(table.Id, rowIndex)
@@ -857,7 +843,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg19'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -869,7 +855,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg20'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -886,7 +872,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg21'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -898,7 +884,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg22'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -916,7 +902,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg23'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -928,7 +914,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg24'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -944,7 +930,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg25'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -961,7 +947,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg26'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -983,7 +969,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg27'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -995,7 +981,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg28'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1011,7 +997,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg29'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1023,7 +1009,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg30'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1045,7 +1031,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg31'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1057,7 +1043,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg32'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1074,7 +1060,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg33'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1086,7 +1072,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg34'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1103,7 +1089,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg35'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1115,7 +1101,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg36'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1132,7 +1118,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg37'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1144,7 +1130,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg38'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1161,7 +1147,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg39'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1173,7 +1159,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg40'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1190,7 +1176,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg41'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1202,7 +1188,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg42'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1219,7 +1205,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg43'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1231,7 +1217,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg44'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1248,7 +1234,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg45'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1260,7 +1246,7 @@ export default {
this.$confirm(this.$t('trials:reading:warnning:msg46'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
loading.close()
return
@@ -1390,7 +1376,7 @@ export default {
if (annotation) {
this.setMarkName(this.innerFormData[`${obj.tableId}_${obj.rowIndex}`].LesionType, obj.val, this.innerFormData[`${obj.tableId}_${obj.rowIndex}`].LesionName, annotation)
}
-
+
}
if (obj.questionMark === 8) {
this.$set(this.innerFormData[`${obj.tableId}_${obj.rowIndex}`], 'LesionPart', obj.val)
@@ -1448,7 +1434,7 @@ export default {
this.$confirm(msg, {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
return
}
@@ -1551,7 +1537,7 @@ export default {
type: 'imgfail',
trialId: this.$route.query.trialId,
visitTaskId: this.visitTaskId,
- callBack: async() => {
+ callBack: async () => {
const confirm = await this.$confirm(
this.$t('trials:reading:confirm:feedbackmsg'),
{
@@ -1588,7 +1574,7 @@ export default {
this.$confirm(msg, {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
this.$set(this.innerFormData[`${obj.tableId}_${obj.rowIndex}`], 'LesionType', innerForm.LesionType)
return
@@ -1605,7 +1591,7 @@ export default {
this.$confirm(msg, {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
this.$set(this.innerFormData[`${obj.tableId}_${obj.rowIndex}`], 'LesionType', innerForm.LesionType)
return
@@ -1616,7 +1602,7 @@ export default {
this.$confirm(this.$t(' trials:reading:warnning:msg15'), {
type: 'warning',
showCancelButton: false,
- callback: action => {}
+ callback: action => { }
})
this.$set(this.innerFormData[`${obj.tableId}_${obj.rowIndex}`], 'LesionType', innerForm.LesionType)
return
@@ -1694,7 +1680,11 @@ export default {
// 移除标注信息
if (innerForm.MeasureData) {
const obj = Object.assign({}, innerForm.MeasureData)
- this.$emit('removeAnnotation', obj)
+ if (innerForm.IsDicomReading && innerForm.IsDicomReading !== 'False') {
+ this.$emit('removeAnnotation', obj)
+ } else {
+ DicomEvent.$emit('removeNoneDicomMeasureData', obj)
+ }
}
// 关闭窗口
this.activeName = ''
@@ -1819,28 +1809,42 @@ export default {
} else {
return { isCanActiveTool: true, reason: '' }
}
+ },
+ receiveMsg(event) {
+ if (event.data.type === 'isCanActiveNoneDicomTool') {
+ let obj = { isCanActiveTool: true, lesionName: '', reason: '', toolName: event.data.toolName }
+ let { isCanActiveTool, reason } = this.validTool(event.data.toolName)
+ obj.isCanActiveTool = isCanActiveTool
+ obj.reason = reason
+ DicomEvent.$emit('isCanActiveNoneDicomTool', obj)
+ } else if (event.data.type === 'setMeasurement') {
+ this.setAnnotation(event.data.data)
+ }
}
}
}