|
|
@@ -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;
|