From 475c7fab4ed6390ca5a84cfc450c2adf7e1e9db6 Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期五, 17 五月 2024 09:32:10 +0800
Subject: [PATCH] fix:修改学习内容双向绑定问题
---
src/views/exam/paper/edit.vue | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/views/exam/paper/edit.vue b/src/views/exam/paper/edit.vue
index a3b03fd..ed5dbd1 100644
--- a/src/views/exam/paper/edit.vue
+++ b/src/views/exam/paper/edit.vue
@@ -340,6 +340,7 @@
})
},
addQuestion (titleItem) {
+ console.log('titleItem', titleItem)
this.currentTitleItem = titleItem
this.questionPage.showDialog = true
this.search()
@@ -358,7 +359,9 @@
let _this = this
this.questionPage.multipleSelection.forEach(q => {
questionApi.select(q.id).then(re => {
- _this.currentTitleItem.questionItems.push(re.response)
+ if (!_this.currentTitleItem.questionItems.some(obj => obj.id === re.response.id)) {
+ _this.currentTitleItem.questionItems.push(re.response)
+ }
})
})
this.questionPage.showDialog = false
--
Gitblit v1.8.0