diff --git a/src/views/trials/trials-panel/subject/subject-list/components/SubjectChart.vue b/src/views/trials/trials-panel/subject/subject-list/components/SubjectChart.vue index 0357f4dd..240404b9 100644 --- a/src/views/trials/trials-panel/subject/subject-list/components/SubjectChart.vue +++ b/src/views/trials/trials-panel/subject/subject-list/components/SubjectChart.vue @@ -15,7 +15,8 @@ @@ -144,35 +145,44 @@ export default { { title: this.$t(`subjectChart:table:label:visit`), key: 'visit', - IsHighlight: false + IsHighlight: [] } ] Evaluation[0].forEach(key => { let obj = { title: key.Value, key: key.Value, - IsHighlight: key.IsHighlight + IsHighlight: [] } this.tableKey.push(obj) }) this.tableList = [] if (Evaluation[1] && Evaluation[1].length > 0) { - let obj = {} + let obj = { + IsHighlight: [] + } this.tableKey.forEach((item, index) => { if (index === 0) { obj[item.key] = 'R1' } else { obj[item.key] = Evaluation[1][index - 1].DictionaryCode ? this.$fd(Evaluation[1][index - 1].DictionaryCode, parseFloat(Evaluation[1][index - 1].Value)) : Evaluation[1][index - 1].Value - obj.IsHighlight = Evaluation[1][index - 1].IsHighlight + if (Evaluation[1][index - 1].IsHighlight) { + obj.IsHighlight.push(item.key) + } + } }) this.tableList.push(obj) } if (Evaluation[2] && Evaluation[2].length > 0) { - let obj = {} + let obj = { + IsHighlight: [] + } this.tableKey.forEach((item, index) => { obj[item.key] = index === 0 ? 'R2' : Evaluation[2][index - 1].DictionaryCode ? this.$fd(Evaluation[2][index - 1].DictionaryCode, parseFloat(Evaluation[2][index - 1].Value)) : Evaluation[2][index - 1].Value - obj.IsHighlight = index === 0 ? false : Evaluation[2][index - 1].IsHighlight + if (index > 0 && Evaluation[2][index - 1].IsHighlight) { + obj.IsHighlight.push(item.key) + } }) this.tableList.push(obj) }