mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-15 22:06:43 +08:00
调整跳转处理
This commit is contained in:
@@ -79,148 +79,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import studyItem from '@/components/Course/studyItem.vue'
|
|
||||||
import apicourseStudy from '@/api/modules/courseStudy.js';
|
|
||||||
import apiBoeCourse from '@/api/boe/course.js';
|
|
||||||
import {resListMap, resOwnerListMap,courseType,getType} from '@/utils/tools.js';
|
|
||||||
import apiBoe from '@/api/boe/boeApiAjax.js';
|
|
||||||
import axios from 'axios'
|
|
||||||
import { mapGetters,mapActions} from 'vuex';
|
import { mapGetters,mapActions} from 'vuex';
|
||||||
export default {
|
export default {
|
||||||
name: 'ucStudyIndex',
|
name: 'ucStudyIndex',
|
||||||
components:{studyItem},
|
components:{},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
loading:false,
|
loading:false
|
||||||
lastTabName:'course',
|
|
||||||
getCourseType:courseType,
|
|
||||||
lastStudy:{
|
|
||||||
aname: "",
|
|
||||||
contentId: "",
|
|
||||||
contentName: "",
|
|
||||||
contentType: 0,
|
|
||||||
courseId: "",
|
|
||||||
courseName: "",
|
|
||||||
courseType: "",
|
|
||||||
coverImg: "",
|
|
||||||
itemId: "",
|
|
||||||
lastStudyTime: 0,
|
|
||||||
lastTime: "",
|
|
||||||
progress: 100,
|
|
||||||
score: "",
|
|
||||||
studyDuration: "",
|
|
||||||
studyId: "",
|
|
||||||
},
|
|
||||||
params:{
|
|
||||||
pageIndex: 1,//第几页
|
|
||||||
pageSize: 5,
|
|
||||||
isFinish:false,
|
|
||||||
},
|
|
||||||
couresList:[],
|
|
||||||
couresCount:0,
|
|
||||||
taskList:[]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let params={
|
this.$router.push('/uc/study/task')
|
||||||
// keyword:this.keyword,
|
|
||||||
page:1,
|
|
||||||
size:10,
|
|
||||||
// cmtask_status:this.cmtask_status,
|
|
||||||
// cmtask_name:this.cmtask_name,
|
|
||||||
}
|
|
||||||
|
|
||||||
// apiBoeCourse.cmtaskList(params).then(res=>{
|
|
||||||
// if(res.status==200){
|
|
||||||
// this.total = res.result.count
|
|
||||||
// this.couresList = res.result.list;
|
|
||||||
// this.loading = false;
|
|
||||||
// if(this.$route.fullPath != '/uc/study/task' && this.$route.fullPath != '/uc/study/courses' && this.$route.fullPath != '/study/index') {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// if(res.result.count > 0) {
|
|
||||||
// this.$router.push('/uc/study/task')
|
|
||||||
// } else {
|
|
||||||
// if(this.$route.query.study == '1') {
|
|
||||||
// this.$router.push('/uc/study/task')
|
|
||||||
// } else {
|
|
||||||
// this.$router.push('/uc/study/courses')
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }else{
|
|
||||||
// this.$router.push('/uc/study/courses')
|
|
||||||
// }
|
|
||||||
// }).catch(err=>{
|
|
||||||
// if(this.$route.fullPath != '/uc/study/task' || this.$route.fullPath != '/uc/study/courses' || this.$route.fullPath != '/study/index') {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// this.$router.push('/uc/study/courses');
|
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
//this.$router.push('/uc/study/courses');
|
|
||||||
// this.searchData();
|
|
||||||
// this.getLastStudy();
|
|
||||||
// this.loadRemoteTask();
|
|
||||||
// this.loadResOwners();
|
|
||||||
// this.loadSysTypes();
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
continueStudy(item){
|
|
||||||
if(item.courseType==10){
|
|
||||||
return '../course/micro?id='+item.courseId
|
|
||||||
}else{
|
|
||||||
return '../course/studyindex?id='+item.courseId
|
|
||||||
}
|
|
||||||
},
|
|
||||||
...mapActions({
|
|
||||||
getResOwnerTree:'resOwner/getResOwnerTree',
|
|
||||||
loadResOwners:'resOwner/loadResOwners',
|
|
||||||
getSysTypeTree:'sysType/getSysTypeTree',
|
|
||||||
loadSysTypes:'sysType/loadSysTypes'
|
|
||||||
}),
|
|
||||||
getLastStudy() {
|
|
||||||
apicourseStudy.lastStudy().then(res=>{
|
|
||||||
if(res.status === 200) {
|
|
||||||
this.lastStudy=res.result;
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.message);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
loadRemoteTask(){
|
|
||||||
//调用远程接口
|
|
||||||
// let url="http://u.boe.com/api/b1/system/cmtask/cmtask-list";
|
|
||||||
// let jsonData={
|
|
||||||
// cmtask_status:'',
|
|
||||||
// cmtask_name:'',
|
|
||||||
// page:1,
|
|
||||||
// size:10
|
|
||||||
// }
|
|
||||||
// axios.post(url,jsonData).then(rs=>{
|
|
||||||
// console.log(rs)
|
|
||||||
// })
|
|
||||||
// apiBoe.postJson(url,jsonData).then(rs=>{
|
|
||||||
// if(rs.status==200){
|
|
||||||
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
},
|
|
||||||
searchData() {
|
|
||||||
apicourseStudy.myStudyList(this.params).then(res=>{
|
|
||||||
if(res.status === 200) {
|
|
||||||
this.couresList =res.result.list;
|
|
||||||
this.couresCount = res.result.count;
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.message);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
lastTabChange(tab,event){
|
|
||||||
console.log(tab.name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user