|
@@ -190,7 +190,8 @@ export default {
|
|
mathId: 'question_by_hand',
|
|
mathId: 'question_by_hand',
|
|
show: false,
|
|
show: false,
|
|
enableBox: true,
|
|
enableBox: true,
|
|
- ignoreQType: false
|
|
|
|
|
|
+ ignoreQType: false, // 智能组卷会乎略题型
|
|
|
|
+ uploading: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -323,24 +324,28 @@ export default {
|
|
},
|
|
},
|
|
/* methods of question box */
|
|
/* methods of question box */
|
|
addQueCard(item) {
|
|
addQueCard(item) {
|
|
|
|
+ if (this.uploading) return
|
|
|
|
+ if (this.queCardForm.queList.includes(item.id)) return
|
|
if (this.queCardForm.queList.length == 0) {
|
|
if (this.queCardForm.queList.length == 0) {
|
|
// 为0直接添加
|
|
// 为0直接添加
|
|
|
|
+ this.uploading = true
|
|
addToQuestionCard({
|
|
addToQuestionCard({
|
|
questionId: item.id,
|
|
questionId: item.id,
|
|
...this.extraData
|
|
...this.extraData
|
|
}).then(() => {
|
|
}).then(() => {
|
|
this.queCardForm.queList.push(item)
|
|
this.queCardForm.queList.push(item)
|
|
- })
|
|
|
|
|
|
+ }).finally(() => this.uploading = false)
|
|
} else {
|
|
} else {
|
|
// 判断是否是同一个科目下的题目
|
|
// 判断是否是同一个科目下的题目
|
|
if (item.subjectid == this.queCardForm.queList[0].subjectid) {
|
|
if (item.subjectid == this.queCardForm.queList[0].subjectid) {
|
|
// 是,则添加
|
|
// 是,则添加
|
|
|
|
+ this.uploading = true
|
|
addToQuestionCard({
|
|
addToQuestionCard({
|
|
questionId: item.id,
|
|
questionId: item.id,
|
|
...this.extraData
|
|
...this.extraData
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
this.queCardForm.queList.push(item)
|
|
this.queCardForm.queList.push(item)
|
|
- })
|
|
|
|
|
|
+ }).finally(() => this.uploading = false)
|
|
} else {
|
|
} else {
|
|
// 不是,弹出警告
|
|
// 不是,弹出警告
|
|
this.$message.error('科目不一致,请清空试题篮或选择同一科目')
|
|
this.$message.error('科目不一致,请清空试题篮或选择同一科目')
|