浏览代码

个人画像-接口调用及历次变化功能模块

吴朋磊 3 月之前
父节点
当前提交
71a5272e02

+ 3 - 1
src/http/api.js

@@ -1,6 +1,8 @@
 import user from './api/user'//个人中心 相关接口
 import reportStudent from "./api/reportStudent";
+import personalProfile from "./api/personalProfile";
 export default {
     user,  
-    reportStudent
+    reportStudent,
+    personalProfile
 }

+ 11 - 0
src/http/api/personalProfile.js

@@ -0,0 +1,11 @@
+import { get, post } from "../common/http";
+import base from "../common/base";
+
+const report = {
+    // 学生-历次变化
+    examScoreList(data){
+        return get(`${base.prefix}/api/v1/studentPinpoint/examScoreList`,data);
+  } ,
+};
+
+export default report;

+ 29 - 0
src/views/analysisReport/personalProfile/HistoricalChangeChart.vue

@@ -0,0 +1,29 @@
+<template>
+    <div class="HistoricalChangeChart">
+        <div class="title">2、历次变化</div>
+    </div>
+</template>
+<script>
+export default {
+    name: "HistoricalChangeChart",
+    props: {
+        mode: {
+            type: String,
+            default: "grade"
+        }
+    }
+}
+</script>
+<style scoped lang="scss">
+.HistoricalChangeChart {
+    background-color: #ffffff;
+    border-radius: 10px;
+    padding: 20px;
+    box-sizing: border-box;
+    .title {
+        font-size: 16px;
+        font-weight: 600;
+        color: #333333;
+    }
+}
+</style>

+ 32 - 8
src/views/analysisReport/personalProfile/index.vue

@@ -20,21 +20,29 @@
             :high-vulnerability="highVulnerability"
             :mode="radio1"
         />
+
+        <!-- 历次变化 -->
+        <HistoricalChangeChart :mode="radio1" />
     </div>
 </template>
 <script>
-import MyGradeHistory from './MyGradeHistory.vue';
-import KnowledgeTrack from './KnowledgeTrack.vue';
-import zeroScoreKnowledge from './zeroScoreKnowledge.vue';
+import MyGradeHistory from './MyGradeHistory.vue'; //我的历次成绩子组件 
+import KnowledgeTrack from './KnowledgeTrack.vue'; //历次考试知识点追踪子组件
+import zeroScoreKnowledge from './zeroScoreKnowledge.vue'; //零分知识点、高频错题知识点子组件
+import HistoricalChangeChart from './HistoricalChangeChart.vue'; //历次变化子组件
 
 export default {
     name: "PersonalProfile",
     components: {
         MyGradeHistory,
         KnowledgeTrack,
-        zeroScoreKnowledge
+        zeroScoreKnowledge,
+        HistoricalChangeChart
     },
     computed: {
+        portraitData(){
+            return this.$store.state.report.filterObject;
+        },
         // 动态生成知识统计文本,使用repeatKnowledgeNum
         knowledgeStats() {
             const stats = [];
@@ -54,6 +62,7 @@ export default {
             ); //重复知识点
             return stats;
         },
+
     },
     data() {
         return {
@@ -69,15 +78,30 @@ export default {
         };
     },
     created() {
+        // 历次考试知识点追踪数据
+        this.MyGradeHistoryData();
         //零分知识点、高频知识点
-        this.vulerabData()
+        this.vulerabData();
+        // 年级画像
     },
     methods: {
         // 画像切换
         portraitTab() {
-
         },
-        // 零分知识点、高频错题知识点数据
+        // 历次考试知识点---年级画像
+        MyGradeHistoryData(){
+            let examParams = {
+                examId: this.portraitData.examId,
+                subjectCode: this.portraitData.subjectCode,
+            };
+            this.$api.personalProfile.examScoreList(examParams).then(res => {
+                if (res.code === 200) {
+                    this.treeData = res.data;
+                    console.log(this.treeData);
+                }
+            })
+        },
+        // 零分知识点、高频错题知识点----年级
         vulerabData() {
             // 零分知识点数据
             this.fatalVulnerability = [
@@ -165,7 +189,7 @@ export default {
 
         :deep(.el-radio-button__inner) {
         height: 36px;
-        line-height: 36px;
+        line-height: 34px;
         padding: 0px;
         width: 76px;
         text-align: center;

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

@@ -21,7 +21,7 @@
       <div class="view_switcher_container">
         <el-button type="text" @click="switchView('graph')" class="switch_btn list_btn">
           <i class="icon_switch_graph">
-            <img src="../../../assets/studentAnalysis/circleBlue.svg" alt="按图形查看">
+            <img src="../../../assets/studentAnalysis/circleGrey.svg" alt="按图形查看">
           </i>
           按图形查看
         </el-button>

+ 2 - 2
src/views/analysisReport/studentPage/mainPage.vue

@@ -34,9 +34,9 @@
                                 <button class="mm_btn mb_10" :class="{ active: activeBtn === pathOne }"
                                     @click="toPage(pathOne)">成绩分析</button>
 
-                                <button v-if="isShowKnowledgeButtons" class="mm_btn" :class="{ active: activeBtn === pathTwo }"
+                                <button v-if="isShowKnowledgeButtons" class="mm_btn mb_10" :class="{ active: activeBtn === pathTwo }"
                                     @click="toPage(pathTwo)">个性化错题</button>
-                                <button v-if="isShowKnowledgeButtons" class="mm_btn" :class="{ active: activeBtn === pathThree }"
+                                <button v-if="isShowKnowledgeButtons" class="mm_btn mb_10" :class="{ active: activeBtn === pathThree }"
                                     @click="toPage(pathThree)">个人画像</button>
                             </div>