mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-19 15:56:45 +08:00
feat:新增社招新员工项目欢迎页与学习页面
This commit is contained in:
@@ -1,186 +1,254 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <div style="display:flex; padding-left:20px; width:100%">
|
||||
<!-- <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>
|
||||
<el-select class="search-input" v-model="status" clearable placeholder="学习进度">
|
||||
<el-select
|
||||
class="search-input"
|
||||
v-model="status"
|
||||
clearable
|
||||
placeholder="学习进度"
|
||||
>
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="未开始" value="0"></el-option>
|
||||
<el-option label="进行中" value="1"></el-option>
|
||||
<el-option label="已完成" value="2"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div style="padding-left: 10px"><el-input v-model="params.cmtask_name" clearable placeholder="搜索名称"></el-input></div>
|
||||
<div class="button-class" style="padding-left: 10px"><el-button type="primary" icon="el-icon-search" @click="search()">搜索</el-button></div>
|
||||
<div class="button-class" style="padding-left: 10px"><el-button type="primary" icon="el-icon-refresh-right" @click="reset()">重置</el-button></div>
|
||||
<div style="padding-left: 10px">
|
||||
<el-input
|
||||
v-model="params.cmtask_name"
|
||||
clearable
|
||||
placeholder="搜索名称"
|
||||
></el-input>
|
||||
</div>
|
||||
<div class="button-class" style="padding-left: 10px">
|
||||
<el-button type="primary" icon="el-icon-search" @click="search()"
|
||||
>搜索</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="button-class" style="padding-left: 10px">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-right"
|
||||
@click="reset()"
|
||||
>重置</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--课程列表内容-->
|
||||
<div class="uc-list" v-if="couresList.length > 0">
|
||||
<div class="uc-course" v-for="(item, idx) in couresList" @click="jumpRouter(item)" :key="idx">
|
||||
<div
|
||||
class="uc-course"
|
||||
v-for="(item, idx) in couresList"
|
||||
@click="jumpRouter(item)"
|
||||
:key="idx"
|
||||
>
|
||||
<div class="uc-course-img">
|
||||
<img :src="item.cmtask_imgurl" />
|
||||
<span class="spanname" v-if="item.cmtask_type==1">学习路径图</span>
|
||||
<span class="spanname" v-if="item.cmtask_type==2">学习项目</span>
|
||||
<span class="spanname" v-if="item.cmtask_type == 1">学习路径图</span>
|
||||
<span class="spanname" v-if="item.cmtask_type == 2">学习项目</span>
|
||||
<!-- 类型3不显示,20230307 东吴说已确认的修改 -->
|
||||
<!-- <span class="spanname" v-if="item.cmtask_type==3">老系统必修任务</span> -->
|
||||
<!-- <span class="spanname" v-if="item.cmtask_type==3">老系统必修任务</span> -->
|
||||
</div>
|
||||
<div class="uc-course-info">
|
||||
<!-- 任务名称 -->
|
||||
<div class="uc-course-name one-line-ellipsis" style="cursor: pointer">
|
||||
<span v-if="item.type==10" class="uc-course-type2">录播</span>
|
||||
<span v-if="item.type==20" class="uc-course-type2">录播</span>
|
||||
<span v-if="item.type == 10" class="uc-course-type2">录播</span>
|
||||
<span v-if="item.type == 20" class="uc-course-type2">录播</span>
|
||||
<!-- <a href="/course/detail?id=" target="_blank"> {{item.name}}</a> -->
|
||||
<span v-html="item.cmtask_name"></span>
|
||||
</div>
|
||||
<!-- <div class="uc-course-source" @click="jumpRouter(item)">来源:{{ item.cmtask_name }}</div> -->
|
||||
<div style="padding-top: 18px; " class="uc-course-text">学习进度:
|
||||
<span v-if="item.cmtask_user_status==0">未开始</span>
|
||||
<span v-if="item.cmtask_user_status==1">进行中</span>
|
||||
<span v-if="item.cmtask_user_status==2">已完成</span>
|
||||
<div style="padding-top: 18px" class="uc-course-text">
|
||||
学习进度:
|
||||
<span v-if="item.cmtask_user_status == 0">未开始</span>
|
||||
<span v-if="item.cmtask_user_status == 1">进行中</span>
|
||||
<span v-if="item.cmtask_user_status == 2">已完成</span>
|
||||
</div>
|
||||
<!-- <div class="uc-course-time">推送时间:{{ formatsec(Number(item.updated_at) * 1000 )}}</div> -->
|
||||
<div class="uc-course-time">推送时间:{{ item.created_at}}</div>
|
||||
<div class="uc-course-time">推送时间:{{ item.created_at }}</div>
|
||||
</div>
|
||||
<div class="uc-course-btns">
|
||||
<el-button @click="jumpRouter(item)" type="primary" size="small">开始学习</el-button>
|
||||
<el-button @click="jumpRouter(item)" type="primary" size="small"
|
||||
>开始学习</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height:150px; text-align: center; margin-top:57px;" >
|
||||
<el-pagination background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:current-page="page"
|
||||
:page-size="size"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total">
|
||||
<div style="height: 150px; text-align: center; margin-top: 57px">
|
||||
<el-pagination
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:current-page="page"
|
||||
:page-size="size"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
<div v-else class="zan-wu">
|
||||
<div v-if="loading">
|
||||
<span v-if="couresList.length==0">正在加载数据...</span>
|
||||
<span v-else>查询中...</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<span v-if="couresList.length==0">没有查询到相关内容</span>
|
||||
</div>
|
||||
<div v-if="loading">
|
||||
<span v-if="couresList.length == 0">正在加载数据...</span>
|
||||
<span v-else>查询中...</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<span v-if="couresList.length == 0">没有查询到相关内容</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import studyItem from '@/components/Course/studyItem.vue';
|
||||
import apiManage from '@/api/manage/manage.js'
|
||||
import { getToken } from '@/utils/token'
|
||||
import {formatsec} from '@/utils/datetime.js'
|
||||
import axios from 'axios'
|
||||
import studyItem from "@/components/Course/studyItem.vue";
|
||||
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',
|
||||
name: "ucStudyTask",
|
||||
components: { studyItem },
|
||||
data() {
|
||||
return {
|
||||
status: '',
|
||||
params:{
|
||||
cmtask_name:'',
|
||||
cmtask_status:'',
|
||||
type:'',
|
||||
status: "",
|
||||
params: {
|
||||
cmtask_name: "",
|
||||
cmtask_status: "",
|
||||
type: "",
|
||||
},
|
||||
porcessData:{
|
||||
course:0,
|
||||
project:0,
|
||||
router:0,
|
||||
porcessData: {
|
||||
course: 0,
|
||||
project: 0,
|
||||
router: 0,
|
||||
},
|
||||
loading:true,
|
||||
size:10,
|
||||
page:1,
|
||||
keyword:'',
|
||||
loading: true,
|
||||
size: 10,
|
||||
page: 1,
|
||||
keyword: "",
|
||||
formatsec,
|
||||
couresList:[],
|
||||
total: 0
|
||||
couresList: [],
|
||||
total: 0,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.loadBoeData();
|
||||
this.getPossData()
|
||||
this.loadBoeData();
|
||||
this.getPossData();
|
||||
},
|
||||
methods: {
|
||||
jumpRouter(item) {
|
||||
if (item.szxygProjectFlag == 1) {
|
||||
this.$router.push("/new-employee/study");
|
||||
return;
|
||||
}
|
||||
//location.href=`${this.webBaseUrl}/course/boeframe?id=${item.cmtask_id}`;
|
||||
|
||||
//let urlPre=window.location.protocol+'//'+window.location.host;
|
||||
let studentPath=process.env.VUE_APP_STUDENT_PATH;
|
||||
if(item.cmtask_type==1){ //学习路径图
|
||||
let params=encodeURIComponent('routerId='+item.cmtask_id);
|
||||
//this.$router.push('/forward?to='+studentPath+'/pathdetails¶ms='+params);
|
||||
this.$router.push('/forward?to='+studentPath+'/pathchapterdetails¶ms='+params);
|
||||
}else if(item.cmtask_type==2){ //学习项目
|
||||
let params=encodeURIComponent('projectId='+item.cmtask_id);
|
||||
this.$router.push('/forward?to='+studentPath+'/projectdetails¶ms='+params);
|
||||
}else if(item.cmtask_type==3){
|
||||
let pushUrl=`/course/boeframe?id=${item.cmtask_id}&type=3`;
|
||||
this.$router.push(pushUrl);
|
||||
let studentPath = process.env.VUE_APP_STUDENT_PATH;
|
||||
if (item.cmtask_type == 1) {
|
||||
//学习路径图
|
||||
let params = encodeURIComponent("routerId=" + item.cmtask_id);
|
||||
//this.$router.push('/forward?to='+studentPath+'/pathdetails¶ms='+params);
|
||||
this.$router.push(
|
||||
"/forward?to=" + studentPath + "/pathchapterdetails¶ms=" + params
|
||||
);
|
||||
} else if (item.cmtask_type == 2) {
|
||||
//学习项目
|
||||
let params = encodeURIComponent("projectId=" + item.cmtask_id);
|
||||
this.$router.push(
|
||||
"/forward?to=" + studentPath + "/projectdetails¶ms=" + params
|
||||
);
|
||||
} else if (item.cmtask_type == 3) {
|
||||
let pushUrl = `/course/boeframe?id=${item.cmtask_id}&type=3`;
|
||||
this.$router.push(pushUrl);
|
||||
}
|
||||
},
|
||||
getPossData(){
|
||||
axios({
|
||||
getPossData() {
|
||||
axios({
|
||||
method: "POST",
|
||||
url: '/report/boeu/studyInfo',
|
||||
url: "/report/boeu/studyInfo",
|
||||
params: {},
|
||||
headers:{token:getToken(),}
|
||||
headers: { token: getToken() },
|
||||
}).then((res) => {
|
||||
console.log('111',res.data.result)
|
||||
console.log("111", res.data.result);
|
||||
// this.porcessData=response.data.data
|
||||
this.porcessData.course=Math.floor(res.data.result.course.total === 0 ? 0: (res.data.result.course.completion/res.data.result.course.total)*100)
|
||||
this.porcessData.project=Math.floor(res.data.result.project.total === 0 ? 0: (res.data.result.project.completion/res.data.result.project.total)*100)
|
||||
this.porcessData.router=Math.floor(res.data.result.router.total === 0 ? 0: (res.data.result.router.completion/res.data.result.router.total)*100)
|
||||
})
|
||||
this.porcessData.course = Math.floor(
|
||||
res.data.result.course.total === 0
|
||||
? 0
|
||||
: (res.data.result.course.completion /
|
||||
res.data.result.course.total) *
|
||||
100
|
||||
);
|
||||
this.porcessData.project = Math.floor(
|
||||
res.data.result.project.total === 0
|
||||
? 0
|
||||
: (res.data.result.project.completion /
|
||||
res.data.result.project.total) *
|
||||
100
|
||||
);
|
||||
this.porcessData.router = Math.floor(
|
||||
res.data.result.router.total === 0
|
||||
? 0
|
||||
: (res.data.result.router.completion /
|
||||
res.data.result.router.total) *
|
||||
100
|
||||
);
|
||||
});
|
||||
},
|
||||
loadBoeData() {
|
||||
if(this.status !== '5') {
|
||||
if (this.status !== "5") {
|
||||
this.params.cmtask_status = this.status;
|
||||
}
|
||||
let params={
|
||||
pageNo:this.page,
|
||||
pageSize:this.size,
|
||||
cmtask_user_status:this.params.cmtask_status,
|
||||
cmtask_name:this.params.cmtask_name,
|
||||
}
|
||||
this.loading=true;
|
||||
apiManage.userTaskList(params).then(res=>{
|
||||
if(res.code==200){
|
||||
this.total =parseInt(res.data.total);
|
||||
this.couresList = res.data.records;
|
||||
}else{
|
||||
this.$message.error('查询数据失败:'+res.msg);
|
||||
}
|
||||
this.loading=false;
|
||||
}).catch(()=>{
|
||||
this.loading=false;
|
||||
let params = {
|
||||
pageNo: this.page,
|
||||
pageSize: this.size,
|
||||
cmtask_user_status: this.params.cmtask_status,
|
||||
cmtask_name: this.params.cmtask_name,
|
||||
};
|
||||
this.loading = true;
|
||||
apiManage
|
||||
.userTaskList(params)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.total = parseInt(res.data.total);
|
||||
this.couresList = res.data.records;
|
||||
} else {
|
||||
this.$message.error("查询数据失败:" + res.msg);
|
||||
}
|
||||
this.loading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
search(){
|
||||
this.page=1;
|
||||
this.loadBoeData()
|
||||
search() {
|
||||
this.page = 1;
|
||||
this.loadBoeData();
|
||||
},
|
||||
reset() {
|
||||
this.loading=false;
|
||||
this.params.cmtask_name = '',
|
||||
this.params.type = '',
|
||||
this.params.cmtask_status = ''
|
||||
this.status = '';
|
||||
this.page=1;
|
||||
this.loadBoeData();
|
||||
this.loading = false;
|
||||
(this.params.cmtask_name = ""),
|
||||
(this.params.type = ""),
|
||||
(this.params.cmtask_status = "");
|
||||
this.status = "";
|
||||
this.page = 1;
|
||||
this.loadBoeData();
|
||||
},
|
||||
handleSizeChange(value) {
|
||||
this.size = value;
|
||||
@@ -190,25 +258,25 @@ export default {
|
||||
handleCurrentChange(value) {
|
||||
this.page = value;
|
||||
this.loadBoeData();
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.progress{
|
||||
width:calc((100% - 100px) / 3);
|
||||
.progress {
|
||||
width: calc((100% - 100px) / 3);
|
||||
display: flex;
|
||||
.msg{
|
||||
width:120px;
|
||||
.msg {
|
||||
width: 120px;
|
||||
}
|
||||
.progressItem{
|
||||
.progressItem {
|
||||
margin-left: 20px;
|
||||
width:calc(100% - 160px);
|
||||
height: 10px;
|
||||
width: calc(100% - 160px);
|
||||
height: 10px;
|
||||
}
|
||||
}
|
||||
.zan-wu{
|
||||
.zan-wu {
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
margin-top: 70px;
|
||||
@@ -218,19 +286,19 @@ export default {
|
||||
display: -webkit-box;
|
||||
white-space: pre-wrap;
|
||||
overflow: hidden;
|
||||
text-overflow:ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.button-class{
|
||||
.button-class {
|
||||
// height: 42px;
|
||||
}
|
||||
|
||||
.uc-list{
|
||||
.uc-list {
|
||||
padding-left: 22px;
|
||||
}
|
||||
.uc-course-time{
|
||||
.uc-course-time {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
}
|
||||
@@ -238,23 +306,23 @@ export default {
|
||||
margin-top: 10px;
|
||||
margin-right: 40px;
|
||||
}
|
||||
.spanname {
|
||||
position: absolute;
|
||||
background-color: #6a99a4;
|
||||
color:#ffffff;
|
||||
padding: 4px 10px;
|
||||
font-size: 12px;
|
||||
bottom: 0px;
|
||||
z-index: 100;
|
||||
left: 0px;
|
||||
}
|
||||
.spanname {
|
||||
position: absolute;
|
||||
background-color: #6a99a4;
|
||||
color: #ffffff;
|
||||
padding: 4px 10px;
|
||||
font-size: 12px;
|
||||
bottom: 0px;
|
||||
z-index: 100;
|
||||
left: 0px;
|
||||
}
|
||||
.uc-course {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
border-bottom: 1px solid #E8E8E8;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
margin-right: 32px;
|
||||
padding: 20px 0px 15px 0px ;
|
||||
padding: 20px 0px 15px 0px;
|
||||
.uc-course-img {
|
||||
width: 212px;
|
||||
height: 119px;
|
||||
@@ -263,7 +331,6 @@ export default {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
}
|
||||
.uc-course-info {
|
||||
// width: 50%;
|
||||
@@ -278,10 +345,9 @@ export default {
|
||||
}
|
||||
.uc-course-text {
|
||||
color: #444;
|
||||
margin-bottom:3px;
|
||||
margin-bottom: 3px;
|
||||
font-size: 16px;
|
||||
margin-top: 20px;
|
||||
|
||||
}
|
||||
}
|
||||
.uc-course-btns {
|
||||
|
||||
Reference in New Issue
Block a user