From 9945e373c32ab67197860b8aa0b501d27eb77137 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 19 Aug 2024 10:05:13 +0800 Subject: [PATCH] fix --- public/static/ueditorPlus/ueditor.config.js | 2 +- src/components/ueditorPlus/index.vue | 8 +++++- src/pages/ques/detail/index.vue | 17 ++++++++----- src/pages/testPaper/detail/index.vue | 28 +++++++++++++++++---- src/pages/testPaper/detail/manual.vue | 19 ++++++++++++-- 5 files changed, 59 insertions(+), 15 deletions(-) diff --git a/public/static/ueditorPlus/ueditor.config.js b/public/static/ueditorPlus/ueditor.config.js index f555c0e..3a2ceda 100644 --- a/public/static/ueditorPlus/ueditor.config.js +++ b/public/static/ueditorPlus/ueditor.config.js @@ -101,7 +101,7 @@ // 禁止本地上传 disableUpload: false, } - , zIndex: 2500 + , zIndex: 2000 , fullscreen: false , rgb2Hex: true, diff --git a/src/components/ueditorPlus/index.vue b/src/components/ueditorPlus/index.vue index 75c2ed6..7c5c887 100644 --- a/src/components/ueditorPlus/index.vue +++ b/src/components/ueditorPlus/index.vue @@ -13,6 +13,11 @@ export default { default: function () { return '' } + }, + config: { + default () { + return {} + } } }, data () { @@ -48,7 +53,8 @@ export default { this.instance = UE.getEditor(this.randomId, { UEDITOR_HOME_URL: Setting.isDev ? '/static/ueditorPlus/' : '/examination/static/ueditorPlus/', serverUrl: "http://121.37.12.51/exam/exam/upload/configAndUpload", - plugins: 'gapfilling' + plugins: 'gapfilling', + ...this.config }) this.instance.addListener('ready', () => { diff --git a/src/pages/ques/detail/index.vue b/src/pages/ques/detail/index.vue index 2d4ab6d..8faea78 100644 --- a/src/pages/ques/detail/index.vue +++ b/src/pages/ques/detail/index.vue @@ -34,7 +34,7 @@ - +

请输入

- + - + @@ -221,6 +223,9 @@ export default { questionTypes: Const.questionTypes, knowledges: [], + editorConfig: { + zIndex: 2500, + }, richEditor: { object: null, parameterName: '', diff --git a/src/pages/testPaper/detail/index.vue b/src/pages/testPaper/detail/index.vue index c905099..5be14c1 100644 --- a/src/pages/testPaper/detail/index.vue +++ b/src/pages/testPaper/detail/index.vue @@ -134,9 +134,11 @@
- {{ j + 1 }} / {{ item.examQuestions.length }} - {{ questionTypes.find(e => e.id === item.questionType).name }} -
+
+ {{ j + 1 }} / {{ item.examQuestions.length }} + {{ questionTypes.find(e => e.id === item.questionType).name }} +
+

分)

@@ -753,6 +755,7 @@ export default { let invalid = 0 for (const i in paper) { const e = paper[i] + const chineseNum = this.arabicToChinese(+i + 1) if (!e.questionType) { Util.warningMsg('请选择题型') invalid = 1 @@ -763,13 +766,17 @@ export default { invalid = 1 break } + if (!e.outlineName) { + Util.warningMsg(`第${chineseNum}大题请输入大题名称`) + invalid = 1 + break + } if (!e.targetScore) { Util.warningMsg('请输入目标分值') invalid = 1 break } - const chineseNum = this.arabicToChinese(+i + 1) // 该大题里的小题总数需等于目标题数 if (+e.questionNum !== e.examQuestions.length) { Util.warningMsg(`第${chineseNum}大题的小题总数跟目标题数不一致,请重新修改`) @@ -974,8 +981,14 @@ export default { .top-line { display: flex; - align-items: center; + align-items: baseline; margin-bottom: 10px; + line-height: 28px; + } + + .labels { + display: inline-flex; + align-items: center; } .label { @@ -984,10 +997,15 @@ export default { font-size: 12px; line-height: 1; color: $main-color; + white-space: nowrap; border: 1px solid; border-radius: 2px; } + .stem { + max-width: calc(100% - 236px); + } + /deep/.score { width: 70px; margin: 0 10px; diff --git a/src/pages/testPaper/detail/manual.vue b/src/pages/testPaper/detail/manual.vue index 2c19a55..cb7f70e 100644 --- a/src/pages/testPaper/detail/manual.vue +++ b/src/pages/testPaper/detail/manual.vue @@ -39,7 +39,9 @@ {{ i + 1 }} - {{ item.stemText }} + +

{{ item.stemText }}

+
@@ -66,7 +68,9 @@
{{ i + 1 }} -
+ +

{{ item.stemText }}

+
@@ -402,6 +406,17 @@ export default { width: 32px; margin: 0 12px; text-align: center; + white-space: nowrap; + } + + .stem { + max-width: calc(100% - 71px); + @include ellipsis; + } + + .checked-stem { + max-width: 165px; + @include ellipsis; } .check-left {