diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/FusionForm.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/FusionForm.vue index 6296bb66..d5cfff33 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/FusionForm.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/FusionForm.vue @@ -160,7 +160,10 @@ export default { taskBlindName: '', isBaseLineTask: null, ctSeriesInfo: {}, - petSeriesInfo: {} + petSeriesInfo: {}, + defaultStudyId: '', + defaultCTSeriesId: '', + defaultPTSeriesId: '' }, visitTaskId: '', taskList: [], @@ -197,6 +200,9 @@ export default { this.studyList = this.taskList[0].StudyInfoList const studyIdx = this.taskList[0].StudyInfoList.findIndex(i => i.StudyId === this.taskList[0].StudyId) this.fusionForm.studyId = this.studyList[studyIdx].StudyId + this.fusionForm.defaultStudyId = this.taskList[0].StudyId + this.fusionForm.defaultCTSeriesId = this.taskList[0].CTSeriesId + this.fusionForm.defaultPTSeriesId = this.taskList[0].PTSeriesId this.ctSeries = this.studyList[studyIdx].CTSeriesList this.petSeries = this.studyList[studyIdx].PTSeriesList const ctSexiesIdx = this.ctSeries.findIndex(i => i.Id === this.taskList[0].CTSeriesId) @@ -254,11 +260,30 @@ export default { this.studyList = idx > -1 ? this.taskList[idx].StudyInfoList : [] this.fusionForm.taskBlindName = idx > -1 ? this.taskList[idx].TaskBlindName : '' this.fusionForm.isBaseLineTask = idx > -1 ? this.taskList[idx].IsBaseLineTask : null + this.studyList = idx > -1 ? this.taskList[idx].StudyInfoList : null + this.fusionForm.studyId = '' + this.fusionForm.defaultStudyId = idx > -1 ? this.taskList[idx].StudyId : '' + this.fusionForm.defaultCTSeriesId = idx > -1 ? this.taskList[idx].CTSeriesId : '' + this.fusionForm.defaultPTSeriesId = idx > -1 ? this.taskList[idx].PTSeriesId : '' + this.ctSeries = [] + this.petSeries = [] }, handleStudyIdChange(v) { var idx = this.studyList.findIndex(i => i.StudyId === v) this.ctSeries = idx > -1 ? this.studyList[idx].CTSeriesList : [] this.petSeries = idx > -1 ? this.studyList[idx].PTSeriesList : [] + if (v === this.fusionForm.defaultStudyId) { + this.$nextTick(() => { + const ctSexiesIdx = this.ctSeries.findIndex(i => i.Id === this.fusionForm.defaultCTSeriesId) + const ptSexiesIdx = this.petSeries.findIndex(i => i.Id === this.fusionForm.defaultPTSeriesId) + this.fusionForm.ctSeriesInfo = Object.assign({}, this.ctSeries[ctSexiesIdx]) + this.fusionForm.petSeriesInfo = Object.assign({}, this.petSeries[ptSexiesIdx]) + this.$refs.ctSeries.clearSelection() + this.$refs.ctSeries.toggleRowSelection(this.ctSeries[ctSexiesIdx]) + this.$refs.petSeries.clearSelection() + this.$refs.petSeries.toggleRowSelection(this.petSeries[ptSexiesIdx]) + }) + } }, handleCTSelectionChange(rows) { if (rows.length > 0) {