Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is passing Details

uat
wangxiaoshuang 2025-04-18 09:55:17 +08:00
commit dd1fb94562
4 changed files with 223 additions and 88 deletions

View File

@ -132,7 +132,7 @@
<!-- 反色 -->
<div
class="tool-item"
:title="$t('trials:reading:button:reset')"
:title="$t('trials:reading:button:reverseColor')"
@click.prevent="toggleInvert"
>
<svg-icon icon-class="reversecolor" class="svg-icon" />
@ -318,12 +318,18 @@
</div>
<!-- 表单 -->
<div class="right-panel">
<div
v-for="s in visitTaskList"
v-show="lastViewportTaskId === s.VisitTaskId"
:key="s.VisitTaskId"
style="height:100%;"
>
<mRecisit
v-if="lastViewportTaskId && citerionType === 7"
ref="ecrf"
v-if="lastViewportTaskId && citerionType === 7 && lastViewportTaskIds.includes(s.VisitTaskId)"
:ref="`ecrf_${s.VisitTaskId}`"
:reading-task-state="currentVisitInfo.VisitTaskId === taskInfo.VisitTaskId ? readingTaskState : 2"
:last-viewport-task-id="lastViewportTaskId"
:visit-info="currentVisitInfo"
:visit-info="s"
@removeAnnotation="removeAnnotation"
@getScreenshots="getScreenshots"
@setMarkName="setMarkName"
@ -333,6 +339,8 @@
@setToolToTarget="setToolToTarget"
/>
</div>
</div>
<!-- 自定义调窗 -->
<el-dialog
v-if="customWwc.visible"
@ -564,7 +572,8 @@ export default {
cdVisitTaskId: '',
lastViewportTaskId: '',
digitPlaces: 2,
instanceInfo: {}
instanceInfo: {},
lastViewportTaskIds: []
}
},
computed: {
@ -618,17 +627,33 @@ export default {
immediate: true,
handler(id) {
if (!id) return
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()
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)
// // }
// // })
// }
}
}
},
@ -741,8 +766,8 @@ 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 }
@ -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
@ -1012,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)
},
@ -1048,7 +1073,6 @@ export default {
}
}
})
},
addAnnotationListeners() {
console.log(toolsEvents)
@ -1077,7 +1101,6 @@ export default {
// toolsEvents.TOOL_MODE_CHANGED,
// this.toolModeChanged
// )
},
toolModeChanged(e) {
console.log(e)
@ -1105,7 +1128,8 @@ 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 +1141,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 +1189,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 +1396,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) {
@ -1424,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()
},
//

View File

@ -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: {
//
@ -482,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)
@ -510,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,
@ -546,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)
@ -574,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}`
},
@ -654,7 +699,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}`
},
//
@ -774,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
@ -1247,8 +1296,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()
},

View File

@ -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 => {

View File

@ -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: {
//
@ -487,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)
@ -520,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,
@ -557,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)
@ -589,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}`
},
@ -669,7 +715,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 +1345,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()