mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-07 01:46:42 +08:00
添加学习情况
This commit is contained in:
@@ -1,5 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<div style="display:flex; padding-left:20px; width:100%">
|
||||||
|
<div style="width:100px">完成情况</div>
|
||||||
|
<div class="progress"><div class="msg">课程完成情况</div> <el-progress :text-inside="true" :stroke-width="16" :percentage="porcessData.course" status="warning" class="progressItem"> </el-progress> </div>
|
||||||
|
<div class="progress" ><div class="msg">项目完成情况</div> <el-progress :text-inside="true" :stroke-width="16" :percentage="porcessData.project" status="success" class="progressItem"> </el-progress> </div>
|
||||||
|
<div class="progress"><div class="msg">路径图完成情况</div> <el-progress :text-inside="true" :stroke-width="16" :percentage="porcessData.router" class="progressItem"> </el-progress> </div>
|
||||||
|
|
||||||
|
</div>
|
||||||
<div style="display: flex; justify-content: space-between; padding: 12px 32px 10px 22px;">
|
<div style="display: flex; justify-content: space-between; padding: 12px 32px 10px 22px;">
|
||||||
<div style="display: flex; justify-content: flex-start">
|
<div style="display: flex; justify-content: flex-start">
|
||||||
<div>
|
<div>
|
||||||
@@ -76,7 +83,9 @@
|
|||||||
import studyItem from '@/components/Course/studyItem.vue';
|
import studyItem from '@/components/Course/studyItem.vue';
|
||||||
import apiBoeCourse from '@/api/boe/course.js';
|
import apiBoeCourse from '@/api/boe/course.js';
|
||||||
import apiManage from '@/api/manage/manage.js'
|
import apiManage from '@/api/manage/manage.js'
|
||||||
|
import { getToken } from '@/utils/token'
|
||||||
import {formatsec} from '@/utils/datetime.js'
|
import {formatsec} from '@/utils/datetime.js'
|
||||||
|
import axios from 'axios'
|
||||||
export default {
|
export default {
|
||||||
name: 'ucStudyTask',
|
name: 'ucStudyTask',
|
||||||
components: { studyItem },
|
components: { studyItem },
|
||||||
@@ -88,6 +97,11 @@ export default {
|
|||||||
cmtask_status:'',
|
cmtask_status:'',
|
||||||
type:'',
|
type:'',
|
||||||
},
|
},
|
||||||
|
porcessData:{
|
||||||
|
course:0,
|
||||||
|
project:0,
|
||||||
|
router:0,
|
||||||
|
},
|
||||||
loading:true,
|
loading:true,
|
||||||
size:10,
|
size:10,
|
||||||
page:1,
|
page:1,
|
||||||
@@ -124,9 +138,9 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadBoeData();
|
this.loadBoeData();
|
||||||
|
this.getPossData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
jumpRouter(item) {
|
jumpRouter(item) {
|
||||||
//location.href=`${this.webBaseUrl}/course/boeframe?id=${item.cmtask_id}`;
|
//location.href=`${this.webBaseUrl}/course/boeframe?id=${item.cmtask_id}`;
|
||||||
|
|
||||||
@@ -144,7 +158,20 @@ export default {
|
|||||||
this.$router.push(pushUrl);
|
this.$router.push(pushUrl);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getPossData(){
|
||||||
|
axios({
|
||||||
|
method: "POST",
|
||||||
|
url: '/report/boeu/studyInfo',
|
||||||
|
params: {},
|
||||||
|
headers:{token:getToken(),}
|
||||||
|
}).then((response) => {
|
||||||
|
console.log('111',response.data.data)
|
||||||
|
// this.porcessData=response.data.data
|
||||||
|
this.porcessData.course=Math.floor((response.data.data.course.completion/response.data.data.course.total)*100)
|
||||||
|
this.porcessData.project=Math.floor((response.data.data.project.completion/response.data.data.project.total)*100)
|
||||||
|
this.porcessData.router=Math.floor((response.data.data.router.completion/response.data.data.router.total)*100)
|
||||||
|
})
|
||||||
|
},
|
||||||
loadBoeData() {
|
loadBoeData() {
|
||||||
if(this.status !== '5') {
|
if(this.status !== '5') {
|
||||||
this.params.cmtask_status = this.status;
|
this.params.cmtask_status = this.status;
|
||||||
@@ -207,6 +234,18 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.progress{
|
||||||
|
width:calc((100% - 100px) / 3);
|
||||||
|
display: flex;
|
||||||
|
.msg{
|
||||||
|
width:120px;
|
||||||
|
}
|
||||||
|
.progressItem{
|
||||||
|
margin-left: 20px;
|
||||||
|
width:calc(100% - 160px);
|
||||||
|
height: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.zan-wu{
|
.zan-wu{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
|||||||
@@ -174,6 +174,15 @@ module.exports = {
|
|||||||
'^/socialApi': ''
|
'^/socialApi': ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
'/report': {
|
||||||
|
// 目标代理服务器地址
|
||||||
|
target: 'https://u-pre.boe.com',
|
||||||
|
changeOrigin: true,
|
||||||
|
secure: false,
|
||||||
|
pathRewrite: {
|
||||||
|
'^/report': '/report'
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user