mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-07 18:06:44 +08:00
添加学习情况
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
<template>
|
||||
<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: flex-start">
|
||||
<div>
|
||||
@@ -76,7 +83,9 @@
|
||||
import studyItem from '@/components/Course/studyItem.vue';
|
||||
import apiBoeCourse from '@/api/boe/course.js';
|
||||
import apiManage from '@/api/manage/manage.js'
|
||||
import { getToken } from '@/utils/token'
|
||||
import {formatsec} from '@/utils/datetime.js'
|
||||
import axios from 'axios'
|
||||
export default {
|
||||
name: 'ucStudyTask',
|
||||
components: { studyItem },
|
||||
@@ -88,6 +97,11 @@ export default {
|
||||
cmtask_status:'',
|
||||
type:'',
|
||||
},
|
||||
porcessData:{
|
||||
course:0,
|
||||
project:0,
|
||||
router:0,
|
||||
},
|
||||
loading:true,
|
||||
size:10,
|
||||
page:1,
|
||||
@@ -124,9 +138,9 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.loadBoeData();
|
||||
this.getPossData()
|
||||
},
|
||||
methods: {
|
||||
|
||||
jumpRouter(item) {
|
||||
//location.href=`${this.webBaseUrl}/course/boeframe?id=${item.cmtask_id}`;
|
||||
|
||||
@@ -144,7 +158,20 @@ export default {
|
||||
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() {
|
||||
if(this.status !== '5') {
|
||||
this.params.cmtask_status = this.status;
|
||||
@@ -207,6 +234,18 @@ export default {
|
||||
</script>
|
||||
|
||||
<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{
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
|
||||
@@ -174,6 +174,15 @@ module.exports = {
|
||||
'^/socialApi': ''
|
||||
}
|
||||
},
|
||||
'/report': {
|
||||
// 目标代理服务器地址
|
||||
target: 'https://u-pre.boe.com',
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
pathRewrite: {
|
||||
'^/report': '/report'
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user