Эх сурвалжийг харах

学生端错题巩固更新

dengshaobo 1 сар өмнө
parent
commit
5e14fed03c

+ 4 - 3
src/styles/common.scss

@@ -3019,8 +3019,8 @@ body {
       .left_title
       {
         width: 42px;
-        font-weight: 600;
-        font-size: 14px;
+        font-weight: 550;
+        font-size: 16px;
         color: #333333;
         margin-right: 8px;
       }
@@ -11192,7 +11192,8 @@ body {
 .question_no_data
 {
     width: 100%;
-    height: calc(100vh - 264px);
+    // height: calc(100vh - 264px);
+    height:100%;
     // background-image: url("../assets/bg/mark_bg.png");
     background-size: 100% auto;
     background-position: 10px 50%;

+ 12 - 0
src/utils/global.js

@@ -265,6 +265,18 @@ export default {
       },
     ];
   },
+
+  // 容易:#90CB75    较易:#FAC858  一般:#5470C6  较难:#EA7ACB  困难:#EE6666
+  getDiffcutyColor(difficulty) {
+      const classMap = {
+          '容易': '#90CB75',
+          '较易': '#FAC858',
+          '一般': '#5470C6',
+          '较难': '#EA7ACB',
+          '困难': '#EE6666'
+      }
+      return classMap[difficulty] || ''
+  },
   //获取百分比  type  progress 表示进度条使用
   getPercentage(num1, num2, type) {
     let result = 0;

+ 6 - 8
src/views/layout/components/Header.vue

@@ -206,19 +206,17 @@ export default {
         menuName: "分析报告",
         externalLink: "/jointStudentAnalysisReport/list",
       },
+      {
+        menuName: "靶向提升",
+        externalLink: "/targetImprove",
+      },
       {
         menuName: "个人中心",
         externalLink: "/userInfo",
       },
+     
     ];
-    // 当访问域名不是 www.k12100.com 时,才显示"靶向提升"菜单
-    const isK12Domain = window.location.hostname === 'www.k12100.com';
-    if (!isK12Domain) {
-      baseMenuList.splice(1, 0, {
-        menuName: "靶向提升",
-        externalLink: "/targetImprove",
-      });
-    }
+  
     this.menuList = baseMenuList;
     
   },

+ 1 - 12
src/views/targetImprove/components/CommonTree.vue

@@ -1,17 +1,6 @@
 <template>
-  <!-- 公共树形组件:基于 Element UI el-tree 封装 -->
-  <!-- common_tree_wrapper:用作非 scoped 样式的全局命名空间,防止样式泄漏到其他组件 -->
+
   <div class="common_tree_wrapper common_tree">
-    <!--
-      el-tree 核心配置说明:
-      - ref: 用于父组件通过 this.$refs 调用 el-tree 原生方法(如 setCheckedKeys、getCheckedNodes 等)
-      - data: 树形数据源(由父组件通过 props 传入)
-      - props: 配置 el-tree 如何读取数据结构中的字段(label/children)
-      - node-key: 每个树节点的唯一标识字段,用于选中/高亮定位
-      - show-checkbox: 开启多选复选框
-      - highlight-current: 高亮当前点击选中的节点
-      - default-expand-all: 默认展开所有节点
-    -->
     <el-tree
       ref="commonTree"
       class="tree_container"

+ 12 - 4
src/views/targetImprove/components/QuestionItem.vue

@@ -7,12 +7,15 @@
         <span class="header_type">
             {{question.questionType}}
         </span>
-        <span class="header_difficulty">
-            {{question.questionLevel}}
+        <span class="header_difficulty" :style="{color:GetDiffcutyColor(question.questionLevel || question.diffName)}">
+            {{question.questionLevel || question.diffName}}
         </span>
         <div class="header_exam_name">
-            {{question.fromPaper}} 
+             来源:{{question.fromPaper || question.source || question.sourceName}} 
         </div>
+        <slot name="header_right">
+          
+        </slot>
     </div>
     <div class="question_content" v-html="question.title">
         
@@ -66,7 +69,12 @@ export default {
 
   },
   methods: {
-  
+    // 获取题目难度颜色
+    GetDiffcutyColor(value)
+    {
+      console.log("打印难易度",value);
+      return this.$global.getDiffcutyColor(value);
+    },
   },
 };
 </script>

+ 20 - 10
src/views/targetImprove/consolidate/index.vue

@@ -60,7 +60,7 @@
             <span class="left_title">错题详情</span>  <span>共{{questionList.length}}道题</span>
           </div>
           <div class="content_right">
-            <el-button type="primary" >导出PDF</el-button>
+            <el-button type="primary" @click="ExportPDF()">导出PDF</el-button>
           </div>
         </div>
         <div class="page_jg_20">
@@ -119,7 +119,7 @@
                         :answerOptionNum="item.optionsNum"
                         :rightAnswer="item.answer"
                         :answerImg="(item.studentAnswer?.split(',')?.map(img=>({name:img,url:img})) || [])"
-                    />
+                />
             </div>
           </div>
           <div class="question_no_data" v-if="questionList.length==0">
@@ -225,7 +225,7 @@ export default {
       console.log('科目编码改变了', newVal, oldVal)
       // ========= 业务逻辑写这里 =========
       // 例如:切换科目,重置步骤、重新请求知识点图谱数据
-      
+      this.GetKnowledgeTreeData();//获取知识点树形数据
     }
   },
   mounted() 
@@ -236,7 +236,7 @@ export default {
     console.log('打印科目编码', this.gradeList)
     this.checkGrades=[this.gradeList[this.gradeList.length-1].value];
     // this.GetTargetErrorTopData();//获取错题筛选数据
-    this.GetQuestionList();//获取错题列表
+    // this.GetQuestionList();//获取错题列表
     this.GetKnowledgeTreeData();//获取知识点树形数据
   },
   methods: { 
@@ -286,6 +286,12 @@ export default {
       return (this.pageInfo.pageNum-1)*10+index+1;
     },
 
+    //导出错题本pdf
+    ExportPDF()
+    {
+      this.$message.warning('功能开发中,敬请期待');
+    },
+
     ChangePage()
     {
 
@@ -500,8 +506,9 @@ export default {
     {
       flex-shrink: 0;
       margin-bottom: 10px;
-      font-weight: 500;
+      font-weight: 550;
       color: #333;
+      font-size: 16px;
     }
 
     // 让 CommonTree 承接真正的剩余高度,超出时由它自己的 overflow 出现滚动条
@@ -516,23 +523,26 @@ export default {
   .right_list
   {
     width: calc(100% - 330px);
-    height: calc(100% - 10px);
+    height: auto;
     background: #fff;
     padding: 20px;
-    overflow-y: auto;
+
     box-sizing: border-box;
     border-radius: 10px 10px 10px 10px;
     .question_list
     {
 
-      height: calc(100% - 107px);
+      height: calc(100vh - 280px);
       overflow-y: auto;
-
-
     }
   }
 }
 
+.left_title
+{
+  font-size: 16px;
+}
+
 .question_list_item
 {
   width:100%;

+ 1 - 1
version.json

@@ -1,5 +1,5 @@
 {
-  "version": "0.1.3_2026_8_26_0",
+  "version": "0.1.3_2026_8_27_0",
   "content": [
     {
       "time": "2024-11-1",