diff --git a/src/views/trials/trials-panel/study/index.vue b/src/views/trials/trials-panel/study/index.vue index 65d26fad..da4ca5bd 100644 --- a/src/views/trials/trials-panel/study/index.vue +++ b/src/views/trials/trials-panel/study/index.vue @@ -5,18 +5,9 @@ - - + + @@ -25,19 +16,9 @@ - - + + {{ item.VisitName }} @@ -45,12 +26,7 @@ - + @@ -60,11 +36,7 @@ {{ $t("common:button:search") }} - + {{ $t("common:button:reset") }} @@ -73,42 +45,22 @@ - + - - - + + + - + - + @@ -327,30 +237,17 @@
- 复制链接及提取码 + 复制链接及提取码
- -
- + +
+
@@ -411,16 +308,36 @@ export default { trialId: this.$route.query.trialId, tokenKey: getToken(), openWindow: null, - bp: [], + BodyPart: {} }; }, async mounted() { - this.bp = await this.$getBodyPart(this.$route.query.trialId); + this.BodyPart.Bodypart = await this.$getBodyPart(this.$route.query.trialId) this.getSite(); this.getVisitPlanOptions(); this.getList(); }, 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(' | ') + }, // 获取检查列表数据 getList() { this.loading = true; @@ -550,28 +467,28 @@ export default { this.loading = false; }); }, - getBodyPart(bodyPart) { - if (!bodyPart) 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", - { Bodypart: this.bp }, - "Name" - ); - }); - return newArr.join(" | "); - }, + // getBodyPart(bodyPart) { + // if (!bodyPart) 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", + // { Bodypart: this.bp }, + // "Name" + // ); + // }); + // return newArr.join(" | "); + // }, // 复制 copyCode() { this.$copyText(`链接: ${this.shareLink} 提取码: ${this.extractionCode}`)