liurongli 8 kuukautta sitten
vanhempi
commit
876158c75e

+ 7 - 3
src/components/PaperImage.vue

@@ -2,7 +2,7 @@
 
   <div class="paper_container"  ref="paperContainer"  @mousedown="onMouseDown" @mousemove="onMouseMove" @mouseup="onMouseUp"  @wheel="onWheel">
       <canvas id="paperCanvas" ref="paperCanvas" class="paper_canvas" @mouseleave="onCanvasLeave"></canvas>
-      <div id="imgContainer" class="img_container">
+      <div :id="`imgContainer${imageIndex}`" class="img_container">
         <img v-if="paperImgUrl" :src="paperImgUrl" >
       </div>
       <div class="no_paper_url" v-if="paperImgUrl==''">
@@ -60,6 +60,10 @@ export default {
       type:String,
       default:''
     },//下载图片的名称
+    imageIndex:{//图片索引
+      type:[String,Number],
+      default:''
+    }
   },
   computed:{
 
@@ -431,11 +435,11 @@ export default {
     ImageInfoChange(){
       let {width,height} = this.paperImgInfo;
       // console.log("打印纸张试卷的图片宽高",this.paperImgInfo);
-      let imgDom = document.getElementById('imgContainer');
+      let imgDom = document.getElementById(`imgContainer${this.imageIndex}`);
       imgDom.style.width = width * this.zoomRate*this.scale + 'px';
       imgDom.style.height = height * this.zoomRate*this.scale + 'px';
       imgDom.style.left = this.position.x + 'px';
-      imgDom.style.top = this.position.y + 'px';         
+      imgDom.style.top = this.position.y + 'px';
     },
 
     //图片加载完成后绘制图片

+ 3 - 3
src/components/StudentPaper.vue

@@ -194,7 +194,7 @@ export default {
 
             if(res.code==200)
             {
-              this.paperImageList=res.data.pageVOS || [];
+              this.paperImageList=res?.data?.pageVOS || [];
               // 重置索引并更新当前试卷数据
               // this.currentIndex = 0;
               this.UpdateCurrentPaperData();
@@ -205,8 +205,8 @@ export default {
               //先添加总分数据
               let totalScore = {
                 questionName: '总分',
-                fullScore: res.data.fullScore || 150,
-                score: res.data.totalScore,
+                fullScore: res?.data?.fullScore || 150,
+                score: res?.data?.totalScore,
                 questionAnswer: '',
                 answer: '',
                 samplingPosition:"{\"x\":195,\"y\":247,\"page\":1}",

+ 1 - 2
src/http/api/reportStudent.js

@@ -1,6 +1,5 @@
 import { get, post } from "../common/http";
 import base from "../common/base";
-console.log(sessionStorage.getItem('schoolType'),1888888)
 //联校接口
 const jointSchoolReport = {
     //学生端查询考试列表
@@ -161,6 +160,6 @@ const schoolReport = {
         );
     },
 };
-const schoolType = sessionStorage.getItem('schoolType') ?? '2';//1:单校  2:联校
+const schoolType = sessionStorage.getItem('schoolType') ?? '1';//1:单校  2:联校
 const report = schoolType=='1'?schoolReport:jointSchoolReport;
 export default { ...report };

+ 3 - 3
src/views/analysisReport/components/dCharts/GaugeChart.vue

@@ -155,9 +155,9 @@ export default {
             shadowOffsetY: 0,
             shadowBlur: 6,
             borderWidth: 1,
-            width: 140,
-            height: 70,
-            borderRadius: [70, 70, 0, 0],
+            width: 160,
+            height: 80,
+            borderRadius: [80, 80, 0, 0],
             fontSize: 24,
             offsetCenter: [0, '-25%'],
             valueAnimation: true,

+ 25 - 19
src/views/analysisReport/studentPage/scrolReport/transcript_single.vue

@@ -55,7 +55,7 @@
               <span class="title">年排</span>
               <span class="value">{{ subjectData?.data?.schoolRank ?? '-' }}</span>
             </div>
-            <div class="score_item" v-if="subjectData?.data?.examRankStatus === 0">
+            <div class="score_item" v-if="subjectData?.data?.examRankStatus === 0 && schoolType == 2">
               <span class="title">联排</span>
               <span class="value">{{ subjectData?.data?.examRank ?? '-' }}</span>
             </div>
@@ -340,6 +340,7 @@ export default {
     },//监听筛选数据变化
   },
   computed: {
+    ...mapGetters(["userInfo"]),
     reportParam() {
       return {
         examLevel: this.$store.state.report.filterObject.examLevel, //1-联考 2-单校
@@ -367,8 +368,10 @@ export default {
       if (examName) {
         return examName.split("_")[0];
       }
-    },
-    ...mapGetters(["userInfo"]),
+    },//考试名称
+    schoolType(){
+      sessionStorage.getItem('schoolType');//1:单校 2:联校
+    }
   },
   created() { },
   mounted() {
@@ -438,6 +441,18 @@ export default {
       }).then((res) => {
           if (res.code == 200 && res.data) {
             this.answerCard.paperImageList=res.data.pageVOS || [];
+            //先添加总分数据
+            let totalScore = {
+              questionName: '总分',
+              fullScore: res?.data?.fullScore || 150,
+              score: res?.data?.totalScore,
+              questionAnswer: '',
+              answer: '',
+              samplingPosition:"{\"x\":195,\"y\":247,\"page\":1}",
+            };
+            if (this.answerCard.paperImageList.length > 0 && this.answerCard.paperImageList[0].questionVOS) {
+              this.answerCard.paperImageList[0].questionVOS.unshift(totalScore);
+            }
           }else{
             this.answerCard.paperImageList=[];
           }
@@ -466,7 +481,6 @@ export default {
             const titleData = res.data.titleData || [];
             const studentOpenness = res.data?.studentOpenness ?? '';
             this.TableChartData(tableData, titleData, studentOpenness, 'smallQuestionData');
-            this.QueryOneSubjectGroupQuestionData();//学生端查询单科-大题分析,知识点分析,能力要素分析
           } else {
             this.groupData.smallQuestionData.tableData = [];
             this.groupData.smallQuestionData.titleData = [];
@@ -475,6 +489,7 @@ export default {
             this.groupData.smallQuestionData.datay = [];
             this.groupData.smallQuestionData.studentOpenness = '';
           }
+          this.QueryOneSubjectGroupQuestionData();//学生端查询单科-大题分析,知识点分析,能力要素分析
         })
         .finally(() => {
           this.groupData.smallQuestionData.loading = false;
@@ -510,9 +525,7 @@ export default {
       this.groupData.bigQuestionData.loading = true;
       this.groupData.knowledgePointQuestionData.loading = true;
       this.groupData.abilityQuestionData.loading = true;
-      this.$api.reportStudent
-        .queryOneSubjectGroupQuestionData(this.reportParam)
-        .then((res) => {
+      this.$api.reportStudent.queryOneSubjectGroupQuestionData(this.reportParam).then((res) => {
           if (res.code == 200 && res.data) {
             const { bigQuestion, knowledgePointQuestion, abilityQuestion } = res.data;
             if (bigQuestion && bigQuestion?.tableData?.length > 0) {
@@ -545,7 +558,6 @@ export default {
               const studentOpenness = abilityQuestion?.studentOpenness ?? '';
               this.TableChartData(tableData, titleData, studentOpenness, 'abilityQuestionData');
             }
-            this.QueryOneSubjectCustomGroupQuestion();//学生端查询单科-自定义分组
           } else {
             this.groupData.bigQuestionData.tableData = [];
             this.groupData.bigQuestionData.titleData = [];
@@ -566,6 +578,7 @@ export default {
             this.groupData.abilityQuestionData.datay = [];
             this.groupData.abilityQuestionData.studentOpenness = '';
           }
+          this.QueryOneSubjectCustomGroupQuestion();//学生端查询单科-自定义分组
         }).finally(() => {
           this.groupData.bigQuestionData.loading = false;
           this.groupData.knowledgePointQuestionData.loading = false;
@@ -574,9 +587,7 @@ export default {
     },
     //学生端查询单科-自定义分组
     QueryOneSubjectCustomGroupQuestion() {
-      this.$api.reportStudent
-        .queryOneSubjectCustomGroupQuestion(this.reportParam)
-        .then((res) => {
+      this.$api.reportStudent.queryOneSubjectCustomGroupQuestion(this.reportParam).then((res) => {
           if (res.code == 200 && res.data) {
             const customQuestionData = res?.data?.customQuestionData ?? [];
             if (customQuestionData && customQuestionData.length > 0) {
@@ -612,9 +623,7 @@ export default {
     //学生端查询单科-历次查询
     QueryOneSubjectHistoryExamData() {
       this.historyExamLoading = true;
-      this.$api.reportStudent
-        .queryOneSubjectHistoryExamData(this.reportParam)
-        .then((res) => {
+      this.$api.reportStudent.queryOneSubjectHistoryExamData(this.reportParam).then((res) => {
           if (res.code == 200 && res.data) {
             const detailData = res.data?.detailData || [];
             this.historyExamData.chartData = detailData;
@@ -640,8 +649,7 @@ export default {
             this.historyExamData.tooltipData = [];
             this.historyExamData.selectVal = '';
           }
-        })
-        .finally(() => {
+        }).finally(() => {
           this.historyExamLoading = false;
         });
     },
@@ -660,9 +668,7 @@ export default {
     },
     //学生端查询单科-总结建议
     QueryOneSubjectSuggestionData() {
-      this.$api.reportStudent
-        .queryOneSubjectSuggestionData(this.reportParam)
-        .then((res) => {
+      this.$api.reportStudent.queryOneSubjectSuggestionData(this.reportParam).then((res) => {
           if (res.code == 200 && res.data) {
             const data = res.data;
             const upSubjectData = data.upSubjectData.map(item => {

+ 26 - 6
src/views/analysisReport/studentPage/scrolReport/transcript_total.vue

@@ -21,8 +21,8 @@
                 <template v-else>{{ scope.row?.[title.prop] || "-" }}</template>
               </template>
               <template v-else-if="title.prop == 'imgUrlList'">
-                <el-button type="text"
-                  :disabled="!scope?.row?.imgUrlList || scope?.row?.imgUrlList == '-'">查看答题卡</el-button>
+                <el-button v-if="scope.row.isTotal==0 || scope.row.subjectGroupType==0" type="text" :disabled="!scope?.row?.imgUrlList || scope?.row?.imgUrlList == '-'" @click="OpenStudentPaper(scope.row.subjectCode)">查看答题卡</el-button>
+                <template v-else>-</template>
               </template>
               <template v-else>{{ scope.row?.[title.prop] || "-" }}</template>
             </template>
@@ -100,6 +100,8 @@
       </div>
     </div>
     <GotoTop></GotoTop>
+    <!-- 学生答题卡预览组件 -->
+    <StudentPaper v-model="showStudentPaperDialog" :paperInfo="paperInfo" :currentPageIndex="currentPageIndex" :pageTitle="paperTitle"></StudentPaper>
   </div>
 </template>
 <script>
@@ -107,6 +109,8 @@ import DifferenceChart from "@/views/analysisReport/components/dCharts/differenc
 import ExpandableText from "@/views/analysisReport/components/ExpandableText"; //文本内容展开收缩组件
 import LineChart from "@/views/analysisReport/components/dCharts/lineChart"; //折线图
 import GotoTop from "@/views/analysisReport/components/GotoTop"; //分析报告页面底部回到顶部组件
+import StudentPaper from '@/components/StudentPaper.vue';//学生答题卡预览组件
+import { mapGetters } from "vuex";
 export default {
   name: "subjectQuality",
   props: {},
@@ -115,6 +119,7 @@ export default {
     ExpandableText,
     LineChart,
     GotoTop,
+    StudentPaper
   },
   data() {
     return {
@@ -141,7 +146,11 @@ export default {
         selectNames: [],
         selectVal: 'standardScore'
       }, //线面积图
-      suggestionData: null
+      suggestionData: null,
+      showStudentPaperDialog:false,//显示答题卡弹框
+      paperInfo:{},
+      paperTitle:'',//答题卡弹框标题
+      currentPageIndex:0,//当前选中的答题卡第几页
     };
   },
   watch: {
@@ -150,6 +159,13 @@ export default {
     },//监听筛选数据变化
   },
   computed: {
+    ...mapGetters(["userInfo"]),
+    pageName() {
+      let examName = this.$store.state.report.examSelectItem.examName;
+      if (examName) {
+        return examName.split("_")[0];
+      }
+    },//考试名称
     reportParam() {
       return {
         examLevel: this.$store.state.report.filterObject.examLevel, //1-联考 2-单校
@@ -230,9 +246,7 @@ export default {
       if(this.reportParam.subjectGroupType==1 && this.reportParam.isTotal==0){//学生端查询总分,多科历次信息,组合科目时,一定要传组合科目的名称,组合科目的历次是按照组合科目名称来查询
         param.subjectGroupNames = this.subjectGroupNames
       }
-      this.$api.reportStudent
-        .queryHistoryExamData(...param)
-        .then((res) => {
+      this.$api.reportStudent.queryHistoryExamData({...param}).then((res) => {
           if (res.code == 200 && res.data) {
             const detailData = res.data?.detailData || [];
             this.historyExamData.chartData = detailData;
@@ -303,6 +317,12 @@ export default {
           }
         });
     },
+    //答题卡预览
+    OpenStudentPaper(subjectCode){
+      this.paperTitle = `${this.pageName}_${this.userInfo.userName}【${this.userInfo.registrationCode}】`;
+      this.paperInfo = {examId:this.reportParam.examId,subjectCode:subjectCode};
+      this.showStudentPaperDialog = true;
+    },
   },
 };
 </script>

+ 1 - 1
src/views/login/login.vue

@@ -26,7 +26,7 @@ export default {
     SubmitLogin() {
       const code = this.$route.query.code || '';
       const pw = this.$route.query.pw || '';
-      const type = this.$route.query.type || '2';//1:单校 2:联校
+      const type = this.$route.query.type || '1';//1:单校 2:联校
       if(!code && !pw){
         window.location.href = base.STUDENT_LOGIN;//跳转到教师端登录页面
       }

+ 1 - 1
version.json

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

+ 2 - 2
vue.config.js

@@ -89,8 +89,8 @@ module.exports = {
     },
     proxy: {
       "/api": {
-        target: "https://dev3.k12100.net/student/api/",
-        // target: "http://192.168.1.15:47003/api/",
+        // target: "https://dev3.k12100.net/student/api/",
+        target: "http://192.168.1.15:47003/api/",
         changeOrigin: true,
         pathRewrite: {
           "^/api": "/",