Browse Source

单科、总分增加排名拆分、考试历次设置、学生报告修改

liurongli 2 months ago
parent
commit
ca9a3bdbd4

+ 1 - 3
src/App.vue

@@ -18,9 +18,7 @@ export default {
     },
     methods: {
         SubmitLogin() {
-            // const username = '5000715069857';
-            const username = '4305962347220710';
-
+            const username = '376050cy_xiyanzuo_015';
             const password = '123456';
             // const type = '1';
             const schoolType = sessionStorage.getItem('schoolType');

+ 36 - 1
src/views/analysisReport/studentPage/downloadPdf/studentReport.vue

@@ -101,6 +101,7 @@
                                                     </template>
                                                     <template v-else>{{ scope.row?.[header.prop] ?? '-' }}</template>
                                                 </template>
+                                                <template v-else-if="header.prop == 'groupClassRanks' || header.prop == 'groupClassMaxScoreList' || header.prop == 'groupClassAvgScoreList'">{{ GetGroupClassValue(scope.row?.[header.prop],header.prop,header.code)}}</template>
                                                 <template v-else>{{ scope.row?.[header.prop] ?? '-' }}</template>
                                                 </template>
                                         </el-table-column>
@@ -170,6 +171,7 @@
                                                         </template>
                                                         <template v-else>{{ scope?.row?.[header.prop] ?? '-' }}</template>
                                                     </template>
+                                                    <template v-else-if="header.prop == 'groupClassRanks' || header.prop == 'groupClassMaxScoreList' || header.prop == 'groupClassAvgScoreList'">{{ GetGroupClassValue(scope.row?.[header.prop],header.prop,header.code) }}</template>
                                                     <template v-else>{{ scope?.row?.[header.prop] ?? '-' }}</template>
                                                 </template>
                                             </el-table-column>
@@ -236,6 +238,7 @@
                                                             <span :class="GetDifficultyClass(scope.row[header.prop])"></span>
                                                             <span>{{ GetDifficultyName(scope.row[header.prop]) }}</span>
                                                         </template>
+                                                        <template v-else-if="header.prop == 'classGroupAvgScoreMap' || header.prop == 'classGroupScoreRateMap'">{{ scope.row?.[header.prop]?.[header.code] || '-' }}</template>
                                                         <template v-else>{{ scope.row[header.prop] || '-' }}</template>
                                                     </template>
                                                 </el-table-column>
@@ -849,7 +852,34 @@ export default {
                         name:'联校均分',
                         prop:'examAvgScore',
                         display:res?.data?.examAvgScoreStatus === 0 && this.schoolType == 2
-                    }] 
+                    }]
+                    const groupClassRanks = res.data.groupClassRanks || [];
+                    const groupClassMaxScoreList = res.data.groupClassMaxScoreList || [];
+                    const groupClassAvgScoreList = res.data.groupClassAvgScoreList || [];
+                    groupClassRanks.forEach(item=>{
+                        headData.push({
+                            name:`${item.classGroupName}排名`,
+                            prop:'groupClassRanks',
+                            code:item.classGroupCode,
+                            display:item.classGroupRankStatus === 1
+                        })
+                    })
+                    groupClassMaxScoreList.forEach(item=>{
+                        headData.push({
+                            name:`${item.classGroupName}最高分`,
+                            prop:'groupClassMaxScoreList',
+                            code:item.classGroupCode,
+                            display:item.classGroupResultScoreStatus === 1
+                        })
+                    })
+                    groupClassAvgScoreList.forEach(item=>{
+                        headData.push({
+                            name:`${item.classGroupName}均分`,
+                            prop:'groupClassAvgScoreList',
+                            code:item.classGroupCode,
+                            display:item.classGroupResultScoreStatus === 1
+                        })
+                    }) 
                     const tableData = [res.data] || [];
                     const headerList = headData.filter(item=>item.display);
                     const pageTableData = this.TableRowAndColumnPage(headerList,tableData,8,1);//8列一个表
@@ -1338,6 +1368,11 @@ export default {
                 return '-'
             }
         },
+        GetGroupClassValue(data,prop,code){
+            const obj = data.find(item=>item.classGroupCode==code);
+            const val = prop=='groupClassRanks'?obj?.classGroupRankRate:obj?.groupClassResultScore;
+            return val ?? '-'
+        },
         //点击顶部下载PDF按钮导出
         DownloadPdf(){
             if(this.$refs.bookFlipBox){

+ 24 - 1
src/views/analysisReport/studentPage/scrolReport/transcript_single.vue

@@ -117,6 +117,28 @@
               <span class="title">联校均分</span>
               <span class="value">{{ subjectData?.data?.examAvgScore ?? '-' }}</span>
             </div>
+            <div class="score_item" v-if="subjectData?.data?.tscoreStatus === 0">
+              <span class="title">T分数</span>
+              <span class="value">{{ subjectData?.data?.tscore ?? '-' }}</span>
+            </div>
+            <template v-for="item in (subjectData?.data?.groupClassRanks || [])">
+              <div class="score_item" v-if="item?.classGroupRankStatus === 1">
+                <span class="title">{{`${item.classGroupName}排名`}}</span>
+                <span class="value">{{ item?.classGroupRank ?? '-' }}</span>
+              </div>
+            </template>
+            <template v-for="item in (subjectData?.data?.groupClassMaxScoreList || [])">
+              <div class="score_item" v-if="item?.classGroupResultScoreStatus === 1">
+                <span class="title">{{`${item.classGroupName}最高分`}}</span>
+                <span class="value">{{ item?.groupClassResultScore ?? '-' }}</span>
+              </div>
+            </template>
+            <template v-for="item in (subjectData?.data?.groupClassAvgScoreList || [])">
+              <div class="score_item" v-if="item?.classGroupResultScoreStatus === 1">
+                <span class="title">{{`${item.classGroupName}均分`}}</span>
+                <span class="value">{{ item?.groupClassResultScore ?? '-' }}</span>
+              </div>
+            </template>
           </div>
         </div>
         <div class="page_jg_20"></div>
@@ -265,6 +287,7 @@
                   ><span :class="GetDifficultyClass(scope.row[title.prop])"></span
                   ><span>{{ GetDifficultyName(scope.row[title.prop]) }}</span></template
                 >
+                <template v-else-if="title.prop == 'classGroupAvgScoreMap' || title.prop == 'classGroupScoreRateMap'">{{ scope.row?.[title.prop]?.[title.code] || '-' }}</template>
                 <template v-else>{{ scope.row[title.prop] || '-' }}</template>
               </template>
             </el-table-column>
@@ -318,7 +341,7 @@
         </div>
       </div>
     </template>
-    <div class="report_module" v-if="false">
+    <div class="report_module" v-if="subjectData?.data?.showHistory == 1">
       <div class="module_title">
         <div class="title_left">历次考试分析</div>
         <div class="title_right report_button">

+ 10 - 2
src/views/analysisReport/studentPage/scrolReport/transcript_total.vue

@@ -43,6 +43,7 @@
                 </template>
                 <template v-else>{{ scope.row?.[title.prop] ?? '-' }}</template>
               </template>
+              <template v-else-if="title.prop == 'groupClassRanks' || title.prop == 'groupClassMaxScoreList' || title.prop == 'groupClassAvgScoreList'">{{ GetGroupClassValue(scope.row?.[title.prop],title.prop,title.code)}}</template>
               <template v-else>{{ scope.row?.[title.prop] ?? '-' }}</template>
             </template>
           </el-table-column>
@@ -127,7 +128,7 @@
         </ExpandableText>
       </div>
     </div>
-    <div class="report_module" v-if="false">
+    <div class="report_module" v-if="showHistory==1">
       <div class="module_title">
         <div class="title_left">历次考试分析</div>
         <div class="title_right report_button">
@@ -237,7 +238,8 @@ export default {
       showStudentPaperDialog: false, //显示答题卡弹框
       paperInfo: {},
       paperTitle: '', //答题卡弹框标题
-      currentPageIndex: 0 //当前选中的答题卡第几页
+      currentPageIndex: 0, //当前选中的答题卡第几页
+      showHistory:0
     }
   },
   watch: {
@@ -290,6 +292,11 @@ export default {
       this.QueryHistoryExamData() //学生端查询总分,多科历次信息
       this.QuerySuggestionData() //学生端查询总分,多科总结建议信息
     },
+    GetGroupClassValue(data,prop,code){
+      const obj = data.find(item=>item.classGroupCode==code);
+      const val = prop=='groupClassRanks'?obj?.classGroupRankRate:obj?.groupClassResultScore;
+      return val ?? '-'
+    },
     //学生端查询单科-我的成绩
     QueryOneSubjectData() {
       this.subjectLoading = true
@@ -308,6 +315,7 @@ export default {
               this.academicLevelData.examAcademicLevelStr +=`${level}${index==0?'[':'('}${startScore}%-${endScore}%]${index==lens -1?'。':';'}`;
             })
             this.academicLevelData.scoreType = scoreType;
+            this.showHistory = res?.data?.showHistory || 0;
           } else {
             this.academicLevelData.examAcademicLevelStr = '';
             this.academicLevelData.scoreType = '';

+ 1 - 0
vue.config.js

@@ -105,6 +105,7 @@ module.exports = {
     proxy: {
       "/api": {
         target: "https://dev3.k12100.net/student/api/",
+        // target: "http://192.168.1.19:47003/api/",//静远本地
         // target: "https://www.k12100.com/student/api/",
         changeOrigin: true,
         pathRewrite: {