mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 03:46:45 +08:00
fix:修改学员总数不一致
This commit is contained in:
@@ -418,6 +418,10 @@
|
||||
<a-button class="pubtn2" @click="releaseLearnPath">发布</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 加载动画 -->
|
||||
<div class="aeLoading" :style="{ display: pubLoading ? 'flex' : 'none' }">
|
||||
<a-spin :spinning="pubLoading" />
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 复制路径弹窗 -->
|
||||
<a-modal
|
||||
@@ -723,6 +727,7 @@ export default {
|
||||
// learnPathBg: null, //创建路径选择的路径图背景
|
||||
// learnPathBg2: null, //编辑路径选择的路径图背景
|
||||
pub: false, //发布弹窗
|
||||
pubLoading: false, //发布loading
|
||||
checked: false, //发布弹窗switch
|
||||
checkedTeacher: false, //发布弹窗勾选
|
||||
checkStu: false, //发布弹窗勾选
|
||||
@@ -853,6 +858,7 @@ export default {
|
||||
const showPub = (router) => {
|
||||
console.log("router", router);
|
||||
state.pub = true;
|
||||
state.pubLoading = true;
|
||||
state.releasePathId = router.id;
|
||||
state.releasePathName = router.manager;
|
||||
api
|
||||
@@ -860,7 +866,7 @@ export default {
|
||||
.then((res) => {
|
||||
console.log("获取关卡、任务、学员统计数据", res.data);
|
||||
if (res.status === 200) {
|
||||
state.routeStudentsNum = res.data.students;
|
||||
// state.routeStudentsNum = res.data.students;
|
||||
state.routeChapters = res.data.chapters;
|
||||
state.routeTasks = res.data.tasks;
|
||||
}
|
||||
@@ -868,6 +874,24 @@ export default {
|
||||
.catch((err) => {
|
||||
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;
|
||||
state.pubLoading = false;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取学员列表失败", err);
|
||||
});
|
||||
};
|
||||
//确定发布
|
||||
const releaseLearnPath = () => {
|
||||
@@ -897,6 +921,11 @@ export default {
|
||||
|
||||
const closePub = () => {
|
||||
state.pub = false;
|
||||
state.releasePathId = null;
|
||||
state.releasePathName = null;
|
||||
state.routeChapters = null;
|
||||
state.routeTasks = null;
|
||||
state.routeStudentsNum = null;
|
||||
};
|
||||
//显示复制窗口
|
||||
const showCopyModal = () => {
|
||||
@@ -1544,8 +1573,8 @@ export default {
|
||||
.getRouterDetail(id)
|
||||
.then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
console.log("获取学习路径详情成功", res.data.data);
|
||||
let detail = res.data.data.routerInfo;
|
||||
// console.log("获取详情成功", detail);
|
||||
state.pathName = detail.name;
|
||||
state.pathBg = detail.picUrl;
|
||||
state.pathBgId = "";
|
||||
|
||||
@@ -1143,6 +1143,10 @@
|
||||
<a-button class="pubtn2" @click="releaseLearnPath">发布</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 加载动画 -->
|
||||
<div class="aeLoading" :style="{ display: pubLoading ? 'flex' : 'none' }">
|
||||
<a-spin :spinning="pubLoading" />
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 撤回路径弹窗 -->
|
||||
<a-modal
|
||||
@@ -1303,6 +1307,7 @@ export default {
|
||||
action: null,
|
||||
act: null,
|
||||
pub: false, //发布弹窗
|
||||
pubLoading: false, //发布loading
|
||||
backModal: false, //撤回弹窗
|
||||
dcopyModal: false, //复制弹窗
|
||||
closeBack: false,
|
||||
@@ -1813,13 +1818,14 @@ export default {
|
||||
//显示发布弹窗
|
||||
const showPub = () => {
|
||||
state.pub = true;
|
||||
state.pubLoading = true;
|
||||
// state.releasePathId = routerId;
|
||||
api
|
||||
.getLearnCount(state.routerId)
|
||||
.then((res) => {
|
||||
if (res.status === 200) {
|
||||
// console.log("获取关卡、任务、学员统计数据", res.data);
|
||||
state.routeStudentsNum = res.data.students;
|
||||
// state.routeStudentsNum = res.data.students;
|
||||
state.routeChapters = res.data.chapters;
|
||||
state.routeTasks = res.data.tasks;
|
||||
}
|
||||
@@ -1827,6 +1833,24 @@ export default {
|
||||
.catch((err) => {
|
||||
console.log("err", err);
|
||||
});
|
||||
//获取学员列表
|
||||
let stuobj = {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
routerId: state.routerId,
|
||||
};
|
||||
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;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取学员列表失败", err);
|
||||
});
|
||||
};
|
||||
//显示撤回弹窗
|
||||
const showBackModal = () => {
|
||||
|
||||
@@ -47,7 +47,10 @@
|
||||
<a-range-picker
|
||||
v-model:value="searchParam.valueDate"
|
||||
:show-time="{
|
||||
defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('23:59:59', 'HH:mm:ss')],
|
||||
defaultValue: [
|
||||
moment('00:00:00', 'HH:mm:ss'),
|
||||
moment('23:59:59', 'HH:mm:ss'),
|
||||
],
|
||||
}"
|
||||
style="border-radius: 8px; height: 40px; margin-left: 5px"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
@@ -109,13 +112,13 @@
|
||||
style="background: linear-gradient(180deg, #ddeaff, #f0f8fe)"
|
||||
>
|
||||
<div class="leftt">
|
||||
<img src="../../assets/images/taskpage/left2.png"/>
|
||||
<img src="../../assets/images/taskpage/left2.png" />
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img src="../../assets/images/projectadd/nopro.png"/>
|
||||
<img src="../../assets/images/projectadd/nopro.png" />
|
||||
</div>
|
||||
<div class="rightt">
|
||||
<img src="../../assets/images/taskpage/right2.png"/>
|
||||
<img src="../../assets/images/taskpage/right2.png" />
|
||||
</div>
|
||||
<div class="centerbox" style="color: rgba(78, 166, 255, 1)">
|
||||
创建项目
|
||||
@@ -282,13 +285,13 @@
|
||||
"
|
||||
>
|
||||
<div class="leftt">
|
||||
<img src="../../assets/images/taskpage/left2.png"/>
|
||||
<img src="../../assets/images/taskpage/left2.png" />
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img src="../../assets/images/taskpage/picture4.png"/>
|
||||
<img src="../../assets/images/taskpage/picture4.png" />
|
||||
</div>
|
||||
<div class="rightt">
|
||||
<img src="../../assets/images/taskpage/right2.png"/>
|
||||
<img src="../../assets/images/taskpage/right2.png" />
|
||||
</div>
|
||||
<div class="centerbox" style="color: rgba(78, 166, 255, 1)">
|
||||
单层子项目
|
||||
@@ -302,13 +305,13 @@
|
||||
"
|
||||
>
|
||||
<div class="leftt">
|
||||
<img src="../../assets/images/taskpage/left1.png"/>
|
||||
<img src="../../assets/images/taskpage/left1.png" />
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img src="../../assets/images/taskpage/picture5.png"/>
|
||||
<img src="../../assets/images/taskpage/picture5.png" />
|
||||
</div>
|
||||
<div class="rightt">
|
||||
<img src="../../assets/images/taskpage/right1.png"/>
|
||||
<img src="../../assets/images/taskpage/right1.png" />
|
||||
</div>
|
||||
<div class="centerbox" style="color: rgba(255, 182, 78, 1)">
|
||||
多层子项目
|
||||
@@ -369,16 +372,16 @@
|
||||
"
|
||||
>
|
||||
<div class="leftt">
|
||||
<img src="../../assets/images/taskpage/left2.png"/>
|
||||
<img src="../../assets/images/taskpage/left2.png" />
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img src="../../assets/images/taskpage/picture6.png"/>
|
||||
<img src="../../assets/images/taskpage/picture6.png" />
|
||||
</div>
|
||||
<div class="rightt">
|
||||
<img src="../../assets/images/taskpage/right2.png"/>
|
||||
<img src="../../assets/images/taskpage/right2.png" />
|
||||
</div>
|
||||
<div class="centerbox" style="color: rgba(78, 166, 255, 1)">
|
||||
单层{{ projectInfo.parentId ? '子' : '' }}项目
|
||||
单层{{ projectInfo.parentId ? "子" : "" }}项目
|
||||
</div>
|
||||
<div class="centermain">
|
||||
不包含子项目,直接填写项目基础信息后创建任务
|
||||
@@ -394,20 +397,22 @@
|
||||
"
|
||||
>
|
||||
<div class="leftt">
|
||||
<img src="../../assets/images/taskpage/left3.png"/>
|
||||
<img src="../../assets/images/taskpage/left3.png" />
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img src="../../assets/images/taskpage/picture7.png"/>
|
||||
<img src="../../assets/images/taskpage/picture7.png" />
|
||||
</div>
|
||||
<div class="rightt">
|
||||
<img src="../../assets/images/taskpage/right3.png"/>
|
||||
<img src="../../assets/images/taskpage/right3.png" />
|
||||
</div>
|
||||
<div class="centerbox1" style="color: rgba(93, 201, 136, 1)">
|
||||
多层{{ projectInfo.parentId ? '子' : '' }}项目
|
||||
多层{{ projectInfo.parentId ? "子" : "" }}项目
|
||||
</div>
|
||||
<div class="centermain1">
|
||||
{{
|
||||
projectInfo.parentId ? '可创建班级,通过班级填写基础信息并创建任务' : '包含子项目,分为多层子项目和单层子项目,多层子项目可创建班级,通过班级填写基础信息并创建任务'
|
||||
projectInfo.parentId
|
||||
? "可创建班级,通过班级填写基础信息并创建任务"
|
||||
: "包含子项目,分为多层子项目和单层子项目,多层子项目可创建班级,通过班级填写基础信息并创建任务"
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -615,6 +620,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>
|
||||
<!-- 撤回路径弹窗 -->
|
||||
<a-modal
|
||||
@@ -800,21 +812,21 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {reactive, toRefs, ref, watch} from "vue";
|
||||
import {message, Modal} from "ant-design-vue";
|
||||
import {useRouter} from "vue-router";
|
||||
import { reactive, toRefs, ref, watch } from "vue";
|
||||
import { message, Modal } from "ant-design-vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import ProjOwnerShip from "../../components/drawers/ProjectOwn";
|
||||
import ProjPowerList from "../../components/drawers/ProjPowerList";
|
||||
import ProjCheckShip from "../../components/drawers/ProjCheckPower";
|
||||
import * as api from "../../api/index";
|
||||
import * as api1 from "../../api/index1";
|
||||
import {storage} from "../../api/storage";
|
||||
import { storage } from "../../api/storage";
|
||||
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||
import ProjectClass from "@/components/project/ProjectClass";
|
||||
import OrgClass from "@/components/project/OrgClass";
|
||||
import dayjs from "dayjs";
|
||||
import * as moment from 'moment'
|
||||
import {changeOwnership} from "@/api/method";
|
||||
import * as moment from "moment";
|
||||
import { changeOwnership } from "@/api/method";
|
||||
|
||||
export default {
|
||||
name: "projectManage",
|
||||
@@ -846,6 +858,7 @@ export default {
|
||||
startModal: false, //启用弹窗
|
||||
closeStart: false, //启用弹窗关闭图标
|
||||
projectPub: false, //发布弹窗
|
||||
projectPubLoading: false, //发布loading
|
||||
backModal: false, //撤回弹窗
|
||||
closeBack: false, //撤回弹窗关闭图标
|
||||
reminderModal: false, //温馨提示弹窗
|
||||
@@ -900,15 +913,15 @@ export default {
|
||||
// 数据接入 - start -
|
||||
const router = useRouter();
|
||||
const sProjectStateList = ref([
|
||||
{value: 0, label: "草稿"},
|
||||
{value: 1, label: "审核中"},
|
||||
{value: 2, label: "审核通过"},
|
||||
{value: 3, label: "已发布"},
|
||||
{value: -2, label: "未通过"},
|
||||
{value: -1, label: "已结束"}
|
||||
{ value: 0, label: "草稿" },
|
||||
{ value: 1, label: "审核中" },
|
||||
{ value: 2, label: "审核通过" },
|
||||
{ value: 3, label: "已发布" },
|
||||
{ value: -2, label: "未通过" },
|
||||
{ value: -1, label: "已结束" },
|
||||
]);
|
||||
const searchReset = () => {
|
||||
state.searchParam = {pageNo: 1, pageSize: 10};
|
||||
state.searchParam = { pageNo: 1, pageSize: 10 };
|
||||
getTableDate();
|
||||
};
|
||||
const searchSubmit = () => {
|
||||
@@ -955,11 +968,10 @@ export default {
|
||||
message.destroy();
|
||||
message.success("创建成功");
|
||||
state.currentPage = 1;
|
||||
state.projectInfo.projectId || changeOwnership(
|
||||
"project",
|
||||
res.data.data.projectId,
|
||||
[{id: res.data.data.createId, name: res.data.data.createName}]
|
||||
);
|
||||
state.projectInfo.projectId ||
|
||||
changeOwnership("project", res.data.data.projectId, [
|
||||
{ id: res.data.data.createId, name: res.data.data.createName },
|
||||
]);
|
||||
getTableDate();
|
||||
});
|
||||
};
|
||||
@@ -1002,38 +1014,38 @@ export default {
|
||||
//打开发布弹窗
|
||||
const showProjectPub = (object) => {
|
||||
state.projectPub = true;
|
||||
state.projectPubLoading = true;
|
||||
state.releaseProjectId = object.projectId;
|
||||
state.releaseProjectName = object.name;
|
||||
state.releaseProjectTime = object.time;
|
||||
console.log("object", object);
|
||||
api
|
||||
.getProjectCount(object.projectId)
|
||||
.then((res) => {
|
||||
api.getProjectCount(object.projectId).then((res) => {
|
||||
console.log("获取关卡、任务、学员统计数据", res.data);
|
||||
state.projectStudentsNum = res.data.students;
|
||||
// state.projectStudentsNum = res.data.students;
|
||||
state.projectStages = res.data.stages;
|
||||
state.projectTasks = res.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;
|
||||
state.projectPubLoading = false;
|
||||
}
|
||||
})
|
||||
// //获取学员总数
|
||||
// let obj = {
|
||||
// pageNo: 0,
|
||||
// pageSize: 0,
|
||||
// projectId: object.projectId,
|
||||
// };
|
||||
// api
|
||||
// .projectStudent(obj)
|
||||
// .then((res) => {
|
||||
// if (res.status === 200) {
|
||||
// // console.log("res", res.data);
|
||||
// state.projectStudentsNum = res.data.data.total
|
||||
// ? res.data.data.total
|
||||
// : 0;
|
||||
// }
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// console.log("获取学员人数失败", err);
|
||||
// });
|
||||
// //获取阶段及任务总数
|
||||
.catch((err) => {
|
||||
console.log("获取学员人数失败", err);
|
||||
});
|
||||
//获取阶段及任务总数
|
||||
};
|
||||
//确认发布项目
|
||||
const releaseProject = () => {
|
||||
@@ -1042,18 +1054,22 @@ export default {
|
||||
projectId: state.releaseProjectId,
|
||||
type: 4,
|
||||
};
|
||||
api.handleProject(obj)
|
||||
.then((res) => {
|
||||
api.handleProject(obj).then((res) => {
|
||||
console.log("发布成功", res);
|
||||
message.destroy();
|
||||
message.success("发布成功");
|
||||
state.projectPub = false;
|
||||
getTableDate();
|
||||
})
|
||||
});
|
||||
};
|
||||
//关闭发布弹窗
|
||||
const closeProjectPub = () => {
|
||||
state.projectPub = false;
|
||||
state.projectStages = null;
|
||||
state.projectTasks = null;
|
||||
state.projectStudentsNum = null;
|
||||
state.projectPubLoading = false;
|
||||
state.releaseProjectId = null;
|
||||
};
|
||||
//打开撤回发布弹窗
|
||||
const showBackModal = (projectId) => {
|
||||
@@ -1184,7 +1200,7 @@ export default {
|
||||
message.success("模版保存成功");
|
||||
return;
|
||||
}
|
||||
Modal.error({title: res.data.msg})
|
||||
Modal.error({ title: res.data.msg });
|
||||
});
|
||||
};
|
||||
//关闭存为模版弹窗
|
||||
@@ -1314,15 +1330,21 @@ export default {
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
{value.record.type === 3 ? {
|
||||
'0': () => '草稿',
|
||||
'1': () => '草稿',
|
||||
'2': () => '草稿',
|
||||
'3': () => dayjs().isBefore(value.record.beginTime) ? '未开始' : '进行中',
|
||||
'4': () => dayjs().isBefore(value.record.end) ? '进行中' : '已结束',
|
||||
'-1': () => '已结束',
|
||||
'-5': () => '草稿'
|
||||
}[value.record.status + '']() || '' : '-'}
|
||||
{value.record.type === 3
|
||||
? {
|
||||
0: () => "草稿",
|
||||
1: () => "草稿",
|
||||
2: () => "草稿",
|
||||
3: () =>
|
||||
dayjs().isBefore(value.record.beginTime)
|
||||
? "未开始"
|
||||
: "进行中",
|
||||
4: () =>
|
||||
dayjs().isBefore(value.record.end) ? "进行中" : "已结束",
|
||||
"-1": () => "已结束",
|
||||
"-5": () => "草稿",
|
||||
}[value.record.status + ""]() || ""
|
||||
: "-"}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -1345,15 +1367,17 @@ export default {
|
||||
customRender: (value) => {
|
||||
return (
|
||||
<div>
|
||||
{value.record.type === 3 ? {
|
||||
'0': '未审核',
|
||||
'1': '审核中',
|
||||
'2': '已审核',
|
||||
'3': '已审核',
|
||||
'4': '已审核',
|
||||
'-1': '已审核',
|
||||
'-5': '拒绝'
|
||||
}[value.record.status + ''] || '' : '-'}
|
||||
{value.record.type === 3
|
||||
? {
|
||||
0: "未审核",
|
||||
1: "审核中",
|
||||
2: "已审核",
|
||||
3: "已审核",
|
||||
4: "已审核",
|
||||
"-1": "已审核",
|
||||
"-5": "拒绝",
|
||||
}[value.record.status + ""] || ""
|
||||
: "-"}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -1402,8 +1426,7 @@ export default {
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{(value.record.status === 0) &&
|
||||
value.record.type === 3 ? (
|
||||
{value.record.status === 0 && value.record.type === 3 ? (
|
||||
<span
|
||||
onClick={() => {
|
||||
showReviewModal(value.record.projectId);
|
||||
@@ -1432,7 +1455,8 @@ export default {
|
||||
{value.record.status === 2 && value.record.type === 3 ? (
|
||||
<span
|
||||
onClick={() => {
|
||||
let time = value.record.beginTime + "-" + value.record.endTime;
|
||||
let time =
|
||||
value.record.beginTime + "-" + value.record.endTime;
|
||||
let obj = {
|
||||
projectId: value.record.projectId,
|
||||
name: value.record.name,
|
||||
@@ -1535,7 +1559,8 @@ export default {
|
||||
path: "/projectadd",
|
||||
query: {
|
||||
parentId: value.record.projectId,
|
||||
parentName: value.record.parentName + '——' + value.record.name,
|
||||
parentName:
|
||||
value.record.parentName + "——" + value.record.name,
|
||||
},
|
||||
});
|
||||
}}
|
||||
@@ -1616,7 +1641,7 @@ export default {
|
||||
onClick={() => {
|
||||
router.push({
|
||||
path: "/taskpage",
|
||||
query: {projectId: value.record.projectId}
|
||||
query: { projectId: value.record.projectId },
|
||||
});
|
||||
storage.set("projectId", value.record.projectId);
|
||||
}}
|
||||
@@ -1664,7 +1689,10 @@ export default {
|
||||
data.forEach((e) => {
|
||||
e.parentName = parentName;
|
||||
e.key = e.projectId;
|
||||
initDataSublist((parentName ? (parentName + '——') : '') + e.name, e.subList);
|
||||
initDataSublist(
|
||||
(parentName ? parentName + "——" : "") + e.name,
|
||||
e.subList
|
||||
);
|
||||
e.subList && e.subList.length && (e.children = e.subList);
|
||||
});
|
||||
}
|
||||
@@ -1755,7 +1783,7 @@ export default {
|
||||
);
|
||||
|
||||
function managerChange(e, l, d) {
|
||||
state.projectInfo.sourceBelongId = d
|
||||
state.projectInfo.sourceBelongId = d;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user