From e388ea2543d71d3259953945620eaa5dfc1853e9 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Wed, 13 Nov 2024 13:30:31 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=A1=AE=E8=AE=A4=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=B1=95=E7=A4=BA=E6=9C=AF=E8=AF=AD=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trial-config/components/logicalConfig.vue | 70 +++++++++++-------- 1 file changed, 41 insertions(+), 29 deletions(-) diff --git a/src/views/trials/trials-panel/setting/trial-config/components/logicalConfig.vue b/src/views/trials/trials-panel/setting/trial-config/components/logicalConfig.vue index 2e354f36..d0d31b21 100644 --- a/src/views/trials/trials-panel/setting/trial-config/components/logicalConfig.vue +++ b/src/views/trials/trials-panel/setting/trial-config/components/logicalConfig.vue @@ -1307,6 +1307,16 @@ export default { // OldVal: this.initialForm.ClinicalDataSetNames.join(', ') // } ] + this.form.TrialObjectNameList.forEach((item) => { + let obj = { + Name: item.Name, + NewVal: item.TrialName, + OldVal: this.initialForm.TrialObjectNameList.find( + (d) => d.Name === item.Name + ).TrialName, + } + this.confirmData.push(obj) + }) }, // 筛选号规则提醒 subjectCodeRuleChange(val) { @@ -1323,35 +1333,6 @@ export default { this.form[k] = res[k] } } - if ( - !this.form.TrialObjectNameList || - (Array.isArray(this.form.TrialObjectNameList) && - this.form.TrialObjectNameList.length <= 0) - ) { - this.form.TrialObjectNameList = this.$d.Terminology.map((item) => { - return { - Name: item.label, - TrialName: item.label, - IsDefault: true, - } - }) - } else if ( - Array.isArray(this.form.TrialObjectNameList) && - this.form.TrialObjectNameList.length > 0 - ) { - this.$d.Terminology.forEach((item) => { - if ( - !this.form.TrialObjectNameList.find((d) => d.Name === item.label) - ) { - this.form.TrialObjectNameList.push({ - Name: item.label, - TrialName: item.label, - IsDefault: true, - }) - } - }) - } - let Modalitys = this.form.ModalityList.map((item) => { return this.$fd('Modality', item.trim()) }) @@ -1373,6 +1354,37 @@ export default { .replaceAll(',', ' | ') // this.form.ClinicalDataSetNamesStr = this.form.ClinicalDataSetNames.join(', ') this.initialForm = { ...this.form } + this.initialForm.TrialObjectNameList = JSON.parse( + JSON.stringify(this.form.TrialObjectNameList) + ) + if ( + !this.form.TrialObjectNameList || + (Array.isArray(this.form.TrialObjectNameList) && + this.form.TrialObjectNameList.length <= 0) + ) { + this.form.TrialObjectNameList = this.$d.Terminology.map((item) => { + return { + Name: item.label, + TrialName: item.label, + IsDefault: true, + } + }) + } else if ( + Array.isArray(this.form.TrialObjectNameList) && + this.form.TrialObjectNameList.length > 0 + ) { + this.$d.Terminology.forEach((item) => { + if ( + !this.form.TrialObjectNameList.find((d) => d.Name === item.label) + ) { + this.form.TrialObjectNameList.push({ + Name: item.label, + TrialName: item.label, + IsDefault: true, + }) + } + }) + } this.loading = false } },