From 4363089165107c777696e941f99f79d2b5613d66 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Fri, 23 Apr 2021 14:59:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AD=94=E6=A1=88=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/page/Experiment.vue | 2 +- src/components/page/ExperimentTeach.vue | 2 +- src/components/page/ExperimentVir.vue | 2 +- src/components/page/ShowExperiment.vue | 17 ++++++++++++++--- src/utils/api.js | 1 + 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/components/page/Experiment.vue b/src/components/page/Experiment.vue index 56523fd..4b5f594 100644 --- a/src/components/page/Experiment.vue +++ b/src/components/page/Experiment.vue @@ -69,7 +69,7 @@ diff --git a/src/components/page/ExperimentTeach.vue b/src/components/page/ExperimentTeach.vue index 0e71c1c..1fada57 100644 --- a/src/components/page/ExperimentTeach.vue +++ b/src/components/page/ExperimentTeach.vue @@ -69,7 +69,7 @@ diff --git a/src/components/page/ExperimentVir.vue b/src/components/page/ExperimentVir.vue index 825acc8..17648b5 100644 --- a/src/components/page/ExperimentVir.vue +++ b/src/components/page/ExperimentVir.vue @@ -64,7 +64,7 @@ diff --git a/src/components/page/ShowExperiment.vue b/src/components/page/ShowExperiment.vue index 60bf296..0734601 100644 --- a/src/components/page/ShowExperiment.vue +++ b/src/components/page/ShowExperiment.vue @@ -310,10 +310,10 @@ this.$post(this.api.queryItem,n.levelThree) .then((res) => { n.levelFour = res.subject.find(e => e.id == n.levelFour).itemDescription - console.log(11,n) }).catch((err) => {}) } }) + let ids = [] setTimeout(() => { score.map(n => { let item = answerList.find(e => e.tradingJudgmentPointsId == n.tradingJudgmentPointsId) @@ -321,10 +321,21 @@ judgmentPointsName: item.judgmentPointsName, userAnswers: n.userAnswers, referenceAnswer: item.levelFour, - score: n.score, - id: n.id + score: n.userScore, + id: n.id, + type: n.type }) + n.type == 1 && ids.push(`ids=${n.userAnswers}`) }) + this.$get(`${this.api.getItemContentByIds}?${ids.join('&')}`).then((res) => { + let list = res.data + sjData.map(n => { + if(n.type == 1){ + let item = list.find(e => e.id == n.userAnswers) + if(item) n.userAnswers = item.itemDescription + } + }) + }).catch((err) => {}) },500) this.sjData = sjData diff --git a/src/utils/api.js b/src/utils/api.js index 5579d12..1299301 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -135,6 +135,7 @@ export default { queryReport:`${host}/evaluation/Achievement/queryReport`, getReport: `${host}/evaluation/Achievement/getReport`, editScore: `${host}/evaluation/Achievement/editScore`, + getItemContentByIds:`${host}/kdSys/getItemContentByIds`, // 教师评语 addComment: `${host}/evaluation/Achievement/addComment`,