fix:修改学员总数不一致

This commit is contained in:
lixg
2022-12-08 15:24:08 +08:00
parent 84ee457c09
commit a189d96260
4 changed files with 784 additions and 683 deletions

View File

@@ -1707,7 +1707,9 @@
<div class="projectbox">
<div class="promessage">
<div class="messageme">项目信息</div>
<div class="messagege">当前项目共0个阶段0个任务</div>
<div class="messagege">
当前项目共{{ projectStages }}个阶段,{{ projectTasks }}个任务
</div>
</div>
<div class="stumessage">
<div class="messageme1">学员信息</div>
@@ -1731,6 +1733,13 @@
<a-button class="pubtn2" @click="releaseProject">发布</a-button>
</div>
</div>
<!-- 加载动画 -->
<div
class="aeLoading"
:style="{ display: projectPubLoading ? 'flex' : 'none' }"
>
<a-spin :spinning="projectPubLoading" />
</div>
</a-modal>
<!-- 撤回弹窗 -->
@@ -2092,7 +2101,10 @@ export default {
action: null,
act: null,
projectPub: false, //发布弹窗
projectPubLoading: false, //发布loading
projectStudentsNum: 0, //发布弹窗-学员人数
projectStages: 0, //发布弹窗-阶段数
projectTasks: 0, //任务数
releaseProjectId: null, //发布的项目id
releaseProjectName: null, //发布的项目名称
releaseProjectTime: null, //发布的项目时间
@@ -3893,10 +3905,17 @@ export default {
//打开发布弹窗
const showProjectPub = () => {
state.projectPub = true;
state.projectPubLoading = true;
state.releaseProjectId = state.projectId;
state.releaseProjectName = state.name;
// state.releaseProjectTime = state.startTime;
// console.log("object", object);
apiproj.getProjectCount(state.projectId).then((res) => {
console.log("获取关卡、任务、学员统计数据", res.data);
// state.projectStudentsNum = res.data.students;
state.projectStages = res.data.stages;
state.projectTasks = res.data.tasks;
});
//获取学员总数
let obj = {
pageNo: 0,
@@ -3906,11 +3925,12 @@ export default {
apiproj
.projectStudent(obj)
.then((res) => {
if (res.status === 200) {
if (res.data.code === 200) {
// console.log("res", res.data);
state.projectStudentsNum = res.data.data.total
? res.data.data.total
: 0;
state.projectPubLoading = false;
}
})
.catch((err) => {