-- 学员数

This commit is contained in:
yuping
2022-12-19 21:01:13 +08:00
parent 7fa58cdea1
commit f8650e799a
3 changed files with 12 additions and 32 deletions

View File

@@ -57,6 +57,7 @@ export const getProjectDetail = (obj) => http.get('/admin/project/detail', {para
export const releaseProject = (obj) => http.post('/admin/project/publish', obj) export const releaseProject = (obj) => http.post('/admin/project/publish', obj)
//获取项目学员 //获取项目学员
export const projectStudent = (obj) => http.post('/admin/project/studentList', obj) export const projectStudent = (obj) => http.post('/admin/project/studentList', obj)
export const projectStudentCount = (obj) => http.get('/admin/student/getStudentCount', {params: obj})
//撤回发布、结束 //撤回发布、结束
export const handleProject = (obj) => http.post('/admin/project/handle', obj) export const handleProject = (obj) => http.post('/admin/project/handle', obj)

View File

@@ -699,6 +699,7 @@ import ProjPowerList from "../../components/drawers/ProjPowerList";
import ProjCheckShip from "../../components/drawers/ProjCheckPower"; import ProjCheckShip from "../../components/drawers/ProjCheckPower";
// import ManageRight from "../../components/drawers/ManageRight"; // import ManageRight from "../../components/drawers/ManageRight";
import * as api from "../../api/index1"; import * as api from "../../api/index1";
import * as apiStu from "../../api/index";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import { import {
commonData, commonData,
@@ -905,23 +906,13 @@ export default {
console.log("err", err); console.log("err", err);
}); });
//获取学员列表 //获取学员列表
let stuobj = { apiStu.projectStudentCount({
pageNo: 1, pid: router.id,
pageSize: 10, type:2
routerId: router.id, }).then((res) => {
}; state.routeStudentsNum = res.data.data;
api
.getStudent(stuobj)
.then((res) => {
console.log("获取学员列表", res.data.data.total);
if (res.data.code === 200) {
state.routeStudentsNum = res.data.data.total;
state.pubLoading = false; state.pubLoading = false;
}
}) })
.catch((err) => {
console.log("获取学员列表失败", err);
});
}; };
//确定发布 //确定发布
const releaseLearnPath = () => { const releaseLearnPath = () => {

View File

@@ -1047,25 +1047,13 @@ export default {
state.projectTasks = res.data.data.tasks; state.projectTasks = res.data.data.tasks;
}); });
//获取学员总数 //获取学员总数
let obj = { api.projectStudentCount({
pageNo: 0, pid: object.projectId,
pageSize: 0, type:1
projectId: object.projectId, }).then((res) => {
}; state.projectStudentsNum = res.data.data
api
.projectStudent(obj)
.then((res) => {
if (res.data.code === 200) {
// console.log("res", res.data);
state.projectStudentsNum = res.data.data.total
? res.data.data.total
: 0;
state.projectPubLoading = false; state.projectPubLoading = false;
}
}) })
.catch((err) => {
console.log("获取学员人数失败", err);
});
//获取阶段及任务总数 //获取阶段及任务总数
}; };
//确认发布项目 //确认发布项目