zhangjie 2 سال پیش
والد
کامیت
18246abd8c

+ 19 - 0
src/assets/styles/pages.scss

@@ -1437,6 +1437,25 @@
     border-radius: 8px;
     padding: 20px;
     margin-top: 10px;
+    position: relative;
+
+    &-close {
+      position: absolute;
+      z-index: 9;
+      width: 24px;
+      height: 24px;
+      top: 0;
+      right: 0;
+      text-align: center;
+      line-height: 24px;
+      color: $--color-danger;
+      font-size: 18px;
+      cursor: pointer;
+
+      &:hover {
+        color: mix(#000, $--color-danger, 10%);
+      }
+    }
 
     .el-form-item {
       margin-bottom: 4px;

+ 1 - 0
src/components/vEditor/components/SpecharDialog.vue

@@ -84,6 +84,7 @@ export default {
     }
 
     &:hover {
+      color: #705eff;
       border-color: #705eff;
       span {
         transform: scale(1.3, 1.3);

+ 9 - 7
src/modules/paper-export/views/PaperTemplateBuild.vue

@@ -645,7 +645,7 @@ export default {
 
         const optionCount = curOptions.length;
         // 奇数选项,全部一行
-        if (optionCount % 2 > 0) {
+        if (optionCount <= 7 && optionCount % 2 > 0) {
           curOptions.forEach((optionElem) => {
             optionElem._percent = 1;
             optionElem.styles.width = "100%";
@@ -656,12 +656,14 @@ export default {
 
         const percents = curOptions.map((item) => item._percent);
         const maxPercent = maxNum(percents);
-        let aveOptionPercent = 1;
-        if (optionCount % 4 === 0) {
-          aveOptionPercent = this.calcAveOptionPercent(maxPercent);
-        } else {
-          aveOptionPercent = maxPercent > 0.5 ? 1 : 0.5;
-        }
+        // let aveOptionPercent = 1;
+        // if (optionCount % 4 === 0) {
+        //   aveOptionPercent = this.calcAveOptionPercent(maxPercent);
+        // } else {
+        //   aveOptionPercent = maxPercent > 0.5 ? 1 : 0.5;
+        // }
+        const aveOptionPercent = this.calcAveOptionPercent(maxPercent);
+
         curOptions.forEach((optionElem) => {
           optionElem._percent = aveOptionPercent;
           optionElem.styles.width = aveOptionPercent * 100 + "%";

+ 0 - 1
src/modules/question/components/QuestionPreviewDialog.vue

@@ -3,7 +3,6 @@
     custom-class="question-preview-dialog"
     :visible.sync="modalIsShow"
     title="试题预览"
-    :modal="false"
     width="1000px"
     top="20px"
     :close-on-click-modal="false"

+ 6 - 0
src/modules/question/components/import-edit/BooleanQuestion.vue

@@ -40,6 +40,9 @@
         use-course-property-cache
         @change="questionInfoChange"
       ></question-info-edit>
+      <div class="ep-question-props-close" @click="unactiveQuestion">
+        <i class="el-icon-error"></i>
+      </div>
     </div>
   </div>
 </template>
@@ -112,6 +115,9 @@ export default {
     activeQuestion() {
       this.setCurQuestion(this.question);
     },
+    unactiveQuestion() {
+      this.setCurQuestion({});
+    },
   },
 };
 </script>

+ 6 - 0
src/modules/question/components/import-edit/FillBlankQuestion.vue

@@ -42,6 +42,9 @@
         use-course-property-cache
         @change="questionInfoChange"
       ></question-info-edit>
+      <div class="ep-question-props-close" @click="unactiveQuestion">
+        <i class="el-icon-error"></i>
+      </div>
     </div>
   </div>
 </template>
@@ -138,6 +141,9 @@ export default {
     activeQuestion() {
       this.setCurQuestion(this.question);
     },
+    unactiveQuestion() {
+      this.setCurQuestion({});
+    },
   },
 };
 </script>

+ 6 - 0
src/modules/question/components/import-edit/MatchQuestion.vue

@@ -45,6 +45,9 @@
         use-course-property-cache
         @change="questionInfoChange"
       ></question-info-edit>
+      <div class="ep-question-props-close" @click="unactiveQuestion">
+        <i class="el-icon-error"></i>
+      </div>
     </div>
   </div>
 </template>
@@ -154,6 +157,9 @@ export default {
     activeQuestion() {
       this.setCurQuestion(this.question);
     },
+    unactiveQuestion() {
+      this.setCurQuestion({});
+    },
   },
 };
 </script>

+ 6 - 0
src/modules/question/components/import-edit/SelectQuestion.vue

@@ -67,6 +67,9 @@
         use-course-property-cache
         @change="questionInfoChange"
       ></question-info-edit>
+      <div class="ep-question-props-close" @click="unactiveQuestion">
+        <i class="el-icon-error"></i>
+      </div>
     </div>
   </div>
 </template>
@@ -199,6 +202,9 @@ export default {
     activeQuestion() {
       this.setCurQuestion(this.question);
     },
+    unactiveQuestion() {
+      this.setCurQuestion({});
+    },
   },
 };
 </script>

+ 6 - 0
src/modules/question/components/import-edit/TextAnswerQuestion.vue

@@ -36,6 +36,9 @@
         use-course-property-cache
         @change="questionInfoChange"
       ></question-info-edit>
+      <div class="ep-question-props-close" @click="unactiveQuestion">
+        <i class="el-icon-error"></i>
+      </div>
     </div>
   </div>
 </template>
@@ -129,6 +132,9 @@ export default {
     activeQuestion() {
       this.setCurQuestion(this.question);
     },
+    unactiveQuestion() {
+      this.setCurQuestion({});
+    },
   },
 };
 </script>