diff --git a/src/views/trials/trials-panel/reading/dicoms/components/StudyList.vue b/src/views/trials/trials-panel/reading/dicoms/components/StudyList.vue index 2879e9af..d2149f9a 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/StudyList.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/StudyList.vue @@ -385,10 +385,10 @@ export default { var isReadingTaskViewInOrder = parseInt(this.$router.currentRoute.query.isReadingTaskViewInOrder) var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId) this.studyList = this.visitTaskList[idx].StudyList + const studyList = this.visitTaskList[idx].StudyList.filter(i => i.IsDicom) + const seriesArr = studyList.map(s => s.SeriesList).flat() if (isReadingTaskViewInOrder === 2) { // 受试者内随机 - const studyList = this.visitTaskList[idx].StudyList.filter(i => i.IsDicom) - const seriesArr = studyList.map(s => s.SeriesList).flat() if (seriesArr.length === 1) { seriesList.push(seriesArr[0], seriesArr[0]) this.studyIndex = seriesArr[0].studyIndex @@ -410,9 +410,13 @@ export default { this.activeNames = [`${this.studyList[ this.studyIndex].StudyId}`] this.studyList[ obj.studyIndex].SeriesList[obj.seriesIndex].isFirstRender = true } else { - // 初始化问题表单 if (this.studyList.length > 0) { - this.activeNames = [`${this.studyList[0].StudyId}`] + // 初始化问题表单 + this.studyIndex = seriesArr[0].studyIndex + this.seriesIndex = seriesArr[0].seriesIndex + this.activeNames = [`${seriesArr[0].studyId}`] + seriesList.push(seriesArr[0]) + // this.activeNames = [`${this.studyList[0].StudyId}`] } // DicomEvent.$emit('loadMeasurementList', { visitTaskId: this.visitTaskList[idx].VisitTaskId, taskBlindName: this.visitTaskList[idx].TaskBlindName }) @@ -436,6 +440,7 @@ export default { 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 @@ -575,22 +580,20 @@ export default { obj.series = seriesObj.series obj.seriesId = seriesObj.series.seriesId obj.isMarked = false - } else { - const sIdx = studyList.findIndex(s => s.IsDicom) - if (sIdx > -1) { - // 判断是否存在层厚为5的序列,否则显示第一个检查的第一个序列 - const series = studyList[sIdx].SeriesList[0] - var imageIdIndex = series.imageIds.length > 1 ? Math.floor(series.imageIds.length / 2) - 1 : 0 - obj.studyIndex = sIdx - obj.seriesIndex = 0 - obj.series = series - obj.series.imageIdIndex = imageIdIndex >= 0 ? imageIdIndex : 0 - obj.seriesId = series.seriesId - obj.isMarked = false - } } } - + if (Object.keys(obj).length === 0) { + const sIdx = studyList.findIndex(s => s.IsDicom) + if (sIdx > -1) { + obj.studyIndex = sIdx + obj.seriesIndex = 0 + obj.series = studyList[obj.studyIndex].SeriesList[obj.seriesIndex] + const imageIdIndex = Math.floor(obj.series.imageIds.length / 2) + obj.series.imageIdIndex = imageIdIndex >= 0 ? imageIdIndex : 0 + // obj.seriesId = series.seriesId + obj.isMarked = false + } + } return obj }, strSimilarity2Number(s, t) { diff --git a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeStudyList.vue b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeStudyList.vue index f5229536..3b94abff 100644 --- a/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeStudyList.vue +++ b/src/views/trials/trials-panel/reading/dicoms/customize/CustomizeStudyList.vue @@ -555,19 +555,18 @@ export default { obj.series = seriesObj.series obj.seriesId = seriesObj.series.seriesId obj.isMarked = false - } else { - const sIdx = studyList.findIndex(s => s.IsDicom) - if (sIdx > -1) { - // 判断是否存在层厚为5的序列,否则显示第一个检查的第一个序列 - const series = studyList[sIdx].SeriesList[0] - var imageIdIndex = series.imageIds.length > 1 ? Math.floor(series.imageIds.length / 2) - 1 : 0 - obj.studyIndex = sIdx - obj.seriesIndex = 0 - obj.series = series - obj.series.imageIdIndex = imageIdIndex >= 0 ? imageIdIndex : 0 - obj.seriesId = series.seriesId - obj.isMarked = false - } + } + } + if (Object.keys(obj).length === 0) { + const sIdx = studyList.findIndex(s => s.IsDicom) + if (sIdx > -1) { + obj.studyIndex = sIdx + obj.seriesIndex = 0 + obj.series = studyList[obj.studyIndex].SeriesList[obj.seriesIndex] + const imageIdIndex = Math.floor(obj.series.imageIds.length / 2) + obj.series.imageIdIndex = imageIdIndex >= 0 ? imageIdIndex : 0 + // obj.seriesId = series.seriesId + obj.isMarked = false } }