Jelajahi Sumber

学生端修改

liurongli 8 bulan lalu
induk
melakukan
4fb93ea94a

+ 1 - 1
src/components/FiltersItem_ruoyan.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="filters_group">
       <div v-for="(filterItem,index) in filtersData" :key="index">
-        <div class="tag_group" v-if="filterItem.list.length>1">
+        <div class="tag_group" v-if="filterItem.list.length>0">
           <div class="tag_group_title">{{ filterItem.name }}:</div>
           <div class="tag_group_content">
             <div class="tag_item" v-for="item in filterItem.list" :key="item.value" @click="selectItem(index, item.value, filterItem)" :class="item.value == filterItem.value?'active':''">

+ 14 - 1
src/components/PaperImage.vue

@@ -6,7 +6,7 @@
         <img v-if="paperImgUrl" :src="paperImgUrl" >
       </div>
       <div class="no_paper_url" v-if="paperImgUrl==''">
-        暂无数据
+        <!-- 暂无答题卡 -->
         <!-- 请先制作模版 -->
       </div>
       <div v-if="showContextMenu"  class="custom_context_menu"  :style="{ top: contextMenuY + 'px', left: contextMenuX + 'px' }" @click="hideContextMenu">
@@ -1142,4 +1142,17 @@ export default {
     }
   }
 }
+.no_paper_url {
+  background-image: url("../assets/bg/no_content_bg.png");
+
+  background-repeat: no-repeat;
+  background-size: 360px auto;
+  background-position: 50% 30%;
+  color: #666666;
+  width: 100%;
+  height: 100%;
+  justify-content: center;
+  display: flex;
+  align-items: center;
+}
 </style>

+ 1 - 1
src/components/StudentPaper.vue

@@ -206,7 +206,7 @@ export default {
               let totalScore = {
                 questionName: '总分',
                 fullScore: res?.data?.fullScore || 150,
-                score: res?.data?.totalScore,
+                score: res?.data?.levelName ?? res?.data?.totalScore,
                 questionAnswer: '',
                 answer: '',
                 samplingPosition:"{\"x\":195,\"y\":247,\"page\":1}",

+ 56 - 3
src/views/analysisReport/studentPage/scrolReport/transcript_single.vue

@@ -163,9 +163,9 @@
                   <template v-else>{{ scope.row.score || "-" }}</template>
                 </template>
                 <!-- 包含小题 -->
-                <template
-                  v-else-if="title.prop == 'smallQuestionNames' && scope?.row?.[title.prop] && Object.prototype.toString.call(scope.row[title.prop]) == '[object Array]'">{{
+                <template v-else-if="title.prop == 'smallQuestionNames' && scope?.row?.[title.prop] && Object.prototype.toString.call(scope.row[title.prop]) == '[object Array]'">{{
                     scope.row[title.prop].join('、') }}</template>
+                <template v-else-if="title.prop == 'difficultyName'"><span :class="GetDifficultyClass(scope.row[title.prop])"></span><span>{{ GetDifficultyName(scope.row[title.prop]) }}</span></template>    
                 <template v-else>{{ scope.row[title.prop] || "-" }}</template>
               </template>
             </el-table-column>
@@ -442,7 +442,7 @@ export default {
             let totalScore = {
               questionName: '总分',
               fullScore: res?.data?.fullScore || 150,
-              score: res?.data?.totalScore,
+              score: res?.data?.levelName ?? res?.data?.totalScore,
               questionAnswer: '',
               answer: '',
               samplingPosition:"{\"x\":195,\"y\":247,\"page\":1}",
@@ -492,6 +492,36 @@ export default {
           this.groupData.smallQuestionData.loading = false;
         });
     },
+    GetDifficultyClass(val){
+      if (val == 1) {
+        return 'difficulty easy';
+      }else if (val == 2) {
+          return 'difficulty relatively_easy';
+      }else if (val == 3) {
+          return 'difficulty general';
+      }else if (val == 4) {
+          return 'difficulty more_difficult';
+      }else if (val == 5) {
+          return 'difficulty difficult';
+      }else{
+        return '';
+      }
+    },
+    GetDifficultyName(val){
+      if (val == 1) {
+        return '容易';
+      }else if (val == 2) {
+          return '较易';
+      }else if (val == 3) {
+          return '一般';
+      }else if (val == 4) {
+          return '较难';
+      }else if (val == 5) {
+          return '困难';
+      }else{
+        return '-';
+      }
+    },
     //处理数据
     TableChartData(tableData, titleData, studentOpenness, type) {
       this.groupData[type].studentOpenness = studentOpenness;
@@ -832,4 +862,27 @@ export default {
     }
   }
 }
+.difficulty{
+  width: 6px;
+  height: 6px;
+  display: inline-flex;
+  border-radius: 50%;
+  margin-right: 4px;
+  &.easy{
+    background: #3BA272;
+  }
+  &.relatively_easy{
+    background: #FAC858;
+  }
+  &.general{
+    background: #5470C6;
+  }
+  &.more_difficult{
+    background: #EA7ACB;
+  }
+  &.difficult{
+    background: #EE6666;
+  }
+}
+
 </style>

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

@@ -21,7 +21,8 @@
                 <template v-else>{{ scope.row?.[title.prop] || "-" }}</template>
               </template>
               <template v-else-if="title.prop == 'imgUrlList'">
-                <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>
+                <!-- :disabled="!scope?.row?.imgUrlList || scope?.row?.imgUrlList == '-'" -->
+                <el-button v-if="scope.row.isTotal==0 || scope.row.subjectGroupType==0" type="text" @click="OpenStudentPaper(scope.row.subjectCode)">查看答题卡</el-button>
                 <template v-else>-</template>
               </template>
               <template v-else>{{ scope.row?.[title.prop] || "-" }}</template>
@@ -209,9 +210,14 @@ export default {
             //单科
             const singleSubject = this.subjectData.tableData.filter(item => item.isTotal == 0 && item.subjectGroupType == 0);
             const chartData = [...totalScore,...subjectGroup,...singleSubject];
+            let datax = [],datay = [];
             chartData.forEach(item=>{
               this.subjectData.datax.push(item.subjectName)
               this.subjectData.datay.push(item.standardScore)
+              if(item.isTotal == 0 && item.subjectGroupType == 0){
+                datax.push(item.subjectName)
+                datay.push(item.standardScore)
+              }
               this.subjectData.tooltipData.push({
                 list: [{
                   name: '标准分',
@@ -221,12 +227,12 @@ export default {
               })
             })
             let maxSubject = [], minSubject = [];
-            this.subjectData.datay.forEach((item, k) => {
+            datay.forEach((item, k) => {
               if (Number(item) > 0) {
-                maxSubject.push(this.subjectData.datax[k])
+                maxSubject.push(datax[k])
               }
               if (Number(item) < 0) {
-                minSubject.push(this.subjectData.datax[k])
+                minSubject.push(datax[k])
               }
             });
             this.subjectData.maxSubject = maxSubject.join('、');

+ 1 - 1
vue.config.js

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