mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 12:56:45 +08:00
修改管理页概览图表数据问题
This commit is contained in:
@@ -78,6 +78,8 @@ export const exportStudentTaskPage = (obj) => http.post('/professional/studentTa
|
||||
// 任务管理概览
|
||||
export const taskInformation = (growthId) => http.get('/professional/managementOverview/taskInformation/' + growthId)
|
||||
|
||||
// 任务管理完成统计概览
|
||||
export const taskCompletionRate = (growthId) => http.get('/professional/managementOverview/taskCompletionRate/' + growthId)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -437,19 +437,19 @@ const tablecolumns = ref([
|
||||
},
|
||||
{
|
||||
title: "完成状态",
|
||||
dataIndex: "finishStatus",
|
||||
key: "finishStatus",
|
||||
dataIndex: "completionStatus",
|
||||
key: "completionStatus",
|
||||
width: 100,
|
||||
align: "center",
|
||||
className: "h",
|
||||
ellipsis: true,
|
||||
customRender: ({ record: { finishStatus } }) =>
|
||||
customRender: ({ record: { completionStatus } }) =>
|
||||
({
|
||||
null: "未开始",
|
||||
0: "未开始",
|
||||
1: "已完成",
|
||||
2: "进行中",
|
||||
}[finishStatus] || "未开始"),
|
||||
}[completionStatus] || "未开始"),
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
@@ -632,6 +632,8 @@ function submitCall(selectList) {
|
||||
tableData.value.loading = false;
|
||||
message.success("添加成功");
|
||||
getStuList();
|
||||
}).catch(err =>{
|
||||
tableData.value.loading = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<div class="nub1" style="color: #ff90ae">
|
||||
{{ overviewData?.learnNum || 0 }}
|
||||
</div>
|
||||
<div class="nub2">学习人数</div>
|
||||
<div class="nub2">未完成人数</div>
|
||||
</div>
|
||||
<div class="nubbox">
|
||||
<div class="nub1" style="color: #409eff">
|
||||
@@ -126,90 +126,75 @@
|
||||
<div class="taskmain">任务信息</div>
|
||||
</div>
|
||||
<div class="stagelast">
|
||||
<div class="stagepro">
|
||||
<!-- 圆形统计 -->
|
||||
<div class="stagepro" v-for="item of overviewData2">
|
||||
<a-progress
|
||||
type="dashboard"
|
||||
gapDegree="0"
|
||||
:percent="
|
||||
fixDoublePer(overviewData?.courseCompleteRatio || 0)
|
||||
"
|
||||
:percent="fixDoublePer(item.completedRate || 0)"
|
||||
:width="140"
|
||||
/>
|
||||
<div class="protext">课程完成率</div>
|
||||
</div>
|
||||
<div class="stagepro">
|
||||
<a-progress
|
||||
type="dashboard"
|
||||
gapDegree="0"
|
||||
:percent="
|
||||
fixDoublePer(overviewData?.examCompleteRatio || 0)
|
||||
"
|
||||
:width="140"
|
||||
/>
|
||||
<div class="protext">考试通过率</div>
|
||||
</div>
|
||||
<div class="stagepro">
|
||||
<a-progress
|
||||
type="dashboard"
|
||||
gapDegree="0"
|
||||
:percent="fixDoublePer(overviewData || 0)"
|
||||
:width="140"
|
||||
/>
|
||||
<div class="protext">作业完成率</div>
|
||||
<div class="protext">
|
||||
{{ TASK_TYPE[item.taskType].name }}完成率
|
||||
</div>
|
||||
</div>
|
||||
<!-- 条形统计 -->
|
||||
<div class="proright">
|
||||
<div class="proright1">
|
||||
<div class="textpro">
|
||||
任务总完成率<span
|
||||
style="margin-left: 16px; color: #409eff"
|
||||
>{{ overviewData?.completeTaskCnt }}</span
|
||||
>
|
||||
任务总完成率
|
||||
<!-- <span style="margin-left: 16px; color: #409eff">{{
|
||||
overviewData3?.totalTaskCompletionNum
|
||||
}}</span> -->
|
||||
</div>
|
||||
<div style="margin-top: 12px; display: flex">
|
||||
<a-progress
|
||||
:showInfo="true"
|
||||
:percent="
|
||||
fixDoublePer(overviewData?.completeTaskRatio || 0)
|
||||
fixDoublePer(
|
||||
overviewData3?.totalTaskCompletionRate || 0
|
||||
)
|
||||
"
|
||||
style="width: 369px"
|
||||
/>
|
||||
<!-- <div style="margin-left: 10px">{{ (overviewData?.completeTaskRatio*100)?.toFixed(2) || 0 }}%</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="proright1">
|
||||
<div class="textpro">
|
||||
必修任务完成率<span
|
||||
style="margin-left: 16px; color: #409eff"
|
||||
>{{ overviewData?.completeTaskCnt }}</span
|
||||
>
|
||||
必修任务完成率
|
||||
<!-- <span style="margin-left: 16px; color: #409eff">{{
|
||||
overviewData3?.compulsoryTaskCompletionNum
|
||||
}}</span> -->
|
||||
</div>
|
||||
<div style="margin-top: 12px; display: flex">
|
||||
<a-progress
|
||||
:showInfo="true"
|
||||
:percent="
|
||||
fixDoublePer(overviewData?.completeTaskRatio || 0)
|
||||
fixDoublePer(
|
||||
overviewData3?.compulsoryTaskCompletionRate || 0
|
||||
)
|
||||
"
|
||||
style="width: 369px"
|
||||
/>
|
||||
<!-- <div style="margin-left: 10px">{{ (overviewData?.completeTaskRatio*100)?.toFixed(2) || 0 }}%</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="proright1">
|
||||
<div class="textpro">
|
||||
选修任务完成率<span
|
||||
style="margin-left: 16px; color: #409eff"
|
||||
>{{ overviewData?.completeTaskCnt }}</span
|
||||
>
|
||||
选修任务完成率
|
||||
<!-- <span style="margin-left: 16px; color: #409eff">{{
|
||||
overviewData3?.electiveTaskCompletionNum
|
||||
}}</span> -->
|
||||
</div>
|
||||
<div style="margin-top: 12px; display: flex">
|
||||
<a-progress
|
||||
:showInfo="true"
|
||||
:percent="
|
||||
fixDoublePer(overviewData?.completeTaskRatio || 0)
|
||||
fixDoublePer(
|
||||
overviewData3?.electiveTaskCompletionRate || 0
|
||||
)
|
||||
"
|
||||
style="width: 369px"
|
||||
/>
|
||||
<!-- <div style="margin-left: 10px">{{ (overviewData?.completeTaskRatio*100)?.toFixed(2) || 0 }}%</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -340,31 +325,19 @@
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="progresstext">
|
||||
{{ element.finishTaskStudentNum || 0 }}/{{
|
||||
element.taskStudentNum || 0
|
||||
{{ element.completeNum || 0 }}/{{
|
||||
element.totalNum || 0
|
||||
}}人
|
||||
</div>
|
||||
<div style="display: flex">
|
||||
<a-progress
|
||||
:showInfo="false"
|
||||
:percent="
|
||||
parseInt(
|
||||
(element.finishTaskStudentNum /
|
||||
element.taskStudentNum) *
|
||||
100
|
||||
)
|
||||
"
|
||||
:percent="parseInt(element.progress * 100) || 0"
|
||||
strokeColor="#FFC067"
|
||||
trailColor="rgba(253, 209, 98, 0.2)"
|
||||
/>
|
||||
<span class="progresstext" style="margin-left: 10px"
|
||||
>{{
|
||||
parseInt(
|
||||
(element.finishTaskStudentNum /
|
||||
element.taskStudentNum) *
|
||||
100
|
||||
) || 0
|
||||
}}%</span
|
||||
>{{ parseInt(element.progress * 100) || 0 }}%</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@@ -574,6 +547,7 @@ import {
|
||||
saveSuperiorTask,
|
||||
delSuperiorTask,
|
||||
taskInformation,
|
||||
taskCompletionRate,
|
||||
} from "@/api/growthpath";
|
||||
export default {
|
||||
name: "pathManage",
|
||||
@@ -619,6 +593,7 @@ export default {
|
||||
listTaskData: [],
|
||||
overviewData: {},
|
||||
overviewData2: {},
|
||||
overviewData3: {},
|
||||
TASK_TYPE: TASK_TYPE,
|
||||
// 课程类型 1必修 2选修
|
||||
courseType: "1",
|
||||
@@ -698,9 +673,16 @@ export default {
|
||||
};
|
||||
const changeTabs = (e) => {
|
||||
if (e == 3) {
|
||||
// 学员
|
||||
state.tabFlag = true;
|
||||
} else {
|
||||
} else if (e == 1) {
|
||||
// 概览
|
||||
state.tabFlag = false;
|
||||
getOverviewList();
|
||||
} else {
|
||||
// 任务
|
||||
state.tabFlag = false;
|
||||
getListTask();
|
||||
}
|
||||
};
|
||||
const showStudent = (record) => {
|
||||
@@ -842,6 +824,13 @@ export default {
|
||||
message.error(res.msg);
|
||||
}
|
||||
});
|
||||
taskCompletionRate(state.routerId).then((res) => {
|
||||
if (res.data.code == 200) {
|
||||
state.overviewData3 = res.data.data;
|
||||
} else {
|
||||
message.error(res.msg);
|
||||
}
|
||||
});
|
||||
};
|
||||
const totasks = () => {
|
||||
router.push({
|
||||
|
||||
Reference in New Issue
Block a user