Prechádzať zdrojové kódy

试题查重显示优化

zhangjie 2 rokov pred
rodič
commit
a88fa76cca

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

@@ -614,6 +614,24 @@
   background-color: #fcfcfd;
   border-radius: 10px;
   padding: 30px;
+  position: relative;
+
+  .info-type {
+    position: absolute;
+    padding: 5px 10px;
+    top: 10px;
+    right: 10px;
+    z-index: 9;
+    font-size: 18px;
+    border-radius: 10px;
+    color: #ff7240;
+    border: 1px solid #ff7240;
+
+    &-existed {
+      color: #1fb46f;
+      border-color: #1fb46f;
+    }
+  }
 
   .line-seperator {
     border-color: #f0f2f6;

+ 1 - 1
src/modules/questions/views/CheckDuplicateInfo.vue

@@ -42,7 +42,7 @@
       <el-col :span="12">
         <QuestionInfo
           :question="duplicateQuestion"
-          info-type="right"
+          info-type="existed"
           style="height: 100%"
         ></QuestionInfo>
       </el-col>

+ 15 - 27
src/modules/questions/views/QuestionInfo.vue

@@ -104,7 +104,7 @@
           <span>{{ quesModel.calculateAvgScore || "-" }}</span>
         </el-form-item>
         <el-form-item
-          v-if="infoType == 'right'"
+          v-if="infoType === 'existed'"
           label="重复率"
           style="width: 120px"
         >
@@ -115,36 +115,24 @@
       <div class="line-seperator"></div>
 
       <el-form-item label="试题关联属性" label-width="100px">
-        <el-tooltip
+        <el-tag
           v-for="(content, propIndex) in quesModel.quesProperties"
           :key="propIndex"
-          placement="top"
+          type="primary"
+          effect="dark"
+          style="margin-right: 5px; margin-bottom: 5px"
         >
-          <div slot="content">
-            <span v-if="content.firstProperty != null"
-              >一级属性:{{ content.firstProperty.name }}({{
-                content.firstProperty.code
-              }})</span
-            ><br />
-            <span v-if="content.secondProperty != null"
-              >二级属性:{{ content.secondProperty.name }}({{
-                content.secondProperty.code
-              }})</span
-            >
-          </div>
-          <span>
-            <el-tag
-              :key="content.id"
-              style="margin-right: 5px"
-              type="primary"
-              effect="dark"
-            >
-              {{ content.courseProperty.name }}
-            </el-tag>
-          </span>
-        </el-tooltip>
+          {{ content.courseProperty && content.courseProperty.name }}
+          <span style="margin: 0 3px">/</span>
+          {{ content.firstProperty && content.firstProperty.name }}
+          <span v-if="content.secondProperty" style="margin: 0 3px">/</span>
+          {{ content.secondProperty && content.secondProperty.name }}
+        </el-tag>
       </el-form-item>
     </el-form>
+    <div :class="['info-type', `info-type-${infoType}`]">
+      {{ infoType === "new" ? "新导入" : "已入库" }}
+    </div>
   </section>
 </template>
 <script>
@@ -160,7 +148,7 @@ export default {
     },
     infoType: {
       type: String,
-      default: "",
+      default: "new",
     },
   },
   data() {