Files
learning-system-portal/src/views/study/Growth.vue
zhangsir 99ea8d35c9 细节
2024-07-05 14:53:23 +08:00

654 lines
18 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<div>
<div v-if="Object.keys(detailData).length" class="growth">
<div class="growth_heads">
<div class="growth_left">
<div class="left_text">我的成长路径</div>
<el-popover
placement="right"
width="437"
trigger="hover"
:visible-arrow="false"
v-model="explainBody"
popper-class="growth_explain"
>
<div slot="reference" class="growth_i">
<div class="growth_mark">?</div>
</div>
<div class="growth_explain1">
<div class="growth_explain_text">
<div class="text">根据您的归属组织您所在岗位职级已为您自动匹配{{detailData.growName || ''}}抓紧时间学习吧</div>
<div class="explain_close" @click="explainBody = false"></div>
</div>
</div>
</el-popover>
</div>
<div class="growth_right">
<div class="right_text">什么是成长路径</div>
<div class="growth_img" @click="checkedTrue">
<img class="img" src="../../assets/images/growth/mark.png" alt="">
</div>
</div>
</div>
<div class="growth_body">
<div class="body_head">
<div class="head_left">{{detailData.growName || ''}}</div>
<div class="head_right">
<div class="head_right_one">{{detailData.organizationName || ''}}</div>
<div class="head_right_two">
<span class="head_right_sta">学习状态:</span>
<span class="head_right_status" :style="{color: ['#FF8336','#31AF0D','#409EFF '][detailData.studyStatus]}"> {{detailData.studyStatus==0?'未开始':detailData.studyStatus==1?'已完成':'进行中'}}</span>
</div>
</div>
</div>
<!-- <el-popover
placement="bottom-end"
width="300"
trigger="click"
:visible-arrow="false"
v-model="downBody"
offset="0"
popper-class="growth_body_down"
>
<div slot="reference" class="growth_body_shared">
<img class="shared_img" src="../../assets/images/growth/growthRight.png" alt="">
<span class="shared_text">共享文档</span>
</div>
<div class="growth_body_down">
<div class="down_head">
<span class="down_head_text">共享文档</span>
<div class="down_close" @click="downBody = false">
<img class="down_close_img" src="../../assets/images/growth/close.png" alt="">
</div>
</div>
<div class="down_over">
<div class="down_body" v-for="itme in 10">
<div class="down_body_left">
<img class="left_img" src="../../assets/images/growth/ppt.png" alt="">
<span title="人工智能启蒙讲解讲义.pptx" class="left_text">人工智能启蒙讲解讲义.pptx</span>
</div>
<div class="down_btn">
<span class="down_btn_text">下载</span>
</div>
</div>
</div>
</div>
</el-popover> -->
<div v-if="detailData.remark" class="body_explain">
<div class="body_explain_icon">
<img class="body_explain_img" src="../../assets/images/growth/growthLeft.png" alt="">
<div class="body_explain_text">说明</div>
</div>
<div class="body_explain_item">
<div class="body_explain_text">
{{detailData.remark || ''}}
</div>
</div>
</div>
<div class="body_schedule" v-if="detailData.taskNum > 0">
<div class="body_schedule_icon">
<img class="body_schedule_img" src="../../assets/images/growth/growthTime.png" alt="">
<div class="body_schedule_text">学习进度</div>
</div>
<div class="body_schedule_item">
<div class="body_schedule_one">
<div class="body_schedule_left">
<div style="margin-bottom: 9px;">总任务</div>
<div>当前任务</div>
</div>
<div class="body_schedule_right">
<div style="margin-bottom: 9px;">{{detailData.taskNum}}</div>
<div :title="detailData.currentTaskName">{{detailData.currentTaskName.length>30?detailData.currentTaskName.slice(0,30)+'...':detailData.currentTaskName}}</div>
</div>
</div>
<div class="body_schedule_two">
<div class="body_schedule_pro">
<div class="pro_text">总进度</div>
<div style="display: flex;align-items: center;">
<el-progress style="width: 213px;" :show-text="false" :stroke-width="10" :percentage="Number(((detailData.overallCompletionRate || 0)*100).toFixed(2))"></el-progress>
<div class="text">{{ Number(((detailData.overallCompletionRate || 0)*100).toFixed(2)) || 0 }}%</div>
</div>
</div>
<div class="body_schedule_btn" @click="startLearn">
<span class="body_schedule_text">{{detailData.overallCompletionRate==0?'开始学习':detailData.overallCompletionRate==1?'回顾':'继续学习'}}</span>
</div>
</div>
</div>
</div>
<div v-else>
<el-empty :image-size="200"></el-empty>
</div>
</div>
<div>
<el-dialog
title="成长路径说明"
:visible.sync="centerDialogVisible"
width="476px"
style="margin-top: 30vh;"
center>
<div class="dialog_body">
<div class="dialog_body_text">
本功能针对学员所在组织岗位职级自动匹配成长路径完成本路径方可晋升
</div>
<div @click="centerDialogVisible = false" class="dialog_body_btn">
<span>我已阅读</span>
</div>
<div class="dialog_body_foot">
<el-checkbox v-model="checked">下次进入不再弹窗</el-checkbox>
</div>
</div>
</el-dialog>
</div>
</div>
<el-empty v-else :image-size="200"></el-empty>
</div>
</template>
<script>
import {getList} from '@/api/growth'
import {mapGetters} from 'vuex'
export default {
name: 'Growth',
data() {
return {
downBody: false,
explainBody: false,
centerDialogVisible: false,
checked: false,
detailData: {},
}
},
mounted() {
getList(this.userInfo.aid).then(res=>{
if(res.code == 200 ){
this.detailData = res.data
}
if(res.code == 4){
// this.$message({
// type: 'error',
// message: res.msg
// })
}
})
if(localStorage.getItem("checkedGrowth") != null){
this.centerDialogVisible = localStorage.getItem("checkedGrowth") === "true"
}else{
this.centerDialogVisible = true
}
},
watch:{
checked(){
this.checkedVisible()
}
},
methods: {
startLearn(){
this.$router.push({
path: '/growthpath',
query: {growId:this.detailData.growId,name: this.detailData.growName,isTrue: true,status:this.detailData.overallCompletionRate}
})
},
checkedTrue(){
this.centerDialogVisible = true
this.checked = localStorage.getItem("checkedGrowth") === "false"
},
checkedVisible(){
// this.centerDialogVisible = false
localStorage.setItem("checkedGrowth",!this.checked)
},
},
computed: {
...mapGetters(['userInfo'])
},
};
</script>
<style scoped lang="scss">
::v-deep .el-dialog__header{
height: 68px;
background: linear-gradient( 180deg, #E1DAFF 0%, #FFFFFF 100%);
padding-top: 23px;
margin-bottom: 36px;
}
::v-deep .el-dialog__body{
padding: 0;
}
.growth_body_down{
background-image: url(../../assets/images/growth/fileBack.png);
background-repeat: no-repeat;
background-size:100%;
width: 487px;
max-height: 452px;
position: absolute;
right: -120px;
top: -22px;
padding-right: 32px;
.down_head{
margin-top: 57px;
margin-bottom: 34px;
text-align: center;
position: relative;
.down_head_text{
width: 96px;
height: 28px;
font-weight: 600;
font-size: 24px;
color: #387DF7;
line-height: 28px;
text-align: left;
}
.down_close{
position: absolute;
cursor: pointer;
right: 37px;
top: -18px;
.down_close_img{
width: 26px;
height: 26px;
}
}
}
.down_over{
padding: 0px 40px 0px 63px;
overflow-y: auto;
max-height: 309px;
.down_body{
display: flex;
justify-content: space-between;
margin-bottom: 22px;
.down_body_left{
display: flex;
.left_img{
width: 20px;
height: 20px;
}
.left_text{
display: inline-block;
overflow: hidden;
text-align: left;
white-space: nowrap;
text-overflow: ellipsis;
margin-left: 18px;
width: 210px;
height: 20px;
font-weight: 500;
font-size: 14px;
color: #677D86;
line-height: 20px;
}
}
.down_btn{
cursor: pointer;
width: 70px;
height: 28px;
line-height: 28px;
border-radius: 4px;
border: 1px solid #387DF7;
text-align: center;
.down_btn_text{
width: 28px;
height: 20px;
font-weight: 400;
font-size: 14px;
color: #387DF7;
line-height: 20px;
}
}
}
}
}
.growth_explain{
top: 347xp !important;
.growth_explain1{
display: flex;
justify-content: center;
align-items: center;
width: 487px;
height: 170px;
margin: -37px;
background: url("../../assets/images/growth/explain.png") no-repeat;
background-size: 100%;
.growth_explain_text{
width: 376px;
height: 56px;
font-weight: 400;
font-size: 14px;
color: #333333;
line-height: 28px;
text-align: left;
position: relative;
.text{
display: -webkit-box;
word-wrap: break-word;
word-break:break-all;
overflow: hidden;
text-overflow:ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp:2;
}
.explain_close{
cursor: pointer;
background-image: url(../../assets/images/growth/close.png);
z-index: 99999;
width: 26px;
height: 26px;
position: absolute;
right: -21px;
top: -26px;
}
}
}
}
.growth{
.dialog_body{
height: 238px;
margin-bottom: 32px;
.dialog_body_text{
width: 372px;
height: 52px;
font-weight: 400;
font-size: 14px;
color: #333333;
line-height: 26px;
text-align: left;
margin: 0 auto;
margin-bottom: 56px;
}
.dialog_body_btn{
cursor: pointer;
width: 152px;
margin: 0 auto;
margin-bottom: 31px;
height: 40px;
background: #387DF7;
box-shadow: 1px 2px 8px 1px rgba(56,125,247,0.38);
border-radius: 4px;
text-align: center;
line-height: 40px;
color: #ffffff;
font-size: 14px;
}
.dialog_body_foot{
margin: 0 0 40px 61px;
}
}
.growth_heads{
display: flex;
justify-content: space-between;
margin: 10px 43px 29px 40px;
position: relative;
.growth_left{
display: flex;
justify-content: center;
line-height: 40px;
.left_text{
// width: 108px;
height: 25px;
font-weight: 600;
font-size: 14px;
color: #333333;
text-align: left;
}
.growth_i{
cursor: pointer;
width: 16px;
height: 16px;
margin-left: 6px;
border: 1px solid #999999;
border-radius: 100%;
margin-top: 13px;
.growth_mark{
color: #999999;
line-height: 15px;
margin-left: 4px;
}
}
}
.growth_right{
width: 158px;
height: 32px;
line-height: 32px;
background: #387DF7;
box-shadow: 1px 2 12px 1px rgba(56,125,247,0.34);
border-radius: 16px;
display: flex;
justify-content: center;
.right_text{
// width: 112px;
height: 22px;
font-weight: 400;
font-size: 13px;
color: #FFFFFF;
text-align: left;
}
.growth_img{
cursor: pointer;
width: 16px;
height: 16px;
margin-left: 10px;
.img{
width: 100%;
vertical-align: middle;
}
}
}
}
.growth_body{
// max-width: 1340px;
height: 574px;
background: #FFFFFF;
border-radius: 10px;
border: 1px solid #E4EDFE;
margin: 0 41px 0px 38px;
position: relative;
.growth_body_shared{
cursor: pointer;
position: absolute;
right: 46px;
top: 107px;
.shared_img{
width: 21px;
height: 18px;
}
.shared_text{
width: 64px;
height: 22px;
font-weight: 600;
font-size: 16px;
color: #409EFF;
line-height: 22px;
text-align: left;
margin-left: 9px;
}
}
.body_head{
// max-width: 1066px;
height: 70px;
background: linear-gradient( 180deg, #DEEBFF 0%, #FFFFFF 100%);
border-radius: 10px 10px 0px 0px;
border: 1px solid #E4EDFE;
display: flex;
justify-content: space-between;
margin-bottom: 23px;
.head_left{
// width: 272px;
// height: 28px;
font-weight: 600;
font-size: 16px;
color: #387DF7;
// line-height: 28px;
text-align: left;
margin: 23px 0 0 26px;
}
.head_right{
// width: 326px;
height: 22px;
font-weight: 400;
font-size: 13px;
color: #666660;
line-height: 22px;
margin: 25px 36px 0 0;
display: flex;
justify-content: space-between;
line-height: 22px;
.head_right_one{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.head_right_two{
margin-left: 14px;
.head_right_sta{
}
.head_right_status{
color: #409EFF;
}
}
}
}
.body_explain{
margin-bottom: 20px;
.body_explain_icon{
display: flex;
margin-left: 28px;
margin-bottom: 20px;
.body_explain_img{
width: 16px;
height: 16px;
margin-top: 4px;
}
.body_explain_text{
width: 32px;
height: 22px;
font-weight: 600;
font-size: 13px;
color: #333333;
line-height: 22px;
text-align: left;
margin-left: 8px;
}
}
.body_explain_item{
margin-left: 28px;
margin-right: 36px;
// max-width: 1003px;
max-height: 80px;
background: #F5F6F7;
border-radius: 8px;
padding: 18px 20px 18px 13px;
.body_explain_text{
// max-width: 970px;
max-height: 45px;
font-weight: 400;
font-size: 11px;
color: #333333;
line-height: 22px;
display: -webkit-box;
word-wrap: break-word;
word-break:break-all;
overflow: hidden;
text-overflow:ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp:2;
}
}
}
.body_schedule{
.body_schedule_icon{
display: flex;
margin-bottom: 27px;
.body_schedule_img{
width: 16px;
height: 16px;
margin-left: 28px;
margin-top: 3px;
}
.body_schedule_text{
width: 64px;
height: 22px;
font-weight: 600;
font-size: 13px;
color: #333333;
line-height: 22px;
text-align: left;
margin-left: 8px;
}
}
.body_schedule_item{
margin-left: 58px;
.body_schedule_one{
display: flex;
margin-bottom: 41px;
.body_schedule_left{
min-width: 52px;
font-weight: 500;
font-size: 13px;
color: #3B3C4A;
line-height: 18px;
text-align: left;
}
.body_schedule_right{
margin-left: 13px;
min-width: 65px;
font-weight: 500;
font-size: 13px;
color: #2E72F2;
line-height: 18px;
text-align: left;
}
}
.body_schedule_two{
display: flex;
.body_schedule_pro{
width: 250px;
height: 30px;
.pro_text{
width: 42px;
height: 18px;
font-weight: 400;
font-size: 11px;
color: #666660;
line-height: 18px;
text-align: left;
margin-bottom: 2px;
}
.text{
font-weight: 400;
font-size: 10px;
color: #333333;
margin-left: 15px;
line-height: 14px;
}
}
.body_schedule_btn{
width: 112px;
cursor: pointer;
height: 32px;
margin-left: 35px;
margin-top: 6px;
background: #409EFF;
box-shadow: 1px 2 12px 1px rgba(56,125,247,0.34);
border-radius: 3px;
text-align: center;
line-height: 30px;
.body_schedule_text{
width: 52px;
height: 18px;
font-weight: 400;
font-size: 13px;
color: #FFFFFF;
line-height: 18px;
text-align: left;
}
}
}
}
}
}
}
</style>