From fcc4820087843e4c8e5250f5c5b2d486fc678d11 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Mon, 5 Aug 2024 14:22:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E9=98=85=E7=89=87=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/CriterionQuestionForm.vue | 47 +++++++++++-------- .../reading-unit/components/TableQsForm.vue | 34 +++++++++++--- 2 files changed, 56 insertions(+), 25 deletions(-) diff --git a/src/views/dictionary/template/components/CriterionQuestionForm.vue b/src/views/dictionary/template/components/CriterionQuestionForm.vue index 3b4ff103..6f5c12a7 100644 --- a/src/views/dictionary/template/components/CriterionQuestionForm.vue +++ b/src/views/dictionary/template/components/CriterionQuestionForm.vue @@ -442,10 +442,10 @@ @@ -517,7 +517,7 @@ export default { type: String, default() { return '' } } - }, + }, data() { var validateTypeVal = (rule, value, callback) => { if (value === '') { @@ -606,7 +606,29 @@ export default { lesionTypes: [], dicList: [], CriterionDictionaryList: [], - groupClassifyList:[] + groupClassifyList:[], + highlightAnswers: [] + } + }, + watch: { + 'form.DictionaryCode': { + deep: true, + immediate: true, + async handler(v, oldv) { + try { + if (!v) { + this.highlightAnswers = [] + return + } + let res = await getCriterionDictionary({ + ReadingCriterionId: this.data.ReadingQuestionCriterionSystemId, + DictionaryCode: this.form.DictionaryCode + }) + this.highlightAnswers = res.Result[this.form.DictionaryCode] + } catch (e) { + console.log(e) + } + } } }, mounted() { @@ -633,7 +655,6 @@ export default { await this.getGroupOptions() await this.getParentQuestions() await this.getLesionType() - await this.getBasicConfigSelect() if (Object.keys(this.data).length > 0) { for (const k in this.form) { if (this.data.hasOwnProperty(k)) { @@ -697,18 +718,6 @@ export default { }) }) }, - getBasicConfigSelect() { - // getBasicConfigSelect('Reading_eCRF_Criterion').then(res => { - // this.dicList = res.Result - // }) - getCriterionDictionaryList({ - CriterionId: this.data.ReadingQuestionCriterionSystemId, - SystemCriterionId: this.data.ReadingQuestionCriterionSystemId - }).then(res => { - console.log(this.dicList) - this.dicList = res.Result - }) - }, getGroupOptions() { return new Promise((resolve, reject) => { this.loading = true diff --git a/src/views/trials/trials-panel/setting/reading-unit/components/TableQsForm.vue b/src/views/trials/trials-panel/setting/reading-unit/components/TableQsForm.vue index 8802478e..3d4f419c 100644 --- a/src/views/trials/trials-panel/setting/reading-unit/components/TableQsForm.vue +++ b/src/views/trials/trials-panel/setting/reading-unit/components/TableQsForm.vue @@ -439,10 +439,10 @@ @@ -486,7 +486,7 @@