mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-14 05:16:45 +08:00
--fix bug 概览
This commit is contained in:
@@ -44,7 +44,7 @@ export function checkPer(per,createId) {
|
||||
if (store?.state?.userInfo?.isHrbp) {
|
||||
return true;
|
||||
}
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
|
||||
const adminOwner = [6, 9, 12];
|
||||
@@ -201,3 +201,20 @@ export function newFile(code) {
|
||||
URL.revokeObjectURL(linkNode.href); // 释放URL 对象
|
||||
document.body.removeChild(linkNode);
|
||||
}
|
||||
|
||||
//保留两位小数
|
||||
export function fixDouble(v) {
|
||||
const f = parseFloat(v);
|
||||
if (isNaN(f)) {
|
||||
return 0;
|
||||
}
|
||||
return Math.round(f * 100) / 100;
|
||||
}
|
||||
//输出两位百分小数
|
||||
export function fixDoublePer(v) {
|
||||
const f = parseFloat(v);
|
||||
if (isNaN(f)) {
|
||||
return 0;
|
||||
}
|
||||
return Math.round(f * 10000) / 100;
|
||||
}
|
||||
@@ -160,9 +160,7 @@
|
||||
</div>
|
||||
<div class="nubbox">
|
||||
<div>
|
||||
<span class="nub1" style="color: #a497ff">{{
|
||||
routerInfoOverview.completeRatio
|
||||
}}</span
|
||||
<span class="nub1" style="color: #a497ff">{{(routerInfoOverview.completeRatio * 100).toFixed(2)}}</span
|
||||
><span style="color: #a497ff; font-size: 14px">%</span>
|
||||
</div>
|
||||
<div class="nub2">总完成率</div>
|
||||
@@ -195,9 +193,7 @@
|
||||
<a-progress
|
||||
type="dashboard"
|
||||
gapDegree="0"
|
||||
:percent="
|
||||
chapterOverviewList[choosedStageIndex]?.completeCourseRatio
|
||||
"
|
||||
:percent=" chapterOverviewList[choosedStageIndex]?.completeCourseRatio || 0 "
|
||||
:width="140"
|
||||
/>
|
||||
<div class="protext">课程完成率</div>
|
||||
@@ -206,9 +202,7 @@
|
||||
<a-progress
|
||||
type="dashboard"
|
||||
gapDegree="0"
|
||||
:percent="
|
||||
chapterOverviewList[choosedStageIndex]?.completeExamRatio
|
||||
"
|
||||
:percent="chapterOverviewList[choosedStageIndex]?.completeExamRatio || 0"
|
||||
:width="140"
|
||||
/>
|
||||
<div class="protext">考试通过率</div>
|
||||
@@ -217,65 +211,47 @@
|
||||
<a-progress
|
||||
type="dashboard"
|
||||
gapDegree="0"
|
||||
:percent="
|
||||
chapterOverviewList[choosedStageIndex]?.completeRatio
|
||||
"
|
||||
:percent="chapterOverviewList[choosedStageIndex]?.completeRatio || 0"
|
||||
:width="140"
|
||||
/>
|
||||
<div class="protext">作业完成率</div>
|
||||
</div>
|
||||
<div class="proright">
|
||||
<div class="pronub" style="margin-left: 142px">
|
||||
{{
|
||||
chapterOverviewList[choosedStageIndex]
|
||||
? chapterOverviewList[choosedStageIndex].totalTaskCnt
|
||||
: 0
|
||||
}}
|
||||
{{ chapterOverviewList[choosedStageIndex].completeTaskCnt || 0}}
|
||||
</div>
|
||||
<div class="proright1">
|
||||
<span class="textpro">关卡任务总数</span>
|
||||
<a-progress
|
||||
:percent="
|
||||
chapterOverviewList[choosedStageIndex]
|
||||
? chapterOverviewList[choosedStageIndex].totalTaskCnt
|
||||
: 0
|
||||
"
|
||||
:percent="fixDoublePer(chapterOverviewList[choosedStageIndex].completeTaskCnt / (chapterOverviewList[choosedStageIndex].totalTaskCnt || 0))"
|
||||
style="width: 369px"
|
||||
/>
|
||||
</div>
|
||||
<div class="pronub" style="margin-left: 142px">
|
||||
{{
|
||||
chapterOverviewList[choosedStageIndex]
|
||||
? chapterOverviewList[choosedStageIndex].totalReqCnt
|
||||
? chapterOverviewList[choosedStageIndex].completeReqCnt
|
||||
: 0
|
||||
}}
|
||||
</div>
|
||||
<div class="proright1">
|
||||
<span class="textpro">必修课</span>
|
||||
<a-progress
|
||||
:percent="
|
||||
chapterOverviewList[choosedStageIndex]
|
||||
? chapterOverviewList[choosedStageIndex].totalReqCnt
|
||||
: 0
|
||||
"
|
||||
:percent="fixDoublePer(chapterOverviewList[choosedStageIndex].completeReqCnt / (chapterOverviewList[choosedStageIndex].totalReqCnt || 0))"
|
||||
style="width: 369px"
|
||||
/>
|
||||
</div>
|
||||
<div class="pronub" style="margin-left: 142px">
|
||||
{{
|
||||
chapterOverviewList[choosedStageIndex]
|
||||
? chapterOverviewList[choosedStageIndex].totalOptCnt
|
||||
? chapterOverviewList[choosedStageIndex].completeOptCnt
|
||||
: 0
|
||||
}}
|
||||
</div>
|
||||
<div class="proright1">
|
||||
<span class="textpro">选修课</span>
|
||||
<a-progress
|
||||
:percent="
|
||||
chapterOverviewList[choosedStageIndex]
|
||||
? chapterOverviewList[choosedStageIndex].totalOptCnt
|
||||
: 0
|
||||
"
|
||||
:percent="fixDoublePer(chapterOverviewList[choosedStageIndex].completeOptCnt / (chapterOverviewList[choosedStageIndex].totalOptCnt || 0))"
|
||||
style="width: 369px"
|
||||
/>
|
||||
</div>
|
||||
@@ -468,20 +444,12 @@
|
||||
<div style="display: flex">
|
||||
<a-progress
|
||||
:showInfo="false"
|
||||
:percent="
|
||||
parseInt(
|
||||
(item.finishStuNum / item.totalStuNum) * 100
|
||||
)
|
||||
"
|
||||
:percent=" parseInt((item.finishStuNum / item.totalStuNum) * 100)"
|
||||
strokeColor="#FFC067"
|
||||
trailColor="rgba(253, 209, 98, 0.2)"
|
||||
/>
|
||||
<span class="progresstext" style="margin-left: 10px"
|
||||
>{{
|
||||
parseInt(
|
||||
(item.finishStuNum / item.totalStuNum) * 100
|
||||
) || 0
|
||||
}}%</span
|
||||
>{{parseInt((item.finishStuNum / item.totalStuNum) * 100) || 0}}%</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1446,7 +1414,7 @@ import RouterProjectManage from "../../components/drawers/router/RouterProjectMa
|
||||
import ImpoterGroupLeader from "@/components/drawers/project/ImpoterGroupLeader.vue";
|
||||
import TaskImpStu from "../../components/drawers/TaskFaceIn";
|
||||
|
||||
import { checkPer } from "@/utils/utils";
|
||||
import { checkPer,fixDoublePer } from "@/utils/utils";
|
||||
|
||||
export default {
|
||||
name: "LevelAdd",
|
||||
@@ -3012,7 +2980,7 @@ export default {
|
||||
showCodeModel2,
|
||||
editLearnInfo,
|
||||
pubIcon,
|
||||
|
||||
fixDoublePer,
|
||||
faceTeachModel,
|
||||
examinationModel,
|
||||
evaluationModel,
|
||||
|
||||
@@ -313,26 +313,26 @@
|
||||
<div class="second" style="margin-top: 0">
|
||||
<div class="nubbox">
|
||||
<span class="nub1">{{
|
||||
projectInfoOverview.totalStudentCnt
|
||||
projectInfoOverview.totalStudentCnt || 0
|
||||
}}</span>
|
||||
<div class="nub2">总人数</div>
|
||||
</div>
|
||||
<div class="nubbox">
|
||||
<span class="nub1" style="color: #ff90ae">{{
|
||||
projectInfoOverview.studyStudentCnt
|
||||
projectInfoOverview.studyStudentCnt || 0
|
||||
}}</span>
|
||||
<div class="nub2">学习人数</div>
|
||||
</div>
|
||||
<div class="nubbox">
|
||||
<span class="nub1" style="color: #a497ff">{{
|
||||
projectInfoOverview.completeStudentCnt
|
||||
projectInfoOverview.completeStudentCnt || 0
|
||||
}}</span>
|
||||
<div class="nub2">完成人数</div>
|
||||
</div>
|
||||
<div class="nubbox">
|
||||
<div>
|
||||
<span class="nub1" style="color: #5dc988">{{
|
||||
projectInfoOverview.onlineCourseCnt
|
||||
projectInfoOverview.onlineCourseCnt || 0
|
||||
}}</span>
|
||||
<!-- <span style="color: #5dc988; font-size: 14px">%</span> -->
|
||||
</div>
|
||||
@@ -341,7 +341,7 @@
|
||||
<div class="nubbox">
|
||||
<div>
|
||||
<span class="nub1" style="color: #ff90ae">{{
|
||||
projectInfoOverview.offLineCourseCnt
|
||||
projectInfoOverview.offLineCourseCnt || 0
|
||||
}}</span>
|
||||
<!-- <span style="color: #ff90ae; font-size: 14px">%</span> -->
|
||||
</div>
|
||||
@@ -350,7 +350,7 @@
|
||||
<div class="nubbox">
|
||||
<div>
|
||||
<span class="nub1" style="color: #a497ff">{{
|
||||
projectInfoOverview.completeRatio
|
||||
(projectInfoOverview.completeRatio || 0).toFixed(2)
|
||||
}}</span
|
||||
><span style="color: #a497ff; font-size: 14px">%</span>
|
||||
</div>
|
||||
@@ -390,7 +390,7 @@
|
||||
type="dashboard"
|
||||
gapDegree="0"
|
||||
:percent="
|
||||
stageOverviewList[choosedStageIndex]?.completeCourseRatio
|
||||
stageOverviewList[choosedStageIndex]?.completeCourseRatio || 0
|
||||
"
|
||||
:width="140"
|
||||
/>
|
||||
@@ -401,7 +401,7 @@
|
||||
type="dashboard"
|
||||
gapDegree="0"
|
||||
:percent="
|
||||
stageOverviewList[choosedStageIndex]?.completeExamRatio
|
||||
stageOverviewList[choosedStageIndex]?.completeExamRatio || 0
|
||||
"
|
||||
:width="140"
|
||||
/>
|
||||
@@ -411,41 +411,39 @@
|
||||
<a-progress
|
||||
type="dashboard"
|
||||
gapDegree="0"
|
||||
:percent="stageOverviewList[choosedStageIndex]?.completeRatio"
|
||||
:percent="stageOverviewList[choosedStageIndex]?.completeRatio || 0"
|
||||
:width="140"
|
||||
/>
|
||||
<div class="protext">作业完成率</div>
|
||||
</div>
|
||||
<div class="proright">
|
||||
<div class="pronub" style="margin-left: 142px">
|
||||
{{ stageOverviewList[choosedStageIndex]?.completeTaskCnt }}
|
||||
{{ stageOverviewList[choosedStageIndex]?.completeTaskCnt || 0}}
|
||||
</div>
|
||||
<div class="proright1">
|
||||
<span class="textpro">阶段任务总数</span>
|
||||
<a-progress
|
||||
:percent="
|
||||
stageOverviewList[choosedStageIndex]?.totalTaskCnt
|
||||
"
|
||||
:percent="fixDoublePer(stageOverviewList[choosedStageIndex]?.completeTaskCnt/(stageOverviewList[choosedStageIndex]?.totalTaskCnt || 0))"
|
||||
style="width: 369px"
|
||||
/>
|
||||
</div>
|
||||
<div class="pronub" style="margin-left: 142px">
|
||||
{{ stageOverviewList[choosedStageIndex]?.totalReqCnt }}
|
||||
{{ stageOverviewList[choosedStageIndex]?.completeReqCnt || 0}}
|
||||
</div>
|
||||
<div class="proright1">
|
||||
<span class="textpro">必修课</span>
|
||||
<a-progress
|
||||
:percent="stageOverviewList[choosedStageIndex]?.totalReqCnt"
|
||||
:percent="fixDoublePer(stageOverviewList[choosedStageIndex]?.completeReqCnt/(stageOverviewList[choosedStageIndex]?.totalReqCnt || 0))"
|
||||
style="width: 369px"
|
||||
/>
|
||||
</div>
|
||||
<div class="pronub" style="margin-left: 142px">
|
||||
{{ stageOverviewList[choosedStageIndex]?.totalOptCnt }}
|
||||
{{ stageOverviewList[choosedStageIndex]?.completeOptCnt || 0}}
|
||||
</div>
|
||||
<div class="proright1">
|
||||
<span class="textpro">选修课</span>
|
||||
<a-progress
|
||||
:percent="stageOverviewList[choosedStageIndex]?.totalOptCnt"
|
||||
:percent="fixDoublePer(stageOverviewList[choosedStageIndex]?.completeOptCnt/(stageOverviewList[choosedStageIndex]?.totalOptCnt || 0))"
|
||||
style="width: 369px"
|
||||
/>
|
||||
</div>
|
||||
@@ -2310,7 +2308,7 @@ import TableStudent from "@/components/student/TableStudent";
|
||||
import TableCertificateStudent from "@/components/student/TableCertificateStudent";
|
||||
import { getStuPage } from "@/api/index1";
|
||||
import ChangeGroupModal from "@/components/student/ChangeGroupModal.vue";
|
||||
import { checkPer } from "@/utils/utils";
|
||||
import { checkPer,fixDoublePer } from "@/utils/utils";
|
||||
import ImpoterGroupLeader from "@/components/drawers/project/ImpoterGroupLeader.vue";
|
||||
export default {
|
||||
name: "taskPage",
|
||||
@@ -4996,6 +4994,7 @@ export default {
|
||||
checkType,
|
||||
downloadFile,
|
||||
checkPer,
|
||||
fixDoublePer,
|
||||
addCertificate,
|
||||
editCertificate,
|
||||
deleteCertificate,
|
||||
|
||||
Reference in New Issue
Block a user