Sfoglia il codice sorgente

隐藏总分和组合科目

wangguoxi 2 mesi fa
parent
commit
70772cf9a9

+ 1 - 1
src/App.vue

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

+ 8 - 4
src/components/FiltersItem_ruoyan.vue

@@ -5,7 +5,7 @@
                 <div class="tag_group_title">{{ filterItem.name }}:</div>
                 <div class="tag_group_content">
                     <template v-for="item in filterItem.list">
-                        <template v-if="showTable(item.label)">
+                        <template v-if="showTable(item)">
                             <div class="tag_item" @click="selectItem(index, item.value, filterItem)"
                                 :class="item.value == filterItem.value ? 'active' : ''">
                                 {{ item.label }}
@@ -40,11 +40,15 @@ export default {
             this.$emit('selectItem', d, item)
         },
 
-        showTable(tableName) {
+        showTable(item) {
             const showTotalScore = this.$store.state.report.showTotalScore
-            console.log('showTotalScore', showTotalScore)
 
-            if (tableName === '总分' && !showTotalScore) {
+            // isTotal:是否总分 0-不是 1-是
+            // subjectGroupType:学科分组类型 0-不分组 1-分组
+            const { isTotal, subjectGroupType } = item
+
+            //  当 isTotal 为 1 或 subjectGroupType 为 1 且 showTotalScore 为 false 的时候隐藏总分
+            if ((isTotal === 1 || subjectGroupType === 1) && !showTotalScore) {
                 return false
             } else {
                 return true

+ 1 - 0
src/views/analysisReport/wrongQuestion/index.vue

@@ -324,6 +324,7 @@ export default {
     watch: {
         subjectCode(newVal, oldVal) {
             if (newVal !== oldVal) {
+                this.pageParam.pageNum = 1;
                 this._queryStudentErrorQuestion();
             }
         },