mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 12:26:47 +08:00
feat:增加项目的发布
This commit is contained in:
@@ -226,11 +226,13 @@
|
||||
<button class="samtn btn2" @click="createLearnPath">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="aeLoading" :style="{display:lpLoading?'flex':'none'}">
|
||||
<a-spin :spinning="lpLoading" tip="添加中..." />
|
||||
<div
|
||||
class="aeLoading"
|
||||
:style="{ display: lpLoading ? 'flex' : 'none' }"
|
||||
>
|
||||
<a-spin :spinning="lpLoading" tip="添加中..." />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</a-modal>
|
||||
|
||||
<!-- 编辑路径弹窗 -->
|
||||
@@ -590,7 +592,7 @@ import QueryRight from "../../components/drawers/QueryRight";
|
||||
import ManageRight from "../../components/drawers/ManageRight";
|
||||
import * as api from "../../api/index1";
|
||||
import { message } from "ant-design-vue";
|
||||
import { toDate,commonData } from "../../api/method";
|
||||
import { toDate, commonData } from "../../api/method";
|
||||
import { storage } from "../../api/storage";
|
||||
export default {
|
||||
name: "learningPath",
|
||||
@@ -721,7 +723,7 @@ export default {
|
||||
recallPathId: null, //撤回路径id
|
||||
stopPathId: null, //停用路径id
|
||||
|
||||
lpLoading:false,
|
||||
lpLoading: false,
|
||||
});
|
||||
|
||||
const selectProjectName = (value, index) => {
|
||||
@@ -1298,19 +1300,30 @@ export default {
|
||||
api
|
||||
.createLearnPath(obj)
|
||||
.then((res) => {
|
||||
// console.log("创建成功", res);
|
||||
// message.destroy();
|
||||
// message.success("创建成功");
|
||||
// router.push("/leveladd");
|
||||
setTimeout(() => {
|
||||
console.log("创建成功", res);
|
||||
message.destroy();
|
||||
message.success("创建成功");
|
||||
state.lpLoading = false;
|
||||
state.currentPage = 1;
|
||||
router.push("/leveladd");
|
||||
// getLearnPath();
|
||||
}, commonData.timeout);
|
||||
let chapterObj = {
|
||||
name: "关卡一",
|
||||
remark: "",
|
||||
routerId: res.data.data.routerId,
|
||||
};
|
||||
//创建关卡
|
||||
api
|
||||
.editChapter(chapterObj)
|
||||
.then((chapterRes) => {
|
||||
console.log("关卡创建成功", chapterRes);
|
||||
setTimeout(() => {
|
||||
console.log("创建成功", res);
|
||||
message.destroy();
|
||||
message.success("创建成功");
|
||||
state.lpLoading = false;
|
||||
state.currentPage = 1;
|
||||
router.push("/leveladd");
|
||||
storage.set("routerId", res.data.data.routerId);
|
||||
// getLearnPath();
|
||||
}, commonData.timeout);
|
||||
})
|
||||
.catch((chapterErr) => {
|
||||
console.log("关卡创建失败", chapterErr);
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败", err);
|
||||
|
||||
Reference in New Issue
Block a user