Răsfoiți Sursa

修改:我的作答,查看分析测试问题

吴朋磊 6 ore în urmă
părinte
comite
6026716a30

+ 3 - 3
src/styles/common.scss

@@ -3191,7 +3191,7 @@ body {
       .left_title
       {
         width: 42px;
-        font-weight: 550;
+        font-weight: 600;
         font-size: 16px;
         color: #333333;
         margin-right: 8px;
@@ -11320,7 +11320,7 @@ body {
     height: 36px;
     .label_name
     {
-      font-weight: 550;
+      font-weight: 600;
       font-size: 14px;
       color: #333;
       padding-right: 10px;
@@ -11353,7 +11353,7 @@ body {
 
   .tree_title
   {
-    font-weight: 550;
+    font-weight: 600;
     font-size: 16px;
     color: #333333;
     line-height: 25px;

+ 1 - 1
src/views/targetImprove/components/QuestionItem.vue

@@ -126,7 +126,7 @@ export default {
 
         .header_type
         {
-            font-weight: 550;
+            font-weight: 600;
             font-size: 14px;
             color: #333333;
         }

+ 7 - 7
src/views/targetImprove/consolidate/export.vue

@@ -2030,7 +2030,7 @@ export default {
   height: 40px;
   line-height: 40px;
   // font-family: Alibaba PuHuiTi 2.0, Alibaba PuHuiTi 20;
-  font-weight: 550;
+  font-weight: 600;
   font-size: 18px;
   color: #000000;
   text-align: center;
@@ -2049,7 +2049,7 @@ export default {
   .knowledge_name
   {
     width:auto;
-    font-weight: 550;
+    font-weight: 600;
     font-size: 12px;
     color: #000000;
     background: #E2E2E2;
@@ -2109,7 +2109,7 @@ export default {
         border-radius: 4px 4px 4px 4px;
         padding: 4px 10px;
         
-        font-weight: 550;
+        font-weight: 600;
         font-size: 12px;
         color: #000000;
       }
@@ -2162,7 +2162,7 @@ export default {
         border-radius: 4px 4px 4px 4px;
         padding: 4px 10px;
         
-        font-weight: 550;
+        font-weight: 600;
         font-size: 12px;
         color: #000000;
       }
@@ -2213,7 +2213,7 @@ export default {
         border-radius: 4px 4px 4px 4px;
         padding: 4px 10px;
         
-        font-weight: 550;
+        font-weight: 600;
         font-size: 12px;
         color: #000000;
       }
@@ -2272,7 +2272,7 @@ export default {
     box-sizing: border-box;
     .knowledge_title
     {
-      font-weight: 550;
+      font-weight: 600;
       font-size: 10px;
       color: #000000;
     }
@@ -2295,7 +2295,7 @@ export default {
     overflow-x:hidden;
     .answer_title
     {
-      font-weight: 550;
+      font-weight: 600;
       font-size: 10px;
       color: #000000;
       line-height: 20px;

+ 1 - 1
src/views/targetImprove/consolidate/index.vue

@@ -542,7 +542,7 @@ export default {
     {
       flex-shrink: 0;
       margin-bottom: 10px;
-      font-weight: 550;
+      font-weight: 600;
       color: #333;
       font-size: 16px;
     }

+ 1 - 1
src/views/targetImprove/practice/index.vue

@@ -149,7 +149,7 @@ export default {
   }
 
   .step_text {
-    font-weight: 550;
+    font-weight: 600;
     font-size: 16px;
     white-space: nowrap;
   }

+ 3 - 3
src/views/targetImprove/practice/knowledgeGraph.vue

@@ -909,17 +909,17 @@ export default {
 
       .stats_num {
         color: #2E64FA;
-        font-weight: 550;
+        font-weight: 600;
       }
 
       .stats_weak {
         color: #F56C6C;
-        font-weight: 550;
+        font-weight: 600;
       }
 
       .stats_good {
         color: #FAC858;
-        font-weight: 550;
+        font-weight: 600;
       }
     }
   }

+ 1 - 1
src/views/targetImprove/practice/practiceAnswer.vue

@@ -477,7 +477,7 @@ export default {
       gap: 16px;
       width: 100%;
       .side_title {
-        font-weight: 550;
+        font-weight: 600;
         font-size: 16px;
         color: #333333;
       }

+ 122 - 28
src/views/teachingHomework/homeworkTask/analysis.vue

@@ -270,7 +270,7 @@
           <div class="page_table analysis_table_wrap">
             <el-table
               :data="questionPage"
-              height="575"
+              max-height="575"
               stripe
               class="el-table--border analysis_table">
               <el-table-column prop="name" label="小题名称" min-width="120" show-overflow-tooltip />
@@ -344,7 +344,7 @@
           <div class="page_table analysis_table_wrap">
             <el-table
               :data="knowledgePage"
-              height="575"
+              max-height="575"
               stripe
               class="el-table--border analysis_table">
               <el-table-column prop="name" label="知识点" min-width="200" show-overflow-tooltip />
@@ -369,20 +369,23 @@
         </section>
 
         <!-- 学情总结(接口暂无该数据时隐藏) -->
-        <section class="card" ref="summary" v-if="hasSummary">
+        <section class="card summary_card" ref="summary" v-if="hasSummary">
           <div class="card_title">学情总结</div>
           <div class="summary_block">
-            <span class="summary_label strength">优势</span>
-            <span class="summary_text">{{ summary.strength }}</span>
+            <span class="summary_label strength">优势:</span>
+            <span class="summary_text">本次作业整体得分率 <strong class="rate_num" :class="summary.rateLevel">{{ summary.rateText }}%</strong>,{{ summary.strength }}</span>
           </div>
           <div class="summary_block">
-            <span class="summary_label weak">薄弱点</span>
+            <span class="summary_label weak">薄弱点:</span>
             <span class="summary_text">{{ summary.weakness }}</span>
           </div>
-          <div class="summary_block advice_block">
-            <span class="summary_label advice">学习建议</span>
-            <div class="summary_text">
-              <div v-for="(item, idx) in summary.advice" :key="idx">{{ idx + 1 }}. {{ item }}</div>
+          <div class="summary_block">
+            <span class="summary_label advice">学习建议:</span>
+            <div class="summary_advice">
+              <div class="advice_item" v-for="(item, idx) in summary.advice" :key="idx">
+                <span class="advice_no">{{ idx + 1 }}.</span>
+                <span>{{ item }}</span>
+              </div>
             </div>
           </div>
         </section>
@@ -403,6 +406,64 @@ function toNumber(val, fallback = 0) {
   return Number.isFinite(n) ? n : fallback;
 }
 
+// 学情总结按得分率分档,文案中的百分比使用接口实际值
+function formatRateText(rate) {
+  const text = String(Math.round(rate * 100) / 100);
+  return text.replace(/\.0+$/, '');
+}
+
+function buildLearningSummary(rate) {
+  const value = formatRateText(rate);
+  let strength = '';
+  let weakness = '';
+  let advice = [];
+  if (rate >= 100) {
+    strength = '获得满分!全部题目作答准确,知识点掌握扎实,审题和计算都没有失误,学习效果非常出色。';
+    weakness = '本次作业无失分,知识掌握全面。可以尝试挑战综合性更强的拓展题目。';
+    advice = [
+      '保持认真细致的答题习惯;',
+      '自主练习综合性拓展题型,进一步提升知识迁移能力。',
+    ];
+  } else if (rate >= 85) {
+    strength = '完成质量优秀。基础题目掌握扎实,大部分题型都能准确作答,展现出不错的学习效果。';
+    weakness = '少量题目存在失误,多为审题或计算粗心导致,不存在大面积知识漏洞。';
+    advice = [
+      '复盘本次错题,养成答题后检查的习惯;',
+      '可适当练习拓展题型,进一步提升综合解题能力。',
+    ];
+  } else if (rate >= 70) {
+    strength = '整体掌握情况良好。基础题型基本可以独立完成,核心知识有一定理解。';
+    weakness = '部分中档题目把握不足,答题过程偶尔会出现疏漏,个别知识点掌握不够稳固。';
+    advice = [
+      '对错题进行整理,弄清错误原因;',
+      '针对失分题型加强练习,巩固知识细节。',
+    ];
+  } else if (rate >= 60) {
+    strength = '达到基本要求,简单基础题能够完成。';
+    weakness = '知识掌握不够稳定,中档题容易出错,部分概念理解模糊,答题时思路不够清晰。';
+    advice = [
+      '回归课本巩固基础概念;',
+      '优先练习基础题型,弄懂每一道错题。',
+    ];
+  } else if (rate > 0) {
+    strength = '仅少数最简单题目能够答对。';
+    weakness = '基础知识点掌握不足,很多题目无法找到解题思路,知识漏洞较多。';
+    advice = [
+      '重新复习本节课基础知识;',
+      '从最简单习题开始练习,不懂及时请教老师。',
+    ];
+  } else {
+    strength = '暂时没有拿到分数。';
+    weakness = '本节课基础内容基本没有掌握,全部题目作答错误,存在较大知识漏洞。';
+    advice = [
+      '重新观看课堂学习内容,通读课本基础知识点;',
+      '从最简单例题入手,逐个理解,遇到不懂及时请教老师;',
+      '完成基础预习与巩固后,重新练习本次作业。',
+    ];
+  }
+  return { rateText: value, rateLevel: rate >= 100 ? 'high' : (rate >= 60 ? 'mid' : 'low'), strength, weakness, advice };
+}
+
 const OPTION_KEYS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
 
 // 题型:1-单选题 2-多选题 3-对错题(判断题)
@@ -586,7 +647,7 @@ export default {
       // 两个表格前端分页,固定每页 10 条
       questionPageSize: 10,
       knowledgePageSize: 10,
-      // 接口未返回学情总结,无数据时隐藏该区块
+      // 按得分率 rateScore 生成学情总结;字段缺失时不展示
       summary: null,
     };
   },
@@ -744,6 +805,7 @@ export default {
       this.selectedIndex = 0;
       this.questionPageNum = 1;
       this.knowledgePageNum = 1;
+      this.summary = null;
     },
     applyAnalysis(res) {
       const data = (res && res.data) || {};
@@ -762,6 +824,10 @@ export default {
       this.selectedIndex = 0;
       this.questionPageNum = 1;
       this.knowledgePageNum = 1;
+      const rateScore = data.rateScore;
+      this.summary = rateScore === null || rateScore === undefined || rateScore === ''
+        ? null
+        : buildLearningSummary(toNumber(rateScore));
     },
     scrollTo(key) {
       const el = this.$refs[key];
@@ -1056,7 +1122,7 @@ export default {
 
         .task_title {
           font-size: 16px;
-          font-weight: 550;
+          font-weight: 600;
           color: #333;
           overflow: hidden;
           text-overflow: ellipsis;
@@ -1116,7 +1182,7 @@ export default {
 
     .card_title {
       font-size: 16px;
-      font-weight: 550;
+      font-weight: 600;
       color: #333;
       line-height: 24px;
     }
@@ -1173,7 +1239,7 @@ export default {
     .metric_value {
       flex-shrink: 0;
       font-size: 24px;
-      font-weight: 550;
+      font-weight: 600;
       color: #333;
       line-height: 28px;
     }
@@ -1267,7 +1333,7 @@ export default {
 
     .detail_title {
       font-size: 16px;
-      font-weight: 550;
+      font-weight: 600;
       color: #333;
       line-height: 24px;
     }
@@ -1299,7 +1365,7 @@ export default {
 
       .knowledge_label {
         font-size: 14px;
-        font-weight: 550;
+        font-weight: 600;
         color: #333;
       }
 
@@ -1332,7 +1398,7 @@ export default {
     }
 
     .stem_text {
-      font-weight: 550;
+      font-weight: 600;
       font-size: 16px;
       line-height: 1.8;
       color: #333333;
@@ -1374,7 +1440,7 @@ export default {
         font-size: 14px;
         line-height: 1.8;
         color: #333;
-        font-weight: 550;
+        font-weight: 600;
 
         :deep(img) {
           max-width: 100%;
@@ -1692,14 +1758,14 @@ export default {
         .line_label {
           flex-shrink: 0;
           color: #333;
-          font-weight: 550;
+          font-weight: 600;
         }
 
         .answer_value {
           flex: 1;
           min-width: 0;
           color: #2E64FA;
-          font-weight: 550;
+          font-weight: 600;
 
           :deep(p) {
             margin: 0;
@@ -1735,7 +1801,7 @@ export default {
 
         .sub_analysis_title {
           font-size: 14px;
-          font-weight: 550;
+          font-weight: 600;
           color: #333;
           line-height: 1.8;
           margin-bottom: 6px;
@@ -1769,22 +1835,50 @@ export default {
 
   /* 分页器使用全局 .page_pagination 公共样式 */
 
+  .summary_card {
+    .card_title {
+      margin-bottom: 4px;
+    }
+  }
+
   .summary_block {
     display: flex;
     align-items: flex-start;
-    gap: 8px;
-    margin-top: 14px;
+    margin-top: 10px;
     font-size: 14px;
-    line-height: 1.7;
-    color: #333;
+    line-height: 22px;
 
     .summary_label {
       flex-shrink: 0;
-      font-weight: 550;
+      font-weight: 600;
 
-      &.strength { color: #67C23A; }
+      &.strength { color: #3BA272; }
       &.weak { color: #F56C6C; }
-      &.advice { color: #409EFF; }
+      &.advice { color: #2E64FA; }
+    }
+
+    .summary_text,
+    .summary_advice {
+      flex: 1;
+      min-width: 0;
+      color: #999;
+    }
+
+    .rate_num {
+      font-weight: 600;
+
+      &.high { color: #3BA272; }
+      &.mid { color: #2E64FA; }
+      &.low { color: #F56C6C; }
+    }
+
+    .advice_item {
+      display: flex;
+      align-items: flex-start;
+    }
+
+    .advice_no {
+      flex-shrink: 0;
     }
   }
 }

+ 23 - 13
src/views/teachingHomework/homeworkTask/answer.vue

@@ -86,12 +86,12 @@
               </div>
             </div>
           </div>
-          <!-- 判断题、单选题、多选题不显示拍照;解答题可上传。最后一题把「下一题」换成「提交」 -->
+          <!-- 判断题、单选题、多选题拍照置灰;解答题可上传。最后一题把「下一题」换成「提交」 -->
           <div class="dock_actions">
-            <el-button v-if="!isSingle" class="photo_btn" type="primary"
-              :disabled="photoLimitReached" :loading="uploading"
+            <el-button class="photo_btn" type="primary"
+              :disabled="isSingle || photoLimitReached" :loading="uploading"
               @click="handlePhoto">
-              <img class="camera_icon" :src="cameraWhite" alt="">
+              <img class="camera_icon" :src="isSingle || photoLimitReached ? cameraGray : cameraWhite" alt="">
               拍照上传
             </el-button>
             <el-button class="nav_btn" :disabled="currentQuestion.index === 0" @click="prevQuestion">
@@ -178,7 +178,8 @@ export default {
       answers: {}, // 选择题为所选选项 key 数组,拍照题为图片 url 数组
       imgVisible: false, // 是否打开图片放大预览
       previewIndex: 0, // 预览起始图片下标
-      cameraWhite: require('@/assets/homeworkTask/camera_999.png'),
+      cameraGray: require('@/assets/homeworkTask/camera_999.png'),
+      cameraWhite: require('@/assets/homeworkTask/camera_fff.png'),
       nowTick: Date.now(),
       timer: null,
       uploading: false,
@@ -265,7 +266,8 @@ export default {
       const minute = Math.floor((diff % 3600000) / 60000);
       const second = Math.floor((diff % 60000) / 1000);
       const pad = value => String(value).padStart(2, '0');
-      return `${day}天 ${pad(hour)}:${pad(minute)}:${pad(second)}`;
+      const time = `${pad(hour)}:${pad(minute)}:${pad(second)}`;
+      return day > 0 ? `${day}天 ${time}` : time;
     },
   },
   created() {
@@ -690,7 +692,7 @@ export default {
           justify-content: center;
           min-width: 40px;
           height: 25px;
-          padding: 0 4px;
+          padding: 0 2px;
           border-radius: 4px;
           color: #fff;
           font-size: 12px;
@@ -699,7 +701,7 @@ export default {
 
         .task_title {
           font-size: 16px;
-          font-weight: 550;
+          font-weight: 600;
           color: #333;
           overflow: hidden;
           text-overflow: ellipsis;
@@ -745,9 +747,9 @@ export default {
 
       .nav_title {
         font-size: 14px;
-        font-weight: 550;
+        font-weight: 600;
         color: #333;
-        padding: 10px;
+        padding: 13px 10px;
         border-bottom: 1px solid #EBEEF5;
       }
 
@@ -761,7 +763,7 @@ export default {
         .group_name {
           font-size: 14px;
           color: #333;
-          font-weight: 550;
+          font-weight: 600;
           padding-bottom: 12px;
         }
 
@@ -833,14 +835,14 @@ export default {
             padding: 0 6px;
             background: #F3F3F3;
             border-radius: 2px;
-            font-weight: 550;
+            font-weight: 600;
             font-size: 14px;
             color: #333333;
             box-sizing: border-box;
           }
 
           .q_type {
-            font-weight: 550;
+            font-weight: 600;
             font-size: 14px;
             color: #333333;
           }
@@ -1106,6 +1108,14 @@ export default {
               height: 16px;
               display: block;
             }
+
+            &.is-disabled,
+            &.is-disabled:hover,
+            &.is-disabled:focus {
+              background: #F3F3F3;
+              color: #C0C4CC;
+              border: 1px solid #C0C4CC;
+            }
           }
 
           .nav_btn {

+ 1 - 1
src/views/teachingHomework/homeworkTask/list.vue

@@ -450,7 +450,7 @@ export default {
 
 .card_title {
   font-size: 16px;
-  font-weight: 550;
+  font-weight: 600;
   color: #333;
   overflow: hidden;
   text-overflow: ellipsis;

+ 18 - 11
src/views/teachingHomework/homeworkTask/viewAnswer.vue

@@ -110,6 +110,7 @@
           <!-- 答案解析 -->
           <div class="content_section" ref="sectionAnalysis" data-section="analysis">
             <div class="block_box analysis_box">
+              <div class="analysis_title">答案解析:</div>
               <div class="analysis_row">
                 <span class="analysis_label">【知识点】</span>
                 <div class="knowledge_tags">
@@ -647,7 +648,7 @@ export default {
 
         .task_title {
           font-size: 16px;
-          font-weight: 550;
+          font-weight: 600;
           color: #333;
           overflow: hidden;
           text-overflow: ellipsis;
@@ -692,7 +693,7 @@ export default {
 
       .nav_title {
         font-size: 14px;
-        font-weight: 550;
+        font-weight: 600;
         color: #333;
         padding: 10px;
         border-bottom: 1px solid #EBEEF5;
@@ -708,7 +709,7 @@ export default {
         .group_name {
           font-size: 14px;
           color: #333;
-          font-weight: 550;
+          font-weight: 600;
           padding-bottom: 12px;
         }
 
@@ -768,7 +769,7 @@ export default {
 
           &.active {
             color: #2E64FA;
-            font-weight: 550;
+            font-weight: 600;
 
             &::after {
               content: '';
@@ -813,14 +814,14 @@ export default {
             padding: 0 6px;
             background: #F3F3F3;
             border-radius: 2px;
-            font-weight: 550;
+            font-weight: 600;
             font-size: 14px;
             color: #333333;
             box-sizing: border-box;
           }
 
           .q_type {
-            font-weight: 550;
+            font-weight: 600;
             font-size: 14px;
             color: #333333;
           }
@@ -1036,11 +1037,17 @@ export default {
               margin-top: 14px;
             }
           }
-
+          .analysis_title{
+            font-weight: 600;
+            font-size: 14px;
+            color: #333333;
+            margin-bottom: 14px;
+            padding-left: 4px;
+          }
           .analysis_label {
             flex-shrink: 0;
             font-size: 14px;
-            font-weight: 550;
+            font-weight: 600;
             color: #333;
             line-height: 28px;
           }
@@ -1048,7 +1055,7 @@ export default {
           .knowledge_tags {
             display: flex;
             flex-wrap: wrap;
-            gap: 8px;
+            gap: 10px;
 
             .knowledge_tag {
               display: inline-flex;
@@ -1058,7 +1065,7 @@ export default {
               border: 1px solid #2E64FA;
               border-radius: 4px;
               color: #2E64FA;
-              font-size: 13px;
+              font-size: 14px;
               background: #fff;
               box-sizing: border-box;
             }
@@ -1072,7 +1079,7 @@ export default {
               display: inline-block;
               margin-right: 8px;
               font-size: 14px;
-              font-weight: 550;
+              font-weight: 600;
               color: #333;
               line-height: 28px;
             }