mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 03:46:45 +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 api from "../../api/index1";
|
||||||
import * as apiStu from "../../api/index";
|
import * as apiStu from "../../api/index";
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import { commonData } from "@/api/method";
|
|
||||||
import { storage } from "@/api/storage";
|
import { storage } from "@/api/storage";
|
||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
import OrgClass from "@/components/project/OrgClass";
|
import OrgClass from "@/components/project/OrgClass";
|
||||||
@@ -1220,49 +1219,19 @@ export default {
|
|||||||
return message.warning("项目名称重复,请重新填写");
|
return message.warning("项目名称重复,请重新填写");
|
||||||
}
|
}
|
||||||
state.lpLoading = true;
|
state.lpLoading = true;
|
||||||
let obj = {
|
api.createLearnPath({
|
||||||
name: state.pathName,
|
name: state.pathName,
|
||||||
remark: state.pathIntro,
|
remark: state.pathIntro,
|
||||||
status: 0,
|
status: 0,
|
||||||
organizationId: state.organizationSelectId,
|
organizationId: state.organizationSelectId,
|
||||||
organizationName: state.organizationSelectName,
|
organizationName: state.organizationSelectName,
|
||||||
picUrl: state.pathBg,
|
picUrl: state.pathBg,
|
||||||
};
|
}).then(id => {
|
||||||
api
|
message.destroy();
|
||||||
.createLearnPath(obj)
|
message.success("创建成功");
|
||||||
.then((res) => {
|
state.lpLoading = false;
|
||||||
console.log("创建学习路径成功", res);
|
router.push( {path: "/leveladd",query:{routerId: id }})
|
||||||
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);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
|
||||||
console.log("创建失败", err);
|
|
||||||
// state.createLoading = false;
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//获取学习路径列表
|
//获取学习路径列表
|
||||||
@@ -1536,8 +1505,8 @@ export default {
|
|||||||
function manage(id) {
|
function manage(id) {
|
||||||
router.push({
|
router.push({
|
||||||
path: "/leveladd",
|
path: "/leveladd",
|
||||||
|
query:{routerId:id}
|
||||||
});
|
});
|
||||||
storage.set("routerId", id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const getLearnPathInfo = (id) => {
|
const getLearnPathInfo = (id) => {
|
||||||
|
|||||||
@@ -1354,7 +1354,6 @@
|
|||||||
import { ref, reactive, toRefs, onMounted, createVNode, watch } from "vue";
|
import { ref, reactive, toRefs, onMounted, createVNode, watch } from "vue";
|
||||||
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
||||||
import { message, Modal } from "ant-design-vue";
|
import { message, Modal } from "ant-design-vue";
|
||||||
// import PathAddStu from "../../components/drawers/pathStuAdd";
|
|
||||||
import ProjCheckShip from "../../components/drawers/ProjCheckPower";
|
import ProjCheckShip from "../../components/drawers/ProjCheckPower";
|
||||||
import ImpStu from "../../components/drawers/AddLevelImportStu";
|
import ImpStu from "../../components/drawers/AddLevelImportStu";
|
||||||
import CheckStu from "../../components/drawers/CheckStu";
|
import CheckStu from "../../components/drawers/CheckStu";
|
||||||
@@ -1365,20 +1364,15 @@ import TestManage from "../../components/drawers/TestManage";
|
|||||||
import FaceManage from "../../components/drawers/FaceManage";
|
import FaceManage from "../../components/drawers/FaceManage";
|
||||||
import WorkManage from "../../components/drawers/WorkManage";
|
import WorkManage from "../../components/drawers/WorkManage";
|
||||||
import SeeStu from "../../components/drawers/SeeStu";
|
import SeeStu from "../../components/drawers/SeeStu";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter,useRoute } from "vue-router";
|
||||||
// import { useStore } from "vuex";
|
|
||||||
import { storage } from "../../api/storage";
|
|
||||||
import { getRouterOverview } from "@/api/indexLearningPath";
|
import { getRouterOverview } from "@/api/indexLearningPath";
|
||||||
import { handleLearnPath } from "../../api/index1";
|
import { handleLearnPath } from "../../api/index1";
|
||||||
import { GetRouterDetail } from "@/api/indexTask";
|
import { GetRouterDetail } from "@/api/indexTask";
|
||||||
import * as api from "../../api/index1";
|
import * as api from "../../api/index1";
|
||||||
import { editRoutered } from "../../api/indexLearningPath";
|
import { editRoutered } from "../../api/indexLearningPath";
|
||||||
// import { codeUrl } from "../../api/method";
|
|
||||||
import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue";
|
import TwoDimensionalCode from "../../components/TwoDimensionalCode.vue";
|
||||||
import TableStudent from "@/components/student/TableStudent";
|
import TableStudent from "@/components/student/TableStudent";
|
||||||
// import * as student from "@/api/student";
|
|
||||||
import { getStuPage, moveStudent } from "@/api/index1";
|
import { getStuPage, moveStudent } from "@/api/index1";
|
||||||
|
|
||||||
import RouterFaceTeachManage from "../../components/drawers/router/RouterFaceTeachManage";
|
import RouterFaceTeachManage from "../../components/drawers/router/RouterFaceTeachManage";
|
||||||
import RouterExaminationManage from "../../components/drawers/router/RouterExaminationManage";
|
import RouterExaminationManage from "../../components/drawers/router/RouterExaminationManage";
|
||||||
import RouterExaminationExternalManage from "../../components/drawers/router/RouterExaminationExternalManage";
|
import RouterExaminationExternalManage from "../../components/drawers/router/RouterExaminationExternalManage";
|
||||||
@@ -1417,15 +1411,15 @@ export default {
|
|||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
// const store = useStore();
|
// const store = useStore();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
permissions: "",
|
permissions: "",
|
||||||
hasTask: false,
|
hasTask: false,
|
||||||
stage: [],
|
stage: [],
|
||||||
statess: [],
|
statess: [],
|
||||||
routerId: storage.get("routerId")
|
routerId: route.query.routerId, //学习路径页面传的学习路径id
|
||||||
? JSON.parse(storage.get("routerId"))
|
|
||||||
: null, //学习路径页面传的学习路径id
|
|
||||||
gatename: null, //关卡名称
|
gatename: null, //关卡名称
|
||||||
gatenamee: null, //学员管理关卡名称
|
gatenamee: null, //学员管理关卡名称
|
||||||
action: null,
|
action: null,
|
||||||
|
|||||||
Reference in New Issue
Block a user