From 708a2193b041840b3ce5d36583d435c38176ff1a Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Mon, 13 Feb 2023 10:22:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E8=AF=95=E9=A2=98=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/AppQuestionBank/components/Add.vue | 93 ++++++++++++------- .../app/AppQuestionBank/components/Detail.vue | 38 ++++---- .../app/AppQuestionBank/components/List.vue | 14 +-- ui/packages/basic/AiArticle.vue | 4 +- 4 files changed, 90 insertions(+), 59 deletions(-) diff --git a/project/qujing/app/AppQuestionBank/components/Add.vue b/project/qujing/app/AppQuestionBank/components/Add.vue index 49284e16..818cff9b 100644 --- a/project/qujing/app/AppQuestionBank/components/Add.vue +++ b/project/qujing/app/AppQuestionBank/components/Add.vue @@ -1,7 +1,7 @@ @@ -30,32 +37,29 @@ props: { instance: Function, dict: Object, - params: Object, - moduleId: String + params: Object }, data () { return { - info: {}, - id: '' + info: {} } }, created () { - if (this.params && this.params.id) { - this.id = this.params.id + this.dict.load('qjQBType').then(() => { this.getInfo(this.params.id) - } + }) }, methods: { getInfo (id) { - this.instance.post(`/app/appcontentinfo/queryDetailById?id=${id}`).then(res => { + this.instance.post(`/app/appquestionbank/queryDetailById?id=${id}`).then(res => { if (res.code === 0) { - this.info = res.data - this.info.pictureUrl = res.data.pictureUrl ? [{ - url: res.data.pictureUrl - }] : [] + this.info = { + ...res.data, + answer: res.data.items.filter(v => v.checked === '1').map(v => v.content).join(',') + } } }) }, diff --git a/project/qujing/app/AppQuestionBank/components/List.vue b/project/qujing/app/AppQuestionBank/components/List.vue index 06299692..ad66faf4 100644 --- a/project/qujing/app/AppQuestionBank/components/List.vue +++ b/project/qujing/app/AppQuestionBank/components/List.vue @@ -29,7 +29,7 @@ :current.sync="search.current" :size.sync="search.size" @getList="getList"> - +