Просмотр исходного кода

新增考试与题库中手动选择和选择试题对话框更改为可配置

cyy 2 недель назад
Родитель
Сommit
51ce11d181

+ 7 - 3
src/views/platform/examination/exam/edit.vue

@@ -88,7 +88,7 @@
             <ibps-custom-dialog
               v-model="allQuestions.handQuestions"
               size="small"
-              template-key="tmlb"
+              :template-key="questionDialogKey"
               multiple
               type="dialog"
               class="custom-dialog"
@@ -444,6 +444,7 @@
 import dayjs from 'dayjs'
 import ActionUtils from '@/utils/action'
 import { examTypeOptions, scoringType } from '../constants'
+import { getSetting } from '@/utils/query'
 export default {
   components: {
     IbpsCustomDialog: () =>
@@ -600,7 +601,8 @@ export default {
         da_biao_zhan_bi_: [
           { required: true, message: this.$t('validate.required') }
         ]
-      }
+      },
+      questionDialogKey: 'tmlb'
     }
   },
   computed: {
@@ -676,8 +678,10 @@ export default {
       deep: true
     }
   },
-  mounted() {
+  async mounted() {
     this.getExamData()
+    const { manualSelectionKey } = (await getSetting('examTag')) || {}
+    this.questionDialogKey = manualSelectionKey || 'tmlb'
   },
   methods: {
     // 分类计算

+ 14 - 4
src/views/platform/examination/questionBank/edit.vue

@@ -255,7 +255,7 @@
         <ibps-custom-dialog
           v-model="quesIdList"
           size="small"
-          template-key="tmlb"
+          :template-key="questionDialogKey"
           multiple
           type="dialog"
           class="custom-dialog"
@@ -415,6 +415,7 @@
 <script>
 import ActionUtils from '@/utils/action'
 import { paperTypeOptions } from '../constants'
+import { getSetting } from '@/utils/query'
 export default {
   components: {
     QuesEdit: () => import('../question/edit'),
@@ -522,7 +523,8 @@ export default {
         da_biao_zhan_bi_: [
           { required: true, message: this.$t('validate.required') }
         ]
-      }
+      },
+      questionDialogKey: 'tmlb'
     }
   },
   computed: {
@@ -554,8 +556,10 @@ export default {
       }
     }
   },
-  mounted() {
+  async mounted() {
     this.getQuestionData()
+    const { selectQuestionsKey } = (await getSetting('examTag')) || {}
+    this.questionDialogKey = selectQuestionsKey || 'tmlb'
   },
   methods: {
     // 默认展示三张图片
@@ -745,7 +749,13 @@ export default {
             const examsList = await this.checkExistExam()
             if (examsList.length > 0) {
               this.$confirm(
-                `当前题库存在正在进行中的“${examsList.length}场”考试,考试名称为:【${examsList.map((i) => i.kao_shi_ming_chen).join(',')}】,考试中更改题库可能会影响考试数据结果,是否继续?`,
+                `当前题库存在正在进行中的“${
+                  examsList.length
+                }场”考试,考试名称为:【${examsList
+                  .map((i) => i.kao_shi_ming_chen)
+                  .join(
+                    ','
+                  )}】,考试中更改题库可能会影响考试数据结果,是否继续?`,
                 '提示',
                 {
                   confirmButtonText: '继续',