From cecb5377d9b0bfcdb52c5880edc4fba3dff2a0db Mon Sep 17 00:00:00 2001 From: lixg Date: Mon, 7 Nov 2022 20:15:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=9A=84=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 14 +- src/views/learningpath/LearningPath.vue | 51 +- src/views/projectcenter/ProjectManage.vue | 6476 ++++++++++++--------- 3 files changed, 3626 insertions(+), 2915 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 883c6a74..b0db5ad7 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,3 +1,11 @@ +/* + * @Author: lixg lixg@dongwu-inc.com + * @Date: 2022-11-07 17:06:45 + * @LastEditors: lixg lixg@dongwu-inc.com + * @LastEditTime: 2022-11-07 20:11:23 + * @FilePath: /fe-manage/src/api/index.js + * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + */ import http from "./config"; // import qs from 'qs'; @@ -44,4 +52,8 @@ export const createProject = (obj) => http.post('/admin/project/edit', obj) export const getProjectList = (obj) => http.post('/admin/project/list', obj) // 获取项目详情信息(包含阶段及任务列表) -export const getProjectDetail = (obj) => http.get('/admin/project/detail', { params: obj }) \ No newline at end of file +export const getProjectDetail = (obj) => http.get('/admin/project/detail', { params: obj }) +//发布项目 +export const releaseProject=(obj)=>http.post('/admin/project/publish',obj) +//获取项目学员 +export const projectStudent=(obj)=>http.post('/admin/project/studentList',obj) \ No newline at end of file diff --git a/src/views/learningpath/LearningPath.vue b/src/views/learningpath/LearningPath.vue index 66b1263e..8b02c597 100644 --- a/src/views/learningpath/LearningPath.vue +++ b/src/views/learningpath/LearningPath.vue @@ -226,11 +226,13 @@ -
- +
+ +
- - @@ -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); diff --git a/src/views/projectcenter/ProjectManage.vue b/src/views/projectcenter/ProjectManage.vue index e7afb705..085f353d 100644 --- a/src/views/projectcenter/ProjectManage.vue +++ b/src/views/projectcenter/ProjectManage.vue @@ -1,56 +1,92 @@