-- 学员数

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 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)

View File

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

View File

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