病灶保存代码优化

uat_us
caiyiling 2024-03-22 16:52:47 +08:00
parent 83c441b7de
commit a86c4bdd0e
4 changed files with 20 additions and 33 deletions

View File

@ -1978,7 +1978,7 @@ export default {
imageLocation(obj) { imageLocation(obj) {
return new Promise(resolve => { return new Promise(resolve => {
console.log('imageLocation') console.log('imageLocation')
this.setToolToTarget(obj) this.setToolToTarget()
if (!obj.otherMeasureData) { if (!obj.otherMeasureData) {
resolve() resolve()
return return
@ -2005,24 +2005,7 @@ export default {
}) })
}, },
setToolToTarget(obj) { setToolToTarget(obj) {
var toolGroupIds = [ctToolGroupId, ptToolGroupId, fusionToolGroupId] if (this.activeTool) {
if (this.readingTaskState < 2 && obj.markTool && !obj.isMarked) {
toolGroupIds.forEach((toolGroupId) => {
const toolGroup = ToolGroupManager.getToolGroup(toolGroupId)
if (this.activeTool) {
toolGroup.setToolPassive(this.activeTool)
}
toolGroup.setToolActive(obj.markTool, {
bindings: [
{
mouseButton: MouseBindings.Primary // Left Click
}
]
})
})
this.activeTool = obj.markTool
} else {
if (this.activeTool === obj.markTool) {
toolGroupIds.forEach((toolGroupId) => { toolGroupIds.forEach((toolGroupId) => {
const toolGroup = ToolGroupManager.getToolGroup(toolGroupId) const toolGroup = ToolGroupManager.getToolGroup(toolGroupId)
@ -2030,7 +2013,6 @@ export default {
}) })
this.activeTool = '' this.activeTool = ''
} }
}
this.isNonTargetMeasurement = false this.isNonTargetMeasurement = false
}, },
getTargetIdImage( getTargetIdImage(

View File

@ -378,18 +378,19 @@ export default {
loading.close() loading.close()
return return
} }
FusionEvent.$emit('getScreenshots', { otherMeasureData: annotationObj.OtherMeasureData }, async val => { var obj = Object.assign({},annotationObj)
FusionEvent.$emit('getScreenshots', { otherMeasureData: obj.OtherMeasureData }, async val => {
var pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, val) var pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, val)
var picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : '' var picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
if (annotationObj && annotationObj.OtherMeasureData) { if (obj && obj.OtherMeasureData) {
var otherMeasureData = Object.assign({}, annotationObj.OtherMeasureData) var otherMeasureData = Object.assign({}, obj.OtherMeasureData)
for (const k in otherMeasureData.data.cachedStats) { for (const k in otherMeasureData.data.cachedStats) {
otherMeasureData.data.cachedStats[k].pointsInShape = [] otherMeasureData.data.cachedStats[k].pointsInShape = []
} }
annotationObj.OtherMeasureData = JSON.stringify(otherMeasureData) obj.OtherMeasureData = JSON.stringify(otherMeasureData)
annotationObj.OtherPicturePath = picturePath obj.OtherPicturePath = picturePath
questionMarkInfoList.push(annotationObj) questionMarkInfoList.push(obj)
} }
for (const k in this.questionForm) { for (const k in this.questionForm) {
if (k === question.Id) { if (k === question.Id) {

View File

@ -5,7 +5,7 @@
v-loading="loading" v-loading="loading"
:model="questionForm" :model="questionForm"
size="mini" size="mini"
class="measurement-form" class="measurement-form"
> >
<div class="base-dialog-body"> <div class="base-dialog-body">
<div style="display: flex;justify-content: space-between;"> <div style="display: flex;justify-content: space-between;">
@ -179,6 +179,7 @@
</el-radio-group> </el-radio-group>
<template v-if="qs.QuestionMark === 20"> <template v-if="qs.QuestionMark === 20">
<div style="display: flex;flex-direction: row;justify-content: flex-start;"> <div style="display: flex;flex-direction: row;justify-content: flex-start;">
<el-input <el-input
v-if="qs.Type==='calculation'" v-if="qs.Type==='calculation'"
v-model="questionForm[qs.Id]" v-model="questionForm[qs.Id]"
@ -197,7 +198,7 @@
:images="[`${OSSclientConfig.basePath}${answers.OtherPicturePath}`]" :images="[`${OSSclientConfig.basePath}${answers.OtherPicturePath}`]"
> >
<span style="color:#409eff;cursor: pointer" @click="previewImage()"> <span style="color:#409eff;cursor: pointer" @click="previewImage()">
{{ $t('trials:lugano:button:suvscreenshot') }} {{ $t('trials:lugano:button:suvscreenshot1') }}
</span> </span>
<img <img
v-show="false" v-show="false"

View File

@ -462,13 +462,16 @@ export default {
this.loading = false this.loading = false
return return
} }
DicomEvent.$emit('getScreenshots', { questionId: annotationObj.Id, visitTaskId: this.visitTaskId, lesionName: annotationObj.OrderMarkName, markTool: annotationObj.MarkTool, readingTaskState: this.readingTaskState, isMarked: !!annotationObj.MeasureData }, async val => { var obj = Object.assign({},annotationObj)
DicomEvent.$emit('getScreenshots', { questionId: obj.Id, visitTaskId: this.visitTaskId, lesionName: obj.OrderMarkName, markTool: obj.MarkTool, readingTaskState: this.readingTaskState, isMarked: !!obj.MeasureData }, async val => {
var pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, val) var pictureObj = await this.uploadScreenshots(`${new Date().getTime()}`, val)
var picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : '' var picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
if (annotationObj && annotationObj.MeasureData) {
annotationObj.MeasureData = JSON.stringify(annotationObj.MeasureData) if (obj && obj.MeasureData) {
annotationObj.PicturePath = picturePath var annotation = Object.assign({},obj.MeasureData)
questionMarkInfoList.push(annotationObj) obj.MeasureData = JSON.stringify(annotation)
obj.PicturePath = picturePath
questionMarkInfoList.push(obj)
} }
for (const k in this.questionForm) { for (const k in this.questionForm) {
if (k === question.Id) { if (k === question.Id) {