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 } },