自定义阅片更改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
642c708c74
commit
43a221de00
|
@ -432,6 +432,7 @@
|
||||||
:visit-info="s"
|
:visit-info="s"
|
||||||
@resetAnnotations="resetAnnotations"
|
@resetAnnotations="resetAnnotations"
|
||||||
@setReadingTaskState="setReadingTaskState"
|
@setReadingTaskState="setReadingTaskState"
|
||||||
|
@viewCustomAnnotationSeries="viewCustomAnnotationSeries"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1479,6 +1480,11 @@ export default {
|
||||||
// if ( this.resetAnnotation && this.isFusion ) return false
|
// if ( this.resetAnnotation && this.isFusion ) return false
|
||||||
if (!annotation) return false
|
if (!annotation) return false
|
||||||
if (this.readingTaskState === 2) throw 'annotation Not allowed to operate'
|
if (this.readingTaskState === 2) throw 'annotation Not allowed to operate'
|
||||||
|
const i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName)
|
||||||
|
if (i === -1) {
|
||||||
|
// 临时标记
|
||||||
|
return
|
||||||
|
}
|
||||||
if (annotation.visitTaskId === this.taskInfo.VisitTaskId && annotation.seriesId) {
|
if (annotation.visitTaskId === this.taskInfo.VisitTaskId && annotation.seriesId) {
|
||||||
if (this.activeTool === 'Eraser') {
|
if (this.activeTool === 'Eraser') {
|
||||||
await this.$confirm(
|
await this.$confirm(
|
||||||
|
@ -1874,8 +1880,10 @@ export default {
|
||||||
const type = parseInt(value)
|
const type = parseInt(value)
|
||||||
// 1:默认值;2:垂直翻转;3:水平翻转;4:左转90度;5:右转90度;
|
// 1:默认值;2:垂直翻转;3:水平翻转;4:左转90度;5:右转90度;
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
viewport.resetCamera()
|
// viewport.resetCamera()
|
||||||
viewport.resetProperties()
|
// viewport.resetProperties()
|
||||||
|
// viewport.render()
|
||||||
|
viewport.setViewPresentation({ rotation: 0 })
|
||||||
viewport.render()
|
viewport.render()
|
||||||
} else if (type === 2) {
|
} else if (type === 2) {
|
||||||
const { flipVertical } = viewport.getCamera()
|
const { flipVertical } = viewport.getCamera()
|
||||||
|
@ -2421,6 +2429,17 @@ export default {
|
||||||
}
|
}
|
||||||
return obj
|
return obj
|
||||||
},
|
},
|
||||||
|
viewCustomAnnotationSeries(obj) {
|
||||||
|
const i = this.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
|
||||||
|
if (i === -1) return
|
||||||
|
const studyList = this.visitTaskList[i].StudyList
|
||||||
|
let series = this.getMarkedSeries(studyList, obj.annotation)
|
||||||
|
if (series) {
|
||||||
|
this.$refs[`${this.viewportKey}-${this.cells.length - 1}`][0].setSeriesInfo(series, true)
|
||||||
|
this.activeViewportIndex = i
|
||||||
|
this.$refs[series.TaskInfo.VisitTaskId][0].setSeriesActive(series.StudyIndex, series.SeriesIndex)
|
||||||
|
}
|
||||||
|
},
|
||||||
async getScreenshots(measureData, callback) {
|
async getScreenshots(measureData, callback) {
|
||||||
if (measureData) {
|
if (measureData) {
|
||||||
await this.imageLocation(measureData)
|
await this.imageLocation(measureData)
|
||||||
|
|
|
@ -233,7 +233,7 @@
|
||||||
type="number"
|
type="number"
|
||||||
@change="(val) => { formItemNumberChange(val, question) }"
|
@change="(val) => { formItemNumberChange(val, question) }"
|
||||||
v-model="questionForm[question.Id]"
|
v-model="questionForm[question.Id]"
|
||||||
:disabled="readingTaskState === 2"
|
disabled
|
||||||
style="width: 150px;"
|
style="width: 150px;"
|
||||||
>
|
>
|
||||||
<template v-if="question.Unit !== 0" slot="append">
|
<template v-if="question.Unit !== 0" slot="append">
|
||||||
|
@ -242,7 +242,7 @@
|
||||||
</el-input>
|
</el-input>
|
||||||
<!-- 标记 -->
|
<!-- 标记 -->
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
v-if="readingTaskState!== 2"
|
v-if="readingTaskState < 2 && !questionsMarkStatus[question.Id]"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@click="operateImageMarker({operateStateEnum: 1, question})"
|
@click="operateImageMarker({operateStateEnum: 1, question})"
|
||||||
|
@ -251,6 +251,7 @@
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
<!-- 查看 -->
|
<!-- 查看 -->
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
|
v-if="questionsMarkStatus[question.Id]"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@click="operateImageMarker({operateStateEnum: 2, question})"
|
@click="operateImageMarker({operateStateEnum: 2, question})"
|
||||||
|
@ -259,7 +260,7 @@
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
<!-- 更改 -->
|
<!-- 更改 -->
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
v-if="readingTaskState!== 2"
|
v-if="readingTaskState < 2 && questionsMarkStatus[question.Id]"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@click="operateImageMarker({operateStateEnum: 3, question})"
|
@click="operateImageMarker({operateStateEnum: 3, question})"
|
||||||
|
@ -268,7 +269,7 @@
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
<!-- 移除 -->
|
<!-- 移除 -->
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
v-if="readingTaskState!== 2"
|
v-if="readingTaskState < 2 && questionsMarkStatus[question.Id]"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@click="operateImageMarker({operateStateEnum: 4, question})"
|
@click="operateImageMarker({operateStateEnum: 4, question})"
|
||||||
|
@ -277,11 +278,14 @@
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
<!-- 保存 -->
|
<!-- 保存 -->
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
v-if="readingTaskState!== 2"
|
v-if="readingTaskState < 2 && questionsMarkStatus[question.Id]"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@click="operateImageMarker({operateStateEnum: 5, question})"
|
@click="operateImageMarker({operateStateEnum: 5, question})"
|
||||||
>
|
>
|
||||||
|
<el-tooltip v-if="questionsMarkStatus[question.Id] === 1" class="item" effect="dark" :content="$t('trials:reading:button:unsaved')" placement="bottom">
|
||||||
|
<i class="el-icon-warning" style="color:red" />
|
||||||
|
</el-tooltip>
|
||||||
保存
|
保存
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
|
@ -358,6 +362,7 @@
|
||||||
:criterion-id="criterionId"
|
:criterion-id="criterionId"
|
||||||
:calculationList="calculationList"
|
:calculationList="calculationList"
|
||||||
:questionMarkInfoList="questionMarkInfoList"
|
:questionMarkInfoList="questionMarkInfoList"
|
||||||
|
:questionsMarkStatus="questionsMarkStatus"
|
||||||
@formItemNumberChange="formItemNumberChange"
|
@formItemNumberChange="formItemNumberChange"
|
||||||
@setFormItemData="setFormItemData"
|
@setFormItemData="setFormItemData"
|
||||||
@resetFormItemData="resetFormItemData"
|
@resetFormItemData="resetFormItemData"
|
||||||
|
@ -474,6 +479,12 @@ export default {
|
||||||
questionMarkInfoList: {
|
questionMarkInfoList: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: []
|
default: []
|
||||||
|
},
|
||||||
|
questionsMarkStatus: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
:criterion-id="criterionId"
|
:criterion-id="criterionId"
|
||||||
:calculation-list="calculationList"
|
:calculation-list="calculationList"
|
||||||
:questionMarkInfoList="questionMarkInfoList"
|
:questionMarkInfoList="questionMarkInfoList"
|
||||||
|
:questionsMarkStatus="questionsMarkStatus"
|
||||||
:is-baseline="isBaseLineTask"
|
:is-baseline="isBaseLineTask"
|
||||||
@resetFormItemData="resetFormItemData"
|
@resetFormItemData="resetFormItemData"
|
||||||
@setFormItemData="setFormItemData"
|
@setFormItemData="setFormItemData"
|
||||||
|
@ -77,7 +78,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { getCustomTableQuestionAnswer, changeDicomReadingQuestionAnswer, submitVisitTaskQuestionsInDto, getQuestionCalculateRelation } from '@/api/trials'
|
import { getCustomTableQuestionAnswer, changeDicomReadingQuestionAnswer, submitVisitTaskQuestionsInDto, getQuestionCalculateRelation, saveTaskQuestion } from '@/api/trials'
|
||||||
import { setSkipReadingCache, resetReadingTask } from '@/api/reading'
|
import { setSkipReadingCache, resetReadingTask } from '@/api/reading'
|
||||||
import const_ from '@/const/sign-code'
|
import const_ from '@/const/sign-code'
|
||||||
import QuestionFormItem from './QuestionFormItem'
|
import QuestionFormItem from './QuestionFormItem'
|
||||||
|
@ -119,7 +120,9 @@ export default {
|
||||||
questionMarkInfoList: [],
|
questionMarkInfoList: [],
|
||||||
operateStateEnum: null, // 1:标记;2:查看;3:更改;4:移除;5:保存
|
operateStateEnum: null, // 1:标记;2:查看;3:更改;4:移除;5:保存
|
||||||
operateQuestionId: '',
|
operateQuestionId: '',
|
||||||
operateRowId: ''
|
operateRowId: '',
|
||||||
|
questionsMarkStatus: {}, // 1:未保存;2:已保存
|
||||||
|
digitPlaces: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -128,6 +131,8 @@ export default {
|
||||||
this.taskInfo = JSON.parse(localStorage.getItem('taskInfo'))
|
this.taskInfo = JSON.parse(localStorage.getItem('taskInfo'))
|
||||||
this.isBaseLineTask = this.taskInfo.IsBaseLine
|
this.isBaseLineTask = this.taskInfo.IsBaseLine
|
||||||
this.criterionType = this.taskInfo.CriterionType
|
this.criterionType = this.taskInfo.CriterionType
|
||||||
|
const digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||||
|
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
||||||
this.getQuestionCalculateRelation()
|
this.getQuestionCalculateRelation()
|
||||||
this.getQuestions()
|
this.getQuestions()
|
||||||
},
|
},
|
||||||
|
@ -160,7 +165,16 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.questions = res.Result.SinglePage
|
this.questions = res.Result.SinglePage
|
||||||
this.questionMarkInfoList = res.OtherInfo.QuestionMarkInfoList
|
this.questionsMarkStatus = {}
|
||||||
|
this.questionMarkInfoList = res.OtherInfo.QuestionMarkInfoList.map(i=>{
|
||||||
|
if (i.QuestionId && i.MeasureData) {
|
||||||
|
this.$set(this.questionsMarkStatus, i.QuestionId, 2)
|
||||||
|
}
|
||||||
|
if (typeof i.MeasureData === 'string' && i.MeasureData) {
|
||||||
|
i.MeasureData = JSON.parse(i.MeasureData)
|
||||||
|
}
|
||||||
|
return i
|
||||||
|
})
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -333,55 +347,112 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
operateImageMarker(obj) {
|
async operateImageMarker(obj) {
|
||||||
|
this.operateStateEnum = obj.operateStateEnum
|
||||||
|
this.operateQuestionId = obj.question.Id
|
||||||
if (obj.operateStateEnum === 1) {
|
if (obj.operateStateEnum === 1) {
|
||||||
// 添加标记
|
// 添加标记
|
||||||
|
|
||||||
} else if (obj.operateStateEnum === 2) {
|
} else if (obj.operateStateEnum === 2) {
|
||||||
// 查看标记
|
// 查看标记
|
||||||
this.$emit('')
|
let i = this.questionMarkInfoList.findIndex(i=>i.QuestionId === obj.question.Id)
|
||||||
|
if (i > -1) {
|
||||||
|
let annotation = this.questionMarkInfoList[i].MeasureData
|
||||||
|
this.$emit('viewCustomAnnotationSeries', {visitTaskId: this.visitTaskId, annotation})
|
||||||
|
}
|
||||||
|
|
||||||
} else if (obj.operateStateEnum === 3) {
|
} else if (obj.operateStateEnum === 3) {
|
||||||
// 更改标记
|
// 更改标记
|
||||||
|
this.$set(this.questionsMarkStatus, obj.question.Id, 1)
|
||||||
} else if (obj.operateStateEnum === 4) {
|
} else if (obj.operateStateEnum === 4) {
|
||||||
// 移除标记
|
// 移除标记
|
||||||
|
this.$set(this.questionForm, obj.question.Id, '')
|
||||||
|
let i = this.questionMarkInfoList.findIndex(i=>i.QuestionId === obj.question.Id)
|
||||||
|
if (i > -1) {
|
||||||
|
this.questionMarkInfoList.splice(i, 1)
|
||||||
|
}
|
||||||
|
this.$set(this.questionsMarkStatus, obj.question.Id, 0)
|
||||||
} else if (obj.operateStateEnum === 5) {
|
} else if (obj.operateStateEnum === 5) {
|
||||||
// 保存标记
|
// 保存标记
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
let answers = []
|
||||||
|
answers.push({ id: obj.question.Id, answer: this.questionForm[obj.question.Id] })
|
||||||
|
let markInfo = []
|
||||||
|
let i = this.questionMarkInfoList.findIndex(i=>i.QuestionId === this.operateQuestionId)
|
||||||
|
if (i > -1) {
|
||||||
|
let obj = Object.assign({}, this.questionMarkInfoList[i])
|
||||||
|
obj.MeasureData = obj.MeasureData ? JSON.stringify(obj.MeasureData) : ''
|
||||||
|
markInfo.push(obj)
|
||||||
|
}
|
||||||
|
let params = {
|
||||||
|
visitTaskId: this.visitTaskId,
|
||||||
|
answers: answers,
|
||||||
|
questionMarkInfoList: markInfo
|
||||||
|
}
|
||||||
|
await saveTaskQuestion(-10, params)
|
||||||
|
|
||||||
|
this.$set(this.questionsMarkStatus, obj.question.Id, 2)
|
||||||
|
this.loading = false
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
this.operateStateEnum = obj.operateStateEnum
|
|
||||||
this.operateQuestionId = obj.question.Id
|
|
||||||
},
|
},
|
||||||
bindAnnotationToQuestion(annotation) {
|
bindAnnotationToQuestion(annotation) {
|
||||||
console.log('bindAnnotationToQuestion', annotation)
|
console.log('bindAnnotationToQuestion', annotation)
|
||||||
if (this.operateStateEnum === 1 && this.operateQuestionId) {
|
if (this.operateStateEnum === 1 && this.operateQuestionId) {
|
||||||
let i = this.questionMarkInfoList.findIndex(i=>i.questionId === this.operateQuestionId)
|
let i = this.questionMarkInfoList.findIndex(i=>i.QuestionId === this.operateQuestionId)
|
||||||
if (i === -1) {
|
if (i === -1) {
|
||||||
let markInfo = {
|
let markInfo = {
|
||||||
id: '',
|
QuestionId: this.operateQuestionId,
|
||||||
questionId: this.operateQuestionId,
|
InstanceId: annotation.instanceId,
|
||||||
instanceId: annotation.instanceId,
|
SeriesId: annotation.seriesId,
|
||||||
seriesId: annotation.seriesId,
|
StudyId: annotation.studyId,
|
||||||
studyId: annotation.studyId,
|
MarkTool: annotation.metadata.toolName,
|
||||||
markTool: '',
|
PicturePath: '',
|
||||||
picturePath: '',
|
NumberOfFrames: annotation.numberOfFrames,
|
||||||
numberOfFrames: '',
|
MeasureData: annotation
|
||||||
measureData: annotation
|
|
||||||
}
|
}
|
||||||
this.questionMarkInfoList.push(markInfo)
|
this.questionMarkInfoList.push(markInfo)
|
||||||
} else {
|
} else {
|
||||||
this.questionMarkInfoList[i].instanceId = annotation.instanceId
|
this.questionMarkInfoList[i].InstanceId = annotation.instanceId
|
||||||
this.questionMarkInfoList[i].seriesId = annotation.seriesId
|
this.questionMarkInfoList[i].SeriesId = annotation.seriesId
|
||||||
this.questionMarkInfoList[i].studyId = annotation.studyId
|
this.questionMarkInfoList[i].StudyId = annotation.studyId
|
||||||
this.questionMarkInfoList[i].markTool = ''
|
this.questionMarkInfoList[i].MarkTool = annotation.metadata.toolName
|
||||||
this.questionMarkInfoList[i].picturePath = ''
|
this.questionMarkInfoList[i].PicturePath = ''
|
||||||
this.questionMarkInfoList[i].numberOfFrames = ''
|
this.questionMarkInfoList[i].NumberOfFrames = annotation.numberOfFrames
|
||||||
this.questionMarkInfoList[i].measureData = annotation
|
this.questionMarkInfoList[i].MeasureData = annotation
|
||||||
}
|
}
|
||||||
|
this.setAnswerToQuestion(annotation, this.operateQuestionId)
|
||||||
|
this.$set(this.questionsMarkStatus, this.operateQuestionId, 1)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateAnnotationToQuestion(annotation) {
|
updateAnnotationToQuestion(annotation) {
|
||||||
let i = this.questionMarkInfoList.findIndex(i=>i.measureData && i.measureData.annotationUID === annotation.annotationUID)
|
console.log('updateAnnotationToQuestion', annotation)
|
||||||
|
let i = this.questionMarkInfoList.findIndex(i=>i.MeasureData && i.MeasureData.annotationUID === annotation.annotationUID)
|
||||||
if (i === -1) return
|
if (i === -1) return
|
||||||
this.questionMarkInfoList[i].measureData = annotation
|
this.questionMarkInfoList[i].measureData = annotation
|
||||||
|
this.setAnswerToQuestion(annotation, this.questionMarkInfoList[i].QuestionId)
|
||||||
|
this.$set(this.questionsMarkStatus, this.questionMarkInfoList[i].QuestionId, 1)
|
||||||
|
},
|
||||||
|
setAnswerToQuestion(annotation, questionId) {
|
||||||
|
if (!questionId || !annotation) return
|
||||||
|
const referencedImageId = annotation.metadata.referencedImageId
|
||||||
|
if (annotation.metadata.toolName === 'Length') {
|
||||||
|
let length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length
|
||||||
|
length = length ? parseFloat(length).toFixed(this.digitPlaces) : length
|
||||||
|
this.$set(this.questionForm, questionId, length)
|
||||||
|
} else if (obj.toolName === 'Bidirectional') {
|
||||||
|
// let length = annotation.data.cachedStats[`imageId:${referencedImageId}`].length
|
||||||
|
// length = length ? parseFloat(length).toFixed(this.digitPlaces) : length
|
||||||
|
let short = annotation.data.cachedStats[`imageId:${referencedImageId}`].width
|
||||||
|
short = short ? parseFloat(short).toFixed(this.digitPlaces) : short
|
||||||
|
this.$set(this.questionForm, questionId, short)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async resetForm() {
|
async resetForm() {
|
||||||
const confirm = await this.$confirm(
|
const confirm = await this.$confirm(
|
||||||
|
|
Loading…
Reference in New Issue