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 b019dd7a..c2ae67f1 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -1427,8 +1427,9 @@ export default { } this.saveCustomAnnotation(annotation) } + this.$refs[`ecrf_${series.TaskInfo.VisitTaskId}`][0].bindAnnotationToQuestion(annotation) } - + this.setToolsPassive() }, validMarkName(markName) { @@ -1468,6 +1469,7 @@ export default { const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) { this.saveCustomAnnotation(annotation) + this.$refs[`ecrf_${series.TaskInfo.VisitTaskId}`][0].updateAnnotationToQuestion(annotation) } this.setToolsPassive() }, @@ -1501,7 +1503,7 @@ export default { } else { throw 'annotation Not allowed to operate' } - }catch(e){ + } catch (e) { cornerstoneTools.annotation.state.addAnnotation(annotation) const renderingEngine = getRenderingEngine(renderingEngineId) for (let i = 0; i < this.cells.length; i++) { diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionFormItem.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionFormItem.vue new file mode 100644 index 00000000..add002a1 --- /dev/null +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionFormItem.vue @@ -0,0 +1,1146 @@ + + + diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue index e4b1d01c..dd1fe0b9 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue @@ -32,9 +32,12 @@ :reading-task-state="readingTaskState" :criterion-id="criterionId" :calculation-list="calculationList" + :questionMarkInfoList="questionMarkInfoList" :is-baseline="isBaseLineTask" @resetFormItemData="resetFormItemData" @setFormItemData="setFormItemData" + @getQuestions="getQuestions" + @operateImageMarker="operateImageMarker" /> @@ -77,7 +80,7 @@ import { getCustomTableQuestionAnswer, changeDicomReadingQuestionAnswer, submitVisitTaskQuestionsInDto, getQuestionCalculateRelation } from '@/api/trials' import { setSkipReadingCache, resetReadingTask } from '@/api/reading' import const_ from '@/const/sign-code' -import QuestionFormItem from '@/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem' +import QuestionFormItem from './QuestionFormItem' import SignForm from '@/views/trials/components/newSignForm' export default { name: 'EcrfList', @@ -112,7 +115,11 @@ export default { calculationList: [], taskInfo: null, isBaseLineTask: false, - rerender: true + rerender: true, + questionMarkInfoList: [], + operateStateEnum: null, // 1:标记;2:查看;3:更改;4:移除;5:保存 + operateQuestionId: '', + operateRowId: '' } }, mounted() { @@ -153,6 +160,7 @@ export default { } }) this.questions = res.Result.SinglePage + this.questionMarkInfoList = res.OtherInfo.QuestionMarkInfoList this.loading = false } } catch (e) { @@ -325,6 +333,56 @@ export default { } }) }, + operateImageMarker(obj) { + if (obj.operateStateEnum === 1) { + // 添加标记 + + } else if (obj.operateStateEnum === 2) { + // 查看标记 + this.$emit('') + } else if (obj.operateStateEnum === 3) { + // 更改标记 + } else if (obj.operateStateEnum === 4) { + // 移除标记 + } else if (obj.operateStateEnum === 5) { + // 保存标记 + } + this.operateStateEnum = obj.operateStateEnum + this.operateQuestionId = obj.question.Id + }, + bindAnnotationToQuestion(annotation) { + console.log('bindAnnotationToQuestion', annotation) + if (this.operateStateEnum === 1 && this.operateQuestionId) { + let i = this.questionMarkInfoList.findIndex(i=>i.questionId === this.operateQuestionId) + if (i === -1) { + let markInfo = { + id: '', + questionId: this.operateQuestionId, + instanceId: annotation.instanceId, + seriesId: annotation.seriesId, + studyId: annotation.studyId, + markTool: '', + picturePath: '', + numberOfFrames: '', + measureData: annotation + } + this.questionMarkInfoList.push(markInfo) + } else { + this.questionMarkInfoList[i].instanceId = annotation.instanceId + this.questionMarkInfoList[i].seriesId = annotation.seriesId + this.questionMarkInfoList[i].studyId = annotation.studyId + this.questionMarkInfoList[i].markTool = '' + this.questionMarkInfoList[i].picturePath = '' + this.questionMarkInfoList[i].numberOfFrames = '' + this.questionMarkInfoList[i].measureData = annotation + } + } + }, + updateAnnotationToQuestion(annotation) { + let i = this.questionMarkInfoList.findIndex(i=>i.measureData && i.measureData.annotationUID === annotation.annotationUID) + if (i === -1) return + this.questionMarkInfoList[i].measureData = annotation + }, async resetForm() { const confirm = await this.$confirm( this.$t('trials:dicomReading:message:confirmReset1'), diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionTableFormItem.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionTableFormItem.vue new file mode 100644 index 00000000..547c1f0f --- /dev/null +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionTableFormItem.vue @@ -0,0 +1,576 @@ + + +