diff --git a/src/views/trials/trials-panel/reading/visit-review/components/StudyList.vue b/src/views/trials/trials-panel/reading/visit-review/components/StudyList.vue index 1616a5d4..0ee5ef3e 100644 --- a/src/views/trials/trials-panel/reading/visit-review/components/StudyList.vue +++ b/src/views/trials/trials-panel/reading/visit-review/components/StudyList.vue @@ -20,7 +20,7 @@ study.StudyName }}
@@ -74,18 +74,40 @@ export default { activeFileIndex: -1, taskInfo: null, studyList: [], - pdf + pdf, + BodyPart: {} } }, - mounted() { + async mounted() { this.taskInfo = JSON.parse(localStorage.getItem('taskInfo')) this.studyList = this.visitTaskInfo.StudyList if (this.studyList.length === 0) return this.$nextTick(() => { this.activeStudy(this.studyList[0].Id) }) + this.BodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId) }, methods: { + getBodyPart(bodyPart, other) { + if (!bodyPart && !other) return '' + var separator = ',' + if (bodyPart.indexOf('|') > -1) { + separator = '|' + } else if (bodyPart.indexOf(',') > -1) { + separator = ',' + } else if (bodyPart.indexOf(',') > -1) { + separator = ',' + } + var arr = bodyPart.split(separator) + var newArr = arr.map((i) => { + return this.$fd('Bodypart', i.trim(), 'Code', this.BodyPart, 'Name') + }) + if (other) { + newArr.push(other) + } + newArr = newArr.filter(Boolean) + return newArr.join(' | ') + }, // 设置初始化激活文件 setInitActiveFile() { if (this.studyList.length === 0) return