mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-17 14:56:46 +08:00
--fix bug
This commit is contained in:
@@ -717,7 +717,6 @@ import ProjCheckShip from "../../components/drawers/ProjCheckPower";
|
||||
import * as api from "../../api/index1";
|
||||
import * as apiStu from "../../api/index";
|
||||
import { message } from "ant-design-vue";
|
||||
import { commonData } from "@/api/method";
|
||||
import { storage } from "@/api/storage";
|
||||
import { useStore } from "vuex";
|
||||
import OrgClass from "@/components/project/OrgClass";
|
||||
@@ -1220,49 +1219,19 @@ export default {
|
||||
return message.warning("项目名称重复,请重新填写");
|
||||
}
|
||||
state.lpLoading = true;
|
||||
let obj = {
|
||||
api.createLearnPath({
|
||||
name: state.pathName,
|
||||
remark: state.pathIntro,
|
||||
status: 0,
|
||||
organizationId: state.organizationSelectId,
|
||||
organizationName: state.organizationSelectName,
|
||||
picUrl: state.pathBg,
|
||||
};
|
||||
api
|
||||
.createLearnPath(obj)
|
||||
.then((res) => {
|
||||
console.log("创建学习路径成功", res);
|
||||
if (res.data.code === 200) {
|
||||
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);
|
||||
});
|
||||
}
|
||||
}).then(id => {
|
||||
message.destroy();
|
||||
message.success("创建成功");
|
||||
state.lpLoading = false;
|
||||
router.push( {path: "/leveladd",query:{routerId: id }})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败", err);
|
||||
// state.createLoading = false;
|
||||
});
|
||||
};
|
||||
|
||||
//获取学习路径列表
|
||||
@@ -1536,8 +1505,8 @@ export default {
|
||||
function manage(id) {
|
||||
router.push({
|
||||
path: "/leveladd",
|
||||
query:{routerId:id}
|
||||
});
|
||||
storage.set("routerId", id);
|
||||
}
|
||||
|
||||
const getLearnPathInfo = (id) => {
|
||||
|
||||
Reference in New Issue
Block a user