fix:增加添加修改阶段动画

This commit is contained in:
lixg
2022-12-07 18:00:57 +08:00
parent dd7f2aed08
commit 878b91d547
4 changed files with 83 additions and 21 deletions

View File

@@ -168,6 +168,15 @@
</div>
</div>
</div>
<div
class="aeLoading"
:style="{ display: addLoading ? 'flex' : 'none' }"
>
<a-spin
:spinning="addLoading"
:tip="updateChapterID ? '修改中...' : '添加中...'"
/>
</div>
</a-modal>
<div class="right" :style="{ display: gqxy_hs ? 'block' : 'none' }">
<div class="addhead">
@@ -1202,6 +1211,8 @@ export default {
curLevel: null, //选择移动到的关卡名称
deleteType: null, //批量删除学员/任务 1任务 2学员
addLoading: false, //添加编辑关卡动画
});
const showModal = (element) => {
@@ -1223,6 +1234,7 @@ export default {
//新建关卡
const editChapter = () => {
if (!state.value1) return message.warning("请输入关卡名称");
state.addLoading = true;
if (state.updateChapterID) {
let obj = {
name: state.value1,
@@ -1235,6 +1247,7 @@ export default {
.then((res) => {
console.log("修改成功", res);
message.success("修改成功");
state.addLoading = false;
getDetail();
closeModal();
})
@@ -1262,6 +1275,7 @@ export default {
// state.createLoading = false;
//state.currentPage = 1;
// getLearnPath();
state.addLoading = false;
getDetail();
closeModal();
})
@@ -1421,7 +1435,7 @@ export default {
//给level赋初始值
state.level = res.data.data.chapterList;
state.styTitle = res.data.data.routerInfo.name;
state.creTime = res.data.data.routerInfo.createTime ;
state.creTime = res.data.data.routerInfo.createTime;
state.picUrl = res.data.data.routerInfo.picUrl;
//增加两个字段
state.level.forEach((item) => {