瀏覽代碼

bug修改

zhangjie 3 年之前
父節點
當前提交
48d6b63299

+ 1 - 0
src/assets/styles/base.scss

@@ -236,6 +236,7 @@ body {
     border-radius: 5px;
     padding: 5px 10px;
     outline: none;
+    overflow: auto;
   }
   .cke_focus {
     border-color: $--color-text-secondary;

+ 30 - 3
src/assets/styles/pages.scss

@@ -291,12 +291,14 @@
     position: relative;
     padding: 0 30px;
     flex-grow: 2;
+    overflow: hidden;
 
     &-title {
-      min-height: 32px;
+      min-height: 42px;
       line-height: 24px;
       font-weight: 600;
       color: #313444;
+      overflow-x: auto;
 
       > h3 {
         font-size: 16px;
@@ -317,8 +319,9 @@
     }
 
     &-body {
-      line-height: 30px;
+      line-height: 24px;
       color: #6e7080;
+      overflow-x: auto;
 
       p {
         margin-bottom: 0;
@@ -471,6 +474,7 @@
     font-weight: 600;
     color: #313444;
     line-height: 22px;
+    overflow-x: auto;
     p {
       display: inline;
     }
@@ -478,6 +482,7 @@
   &-question-body {
     min-height: 24px;
     line-height: 24px;
+    overflow-x: auto;
 
     p {
       margin-bottom: 0;
@@ -485,6 +490,7 @@
   }
   &-question-option {
     line-height: 24px;
+    overflow-x: auto;
     p {
       display: inline;
     }
@@ -564,7 +570,28 @@
     margin: 0;
   }
   .el-form-item__label {
-    color: #9a9dab;
+    color: $--color-text-secondary;
+  }
+
+  .sub-question {
+    margin: 10px 0 10px 30px;
+    padding: 5px 0 5px 24px;
+    border-top: 1px solid $--color-border;
+    position: relative;
+
+    &-no {
+      position: absolute;
+      width: 16px;
+      height: 16px;
+      color: $--color-text-secondary;
+      border: 1px solid $--color-text-secondary;
+      font-size: 12px;
+      line-height: 14px;
+      text-align: center;
+      top: 15px;
+      border-radius: 3px;
+      left: 0;
+    }
   }
 }
 // gen-paper-detail

+ 1 - 0
src/modules/questions/views/EditPaper.vue

@@ -569,6 +569,7 @@
     <el-dialog
       v-loading.body="dialogLoading"
       title="试题编辑"
+      width="900px"
       element-loading-text="保存中。。。"
       :visible.sync="quesDialog"
       :modal="false"

+ 2 - 2
src/modules/questions/views/InsertPaperStructure.vue

@@ -30,13 +30,13 @@
         :model="paperStruct"
         :rules="rules2"
       >
-        <el-form-item label="结构名称" prop="name">
+        <el-form-item prop="name" label="结构名称">
           <el-input
             v-model="paperStruct.name"
             placeholder="试卷结构名称"
           ></el-input>
         </el-form-item>
-        <el-form-item prop="score" label-width="0">
+        <el-form-item prop="score" label="总分">
           <el-input-number
             v-model.number="paperStruct.totalScore"
             placeholder="总分"

+ 43 - 1
src/modules/questions/views/QuestionInfo.vue

@@ -17,7 +17,49 @@
         </div>
       </el-form-item>
 
-      <el-form-item label="答案">
+      <template v-if="quesModel.subQuestions && quesModel.subQuestions.length">
+        <div
+          v-for="(subQuestionModel, qindex) in quesModel.subQuestions"
+          :key="`subq-${qindex}`"
+          class="sub-question"
+        >
+          <div class="sub-question-no">{{ qindex + 1 }}</div>
+          <el-form-item label="题目" label-width="50px">
+            <div
+              class="paper-question-body"
+              v-html="subQuestionModel.quesBody"
+            ></div>
+          </el-form-item>
+          <template
+            v-if="
+              subQuestionModel.quesOptions &&
+              subQuestionModel.quesOptions.length
+            "
+          >
+            <el-form-item
+              v-for="(subQuesOption, subIndex) in subQuestionModel.quesOptions"
+              :key="subIndex"
+              label-width="50px"
+            >
+              <div class="paper-question-option">
+                <span>{{ subIndex | optionOrderWordFilter }}. </span>
+                <span v-html="subQuesOption.optionBody"></span>
+              </div>
+            </el-form-item>
+          </template>
+          <el-form-item label="答案" label-width="50px">
+            <div
+              class="paper-question-body"
+              v-html="subQuestionModel.quesAnswer"
+            ></div>
+          </el-form-item>
+        </div>
+      </template>
+
+      <el-form-item
+        v-if="!quesModel.subQuestions || !quesModel.subQuestions.length"
+        label="答案"
+      >
         <div
           class="paper-question-body padding-top-6"
           v-html="quesModel.quesAnswer"