This commit is contained in:
熊飞
2024-03-12 16:14:00 +08:00
4 changed files with 69 additions and 27 deletions
@@ -789,6 +789,7 @@ export default {
measureData.data = toolState.data[i]
measureData.type = toolType
measureData.thick = this.dicomInfo.thick
measureData.location = this.dicomInfo.location
var uuid = toolState.data[i].uuid
var idx = this.measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === uuid)
if (idx > -1) {
@@ -1036,6 +1037,7 @@ export default {
measureData.data = toolState.data[i]
measureData.type = toolType
measureData.thick = this.dicomInfo.thick
measureData.location = this.dicomInfo.location
measureData.ww = Math.round(viewport.voi.windowWidth)
measureData.wc = Math.round(viewport.voi.windowCenter)
measureData.data.active = false
@@ -1357,6 +1359,7 @@ export default {
measureData.data = e.detail.measurementData
measureData.type = e.detail.toolName
measureData.thick = this.dicomInfo.thick
measureData.location = this.dicomInfo.location
measureData.ww = Math.round(viewport.voi.windowWidth)
measureData.wc = Math.round(viewport.voi.windowCenter)
@@ -1373,6 +1376,7 @@ export default {
measureData.data = e.detail.measurementData
measureData.type = e.detail.toolName
measureData.thick = this.dicomInfo.thick
measureData.location = this.dicomInfo.location
measureData.ww = Math.round(viewport.voi.windowWidth)
measureData.wc = Math.round(viewport.voi.windowCenter)
const canvas = this.canvas.querySelector('canvas')
@@ -1487,6 +1491,7 @@ export default {
measureData.data = measurementData
measureData.type = toolType
measureData.thick = this.dicomInfo.thick
measureData.location = this.dicomInfo.location
measureData.ww = Math.round(viewport.voi.windowWidth)
measureData.wc = Math.round(viewport.voi.windowCenter)
measureData.data.active = false
@@ -1118,7 +1118,7 @@ export default {
}
},
modifyMeasuredData(measureObj) {
if (measureObj.measureData.data.remark === 'Spleen') {
if (measureObj.measureData.data.remark === 'Spleen Tip' || measureObj.measureData.data.remark === 'Spleen Floor') {
this.$refs['ecrf3'].setMeasuredData(measureObj.measureData)
this.isNonTargetMeasurement = false
} else {
@@ -1133,7 +1133,7 @@ export default {
},
// 设置测量数据
setMeasuredData(measureData) {
if (this.isNonTargetMeasurement || measureData.data.remark === 'Spleen') {
if (this.isNonTargetMeasurement || measureData.data.remark === 'Spleen Tip' || measureData.data.remark === 'Spleen Floor') {
this.$refs['ecrf3'].setMeasuredData(measureData)
this.isNonTargetMeasurement = false
return
@@ -1397,6 +1397,7 @@ export default {
margin-bottom: 10px;
span{
font-size: 15px;
color: red;
}
}
}
@@ -25,14 +25,7 @@
]"
:class="[question.Type==='group'?'mb':question.Type==='upload'?'uploadWrapper':'']"
>
<template v-if="question.QuestionType === 48">
<!-- question.QuestionType === 51 || question.QuestionType === 52 -->
<!-- <el-input
v-if="question.Type==='calculation'"
v-model="questionForm[question.Id]"
disabled
style="width: 100px;"
/> -->
<template v-if="question.QuestionType === 60 || question.QuestionType === 61">
<div style="display: flex;flex-direction: row;justify-content: flex-start;">
<el-input
v-if="question.Type==='calculation'"
@@ -53,7 +46,7 @@
</div>
</template>
<template v-else-if="question.QuestionType === 51 || question.QuestionType === 52 || question.QuestionType === 53">
<template v-else-if="question.QuestionType === 48 || question.QuestionType === 51 || question.QuestionType === 52 || question.QuestionType === 53">
<el-input
v-if="question.Type==='calculation'"
v-model="questionForm[question.Id]"
@@ -344,11 +337,11 @@ export default {
// if (parseInt(v) !== 5) {
// return
// }
if (question.QuestionType === 49) {
this.$emit('setFormItemData', { key: question.Id, val: v })
}
if (question.Childrens.length > 0) {
this.resetChild(question.Childrens)
}else{
this.$emit('setFormItemData', { key: question.Id, val: v })
}
},
resetChild(obj) {
@@ -20,7 +20,7 @@
<el-form-item v-if="readingTaskState < 2 && !isFirstChangeTask">
<div style="text-align:right">
<el-button size="mini" :disabled="!questionFormChangeState" :type="questionFormChangeState ? 'primary' : null" @click="handleSave">{{ $t('common:button:save') }}</el-button>
<el-button size="mini" :disabled="!questionFormChangeState || (!formChanged && groupClassify > 0)" :type="questionFormChangeState || (!formChanged && groupClassify > 0) ? 'primary' : null" @click="handleSave">{{ $t('common:button:save') }}</el-button>
</div>
</el-form-item>
</el-form>
@@ -74,10 +74,13 @@ export default {
spleenStatusId: '',
spleenLengthId: '',
spleenCommentsId: '',
spleenTipId: '',
spleenFloorId: '',
isBaseLineTask: false,
criterionType: null,
spleenInfo: null,
calculateSpleenStatus: ''
calculateSpleenStatus: '',
formChanged:false
}
},
computed: {
@@ -167,13 +170,21 @@ export default {
this.spleenStatusId = v.Id
}
if (v.QuestionType === 48) {
// 脾脏长度
// 脾脏垂直径
this.spleenLengthId = v.Id
}
if (v.QuestionType === 58) {
// 修改脾脏状态备注
this.spleenCommentsId = v.Id
}
if (v.QuestionType === 60) {
// 脾尖位置
this.spleenTipId = v.Id
}
if (v.QuestionType === 61) {
// 脾底位置
this.spleenFloorId = v.Id
}
}
if (v.Childrens.length > 0) {
this.setChild(v.Childrens)
@@ -210,6 +221,14 @@ export default {
// 修改脾脏状态备注
this.spleenCommentsId = i.Id
}
if (i.QuestionType === 60) {
// 脾尖位置
this.spleenTipId = i.Id
}
if (i.QuestionType === 61) {
// 脾底位置
this.spleenFloorId = i.Id
}
}
if (i.Childrens && i.Childrens.length > 0) {
this.setChild(i.Childrens)
@@ -225,17 +244,22 @@ export default {
var currentSpleenStatus = this.questionForm[this.spleenStatusId]
var currentSpleenLength = this.questionForm[this.spleenLengthId]
currentSpleenStatus = isNaN(parseInt(currentSpleenStatus)) ? null : parseInt(currentSpleenStatus)
var idx = this.measurements.findIndex(i => i.QuestionType === 48)
var stIdx = this.measurements.findIndex(i => i.QuestionType === 60)
var slIdx = this.measurements.findIndex(i => i.QuestionType === 60)
if (currentSpleenLength && currentSpleenStatus === 5) {
// '脾脏状态为不可评估,不需要添加标记!'
this.$alert(this.$t('trials:lugano:message:validSpleen1'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => {}
})
} else if (currentSpleenLength === 5 && idx > -1 && this.measurements[idx].MeasureData) {
} else if (currentSpleenStatus === 5 && ((stIdx > -1 && this.measurements[stIdx].MeasureData) || (slIdx > -1 && this.measurements[slIdx].MeasureData))) {
// 若有标记,状态不可为“无法评估”
this.$alert(this.$t('trials:lugano:message:validSpleen1'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => {}
})
} else if (((stIdx > -1 && this.measurements[stIdx].MeasureData) || (slIdx > -1 && this.measurements[slIdx].MeasureData)) && !currentSpleenLength) {
this.$alert(this.$t('trials:lugano:message:validSpleen2'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => {}
})
} else {
this.saveQuestionsList()
}
@@ -300,6 +324,7 @@ export default {
})
}
}
this.formChanged = false
}).catch(() => {
this.loading = false
})
@@ -384,15 +409,14 @@ export default {
const { Id, QuestionType } = obj
this.currentQsId = Id
var idx = this.measurements.findIndex(i => i.QuestionId === Id)
var orderMarkName = QuestionType === 48 ? 'Spleen' : ''
var orderMarkName = QuestionType === 60 ? 'Spleen Tip' : QuestionType === 61 ? 'Spleen Floor' : ''
if (idx === -1) {
// 脾脏长度(48); 肝脏血池SUVmax(51); 纵膈血池SUVmax(52)
this.measurements.push({ QuestionId: Id, QuestionType: QuestionType, StudyId: '', SeriesId: '', InstanceId: '', MarkTool: '', PicturePath: '', NumberOfFrames: '', MeasureData: '', OrderMarkName: orderMarkName })
}
// 脾脏长度 直径测量
this.$emit('setNonTargetMeasurementStatus', { status: true })
DicomEvent.$emit('imageLocation', { questionId: Id, visitTaskId: this.visitTaskId, lesionName: orderMarkName, markTool: 'Length', readingTaskState: this.readingTaskState, isMarked: false })
DicomEvent.$emit('imageLocation', { questionId: Id, visitTaskId: this.visitTaskId, lesionName: orderMarkName, markTool: 'ArrowAnnotate', readingTaskState: this.readingTaskState, isMarked: false })
},
async removeAnnotation(obj) {
const { Id } = obj
@@ -407,6 +431,7 @@ export default {
DicomEvent.$emit('getMeasureData')
this.calculateSpleenStatus = ''
this.setSpleenCommentDisplay()
this.formChanged = true
},
locateAnnotation(obj) {
const { Id } = obj
@@ -426,7 +451,7 @@ export default {
idx = this.measurements.findIndex(i => i.OrderMarkName === measurement.data.remark)
}
if (idx === -1) return
var remark = this.measurements[idx].QuestionType === 48 ? 'Spleen' : ''
var remark = this.measurements[idx].QuestionType === 60 ? 'Spleen Tip' : this.measurements[idx].QuestionType === 61 ? 'Spleen Floor' : ''
measurement.data.remark = remark
this.measurements[idx].StudyId = measurement.studyId
this.measurements[idx].SeriesId = measurement.seriesId
@@ -451,10 +476,12 @@ export default {
OrderMarkName: measurement.data.remark,
frame: isNaN(parseInt(measurement.frame)) ? 0 : measurement.frame
}
if (measurement.type === 'Length') {
const length = measurement.data.length ? measurement.data.length : null
this.$set(this.questionForm, this.measurements[idx].QuestionId, length || null)
if (this.measurements[idx].QuestionType === 48) {
if (measurement.type === 'ArrowAnnotate') {
const location = measurement.location ? measurement.location : null
this.$set(this.questionForm, this.measurements[idx].QuestionId, location || null)
if (this.measurements[idx].QuestionType === 60 || this.measurements[idx].QuestionType === 61) {
var length = this.getSpleenL()
this.$set(this.questionForm, this.spleenLengthId, length)
var status = this.setSpleenStatus(length)
this.$set(this.questionForm, this.spleenStatusId, status)
this.calculateSpleenStatus = status
@@ -473,6 +500,20 @@ export default {
if (this.isQulityIssues) {
DicomEvent.$emit('questionFormChange', true)
}
this.formChanged = true
},
getSpleenL() {
var length = null
// 脾尖位置
var st = this.questionForm[this.spleenTipId]
st = isNaN(parseFloat(st)) ? null : parseFloat(st)
// 脾底位置
var sf = this.questionForm[this.spleenFloorId]
sf = isNaN(parseFloat(sf)) ? null : parseFloat(sf)
if (st && sf) {
length = Math.abs(st - sf)
}
return length
},
setSpleenStatus(length) {
console.log('setSpleenStatus')
@@ -554,12 +595,14 @@ export default {
this.removeAnnotation({ Id: this.spleenLengthId })
}
}
this.formChanged = true
},
setFormItemData(obj) {
this.questionForm[obj.key] = obj.val
if (obj.key === this.spleenStatusId) {
this.setSpleenCommentDisplay()
}
this.formChanged = true
},
isJSONString(str) {
try {