dedsudiyu 2 dias atrás
pai
commit
54bea08ee7

+ 1 - 0
src/views/safetyEducationExaminationNew/components/historyOfIncorrectQuestions.vue

@@ -56,6 +56,7 @@
         <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
         <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
         <p class="page-submit-common-style-button"
+           v-if="dataList[0]"
            style="float: right;"
            @click="tableButton(1)"
         >开始训练</p>

+ 2 - 2
src/views/safetyEducationExaminationNew/courseManagement/courseManagement/index.vue

@@ -40,7 +40,7 @@
             ></el-cascader>
           </el-form-item>
           <el-form-item label="" prop="disciplineId">
-            <el-select v-model="queryParams.disciplineId" placeholder="专业类别" style="width: 200px">
+            <el-select v-model="queryParams.disciplineId" placeholder="课程分类" style="width: 200px">
               <el-option
                 v-for="dict in optionListC"
                 :key="dict.id"
@@ -97,7 +97,7 @@
               <span style="padding:2px 10px;border:1px solid rgb(245, 154, 35);border-radius:4px;color: rgb(245, 154, 35);background-color:rgba(245, 154, 35,0.2)" v-if="scope.row.shareStatus==0">不共享</span>
             </template>
           </el-table-column>
-          <el-table-column label="专业类别" prop="disciplineTypeName" width="120" show-overflow-tooltip/>
+          <el-table-column label="课程分类" prop="disciplineTypeName" width="120" show-overflow-tooltip/>
           <el-table-column label="课件总数" prop="coursewareTotalCount" width="100" show-overflow-tooltip/>
           <el-table-column label="总时长" prop="totalLearningDuration" width="100" show-overflow-tooltip/>
           <el-table-column label="可得学时" prop="totalCreditHours" width="100" show-overflow-tooltip/>

+ 21 - 2
src/views/safetyEducationExaminationNew/courseManagement/coursewareManagement/index.vue

@@ -55,6 +55,16 @@
               placeholder="来源"
             ></el-cascader>
           </el-form-item>
+          <el-form-item label="" prop="disciplineTypeId">
+            <el-select v-model="queryParams.disciplineTypeId" placeholder="课件分类" style="width: 200px">
+              <el-option
+                v-for="dict in disciplineOptionList"
+                :key="dict.id"
+                :label="dict.disciplineName"
+                :value="dict.id"
+              />
+            </el-select>
+          </el-form-item>
           <el-form-item label="" prop="searchValue">
             <el-input
               maxLength="30"
@@ -80,6 +90,7 @@
             </template>
           </el-table-column>
           <el-table-column label="知识点" prop="knowledgePointName" width="120" show-overflow-tooltip/>
+          <el-table-column label="课件分类" prop="disciplineTypeName" width="120" show-overflow-tooltip/>
           <!--<el-table-column label="专业类别" prop="content" width="100" show-overflow-tooltip/>-->
           <el-table-column label="是否共享" prop="shareStatus" width="100" show-overflow-tooltip>
             <template slot-scope="scope">
@@ -111,7 +122,7 @@
               <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="操作" width="200" show-overflow-tooltip v-if="tableButtonType">
+          <el-table-column label="操作" width="140" show-overflow-tooltip v-if="tableButtonType">
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
@@ -147,7 +158,7 @@
   import fullScreenFileLook from "@/components/fullScreenFileLook/fullScreenFileLook.vue";
   import {
     examElCoursewarePage,examElCoursewareDel,examElKnowledgePointTreeList,
-    systemDeptCurrentDept,examElCoursewareDetail
+    systemDeptCurrentDept,examElCoursewareDetail,examElDisciplineTypeList
   } from "@/api/safetyEducationExaminationNew/index";
   import addPage from "./addPage.vue";
   export default {
@@ -165,6 +176,7 @@
         optionListA:[{value:1,label:'视频'},{value:3,label:'文档'},{value:4,label:'文章'}],
         optionListB:[],
         optionListC:[],
+        disciplineOptionList:[],
         queryParams:{
           page:1,
           pageSize:20,
@@ -188,6 +200,7 @@
     mounted () {
       this.systemDeptCurrentDept();
       this.examElKnowledgePointTreeList();
+      this.examElDisciplineTypeList();
       this.getList();
     },
     methods: {
@@ -302,6 +315,12 @@
           this.$set(this,'optionListC',list);
         });
       },
+      //查询全部专业类别
+      examElDisciplineTypeList(){
+        examElDisciplineTypeList({}).then(response => {
+          this.$set(this,'disciplineOptionList',response.data);
+        });
+      },
     },
   }
 </script>

+ 5 - 5
src/views/safetyEducationExaminationNew/examManagement/testPaperManagement/index.vue

@@ -46,9 +46,9 @@
             ></el-cascader>
           </el-form-item>
           <el-form-item label="" prop="disciplineTypeId">
-            <el-select v-model="queryParams.disciplineTypeId" placeholder="专业类别" style="width: 140px">
+            <el-select v-model="queryParams.disciplineTypeId" placeholder="试卷分类" style="width: 200px">
               <el-option
-                v-for="dict in optionListD"
+                v-for="dict in disciplineOptionList"
                 :key="dict.id"
                 :label="dict.disciplineName"
                 :value="dict.id"
@@ -91,7 +91,7 @@
             </template>
           </el-table-column>
           <el-table-column label="知识点" prop="knowledgePointNames" width="160" show-overflow-tooltip/>
-          <el-table-column label="专业类别" prop="disciplineTypeName" width="120" show-overflow-tooltip/>
+          <el-table-column label="试卷分类" prop="disciplineTypeName" width="120" show-overflow-tooltip/>
           <el-table-column label="是否共享" prop="shareStatus" width="120" show-overflow-tooltip>
             <template slot-scope="scope">
               <span style="padding:2px 10px;border:1px solid rgb(1, 131, 251);border-radius:4px;color: rgb(1, 131, 251);background-color:rgba(1, 131, 251,0.2)" v-if="scope.row.shareStatus==1">共享</span>
@@ -163,7 +163,7 @@
         //下拉列表数据
         optionListB:[],
         optionListC:[],
-        optionListD:[],
+        disciplineOptionList:[],
         //查询条件
         queryParams:{
           page:1,
@@ -291,7 +291,7 @@
       //查询全部专业类别
       examElDisciplineTypeList(){
         examElDisciplineTypeList({}).then(response => {
-          this.$set(this,'optionListD',response.data);
+          this.$set(this,'disciplineOptionList',response.data);
         });
       },
     },

+ 17 - 4
src/views/safetyEducationExaminationNew/publicConfiguration/basicConfiguration/index.vue

@@ -10,6 +10,7 @@
     <div class="bottom-max-big-box">
       <div class="left-max-big-box">
         <p class="left-for-p" :class="item.value == buttonType?'check-button-p':''"
+           v-show="shouldShowItem(item)"
            @click="tableButton(item.value)"
            v-for="(item,index) in buttonList" :key="index">{{item.name}}</p>
       </div>
@@ -22,9 +23,7 @@
   </div>
 </template>
 <script>
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
+  import store from '@/store'
   import examinationConfiguration from "./examinationConfiguration.vue";
   import specialtyConfiguration from "./specialtyConfiguration.vue";
   import gradingConfiguration from "./gradingConfiguration.vue";
@@ -52,13 +51,20 @@
           {name:'学时积分配置',value:'4'},
           {name:'其他配置',value:'5'},
         ],
+        //管理权限
+        sustainType:false,
       }
     },
     created () {
 
     },
     mounted () {
-
+      let permissions = store.getters.permissions;
+      if(permissions[0] == "*:*:*"){
+        this.$set(this,'sustainType',true);
+      }else{
+        this.$set(this,'sustainType',false);
+      }
     },
     methods: {
       tableButton(val){
@@ -93,6 +99,13 @@
           this.$refs.otherConfiguration.submitButton();
         }
       },
+      shouldShowItem(item){
+        if(this.sustainType){
+          return true
+        }else{
+          return item.value != 2;
+        }
+      },
     },
   }
 </script>

+ 21 - 3
src/views/safetyEducationExaminationNew/questionBankManagement/questionBankManagement/index.vue

@@ -52,6 +52,16 @@
               />
             </el-select>
           </el-form-item>
+          <el-form-item label="" prop="disciplineTypeId">
+            <el-select v-model="queryParams.disciplineTypeId" placeholder="试题分类" style="width: 200px">
+              <el-option
+                v-for="dict in disciplineOptionList"
+                :key="dict.id"
+                :label="dict.disciplineName"
+                :value="dict.id"
+              />
+            </el-select>
+          </el-form-item>
           <el-form-item label="" prop="questionContent">
             <el-input
               maxLength="30"
@@ -141,7 +151,7 @@
 <script>
   //import { getDicts } from "@/api/commonality/noPermission";
   //import { systemUserSelect } from "@/api/commonality/permission";
-  import { examElKnowledgePointTreeList,examElQuestionBankList,examElQuestionBankDel } from "@/api/safetyEducationExaminationNew/index";
+  import { examElKnowledgePointTreeList,examElQuestionBankList,examElQuestionBankDel,examElDisciplineTypeList } from "@/api/safetyEducationExaminationNew/index";
   import importComponent from "@/components/importComponent/importComponent.vue";
   import answerKey from "@/views/safetyEducationExaminationNew/components/answerKey.vue";
   import addPage from "./addPage.vue";
@@ -172,12 +182,14 @@
         optionListB:[],
         optionListC:[{value:1,label:'单选'},{value:2,label:'多选'},{value:3,label:'判断'}],
         optionListD:[{value:1,label:'简单'},{value:2,label:'一般'},{value:3,label:'较难'},{value:4,label:'极难'}],
+        disciplineOptionList:[],
         //查询条件
         queryParams:{
           page:1,
           pageSize:20,
           shareStatus:null,
           knowledgePointId :null,
+          disciplineTypeId: '',
           questionType :null,
           difficulty :null,
           questionContent :'',
@@ -200,6 +212,7 @@
     },
     mounted () {
       this.examElKnowledgePointTreeList();
+      this.examElDisciplineTypeList();
       this.getList();
     },
     methods: {
@@ -227,6 +240,7 @@
           pageSize:20,
           shareStatus:null,
           knowledgePointId :null,
+          disciplineTypeId: '',
           questionType :null,
           difficulty :null,
           questionContent :'',
@@ -235,10 +249,8 @@
       },
       //获取数据列表
       getList(){
-
         let obj = JSON.parse(JSON.stringify(this.queryParams))
         examElQuestionBankList(obj).then(response => {
-
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
         });
@@ -289,6 +301,12 @@
           this.$set(this, 'optionListB', list);
         });
       },
+      //查询全部专业类别
+      examElDisciplineTypeList(){
+        examElDisciplineTypeList({}).then(response => {
+          this.$set(this,'disciplineOptionList',response.data);
+        });
+      },
     },
   }
 </script>

+ 53 - 14
src/views/safetyEducationExaminationNew/safetyEducation/knowledgeLearning/index.vue

@@ -18,8 +18,8 @@
                      :inline="true" style="width:100%;">
               <div class="table-top-button-box-2">
                 <div>
-                  <p :class="topButtonIndex === 1?'check-table-button':''" @click="topCheckButton(1)">视频资源</p>
-                  <p :class="topButtonIndex === 2?'check-table-button':''" @click="topCheckButton(2)">文档文章</p>
+                  <p :class="topButtonIndex == 1?'check-table-button':''" @click="topCheckButton(1)">视频资源</p>
+                  <p :class="topButtonIndex == 2?'check-table-button':''" @click="topCheckButton(2)">文档文章</p>
                 </div>
               </div>
               <div class="table-top-button-box">
@@ -47,6 +47,16 @@
                   placeholder="知识点"
                 ></el-cascader>
               </el-form-item>
+              <el-form-item label="" prop="disciplineTypeId">
+                <el-select v-model="queryParams.disciplineTypeId" placeholder="知识分类" style="width: 200px">
+                  <el-option
+                    v-for="dict in disciplineOptionList"
+                    :key="dict.id"
+                    :label="dict.disciplineName"
+                    :value="dict.id"
+                  />
+                </el-select>
+              </el-form-item>
               <el-form-item label="" prop="coursewareName">
                 <el-input
                   maxLength="30"
@@ -91,7 +101,10 @@
   //import { systemUserSelect } from "@/api/commonality/permission";
   //import { getInfo } from "@/api/basicsModules/index";
   //import addPage from "./addPage.vue";
-  import { examUserCoursewareLearningList,examElKnowledgePointTreeList,examUserCoursewareLearningRestart, } from "@/api/safetyEducationExaminationNew/index";
+  import {
+    examUserCoursewareLearningList,examElKnowledgePointTreeList,
+    examUserCoursewareLearningRestart,examElDisciplineTypeList,
+  } from "@/api/safetyEducationExaminationNew/index";
   export default {
     name: 'index',
     //components: {
@@ -99,19 +112,19 @@
     //},
     data() {
       return {
-        //页面状态
-        pageType: 1,
         letDataList:[],
         leftDataIndex:0,
         topButtonIndex:1,
         //下拉列表数据
         optionListB: [],
+        disciplineOptionList:[],
         //查询条件
         learnStatus:'',
         queryParams: {
           page: 1,
           pageSize: 20,
           knowledgePointId: '',
+          disciplineTypeId: '',
           coursewareName: null
         },
         //列表数据
@@ -129,8 +142,9 @@
 
     },
     mounted() {
-      if(this.$route.query.skip){
-        this.$set(this,'topButtonIndex',2);
+      if(this.$route.query.skipType){
+        this.$set(this,'topButtonIndex',this.$route.query.skipType);
+        this.$set(this.queryParams,'disciplineTypeId',this.$route.query.disciplineId);
       }
       if(this.$route.query.text){
         let obj = JSON.parse(Decrypt(this.$route.query.text));
@@ -139,12 +153,16 @@
         this.$set(this,'completedStudyHours',obj.completedStudyHours);
         this.$set(this,'studyHoursRequirement',obj.studyHoursRequirement);
       }
-
-      // this.$set(this,'examName',this.$route.query.examName?this.$route.query.examName:'');
-      // this.$set(this,'knowledgePointIds',this.$route.query.knowledgePointIds?this.$route.query.knowledgePointIds:[]);
-      // this.$set(this,'completedStudyHours',this.$route.query.completedStudyHours?this.$route.query.completedStudyHours:0);
-      // this.$set(this,'studyHoursRequirement',this.$route.query.studyHoursRequirement?this.$route.query.studyHoursRequirement:0);
+      if(sessionStorage.getItem('skipQueryParamsData')){
+        let skipQueryParamsData = JSON.parse(sessionStorage.getItem('skipQueryParamsData'))
+        this.$set(this,'queryParams',skipQueryParamsData.queryParams);
+        this.$set(this,'leftDataIndex',skipQueryParamsData.leftDataIndex);
+        this.$set(this,'topButtonIndex',skipQueryParamsData.topButtonIndex);
+        this.$set(this,'learnStatus',skipQueryParamsData.learnStatus);
+        sessionStorage.removeItem('skipQueryParamsData');
+      }
       this.examElKnowledgePointTreeList();
+      this.examElDisciplineTypeList();
     },
     methods: {
       //左侧列表切换
@@ -183,6 +201,7 @@
           page: 1,
           pageSize: 20,
           knowledgePointId: '',
+          disciplineTypeId: '',
           coursewareName: null
         })
         this.getList()
@@ -245,6 +264,12 @@
           this.getList();
         });
       },
+      //查询全部专业类别
+      examElDisciplineTypeList(){
+        examElDisciplineTypeList({}).then(response => {
+          this.$set(this,'disciplineOptionList',response.data);
+        });
+      },
       //换算分钟
       secondsToMinutes(totalSeconds) {
         if (typeof totalSeconds !== 'number' || totalSeconds <= 0) {
@@ -252,7 +277,21 @@
         }
         return Math.ceil(totalSeconds / 60);
       },
-    }
+    },
+    beforeRouteLeave(to, from, next) {
+      if (to.name === 'learningMaterials') {
+        const skipQueryParamsData = {
+          queryParams: this.queryParams,
+          leftDataIndex: this.leftDataIndex,
+          topButtonIndex: this.topButtonIndex,
+          learnStatus: this.learnStatus,
+        };
+        sessionStorage.setItem('skipQueryParamsData', JSON.stringify(skipQueryParamsData));
+      } else {
+        sessionStorage.removeItem('skipQueryParamsData');
+      }
+      next(); // 必须调用 next() 放行路由
+    },
   }
 </script>
 <style scoped lang="scss">
@@ -391,7 +430,7 @@
             }
           }
           .page-content-box{
-            padding: 0;
+            padding: 0 0 10px 0;
           }
           .for-max-big-box{
             flex:1;

+ 40 - 4
src/views/safetyEducationExaminationNew/safetyEducation/learningTasks/index.vue

@@ -31,6 +31,16 @@
               placeholder="知识点"
             ></el-cascader>
           </el-form-item>
+          <el-form-item label="" prop="disciplineTypeId">
+            <el-select v-model="queryParams.disciplineTypeId" placeholder="课程分类" style="width: 200px">
+              <el-option
+                v-for="dict in disciplineOptionList"
+                :key="dict.id"
+                :label="dict.disciplineName"
+                :value="dict.id"
+              />
+            </el-select>
+          </el-form-item>
           <el-form-item label="" prop="courseName">
             <el-input
               maxLength="30"
@@ -78,21 +88,21 @@
 <script>
   //import { getDicts } from "@/api/commonality/noPermission";
   //import { systemUserSelect } from "@/api/commonality/permission";
-  import { examUserCourseLearningList,examElKnowledgePointTreeList, } from "@/api/safetyEducationExaminationNew/index";
+  import { examUserCourseLearningList,examElKnowledgePointTreeList,examElDisciplineTypeList, } from "@/api/safetyEducationExaminationNew/index";
   export default {
     name: 'index',
     data() {
       return {
-        //页面状态
-        pageType: 1,
         //下拉列表数据
         optionListB: [],
+        disciplineOptionList:[],
         //查询条件
         learnStatus:'',
         queryParams: {
           page: 1,
           pageSize: 20,
           knowledgePointId: '',
+          disciplineTypeId: '',
           courseName: null
         },
         //列表数据
@@ -105,8 +115,15 @@
 
     },
     mounted() {
+      if(sessionStorage.getItem('skipQueryParamsData')){
+        let skipQueryParamsData = JSON.parse(sessionStorage.getItem('skipQueryParamsData'))
+        this.$set(this,'queryParams',skipQueryParamsData.queryParams);
+        this.$set(this,'learnStatus',skipQueryParamsData.learnStatus);
+        sessionStorage.removeItem('skipQueryParamsData');
+      }
       this.getList();
       this.examElKnowledgePointTreeList();
+      this.examElDisciplineTypeList();
     },
     methods: {
       //切换按钮
@@ -128,6 +145,7 @@
           page: 1,
           pageSize: 20,
           knowledgePointId: '',
+          disciplineTypeId: '',
           courseName: null
         })
         this.getList()
@@ -175,6 +193,12 @@
           this.$set(this, 'optionListB', list);
         });
       },
+      //查询全部专业类别
+      examElDisciplineTypeList(){
+        examElDisciplineTypeList({}).then(response => {
+          this.$set(this,'disciplineOptionList',response.data);
+        });
+      },
       //换算分钟
       secondsToMinutes(totalSeconds) {
         if (typeof totalSeconds !== 'number' || totalSeconds <= 0) {
@@ -182,7 +206,19 @@
         }
         return Math.ceil(totalSeconds / 60);
       },
-    }
+    },
+    beforeRouteLeave(to, from, next) {
+      if (to.name === 'learningCourse') {
+        const skipQueryParamsData = {
+          queryParams: this.queryParams,
+          learnStatus: this.learnStatus,
+        };
+        sessionStorage.setItem('skipQueryParamsData', JSON.stringify(skipQueryParamsData));
+      } else {
+        sessionStorage.removeItem('skipQueryParamsData');
+      }
+      next(); // 必须调用 next() 放行路由
+    },
   }
 </script>
 <style scoped lang="scss">

+ 23 - 1
src/views/safetyEducationExaminationNew/safetyTest/mockExam/index.vue

@@ -112,6 +112,14 @@
 
     },
     mounted() {
+      if(sessionStorage.getItem('skipQueryParamsData')){
+        let skipQueryParamsData = JSON.parse(sessionStorage.getItem('skipQueryParamsData'))
+        this.$set(this,'queryParams',skipQueryParamsData.queryParams);
+        this.$set(this,'dateRange',skipQueryParamsData.dateRange);
+        this.$set(this,'examTypeId',skipQueryParamsData.examTypeId);
+        this.$set(this,'examStatus',skipQueryParamsData.examStatus);
+        sessionStorage.removeItem('skipQueryParamsData');
+      }
       this.examUserExamTypeSelectExamType();
     },
     methods: {
@@ -233,7 +241,21 @@
         m=Math.pow(10,Math.max(r1,r2))
         return ((arg1*m+arg2*m)/m).toFixed(0);
       },
-    }
+    },
+    beforeRouteLeave(to, from, next) {
+      if (to.name === 'learningCourse'||to.name === 'mockExam') {
+        const skipQueryParamsData = {
+          queryParams: this.queryParams,
+          dateRange: this.dateRange,
+          examTypeId: this.examTypeId,
+          examStatus: this.examStatus,
+        };
+        sessionStorage.setItem('skipQueryParamsData', JSON.stringify(skipQueryParamsData));
+      } else {
+        sessionStorage.removeItem('skipQueryParamsData');
+      }
+      next(); // 必须调用 next() 放行路由
+    },
   }
 </script>
 <style scoped lang="scss">

+ 33 - 1
src/views/safetyEducationExaminationNew/safetyTest/myGrades/index.vue

@@ -142,6 +142,19 @@
 
     },
     mounted() {
+      if(sessionStorage.getItem('skipQueryParamsData')){
+        let skipQueryParamsData = JSON.parse(sessionStorage.getItem('skipQueryParamsData'))
+        this.$set(this,'queryParams',skipQueryParamsData.queryParams);
+        this.$set(this,'dateRange',skipQueryParamsData.dateRange);
+        this.$set(this,'pageType',skipQueryParamsData.pageType);
+        this.$set(this,'examTypeId',skipQueryParamsData.examTypeId);
+        this.$set(this,'resultStatus',skipQueryParamsData.resultStatus);
+        this.$set(this,'propsData',skipQueryParamsData.propsData);
+        this.$set(this,'historyOfIncorrectQuestionsPropsData',skipQueryParamsData.historyOfIncorrectQuestionsPropsData);
+        this.$set(this,'dialogType',skipQueryParamsData.dialogType);
+        this.$set(this,'dataStatisticsReportPropsData',skipQueryParamsData.dataStatisticsReportPropsData);
+        sessionStorage.removeItem('skipQueryParamsData');
+      }
       this.examUserExamTypeSelectExamType();
     },
     methods: {
@@ -254,7 +267,26 @@
         m=Math.pow(10,Math.max(r1,r2))
         return ((arg1*m+arg2*m)/m).toFixed(0);
       },
-    }
+    },
+    beforeRouteLeave(to, from, next) {
+      if (to.name === 'startTraining') {
+        const skipQueryParamsData = {
+          queryParams: this.queryParams,
+          dateRange: this.dateRange,
+          pageType: this.pageType,
+          examTypeId: this.examTypeId,
+          resultStatus: this.resultStatus,
+          propsData: this.propsData,
+          historyOfIncorrectQuestionsPropsData: this.historyOfIncorrectQuestionsPropsData,
+          dialogType: this.dialogType,
+          dataStatisticsReportPropsData: this.dataStatisticsReportPropsData,
+        };
+        sessionStorage.setItem('skipQueryParamsData', JSON.stringify(skipQueryParamsData));
+      } else {
+        sessionStorage.removeItem('skipQueryParamsData');
+      }
+      next(); // 必须调用 next() 放行路由
+    },
   }
 </script>
 <style scoped lang="scss">

+ 24 - 1
src/views/safetyEducationExaminationNew/safetyTest/onlineExam/index.vue

@@ -137,6 +137,14 @@
 
     },
     mounted() {
+      if(sessionStorage.getItem('skipQueryParamsData')){
+        let skipQueryParamsData = JSON.parse(sessionStorage.getItem('skipQueryParamsData'))
+        this.$set(this,'queryParams',skipQueryParamsData.queryParams);
+        this.$set(this,'dateRange',skipQueryParamsData.dateRange);
+        this.$set(this,'examTypeId',skipQueryParamsData.examTypeId);
+        this.$set(this,'examStatus',skipQueryParamsData.examStatus);
+        sessionStorage.removeItem('skipQueryParamsData');
+      }
       this.examUserExamTypeSelectExamType();
     },
     methods: {
@@ -331,7 +339,21 @@
         m=Math.pow(10,Math.max(r1,r2))
         return ((arg1*m+arg2*m)/m).toFixed(0);
       },
-    }
+    },
+    beforeRouteLeave(to, from, next) {
+      if (to.name === 'learningCourse'||to.name === 'mockExam'||to.name === 'startTheExam') {
+        const skipQueryParamsData = {
+          queryParams: this.queryParams,
+          dateRange: this.dateRange,
+          examTypeId: this.examTypeId,
+          examStatus: this.examStatus,
+        };
+        sessionStorage.setItem('skipQueryParamsData', JSON.stringify(skipQueryParamsData));
+      } else {
+        sessionStorage.removeItem('skipQueryParamsData');
+      }
+      next(); // 必须调用 next() 放行路由
+    },
   }
 </script>
 <style scoped lang="scss">
@@ -389,6 +411,7 @@
           }
           p:nth-child(2){
             border-left:none;
+            border-right:none;
           }
           p:nth-child(3){
             border-top-right-radius:4px;

+ 45 - 2
src/views/safetyEducationExaminationNew/safetyTest/practiceQuestions/index.vue

@@ -40,6 +40,16 @@
                   placeholder="知识点"
                 ></el-cascader>
               </el-form-item>
+              <el-form-item label="" prop="disciplineTypeId">
+                <el-select v-model="queryParams.disciplineTypeId" placeholder="题目分类" style="width: 200px">
+                  <el-option
+                    v-for="dict in disciplineOptionList"
+                    :key="dict.id"
+                    :label="dict.disciplineName"
+                    :value="dict.id"
+                  />
+                </el-select>
+              </el-form-item>
               <el-form-item label="" prop="searchName">
                 <el-input
                   maxLength="30"
@@ -92,7 +102,7 @@
   //import { systemUserSelect } from "@/api/commonality/permission";
   //import { getInfo } from "@/api/basicsModules/index";
   //import addPage from "./addPage.vue";
-  import { examUserPracticeList,examElKnowledgePointTreeList, } from "@/api/safetyEducationExaminationNew/index";
+  import { examUserPracticeList,examElKnowledgePointTreeList,examElDisciplineTypeList, } from "@/api/safetyEducationExaminationNew/index";
   import historyOfIncorrectQuestions from "@/views/safetyEducationExaminationNew/components/historyOfIncorrectQuestions.vue";
   export default {
     name: 'index',
@@ -107,12 +117,14 @@
         leftDataIndex:0,
         //下拉列表数据
         optionListB: [],
+        disciplineOptionList:[],
         //查询条件
         practiceStatus:'',
         queryParams: {
           page: 1,
           pageSize: 20,
           knowledgePointId: null,
+          disciplineTypeId: null,
           searchName: ''
         },
         //列表数据
@@ -126,7 +138,18 @@
 
     },
     mounted() {
+      if(this.$route.query.disciplineId){
+        this.$set(this.queryParams,'disciplineTypeId',this.$route.query.disciplineId);
+      }
+      if(sessionStorage.getItem('skipQueryParamsData')){
+        let skipQueryParamsData = JSON.parse(sessionStorage.getItem('skipQueryParamsData'))
+        this.$set(this,'queryParams',skipQueryParamsData.queryParams);
+        this.$set(this,'leftDataIndex',skipQueryParamsData.leftDataIndex);
+        this.$set(this,'practiceStatus',skipQueryParamsData.practiceStatus);
+        sessionStorage.removeItem('skipQueryParamsData');
+      }
       this.examElKnowledgePointTreeList();
+      this.examElDisciplineTypeList();
     },
     methods: {
       //左侧列表切换
@@ -156,6 +179,7 @@
           page: 1,
           pageSize: 20,
           knowledgePointId: null,
+          disciplineTypeId: null,
           searchName: ''
         })
         this.getList()
@@ -214,7 +238,26 @@
           this.getList();
         });
       },
-    }
+      //查询全部专业类别
+      examElDisciplineTypeList(){
+        examElDisciplineTypeList({}).then(response => {
+          this.$set(this,'disciplineOptionList',response.data);
+        });
+      },
+    },
+    beforeRouteLeave(to, from, next) {
+      if (to.name === 'startPracticing'||to.name === 'startTraining') {
+        const skipQueryParamsData = {
+          queryParams: this.queryParams,
+          leftDataIndex: this.leftDataIndex,
+          practiceStatus: this.practiceStatus,
+        };
+        sessionStorage.setItem('skipQueryParamsData', JSON.stringify(skipQueryParamsData));
+      } else {
+        sessionStorage.removeItem('skipQueryParamsData');
+      }
+      next(); // 必须调用 next() 放行路由
+    },
   }
 </script>
 <style scoped lang="scss">

+ 19 - 3
src/views/safetyEducationExaminationNew/workbench/ResourceCard.vue

@@ -16,6 +16,7 @@
             <p>学习资料</p>
             <p @click="goPage(1)">查看更多</p>
           </div>
+          <p class="text-null-p" v-if="!topLeftList[0]">暂无数据</p>
           <div class="for-max-big-box" @click="tableButton(item)"
                v-for="(item,index) in topLeftList" :key="index">
             <div class="left-box">
@@ -39,6 +40,7 @@
             <p>学习资料</p>
             <p @click="goPage(2)">查看更多</p>
           </div>
+          <p class="text-null-p" v-if="!topRightList[0]">暂无数据</p>
           <div class="for-max-big-box" v-for="(item,index) in topRightList" :key="index" @click="goPage(4,item)">
             <p class="el-icon-notebook-2"></p>
             <p>{{item.knowledgePointName}}</p>
@@ -57,6 +59,7 @@
         <p class="table-null-p"></p>
       </div>
       <div class="resource-body-bottom">
+        <p class="text-null-p" v-if="!bottomList[0]">暂无数据</p>
         <div class="for-max-big-box"  @click="tableButton(item)"
              v-for="(item,index) in bottomList" :key="index">
           <img v-if="item.exampleImg" :src="item.exampleImg">
@@ -140,24 +143,31 @@ export default {
         this.$router.push({
           path: '/safetyEducationExaminationNew/safetyEducation/knowledgeLearning',
           query: {
-            skip: true,
+            skipType: 2,
+            disciplineId:this.tableList[this.topCheckIndex].id,
           }
         })
       }else if(type == 2){
         this.$router.push({
           path: '/safetyEducationExaminationNew/safetyTest/practiceQuestions',
-          query: {}
+          query: {
+            disciplineId:this.tableList[this.bottomCheckIndex].id,
+          }
         })
       }else if(type == 3){
         this.$router.push({
           path: '/safetyEducationExaminationNew/safetyEducation/knowledgeLearning',
-          query: {}
+          query: {
+            skipType: 1,
+            disciplineId:this.tableList[this.bottomCheckIndex].id,
+          }
         })
       }else if(type == 4){
         this.$router.push({
           path: '/safetyEducationExaminationNew/safetyTest/practiceQuestions',
           query: {
             knowledgePointId:item.knowledgePointId,
+            disciplineId:this.tableList[this.bottomCheckIndex].id,
           }
         })
       }
@@ -277,6 +287,12 @@ export default {
         border-bottom:none!important;
       }
     }
+    .text-null-p{
+      text-align: center;
+      font-size:14px;
+      line-height:400px;
+      color:#999;
+    }
     .resource-body-top{
       height:500px;
       border-left:1px solid #E4E7ED;