i.IsBaseLineTask) } - if (bsIdx > -1) { - var trialId = this.$router.currentRoute.query.trialId - await store.dispatch('reading/getMeasuredData', this.visitTaskList[bsIdx].VisitTaskId) - await store.dispatch('reading/getStudyInfo', { trialId: trialId, subjectVisitId: this.visitTaskList[bsIdx].VisitId, visitTaskId: this.visitTaskList[bsIdx].VisitTaskId, taskBlindName: this.visitTaskList[bsIdx].TaskBlindName }) + try { + if (bsIdx > -1) { + var trialId = this.$router.currentRoute.query.trialId + await store.dispatch('reading/getMeasuredData', this.visitTaskList[bsIdx].VisitTaskId) + await store.dispatch('reading/getStudyInfo', { trialId: trialId, subjectVisitId: this.visitTaskList[bsIdx].VisitId, visitTaskId: this.visitTaskList[bsIdx].VisitTaskId, taskBlindName: this.visitTaskList[bsIdx].TaskBlindName }) - const firstObj = this.getFirstMarkedSeries(this.visitTaskList[bsIdx].MeasureData, [...this.visitTaskList[bsIdx].StudyList]) - seriesList.push(firstObj.series) + const firstObj = this.getFirstMarkedSeries(this.visitTaskList[bsIdx].MeasureData, [...this.visitTaskList[bsIdx].StudyList]) + seriesList.push(firstObj.series) - const secondObj = this.getSecondMarkedSeries(firstObj, { ...this.visitTaskList[idx] }) - this.studyIndex = secondObj.studyIndex - this.seriesIndex = secondObj.seriesIndex - seriesList.push(secondObj.series) - this.studyList[secondObj.studyIndex].SeriesList[secondObj.seriesIndex].isFirstRender = true - this.studyIndex = secondObj.studyIndex - this.seriesIndex = secondObj.seriesIndex + const secondObj = this.getSecondMarkedSeries(firstObj, { ...this.visitTaskList[idx] }) + this.studyIndex = secondObj.studyIndex + this.seriesIndex = secondObj.seriesIndex + seriesList.push(secondObj.series) + this.studyList[secondObj.studyIndex].SeriesList[secondObj.seriesIndex].isFirstRender = true + this.studyIndex = secondObj.studyIndex + this.seriesIndex = secondObj.seriesIndex - this.activeNames = [`${this.studyList[secondObj.studyIndex].StudyId}`] - } else { - const sIdx = this.studyList.findIndex(s => s.IsDicom && !i.IsCriticalSequence) - const series = this.studyList[sIdx].SeriesList[0] - const imageIdIndex = Math.floor(series.imageIds.length / 2) - series.imageIdIndex = imageIdIndex > 0 ? imageIdIndex - 1 : 0 - seriesList.push(series) - this.studyIndex = sIdx - this.seriesIndex = 0 + this.activeNames = [`${this.studyList[secondObj.studyIndex].StudyId}`] + } else { + const sIdx = this.studyList.findIndex(s => s.IsDicom && !i.IsCriticalSequence) + const series = this.studyList[sIdx].SeriesList[0] + const imageIdIndex = Math.floor(series.imageIds.length / 2) + series.imageIdIndex = imageIdIndex > 0 ? imageIdIndex - 1 : 0 + seriesList.push(series) + this.studyIndex = sIdx + this.seriesIndex = 0 - this.activeNames = [`${this.studyList[sIdx].StudyId}`] + this.activeNames = [`${this.studyList[sIdx].StudyId}`] + } + } catch (err) { + console.log(err) } }