소스 검색

1.单选题和判断题一行5列,其余一行3列。2.文案"赋分"改为"给分"

刘洋 1 년 전
부모
커밋
9558c41042
2개의 변경된 파일25개의 추가작업 그리고 4개의 파일을 삭제
  1. 22 1
      src/features/admin/confirmPaper/ConfirmPaper.vue
  2. 3 3
      src/features/arbitrate/Arbitrate.vue

+ 22 - 1
src/features/admin/confirmPaper/ConfirmPaper.vue

@@ -87,7 +87,7 @@
                   :class="{ hide: !question.exist }"
                 >
                   <span class="question-number">{{ question.subNumber }} </span>
-                  <a-input
+                  <!-- <a-input
                     class="normal-input"
                     :class="{
                       'long-input': question.type
@@ -110,6 +110,27 @@
                     @keydown="onPreventAnswerKey"
                     @input="changeAnswer($event, question)"
                     @blur="changeAnswer($event, question, '#')"
+                  /> -->
+                  <a-input
+                    class="normal-input"
+                    :class="{
+                      'long-input': question.type
+                        ? !['SINGLE', 'TRUE_OR_FALSE'].includes(question.type)
+                        : !group.mainTitle.match(/单选|单项|判断|/),
+                    }"
+                    :value="question.answer"
+                    :maxLength="
+                      (
+                        question.type
+                          ? ['MULTIPLE'].includes(question.type)
+                          : group.mainTitle.match(/多选|多项|不定项/)
+                      )
+                        ? 100
+                        : 1
+                    "
+                    @keydown="onPreventAnswerKey"
+                    @input="changeAnswer($event, question)"
+                    @blur="changeAnswer($event, question, '#')"
                   />
                 </div>
               </div>

+ 3 - 3
src/features/arbitrate/Arbitrate.vue

@@ -192,15 +192,15 @@ const saveTaskToServer = async (unselective: boolean) => {
       if (!isNumber(score)) {
         error = `${question.mainNumber}-${question.subNumber}${
           question.questionName ? "(" + question.questionName + ")" : ""
-        } 没有赋分不能提交。`;
+        } 没有给分,不能提交。`;
       } else if (isNumber(question.maxScore) && score > question.maxScore) {
         error = `${question.mainNumber}-${question.subNumber}${
           question.questionName ? "(" + question.questionName + ")" : ""
-        } 分大于最高分不能提交。`;
+        } 分大于最高分不能提交。`;
       } else if (isNumber(question.minScore) && score < question.minScore) {
         error = `${question.mainNumber}-${question.subNumber}${
           question.questionName ? "(" + question.questionName + ")" : ""
-        } 分小于最低分不能提交。`;
+        } 分小于最低分不能提交。`;
       }
       if (error) {
         errors.push({ question, index, error });