Explorar el Código

个人画像-隐藏班级得分率、修改考试知识点追踪bug

吴朋磊 hace 2 meses
padre
commit
13937d5540

+ 75 - 75
src/views/analysisReport/personalProfile/HistoricalChangeChart.vue

@@ -195,83 +195,83 @@ export default {
             }
 
             // 如果有班级数据,添加班级系列(折线图)
-            if (hasClassData) {
-                // 将classList转换为数字数组,确保echarts能正确显示
-                const numericClassList = classList.map(val => {
-                    const num = parseFloat(val);
-                    return isNaN(num) ? null : num;
-                });
+            // if (hasClassData) {
+            //     // 将classList转换为数字数组,确保echarts能正确显示
+            //     const numericClassList = classList.map(val => {
+            //         const num = parseFloat(val);
+            //         return isNaN(num) ? null : num;
+            //     });
                 
-                series.push({
-                    name: '班级',
-                    type: 'line',
-                    data: numericClassList,
-                    itemStyle: {
-                        color: '#ffffff',
-                        borderColor: '#3BA272',
-                        borderWidth: 2 // 边框宽度
-                    },
-                    lineStyle: {
-                        color: '#3BA272',
-                        width: 2
-                    },
-                    // 默认显示圆点
-                    showSymbol: true,
-                    symbol: 'circle',
-                    symbolSize: 10,
-                    // 鼠标经过时显示圆点
-                    emphasis: {
-                        showSymbol: true,
-                        itemStyle: {
-                            color: '#ffffff',
-                            borderColor: '#3BA272',
-                            borderWidth: 3
-                        },
-                        symbolSize: 10
-                    }
-                });
-                legendData.push('班级');
-            }
-
-            // 如果有年级数据,添加年级系列
-            if (hasGradeData) {
-                // 将gradeList转换为数字数组,确保echarts能正确显示
-                const numericGradeList = gradeList.map(val => {
-                    const num = parseFloat(val);
-                    return isNaN(num) ? null : num;
-                });
+            //     series.push({
+            //         name: '班级',
+            //         type: 'line',
+            //         data: numericClassList,
+            //         itemStyle: {
+            //             color: '#ffffff',
+            //             borderColor: '#3BA272',
+            //             borderWidth: 2 // 边框宽度
+            //         },
+            //         lineStyle: {
+            //             color: '#3BA272',
+            //             width: 2
+            //         },
+            //         // 默认显示圆点
+            //         showSymbol: true,
+            //         symbol: 'circle',
+            //         symbolSize: 10,
+            //         // 鼠标经过时显示圆点
+            //         emphasis: {
+            //             showSymbol: true,
+            //             itemStyle: {
+            //                 color: '#ffffff',
+            //                 borderColor: '#3BA272',
+            //                 borderWidth: 3
+            //             },
+            //             symbolSize: 10
+            //         }
+            //     });
+            //     legendData.push('班级');
+            // }
+
+            // // 如果有年级数据,添加年级系列
+            // if (hasGradeData) {
+            //     // 将gradeList转换为数字数组,确保echarts能正确显示
+            //     const numericGradeList = gradeList.map(val => {
+            //         const num = parseFloat(val);
+            //         return isNaN(num) ? null : num;
+            //     });
                 
-                series.push({
-                    name: '年级',
-                    type: 'line',
-                    data: numericGradeList,
-                    // smooth: true,
-                    itemStyle: {
-                        color: '#ffffff',
-                        borderColor: '#FAC858',
-                        borderWidth: 2 // 边框宽度
-                    },
-                    lineStyle: {
-                        color: '#FAC858',
-                        width: 2
-                    },
-                    // 默认显示圆点
-                    showSymbol: true,
-                    symbol: 'circle',
-                    symbolSize: 10,
-                    // 鼠标经过时显示圆点
-                    emphasis: {
-                        showSymbol: true,
-                        itemStyle: {
-                            color: '#ffffff',
-                            borderColor: '#FAC858',
-                            borderWidth: 3,
-                        },
-                        symbolSize: 10
-                    }
-                });
-                legendData.push('年级');
-            }
+            //     series.push({
+            //         name: '年级',
+            //         type: 'line',
+            //         data: numericGradeList,
+            //         // smooth: true,
+            //         itemStyle: {
+            //             color: '#ffffff',
+            //             borderColor: '#FAC858',
+            //             borderWidth: 2 // 边框宽度
+            //         },
+            //         lineStyle: {
+            //             color: '#FAC858',
+            //             width: 2
+            //         },
+            //         // 默认显示圆点
+            //         showSymbol: true,
+            //         symbol: 'circle',
+            //         symbolSize: 10,
+            //         // 鼠标经过时显示圆点
+            //         emphasis: {
+            //             showSymbol: true,
+            //             itemStyle: {
+            //                 color: '#ffffff',
+            //                 borderColor: '#FAC858',
+            //                 borderWidth: 3,
+            //             },
+            //             symbolSize: 10
+            //         }
+            //     });
+            //     legendData.push('年级');
+            // }
 
             // 配置项
             const option = {

+ 21 - 5
src/views/analysisReport/personalProfile/index.vue

@@ -132,9 +132,9 @@ export default {
                 if (changeText) {
                     stats.push(changeText);
                 }
-            } else if (this.knowledgeMapData.examRange) {
+            } else if (this.knowledgeMapData.knowledgeList) {
                 // 如果只有考试范围数据,添加说明文本
-                stats.push(`本次考试涵盖<span style="color:#333333;font-weight:600;">${this.knowledgeMapData.examRange}</span>,暂无详细知识点追踪数据。`);
+                stats.push(`本次考试涵盖<span style="color:#333333;font-weight:600;">${this.knowledgeMapData.knowledgeList}</span>,暂无详细知识点追踪数据。`);
             }
             
             return stats;
@@ -211,9 +211,9 @@ export default {
             // 加载状态-清空数据
             this.historyloading = true;
             // 历次考试知识点追踪-加载状态
-             this.knowledgeloading = true;
+            this.knowledgeloading = true;
             // 零分知识点、高频错题知识点-加载状态
-             this.zeroloading = true;
+            this.zeroloading = true;
              // 薄弱知识点精准提升-加载状态
              this.knowledgePapsLoading = true;
             // 历次变化图表-加载状态
@@ -239,6 +239,14 @@ export default {
                         this.previousExamsData();
                     }else{
                         // 加载状态
+                        // 历次考试知识点追踪-加载状态
+                        this.knowledgeloading = false;
+                        // 零分知识点、高频错题知识点-加载状态
+                        this.zeroloading = false;
+                        // 薄弱知识点精准提升-加载状态
+                        this.knowledgePapsLoading = false;
+                        // 历次变化图表-加载状态
+                        this.historicalChangeLoading = false;    
                         this.historyloading = false;
                         this.gradeHistoryData = [];
                     }
@@ -387,6 +395,15 @@ export default {
                         this.allKnowledgeList = []; // 所有知识点数据
                         // 首次加载默认获取知识点
                         this.zeroloading = false;
+                        this.historicalChangeLoading = false;
+                        this.knowledgePapsLoading = false;
+                        // 清除历次变化图表数据
+                        this.historicalChangeData = {
+                            personalList: [],
+                            classList: [],
+                            gradeList: [],
+                            examName: []
+                        };
                         // 接口调用成功后,刷新图表
                         this.$nextTick(() => {
                             if (this.$refs.knowledgeGraphRef) {
@@ -475,7 +492,6 @@ export default {
                 gradeList: [],
                 examName: []
             };
-            // return
             let params = {
                 examId: this.portraitData.examId, //当前考试id
                 examIds: this.portraitData.examIds, //历次考试ids

+ 10 - 10
src/views/analysisReport/personalProfile/zeroScoreKnowledge.vue

@@ -115,11 +115,11 @@
                 :disabled="!item.knowledgeName || item.knowledgeName.length < 15">
                 <span class="item_title">{{ item.knowledgeName }}</span>
               </el-tooltip>
-              <span class="item_tag" v-if="item.scoreRateDiff"
+              <!-- <span class="item_tag" v-if="item.scoreRateDiff"
                 :style="{ backgroundColor: parseFloat(item.scoreRateDiff) > 0 ? '#3BA272' : '#F56C6C' }">
                 <i>{{ item.scoreRateDiff }}% </i>
                 <i v-if="parseFloat(item.scoreRateDiff) !== 0" style="margin-top: 0px">{{ parseFloat(item.scoreRateDiff) > 0 ? '↑' : '↓' }}</i>
-              </span>
+              </span> -->
               <span class="item_tag" v-if="item.isPush == 1" style="background-color: #2E64FA;">
                 有推题
               </span>
@@ -131,11 +131,11 @@
                 <span class="score_label" v-if="item.personalScoreRate">个人得分率:</span>
                 <span :style="{ color: getDotColor(item, 'personalScoreRate') }" v-if="item.personalScoreRate">{{
                   item.personalScoreRate }}%</span>
-                <span class="score_separator" v-if="item.classScoreRate">|</span>
+                <!-- <span class="score_separator" v-if="item.classScoreRate">|</span>
                 <span class="score_label">班级得分率:</span>
                 <span v-if="item.classScoreRate" class="score_second">{{ item.classScoreRate }}%</span>
                 <span v-if="!item.classScoreRate" :style="{ color: getDotColor(item, 'classScoreRate') }">{{
-                  item.classScoreRate }}%</span>
+                  item.classScoreRate }}%</span> -->
               </span>
 
               <!-- 班级/学生得分率 -->
@@ -184,16 +184,16 @@
         </vxe-table-column>
 
         <!-- 班级得分率 -->
-        <vxe-table-column prop="classScoreRate" title="班级得分率" width="180" align="center">
+        <!-- <vxe-table-column prop="classScoreRate" title="班级得分率" width="180" align="center">
           <template #default="{ row }">
             <div class="rate_info" v-if="row.classScoreRate !== null">
               <span class="rate_dot" :class="getRateClass(row.classScoreRate)"></span>
               <span class="rate_value">{{ row.classScoreRate }}%</span>
             </div>
           </template>
-        </vxe-table-column>
+        </vxe-table-column> -->
         <!-- 班级知识点状态 -->
-        <vxe-table-column prop="classScoreRate" title="班级知识点状态" width="120" align="center">
+        <!-- <vxe-table-column prop="classScoreRate" title="班级知识点状态" width="120" align="center">
           <template #default="{ row }">
             <div class="status_info" v-if="row.classScoreRate !== null">
               <span class="status_value"
@@ -202,10 +202,10 @@
               </span>
             </div>
           </template>
-        </vxe-table-column>
+        </vxe-table-column> -->
 
         <!-- 只有当班级名称不是年级且不为空时,才显示得分率差列 -->
-        <vxe-table-column prop="diff" title="得分率差" width="150" align="center">
+        <!-- <vxe-table-column prop="diff" title="得分率差" width="150" align="center">
           <template #default="{ row }">
             <div class="rate_info" v-if="row.scoreRateDiff !== null">
               <span class="rate_dot" :class="getRateClass(row.scoreRateDiff)"></span>
@@ -215,7 +215,7 @@
               </span>
             </div>
           </template>
-        </vxe-table-column>
+        </vxe-table-column> -->
       </vxe-table>
     </div>
   </div>