From 872a1f6514ff5c1af59d999b5f18796e7030e1b2 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 20 Aug 2024 17:40:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E5=8F=91=E5=B8=83=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E9=87=8D=E5=A4=8D=E8=AF=95=E9=A2=98=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/ueditorPlus/ueditor.config.js | 2 +- src/pages/ques/detail/index.vue | 26 ++-- src/pages/ques/list/index.vue | 2 +- src/pages/testPaper/detail/index.vue | 142 ++++++++------------ src/pages/testPaper/detail/manual.vue | 16 +-- src/pages/testPaper/detail/repeatQues.vue | 69 ++++++---- src/pages/testPaper/list/index.vue | 5 +- 7 files changed, 130 insertions(+), 132 deletions(-) diff --git a/public/static/ueditorPlus/ueditor.config.js b/public/static/ueditorPlus/ueditor.config.js index 474f4af..bb63b79 100644 --- a/public/static/ueditorPlus/ueditor.config.js +++ b/public/static/ueditorPlus/ueditor.config.js @@ -65,7 +65,7 @@ //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义 // , "insertvideo" toolbars: [ - ["fullscreen", "source", "|", "bold", "italic", "underline", "forecolor", "fontfamily", "fontsize", "|", "link", "unlink", "anchor", "|", "imagenone", "imageleft", "imagecenter", "imageright", "|", "justifyleft", "justifycenter", "justifyright", "justifyjustify", "|", "insertcode", "insertimage", "insertvideo", "inserttable", 'formula', "gapfilling", 'combox'] + ["fullscreen", "source", "|", "bold", "italic", "underline", "rowspacingtop", "rowspacingbottom", "lineheight", "|", "customstyle", "paragraph", "forecolor", "fontfamily", "fontsize", "|", "backcolor", "insertorderedlist", "insertunorderedlist", "|", "link", "unlink", "anchor", "|", "imagenone", "imageleft", "imagecenter", "imageright", "|", "justifyleft", "justifycenter", "justifyright", "justifyjustify", "|", "insertcode", "insertimage", "insertvideo", "inserttable", 'formula', "gapfilling", 'combox'] ] // 公式配置 , formulaConfig: { diff --git a/src/pages/ques/detail/index.vue b/src/pages/ques/detail/index.vue index 8faea78..47b1062 100644 --- a/src/pages/ques/detail/index.vue +++ b/src/pages/ques/detail/index.vue @@ -160,8 +160,7 @@ - - + @@ -647,16 +646,19 @@ export default { }, // 保存题目 async saveQues () { - const form = this.tempForm - const type = this.detailType - // type: 1复制(调新增接口),2查看,3编辑,4是试卷里点编辑试题进来的(调createNewVersion创建新的版本) - const res = await this.$post(this.api[type === 4 ? 'createNewVersion' : type === 1 || !form.questionId ? 'addQuestion' : 'updateQuestion'], form) - type === 4 && this.$emit('updateQues', this.tempForm, res.questionVersionId) - - Util.successMsg('保存成功') - this.submiting = false - !form.questionId && this.keep ? this.init() : (this.quesVisible = false) - this.repeatVisible = false + try { + const form = this.tempForm + const type = this.detailType + // type: 1复制(调新增接口),2查看,3编辑,4是试卷里点编辑试题进来的(调createNewVersion创建新的版本) + const res = await this.$post(this.api[type === 4 ? 'createNewVersion' : type === 1 || !form.questionId ? 'addQuestion' : 'updateQuestion'], form) + type === 4 && this.$emit('updateQues', this.tempForm, res.questionVersionId) + + Util.successMsg('保存成功') + !form.questionId && this.keep ? this.init() : (this.quesVisible = false) + this.repeatVisible = false + } finally { + this.submiting = false + } }, // 弹框关闭回调 closeDia () { diff --git a/src/pages/ques/list/index.vue b/src/pages/ques/list/index.vue index 033efb4..2c430db 100644 --- a/src/pages/ques/list/index.vue +++ b/src/pages/ques/list/index.vue @@ -255,7 +255,7 @@ export default { givenYearSort: '', difficultySort: '', correctRateSort: '', - updateTimeSort: '', + updateTimeSort: 'desc', referenceCountSort: '', }, list: [], diff --git a/src/pages/testPaper/detail/index.vue b/src/pages/testPaper/detail/index.vue index 2f65068..e053fc0 100644 --- a/src/pages/testPaper/detail/index.vue +++ b/src/pages/testPaper/detail/index.vue @@ -134,7 +134,8 @@ @update="e => updateSort(e, item)">
-
+ {{ ques.repeat }} +
{{ j + 1 }} / {{ item.examQuestions.length }} @@ -189,25 +190,27 @@ +