feat:项目概览

This commit is contained in:
songwc
2022-11-14 11:24:48 +08:00
parent e0d474ad85
commit bc6a15bbf5
2 changed files with 619 additions and 35 deletions

View File

@@ -20,3 +20,6 @@ export const studentProcess = (obj) => http.get('/admin/project/studentProcess',
//是否优秀学员
export const topStudent = (obj) => http.post('/admin/project/topStudent', obj)
//项目概览
export const overview = (obj) => http.get('/admin/project/overview', { params: obj })

View File

@@ -50,7 +50,7 @@
<a-tab-pane key="1" tab="概览">
<div class="split"></div>
<!-- 概览无数据 -->
<div>
<div style="display: none">
<div class="onerow">
<div class="taskmain">快速创建项目详情</div>
</div>
@@ -116,51 +116,72 @@
</div>
<!-- 概览无数据 -->
<!-- 概览有数据 -->
<div style="display: none">
<div>
<div class="onerow">
<div class="taskmain">项目概览</div>
</div>
<div class="second" style="margin-top: 0">
<div class="nubbox">
<span class="nub1">200</span>
<span class="nub1">{{
projectInfoOverview.totalStudentCnt
}}</span>
<div class="nub2">总人数</div>
</div>
<div class="nubbox">
<span class="nub1" style="color: #ff90ae">15</span>
<div class="nub2">必修课</div>
<span class="nub1" style="color: #ff90ae">{{
projectInfoOverview.studyStudentCnt
}}</span>
<div class="nub2">学习人数</div>
</div>
<div class="nubbox">
<span class="nub1" style="color: #a497ff">15</span>
<div class="nub2">选修课</div>
<span class="nub1" style="color: #a497ff">{{
projectInfoOverview.completeStudentCnt
}}</span>
<div class="nub2">完成人数</div>
</div>
<div class="nubbox">
<div>
<span class="nub1" style="color: #5dc988">50</span
<span class="nub1" style="color: #5dc988">{{
projectInfoOverview.onlineCourseCnt
}}</span
><span style="color: #5dc988; font-size: 14px">%</span>
</div>
<div class="nub2">完成率</div>
<div class="nub2">在线课程数</div>
</div>
<div class="nubbox">
<div>
<span class="nub1" style="color: #ff90ae">30</span
<span class="nub1" style="color: #ff90ae">{{
projectInfoOverview.offLineCourseCnt
}}</span
><span style="color: #ff90ae; font-size: 14px">%</span>
</div>
<div class="nub2">必修完成率</div>
<div class="nub2">面授课程数</div>
</div>
<div class="nubbox">
<div>
<span class="nub1" style="color: #a497ff">30</span
<span class="nub1" style="color: #a497ff">{{
projectInfoOverview.completeRatio
}}</span
><span style="color: #a497ff; font-size: 14px">%</span>
</div>
<div class="nub2">选修完成率</div>
<div class="nub2">完成率</div>
</div>
</div>
<div class="onerow">
<div class="taskmain">阶段信息</div>
</div>
<div class="stagemess">
<!-- <div class="stagemess">
<div class="stage1">阶段1</div>
<div class="stage2">阶段2</div>
</div> -->
<div class="stagemess">
<div v-for="item in stageList"
:class= "{ 'stage1': item.stageId == choosedStageId, 'stage2': item.stageId != choosedStageId }"
:key="item.stageId" @click="choosedStageId = item.stageId">
{{item.stage}}
</div>
<!-- <div class="stage1">阶段1</div>
<div class="stage2">阶段2</div> -->
</div>
<div class="stagesecond">
<div class="staname">阶段名称</div>
@@ -171,7 +192,7 @@
<a-progress
type="dashboard"
gapDegree="0"
:percent="50"
:percent="stageOverviewList.completeCourseRatio"
:width="140"
/>
<div class="protext">课程完成率</div>
@@ -180,7 +201,7 @@
<a-progress
type="dashboard"
gapDegree="0"
:percent="50"
:percent="stageOverviewList.completeExamRatio"
:width="140"
/>
<div class="protext">考试通过率</div>
@@ -189,26 +210,26 @@
<a-progress
type="dashboard"
gapDegree="0"
:percent="50"
:percent="stageOverviewList.completeRatio"
:width="140"
/>
<div class="protext">作业合格</div>
<div class="protext">作业完成</div>
</div>
<div class="proright">
<div class="pronub" style="margin-left: 280px">10</div>
<div class="pronub" style="margin-left: 280px">{{stageOverviewList.totalTaskCnt}}</div>
<div class="proright1">
<span class="textpro">阶段任务总数</span>
<a-progress :percent="50" style="width: 369px" />
<a-progress :percent="stageOverviewList.totalTaskCnt" style="width: 369px" />
</div>
<div class="pronub" style="margin-left: 206px">5</div>
<div class="pronub" style="margin-left: 206px">{{stageOverviewList.totalReqCnt}}</div>
<div class="proright1">
<span class="textpro">必修课</span>
<a-progress :percent="25" style="width: 369px" />
<a-progress :percent="stageOverviewList.totalReqCnt" style="width: 369px" />
</div>
<div class="pronub" style="margin-left: 142px">1</div>
<div class="pronub" style="margin-left: 142px">{{stageOverviewList.totalOptCnt}}</div>
<div class="proright1">
<span class="textpro">选修课</span>
<a-progress :percent="5" style="width: 369px" />
<a-progress :percent="stageOverviewList.totalOptCnt" style="width: 369px" />
</div>
</div>
</div>
@@ -696,10 +717,12 @@
<a-tab-pane key="4" tab="公告">
<div class="split"></div>
<a-tabs v-model:activeKey="activeKeyNotice">
<a-tab-pane key="11" tab="公告"><NoticePub v-model:projectId="projectId"></NoticePub></a-tab-pane>
<a-tab-pane key="11" tab="公告"
><NoticePub v-model:projectId="projectId"></NoticePub
></a-tab-pane>
<a-tab-pane key="12" tab="历史公告" force-render
><NoticeHis v-model:projectId="projectId"></NoticeHis></a-tab-pane
>
><NoticeHis v-model:projectId="projectId"></NoticeHis
></a-tab-pane>
</a-tabs>
</a-tab-pane>
<a-tab-pane key="5" tab="项目积分">
@@ -834,15 +857,21 @@
</a-tab-pane>
<a-tab-pane key="7" tab="设置">
<div class="split"></div>
<a-tabs v-model:activeKey="activeSetKey">
<a-tab-pane key="12" tab="基本信息">
<div class="content7">
<div class="set_tit">
<!-- <div class="set_tit">
<span>基本信息</span>
</div>
<!-- <hr color="#E8E8E8" />
-->
<div class="line"></div>
</div> -->
<!-- <div class="line"></div> -->
<div class="set_body">
<div class="edit" @click="showEditProj">
<!-- <div class="edit" @click="showEditProj">
<div class="img"></div>
<div class="ed">编辑</div>
</div> -->
<div class="edit">
<div class="img"></div>
<div class="ed">编辑</div>
</div>
@@ -921,6 +950,49 @@
</div>
</div>
</a-tab-pane>
<a-tab-pane key="13" tab="共享文档">
<div class="sametab">
<div class="Gcon">
<div class="pad"></div>
<div class="Gin">
<div class="headone">
<div class="box"></div>
<div class="onetitle">上传共享文档</div>
<div class="oneedi">
<a-switch v-model:checked="docChecked" ></a-switch>
</div>
</div>
<div class="btnbox" style="margin:20px;">
<a-upload
v-model:file-list="fileList"
name="file"
action="/api/file/upload"
@change="handleChange"
>
<span class="xkbtn" style="cursor: pointer; font-size: 17px" >上传</span>
<img src="@/assets/images/basicinfo/cloud.png" style="cursor: pointer;
width:34px;height:34px;
" alt="">
</a-upload>
<div class="btnbox" style="margin:20px;">
<span style="color: #999999">
支持pdf.ppt.pptx.doc.docx.xls.xlsx.jpeg.png.gif.zip
</span>
</div>
<div v-for="item in docList" :key="item.src" class="docListStyle">
<img src="@/assets/images/basicinfo/download.png" style="cursor: pointer;
width:40px;height:40px;margin-right:40px;
" alt="">
<span style="font: oblique bold 16px Sans-serif">{{item.name}}</span>
<span style="color: #4ea6ff;float:right;">删除</span>
</div>
</div>
</div>
</div>
</div>
</a-tab-pane>
</a-tabs>
</a-tab-pane>
</a-tabs>
</div>
<!-- 时间管理抽屉 -->
@@ -1415,6 +1487,7 @@ import * as apitl from "../../api/index";
import { getTask } from "../../api/indexTaskadd";
import { toDate } from "../../api/method";
import projSet from "../../components/Modals/projSet";
import { overview } from "../../api/indexProjStu";
export default {
name: "taskPage",
components: {
@@ -1467,6 +1540,23 @@ export default {
},
],
changeGoods: [], //更改是否优秀的id数组
choosedStageId:1, // 选择的阶段id
activeSetKey:"12",//12-基础信息 13-共享文档
docChecked:true,
docList:[
{
name:'测试文档1.doc',
src:"",
},
{
name:'测试文档2.doc',
src:"",
},
{
name:'测试文档3.doc',
src:"",
}
],
//学员信息列表
tabledata: [
// {
@@ -2034,6 +2124,37 @@ export default {
picUrl: null,
});
const levelList = reactive({
projectInfoOverview: {
// 整体数据概览
totalStudentCnt: 0,
studyStudentCnt: 0,
completeStudentCnt: 0,
onlineCourseCnt: 0,
offLineCourseCnt: 0,
completeRatio: 0,
},
stageOverviewList: {
// 阶段数据概览
completeCourseRatio: 0,
completeExamRatio: 0,
completeRatio: 0,
totalTaskCnt: 0,
totalReqCnt: 0,
totalOptCnt: 0,
},
stageList: [
// 阶段列表
{
stageId: 1,
stage: "阶段一",
},
{
stageId: 2,
stage: "阶段二",
},
],
});
// 输入接入 -- start --
const router = useRoute();
@@ -2911,14 +3032,55 @@ export default {
getStu();
};
//end---------学员------
//start---------项目概览
// 获取项目概览
const getOverview = () => {
overview({projectId:state.projectId})
.then((res) => {
Object.keys(res.data.data.projectInfoOverview).forEach((item) => {
levelList.projectInfoOverview[item] =
res.data.data.projectInfoOverview[item] || 0;
});
Object.keys(res.data.data.stageOverviewList).forEach((item) => {
levelList.stageOverviewList[item] =
res.data.data.stageOverviewList[item] || 0;
});
// res.data.data.routerInfoOverview.forEach((r) => {
// console.log(r)
// })
// state.addLoading = false;
console.log("项目概览--" + res);
})
.catch((err) => {
// state.addLoading = false;
message.error("概览获取失败");
console.log("获取失败" + err);
});
};
//end---------项目概览
const handleChange = (info) => {
if (info.file.status !== "uploading") {
console.log(info.file, info.fileList);
}
if (info.file.status === "done") {
message.success(`${info.file.name} 文件上传成功`);
} else if (info.file.status === "error") {
message.error(`${info.file.name} 文件上传失败.`);
}
};
onMounted(() => {
getStu();
getTaskList();
getTaskInfo();
getGroup();
getOverview();
});
return {
...toRefs(state),
...toRefs(levelList),
totask,
tostudent,
showModal,
@@ -2991,6 +3153,7 @@ export default {
cancelyou,
cancelcanyou,
changePaginationStu,
handleChange,
};
},
};
@@ -5085,6 +5248,7 @@ export default {
}
}
//设置的基本信息
.content7 {
margin-top: 20px;
@@ -5152,6 +5316,423 @@ export default {
}
}
}
//设置的共享文档
.sametab {
// margin-left: 30px;
// margin-right: 30px;
margin-top: 30px;
width: 100%;
// background-color: green;
.Gcon {
display: flex;
.pad {
height: 100%;
width: 40px;
}
.Gin {
// background-color: #bfa;
margin-top: 30px;
.headone {
// background-color: red;
display: flex;
text-align: center;
.box {
width: 4px;
height: 20px;
background-color: #409eff;
border-radius: 2px;
}
.onetitle {
margin-left: 15px;
color: #333333;
font-size: 14px;
}
.oneedi {
margin-left: 15px;
color: #4ea6ff;
cursor: pointer;
}
.twobtn {
display: flex;
.btnone {
width: 42px;
height: 24px;
border: 1px solid rgba(64, 158, 255, 1);
border-radius: 4px;
color: rgba(64, 158, 255, 1);
margin-left: 20px;
cursor: pointer;
}
.btntwo {
width: 42px;
height: 24px;
border: 1px solid rgba(64, 158, 255, 1);
border-radius: 4px;
color: #ffffff;
margin-left: 20px;
background: #409eff;
cursor: pointer;
}
}
}
.onemain {
margin-top: 20px;
margin-left: 55px;
color: #6f6f6f;
font-size: 14px;
.checkcon {
position: relative;
.in {
position: absolute;
// margin-top: 10px;
left: 0;
top: 3px;
}
.yulan {
// color: yellow;
margin-left: 22px;
// display: inline-block;
}
.yulan2 {
margin-left: 22px;
}
.ant-input-number {
height: 24px;
width: 24px;
margin: 10px;
border-radius: 4px;
border: 1px solid #6d7584;
.ant-input-number-input {
width: 100%;
height: 100%;
font-size: 14px;
padding: 0;
color: #409eff;
text-align: center;
}
}
}
}
.twomain {
margin-left: 20px;
margin-top: 20px;
.ant-switch-checked {
background-color: #5dc988;
}
.info {
margin-left: 10px;
color: #6f6f6f;
font-size: 14px;
// margin-top: 10px;
}
.infor {
margin-left: 38px;
margin-top: 10px;
color: #c7cbd2;
font-size: 14px;
}
.chooseshow {
// background-color: red;
margin-left: 38px;
margin-top: 12px;
.fane {
color: #6f6f6f;
font-size: 14px;
}
}
.choo {
display: none;
}
.btm {
margin-left: 38px;
margin-top: 20px;
.bmo {
color: #6f6f6f;
font-size: 14px;
}
.bmt {
color: #c7cbd2;
font-size: 14px;
margin-top: 3px;
}
.chosecon {
display: flex;
margin-top: 6px;
margin-bottom: 20px;
.chose {
position: relative;
.inl {
position: absolute;
top: 2px;
}
.sh {
margin-left: 23px;
color: #6f6f6f;
}
}
}
}
}
}
}
.Lhead {
display: flex;
.btns {
display: flex;
margin-left: 20px;
// flex-wrap: wrap;
.btn {
padding: 0px 26px 0px 26px;
height: 38px;
background: rgba(64, 158, 255, 0);
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
color: rgba(64, 158, 255, 1);
line-height: 36px;
margin-left: 5px;
}
}
.btn1 {
.search {
width: 15px;
height: 17px;
background-image: url("../../assets/images/courseManage/search1.png");
}
}
.btn2 {
.search {
width: 16px;
height: 18px;
background-image: url("../../assets/images/courseManage/reset1.png");
}
}
.btn3 {
margin-right: 0px;
.search {
width: 17px;
height: 18px;
background-image: url("../../assets/images/courseManage/add1.png");
}
}
.btn1:hover {
background: rgba(64, 158, 255, 1);
.search {
background-image: url("../../assets/images/courseManage/search0.png");
}
.btnText {
color: #ffffff;
}
}
.btn2:hover {
background: rgba(64, 158, 255, 1);
.search {
background-image: url("../../assets/images/courseManage/reset0.png");
}
.btnText {
color: #ffffff;
}
}
.btn3:hover {
background: rgba(64, 158, 255, 1);
.search {
background-image: url("../../assets/images/courseManage/add0.png");
}
.btnText {
color: #ffffff;
}
}
}
}
.Lbom {
position: relative;
margin-bottom: 20px;
.item {
width: 100%;
height: 200px;
// background-color: green;
margin-top: 40px;
border-radius: 8px;
border: 1px solid #f0f4fe;
.itemhead {
height: 50px;
width: 100%;
background-color: #f0f4fe;
display: flex;
align-items: center;
position: relative;
.lev {
margin-left: 27px;
margin-right: 16px;
line-height: 100%;
color: #409eff;
font-size: 16px;
}
.lin {
width: 1px;
height: 35%;
background-color: #c7cbd2;
}
.nam {
margin-left: 16px;
color: #4f5156;
line-height: 100%;
font-size: 16px;
}
.count {
position: absolute;
line-height: 100%;
color: #4f5156;
font-size: 14px;
right: 40px;
span:nth-child(2) {
color: #63ca8c;
}
}
}
.itembomm {
display: flex;
align-items: center;
height: 150px;
.it {
// margin-left: 110px;
// margin-right: 110px;
width: 13%;
text-align: center;
.on {
font-size: 30px;
}
.ittext {
color: #4f5156;
margin-top: 16px;
margin-left: -5px;
}
}
.linee {
background-color: #ecf2fb;
width: 1px;
height: 55%;
}
.itright {
position: absolute;
right: 45px;
display: flex;
.te {
color: #4ea6ff;
font-size: 14px;
cursor: pointer;
}
.more {
position: relative;
height: 30px;
display: flex;
.moreArrow {
width: 13px;
height: 7px;
display: inline-block;
background-image: url("../../assets/images/navtop/down.png");
background-size: 100%;
margin: 2px;
margin-left: 7px;
margin-top: 6px;
}
.moreItems {
width: 80px;
height: 70px;
display: none;
background: #ffffff;
box-shadow: 2px 3px 9px 3px rgba(0, 0, 0, 0.05);
border-radius: 3px;
border: 0px solid #dcdcdc;
position: absolute;
left: 0px;
top: 20px;
z-index: 100;
.roleItem {
font-size: 14px;
font-weight: 400;
color: rgba(79, 81, 86, 1);
line-height: 36px;
display: flex;
justify-content: center;
cursor: pointer;
}
.roleItem:hover {
color: #4ea6ff;
}
}
}
.more:hover .moreArrow {
background-image: url("../../assets/images/navtop/up.png");
}
.more:hover .moreItems {
display: block;
}
}
}
.show {
color: blue;
}
.noshow {
display: none;
}
}
.create {
margin-top: 40px;
.taskbox {
width: 412px;
height: 160px;
border-radius: 10px;
position: relative;
// margin-left: 68px;
margin-bottom: 40px;
cursor: pointer;
.leftt {
position: absolute;
top: 18px;
left: 0;
}
.photo {
position: absolute;
top: 42px;
left: 37px;
}
.rightt {
position: absolute;
top: 69px;
right: 26px;
}
.centerbox {
position: absolute;
top: 52px;
left: 145px;
font-size: 20px;
font-weight: 700;
//line-height: 36px;
}
.centermain {
color: rgba(135, 139, 146, 1);
font-size: 14px;
position: absolute;
left: 144px;
bottom: 49px;
}
}
}
}
}
}
.DelModal {