From 94685c44c1712508e0a2b3ac2613f50daf64e7d3 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期一, 17 六月 2024 19:24:17 +0800
Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/testbookLayout

---
 src/components/examinations/index.vue |   40 ++++++++++++++++++++--------------------
 1 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/src/components/examinations/index.vue b/src/components/examinations/index.vue
index ff6a449..68fef34 100644
--- a/src/components/examinations/index.vue
+++ b/src/components/examinations/index.vue
@@ -73,12 +73,13 @@
                     v-html="itemText"
                   ></span>
                   <!-- &nbsp; -->
-                  <el-input
+                  <input
                     v-else
                     type="text"
                     class="input"
                     v-model.trim="value.userAnswer[itemText.num]"
                     :disabled="value.isComplete"
+                    :style="{backgroundColor:inputBc}"
                   />
                   <!-- &nbsp; -->
                 </span>
@@ -91,7 +92,7 @@
                 v-cloak
               ></p>
             </div>
-            <img :src="value.isCollect ? isHeart : heart" alt="" class="collect-png" @click="handleCollect(nindex,index)" >
+            <img :src="value.isCollect ? isHeart : heart" alt="" class="collect-png" @click="handleCollect(nindex,index)" v-if="!(hideCollect && value.questionType == 'shortAnswer')" >
             <!-- 鏀惰棌 -->
           </div>
           <div class="questionContent">
@@ -474,6 +475,7 @@
 </template>
 
 <script>
+import { Message } from 'element-ui';
 export default {
   name: "examination-option",
   props: {
@@ -494,6 +496,14 @@
       type: Boolean,
       default: true,
     },
+    inputBc: {
+      type: String,
+      default: "#fff",
+    },
+    hideCollect:{
+      type:Boolean,
+      default:false
+    }
   },
   data() {
     return {
@@ -637,13 +647,10 @@
       }
     },
     // 淇濆瓨鎸夐挳
-    saveAnswer() {
-      const element = (
-        this.container ? this.container : document
-      ).querySelector(".examination");
-      if (element) {
+    saveAnswer(e) {
+      if (e.srcElement) {
         const pageNum = this.getParentWithClass(
-          element,
+          e.srcElement,
           "page-box"
         ).getAttribute("page");
         const oldAnswerData = localStorage.getItem(
@@ -674,6 +681,7 @@
           this.config.activeBook.name + "oldAnswerData",
           JSON.stringify(oldData)
         );
+        Message.success('淇濆瓨鎴愬姛')
       }
 
       // if(oldData[this.chapter]) {
@@ -825,23 +833,15 @@
         font-weight: 400;
         margin-top: 6px;
       }
-      .el-input {
+      input {
         width: 140px;
         height: 24px;
-        border-top: 0;
+        border: 0;
+        outline: none; 
+        border-bottom: 1px solid #15c0f2;
       }
       /deep/ .el-textarea.is-disabled .el-textarea__inner {
         background-color: #fff;
-      }
-      /deep/.el-input__wrapper {
-        border-top: 0 !important;
-      }
-      /deep/ .el-input__inner {
-        border-top: 0 !important;
-        border-left: 0 !important ;
-        border-right: 0 !important ;
-        border-bottom: 1px solid #15c0f2 !important;
-        border-radius: 0 !important;
       }
       /deep/ .el-input.is-disabled .el-input__inner {
         background-color: #fff;

--
Gitblit v1.9.1